@@ -130,6 +130,17 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
130130 * <code>IN_TRANSIT_LOCATION_RESTRICTION = 4;</code>
131131 */
132132 IN_TRANSIT_LOCATION_RESTRICTION (4 ),
133+ /**
134+ *
135+ *
136+ * <pre>
137+ * Cannot write to the Cloud Storage bucket due to an incompatibility
138+ * between the topic schema and subscription settings.
139+ * </pre>
140+ *
141+ * <code>SCHEMA_MISMATCH = 5;</code>
142+ */
143+ SCHEMA_MISMATCH (5 ),
133144 UNRECOGNIZED (-1 ),
134145 ;
135146
@@ -185,6 +196,17 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
185196 * <code>IN_TRANSIT_LOCATION_RESTRICTION = 4;</code>
186197 */
187198 public static final int IN_TRANSIT_LOCATION_RESTRICTION_VALUE = 4 ;
199+ /**
200+ *
201+ *
202+ * <pre>
203+ * Cannot write to the Cloud Storage bucket due to an incompatibility
204+ * between the topic schema and subscription settings.
205+ * </pre>
206+ *
207+ * <code>SCHEMA_MISMATCH = 5;</code>
208+ */
209+ public static final int SCHEMA_MISMATCH_VALUE = 5 ;
188210
189211 public final int getNumber () {
190212 if (this == UNRECOGNIZED ) {
@@ -220,6 +242,8 @@ public static State forNumber(int value) {
220242 return NOT_FOUND ;
221243 case 4 :
222244 return IN_TRANSIT_LOCATION_RESTRICTION ;
245+ case 5 :
246+ return SCHEMA_MISMATCH ;
223247 default :
224248 return null ;
225249 }
@@ -721,6 +745,20 @@ public interface AvroConfigOrBuilder
721745 * @return The writeMetadata.
722746 */
723747 boolean getWriteMetadata ();
748+
749+ /**
750+ *
751+ *
752+ * <pre>
753+ * Optional. When true, the output Cloud Storage file will be serialized
754+ * using the topic schema, if it exists.
755+ * </pre>
756+ *
757+ * <code>bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
758+ *
759+ * @return The useTopicSchema.
760+ */
761+ boolean getUseTopicSchema ();
724762 }
725763 /**
726764 *
@@ -788,6 +826,25 @@ public boolean getWriteMetadata() {
788826 return writeMetadata_ ;
789827 }
790828
829+ public static final int USE_TOPIC_SCHEMA_FIELD_NUMBER = 2 ;
830+ private boolean useTopicSchema_ = false ;
831+ /**
832+ *
833+ *
834+ * <pre>
835+ * Optional. When true, the output Cloud Storage file will be serialized
836+ * using the topic schema, if it exists.
837+ * </pre>
838+ *
839+ * <code>bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
840+ *
841+ * @return The useTopicSchema.
842+ */
843+ @ java .lang .Override
844+ public boolean getUseTopicSchema () {
845+ return useTopicSchema_ ;
846+ }
847+
791848 private byte memoizedIsInitialized = -1 ;
792849
793850 @ java .lang .Override
@@ -805,6 +862,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
805862 if (writeMetadata_ != false ) {
806863 output .writeBool (1 , writeMetadata_ );
807864 }
865+ if (useTopicSchema_ != false ) {
866+ output .writeBool (2 , useTopicSchema_ );
867+ }
808868 getUnknownFields ().writeTo (output );
809869 }
810870
@@ -817,6 +877,9 @@ public int getSerializedSize() {
817877 if (writeMetadata_ != false ) {
818878 size += com .google .protobuf .CodedOutputStream .computeBoolSize (1 , writeMetadata_ );
819879 }
880+ if (useTopicSchema_ != false ) {
881+ size += com .google .protobuf .CodedOutputStream .computeBoolSize (2 , useTopicSchema_ );
882+ }
820883 size += getUnknownFields ().getSerializedSize ();
821884 memoizedSize = size ;
822885 return size ;
@@ -834,6 +897,7 @@ public boolean equals(final java.lang.Object obj) {
834897 (com .google .pubsub .v1 .CloudStorageConfig .AvroConfig ) obj ;
835898
836899 if (getWriteMetadata () != other .getWriteMetadata ()) return false ;
900+ if (getUseTopicSchema () != other .getUseTopicSchema ()) return false ;
837901 if (!getUnknownFields ().equals (other .getUnknownFields ())) return false ;
838902 return true ;
839903 }
@@ -847,6 +911,8 @@ public int hashCode() {
847911 hash = (19 * hash ) + getDescriptor ().hashCode ();
848912 hash = (37 * hash ) + WRITE_METADATA_FIELD_NUMBER ;
849913 hash = (53 * hash ) + com .google .protobuf .Internal .hashBoolean (getWriteMetadata ());
914+ hash = (37 * hash ) + USE_TOPIC_SCHEMA_FIELD_NUMBER ;
915+ hash = (53 * hash ) + com .google .protobuf .Internal .hashBoolean (getUseTopicSchema ());
850916 hash = (29 * hash ) + getUnknownFields ().hashCode ();
851917 memoizedHashCode = hash ;
852918 return hash ;
@@ -990,6 +1056,7 @@ public Builder clear() {
9901056 super .clear ();
9911057 bitField0_ = 0 ;
9921058 writeMetadata_ = false ;
1059+ useTopicSchema_ = false ;
9931060 return this ;
9941061 }
9951062
@@ -1029,6 +1096,9 @@ private void buildPartial0(com.google.pubsub.v1.CloudStorageConfig.AvroConfig re
10291096 if (((from_bitField0_ & 0x00000001 ) != 0 )) {
10301097 result .writeMetadata_ = writeMetadata_ ;
10311098 }
1099+ if (((from_bitField0_ & 0x00000002 ) != 0 )) {
1100+ result .useTopicSchema_ = useTopicSchema_ ;
1101+ }
10321102 }
10331103
10341104 @ java .lang .Override
@@ -1082,6 +1152,9 @@ public Builder mergeFrom(com.google.pubsub.v1.CloudStorageConfig.AvroConfig othe
10821152 if (other .getWriteMetadata () != false ) {
10831153 setWriteMetadata (other .getWriteMetadata ());
10841154 }
1155+ if (other .getUseTopicSchema () != false ) {
1156+ setUseTopicSchema (other .getUseTopicSchema ());
1157+ }
10851158 this .mergeUnknownFields (other .getUnknownFields ());
10861159 onChanged ();
10871160 return this ;
@@ -1114,6 +1187,12 @@ public Builder mergeFrom(
11141187 bitField0_ |= 0x00000001 ;
11151188 break ;
11161189 } // case 8
1190+ case 16 :
1191+ {
1192+ useTopicSchema_ = input .readBool ();
1193+ bitField0_ |= 0x00000002 ;
1194+ break ;
1195+ } // case 16
11171196 default :
11181197 {
11191198 if (!super .parseUnknownField (input , extensionRegistry , tag )) {
@@ -1201,6 +1280,62 @@ public Builder clearWriteMetadata() {
12011280 return this ;
12021281 }
12031282
1283+ private boolean useTopicSchema_ ;
1284+ /**
1285+ *
1286+ *
1287+ * <pre>
1288+ * Optional. When true, the output Cloud Storage file will be serialized
1289+ * using the topic schema, if it exists.
1290+ * </pre>
1291+ *
1292+ * <code>bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
1293+ *
1294+ * @return The useTopicSchema.
1295+ */
1296+ @ java .lang .Override
1297+ public boolean getUseTopicSchema () {
1298+ return useTopicSchema_ ;
1299+ }
1300+ /**
1301+ *
1302+ *
1303+ * <pre>
1304+ * Optional. When true, the output Cloud Storage file will be serialized
1305+ * using the topic schema, if it exists.
1306+ * </pre>
1307+ *
1308+ * <code>bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
1309+ *
1310+ * @param value The useTopicSchema to set.
1311+ * @return This builder for chaining.
1312+ */
1313+ public Builder setUseTopicSchema (boolean value ) {
1314+
1315+ useTopicSchema_ = value ;
1316+ bitField0_ |= 0x00000002 ;
1317+ onChanged ();
1318+ return this ;
1319+ }
1320+ /**
1321+ *
1322+ *
1323+ * <pre>
1324+ * Optional. When true, the output Cloud Storage file will be serialized
1325+ * using the topic schema, if it exists.
1326+ * </pre>
1327+ *
1328+ * <code>bool use_topic_schema = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
1329+ *
1330+ * @return This builder for chaining.
1331+ */
1332+ public Builder clearUseTopicSchema () {
1333+ bitField0_ = (bitField0_ & ~0x00000002 );
1334+ useTopicSchema_ = false ;
1335+ onChanged ();
1336+ return this ;
1337+ }
1338+
12041339 @ java .lang .Override
12051340 public final Builder setUnknownFields (
12061341 final com .google .protobuf .UnknownFieldSet unknownFields ) {
0 commit comments