@@ -130,6 +130,17 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
130
130
* <code>IN_TRANSIT_LOCATION_RESTRICTION = 4;</code>
131
131
*/
132
132
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 ),
133
144
UNRECOGNIZED (-1 ),
134
145
;
135
146
@@ -185,6 +196,17 @@ public enum State implements com.google.protobuf.ProtocolMessageEnum {
185
196
* <code>IN_TRANSIT_LOCATION_RESTRICTION = 4;</code>
186
197
*/
187
198
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 ;
188
210
189
211
public final int getNumber () {
190
212
if (this == UNRECOGNIZED ) {
@@ -220,6 +242,8 @@ public static State forNumber(int value) {
220
242
return NOT_FOUND ;
221
243
case 4 :
222
244
return IN_TRANSIT_LOCATION_RESTRICTION ;
245
+ case 5 :
246
+ return SCHEMA_MISMATCH ;
223
247
default :
224
248
return null ;
225
249
}
@@ -721,6 +745,20 @@ public interface AvroConfigOrBuilder
721
745
* @return The writeMetadata.
722
746
*/
723
747
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 ();
724
762
}
725
763
/**
726
764
*
@@ -788,6 +826,25 @@ public boolean getWriteMetadata() {
788
826
return writeMetadata_ ;
789
827
}
790
828
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
+
791
848
private byte memoizedIsInitialized = -1 ;
792
849
793
850
@ java .lang .Override
@@ -805,6 +862,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
805
862
if (writeMetadata_ != false ) {
806
863
output .writeBool (1 , writeMetadata_ );
807
864
}
865
+ if (useTopicSchema_ != false ) {
866
+ output .writeBool (2 , useTopicSchema_ );
867
+ }
808
868
getUnknownFields ().writeTo (output );
809
869
}
810
870
@@ -817,6 +877,9 @@ public int getSerializedSize() {
817
877
if (writeMetadata_ != false ) {
818
878
size += com .google .protobuf .CodedOutputStream .computeBoolSize (1 , writeMetadata_ );
819
879
}
880
+ if (useTopicSchema_ != false ) {
881
+ size += com .google .protobuf .CodedOutputStream .computeBoolSize (2 , useTopicSchema_ );
882
+ }
820
883
size += getUnknownFields ().getSerializedSize ();
821
884
memoizedSize = size ;
822
885
return size ;
@@ -834,6 +897,7 @@ public boolean equals(final java.lang.Object obj) {
834
897
(com .google .pubsub .v1 .CloudStorageConfig .AvroConfig ) obj ;
835
898
836
899
if (getWriteMetadata () != other .getWriteMetadata ()) return false ;
900
+ if (getUseTopicSchema () != other .getUseTopicSchema ()) return false ;
837
901
if (!getUnknownFields ().equals (other .getUnknownFields ())) return false ;
838
902
return true ;
839
903
}
@@ -847,6 +911,8 @@ public int hashCode() {
847
911
hash = (19 * hash ) + getDescriptor ().hashCode ();
848
912
hash = (37 * hash ) + WRITE_METADATA_FIELD_NUMBER ;
849
913
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 ());
850
916
hash = (29 * hash ) + getUnknownFields ().hashCode ();
851
917
memoizedHashCode = hash ;
852
918
return hash ;
@@ -990,6 +1056,7 @@ public Builder clear() {
990
1056
super .clear ();
991
1057
bitField0_ = 0 ;
992
1058
writeMetadata_ = false ;
1059
+ useTopicSchema_ = false ;
993
1060
return this ;
994
1061
}
995
1062
@@ -1029,6 +1096,9 @@ private void buildPartial0(com.google.pubsub.v1.CloudStorageConfig.AvroConfig re
1029
1096
if (((from_bitField0_ & 0x00000001 ) != 0 )) {
1030
1097
result .writeMetadata_ = writeMetadata_ ;
1031
1098
}
1099
+ if (((from_bitField0_ & 0x00000002 ) != 0 )) {
1100
+ result .useTopicSchema_ = useTopicSchema_ ;
1101
+ }
1032
1102
}
1033
1103
1034
1104
@ java .lang .Override
@@ -1082,6 +1152,9 @@ public Builder mergeFrom(com.google.pubsub.v1.CloudStorageConfig.AvroConfig othe
1082
1152
if (other .getWriteMetadata () != false ) {
1083
1153
setWriteMetadata (other .getWriteMetadata ());
1084
1154
}
1155
+ if (other .getUseTopicSchema () != false ) {
1156
+ setUseTopicSchema (other .getUseTopicSchema ());
1157
+ }
1085
1158
this .mergeUnknownFields (other .getUnknownFields ());
1086
1159
onChanged ();
1087
1160
return this ;
@@ -1114,6 +1187,12 @@ public Builder mergeFrom(
1114
1187
bitField0_ |= 0x00000001 ;
1115
1188
break ;
1116
1189
} // case 8
1190
+ case 16 :
1191
+ {
1192
+ useTopicSchema_ = input .readBool ();
1193
+ bitField0_ |= 0x00000002 ;
1194
+ break ;
1195
+ } // case 16
1117
1196
default :
1118
1197
{
1119
1198
if (!super .parseUnknownField (input , extensionRegistry , tag )) {
@@ -1201,6 +1280,62 @@ public Builder clearWriteMetadata() {
1201
1280
return this ;
1202
1281
}
1203
1282
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
+
1204
1339
@ java .lang .Override
1205
1340
public final Builder setUnknownFields (
1206
1341
final com .google .protobuf .UnknownFieldSet unknownFields ) {
0 commit comments