Skip to content
This repository was archived by the owner on Sep 16, 2023. It is now read-only.

Commit ee07847

Browse files
chore(bazel): update protobuf to v3.21.7 (#721)
- [ ] Regenerate this pull request now. PiperOrigin-RevId: 477955264 Source-Link: https://togithub.com/googleapis/googleapis/commit/a724450af76d0001f23602684c49cd6a4b3a5654 Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/4abcbcaec855e74a0b22a4988cf9e0eb61a83094 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNGFiY2JjYWVjODU1ZTc0YTBiMjJhNDk4OGNmOWUwZWI2MWE4MzA5NCJ9
1 parent 027bd87 commit ee07847

File tree

5 files changed

+332
-542
lines changed

5 files changed

+332
-542
lines changed

proto-google-cloud-mediatranslation-v1beta1/src/main/java/com/google/cloud/mediatranslation/v1beta1/StreamingTranslateSpeechConfig.java

Lines changed: 51 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -51,68 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5151
return this.unknownFields;
5252
}
5353

54-
private StreamingTranslateSpeechConfig(
55-
com.google.protobuf.CodedInputStream input,
56-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
57-
throws com.google.protobuf.InvalidProtocolBufferException {
58-
this();
59-
if (extensionRegistry == null) {
60-
throw new java.lang.NullPointerException();
61-
}
62-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
63-
com.google.protobuf.UnknownFieldSet.newBuilder();
64-
try {
65-
boolean done = false;
66-
while (!done) {
67-
int tag = input.readTag();
68-
switch (tag) {
69-
case 0:
70-
done = true;
71-
break;
72-
case 10:
73-
{
74-
com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig.Builder subBuilder =
75-
null;
76-
if (audioConfig_ != null) {
77-
subBuilder = audioConfig_.toBuilder();
78-
}
79-
audioConfig_ =
80-
input.readMessage(
81-
com.google.cloud.mediatranslation.v1beta1.TranslateSpeechConfig.parser(),
82-
extensionRegistry);
83-
if (subBuilder != null) {
84-
subBuilder.mergeFrom(audioConfig_);
85-
audioConfig_ = subBuilder.buildPartial();
86-
}
87-
88-
break;
89-
}
90-
case 16:
91-
{
92-
singleUtterance_ = input.readBool();
93-
break;
94-
}
95-
default:
96-
{
97-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
98-
done = true;
99-
}
100-
break;
101-
}
102-
}
103-
}
104-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
105-
throw e.setUnfinishedMessage(this);
106-
} catch (com.google.protobuf.UninitializedMessageException e) {
107-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
108-
} catch (java.io.IOException e) {
109-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
110-
} finally {
111-
this.unknownFields = unknownFields.build();
112-
makeExtensionsImmutable();
113-
}
114-
}
115-
11654
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
11755
return com.google.cloud.mediatranslation.v1beta1.MediaTranslationProto
11856
.internal_static_google_cloud_mediatranslation_v1beta1_StreamingTranslateSpeechConfig_descriptor;
@@ -233,7 +171,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
233171
if (singleUtterance_ != false) {
234172
output.writeBool(2, singleUtterance_);
235173
}
236-
unknownFields.writeTo(output);
174+
getUnknownFields().writeTo(output);
237175
}
238176

239177
@java.lang.Override
@@ -248,7 +186,7 @@ public int getSerializedSize() {
248186
if (singleUtterance_ != false) {
249187
size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, singleUtterance_);
250188
}
251-
size += unknownFields.getSerializedSize();
189+
size += getUnknownFields().getSerializedSize();
252190
memoizedSize = size;
253191
return size;
254192
}
@@ -270,7 +208,7 @@ public boolean equals(final java.lang.Object obj) {
270208
if (!getAudioConfig().equals(other.getAudioConfig())) return false;
271209
}
272210
if (getSingleUtterance() != other.getSingleUtterance()) return false;
273-
if (!unknownFields.equals(other.unknownFields)) return false;
211+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
274212
return true;
275213
}
276214

@@ -287,7 +225,7 @@ public int hashCode() {
287225
}
288226
hash = (37 * hash) + SINGLE_UTTERANCE_FIELD_NUMBER;
289227
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSingleUtterance());
290-
hash = (29 * hash) + unknownFields.hashCode();
228+
hash = (29 * hash) + getUnknownFields().hashCode();
291229
memoizedHashCode = hash;
292230
return hash;
293231
}
@@ -420,17 +358,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
420358

421359
// Construct using
422360
// com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig.newBuilder()
423-
private Builder() {
424-
maybeForceBuilderInitialization();
425-
}
361+
private Builder() {}
426362

427363
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
428364
super(parent);
429-
maybeForceBuilderInitialization();
430-
}
431-
432-
private void maybeForceBuilderInitialization() {
433-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
434365
}
435366

436367
@java.lang.Override
@@ -540,7 +471,7 @@ public Builder mergeFrom(
540471
if (other.getSingleUtterance() != false) {
541472
setSingleUtterance(other.getSingleUtterance());
542473
}
543-
this.mergeUnknownFields(other.unknownFields);
474+
this.mergeUnknownFields(other.getUnknownFields());
544475
onChanged();
545476
return this;
546477
}
@@ -555,19 +486,43 @@ public Builder mergeFrom(
555486
com.google.protobuf.CodedInputStream input,
556487
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
557488
throws java.io.IOException {
558-
com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig parsedMessage = null;
489+
if (extensionRegistry == null) {
490+
throw new java.lang.NullPointerException();
491+
}
559492
try {
560-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
493+
boolean done = false;
494+
while (!done) {
495+
int tag = input.readTag();
496+
switch (tag) {
497+
case 0:
498+
done = true;
499+
break;
500+
case 10:
501+
{
502+
input.readMessage(getAudioConfigFieldBuilder().getBuilder(), extensionRegistry);
503+
504+
break;
505+
} // case 10
506+
case 16:
507+
{
508+
singleUtterance_ = input.readBool();
509+
510+
break;
511+
} // case 16
512+
default:
513+
{
514+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
515+
done = true; // was an endgroup tag
516+
}
517+
break;
518+
} // default:
519+
} // switch (tag)
520+
} // while (!done)
561521
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
562-
parsedMessage =
563-
(com.google.cloud.mediatranslation.v1beta1.StreamingTranslateSpeechConfig)
564-
e.getUnfinishedMessage();
565522
throw e.unwrapIOException();
566523
} finally {
567-
if (parsedMessage != null) {
568-
mergeFrom(parsedMessage);
569-
}
570-
}
524+
onChanged();
525+
} // finally
571526
return this;
572527
}
573528

@@ -903,7 +858,18 @@ public StreamingTranslateSpeechConfig parsePartialFrom(
903858
com.google.protobuf.CodedInputStream input,
904859
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
905860
throws com.google.protobuf.InvalidProtocolBufferException {
906-
return new StreamingTranslateSpeechConfig(input, extensionRegistry);
861+
Builder builder = newBuilder();
862+
try {
863+
builder.mergeFrom(input, extensionRegistry);
864+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
865+
throw e.setUnfinishedMessage(builder.buildPartial());
866+
} catch (com.google.protobuf.UninitializedMessageException e) {
867+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
868+
} catch (java.io.IOException e) {
869+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
870+
.setUnfinishedMessage(builder.buildPartial());
871+
}
872+
return builder.buildPartial();
907873
}
908874
};
909875

0 commit comments

Comments
 (0)