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

Commit 7ce24ea

Browse files
chore(bazel): update protobuf to v3.21.7 (#1022)
- [ ] 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 e15150a commit 7ce24ea

File tree

321 files changed

+23215
-35013
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

321 files changed

+23215
-35013
lines changed

proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java

Lines changed: 51 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
5353
return this.unknownFields;
5454
}
5555

56-
private AddProductToProductSetRequest(
57-
com.google.protobuf.CodedInputStream input,
58-
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
59-
throws com.google.protobuf.InvalidProtocolBufferException {
60-
this();
61-
if (extensionRegistry == null) {
62-
throw new java.lang.NullPointerException();
63-
}
64-
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
65-
com.google.protobuf.UnknownFieldSet.newBuilder();
66-
try {
67-
boolean done = false;
68-
while (!done) {
69-
int tag = input.readTag();
70-
switch (tag) {
71-
case 0:
72-
done = true;
73-
break;
74-
case 10:
75-
{
76-
java.lang.String s = input.readStringRequireUtf8();
77-
78-
name_ = s;
79-
break;
80-
}
81-
case 18:
82-
{
83-
java.lang.String s = input.readStringRequireUtf8();
84-
85-
product_ = s;
86-
break;
87-
}
88-
default:
89-
{
90-
if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
91-
done = true;
92-
}
93-
break;
94-
}
95-
}
96-
}
97-
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
98-
throw e.setUnfinishedMessage(this);
99-
} catch (com.google.protobuf.UninitializedMessageException e) {
100-
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
101-
} catch (java.io.IOException e) {
102-
throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
103-
} finally {
104-
this.unknownFields = unknownFields.build();
105-
makeExtensionsImmutable();
106-
}
107-
}
108-
10956
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
11057
return com.google.cloud.vision.v1.ProductSearchServiceProto
11158
.internal_static_google_cloud_vision_v1_AddProductToProductSetRequest_descriptor;
@@ -255,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
255202
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) {
256203
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, product_);
257204
}
258-
unknownFields.writeTo(output);
205+
getUnknownFields().writeTo(output);
259206
}
260207

261208
@java.lang.Override
@@ -270,7 +217,7 @@ public int getSerializedSize() {
270217
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(product_)) {
271218
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, product_);
272219
}
273-
size += unknownFields.getSerializedSize();
220+
size += getUnknownFields().getSerializedSize();
274221
memoizedSize = size;
275222
return size;
276223
}
@@ -288,7 +235,7 @@ public boolean equals(final java.lang.Object obj) {
288235

289236
if (!getName().equals(other.getName())) return false;
290237
if (!getProduct().equals(other.getProduct())) return false;
291-
if (!unknownFields.equals(other.unknownFields)) return false;
238+
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
292239
return true;
293240
}
294241

@@ -303,7 +250,7 @@ public int hashCode() {
303250
hash = (53 * hash) + getName().hashCode();
304251
hash = (37 * hash) + PRODUCT_FIELD_NUMBER;
305252
hash = (53 * hash) + getProduct().hashCode();
306-
hash = (29 * hash) + unknownFields.hashCode();
253+
hash = (29 * hash) + getUnknownFields().hashCode();
307254
memoizedHashCode = hash;
308255
return hash;
309256
}
@@ -433,17 +380,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
433380
}
434381

435382
// Construct using com.google.cloud.vision.v1.AddProductToProductSetRequest.newBuilder()
436-
private Builder() {
437-
maybeForceBuilderInitialization();
438-
}
383+
private Builder() {}
439384

440385
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
441386
super(parent);
442-
maybeForceBuilderInitialization();
443-
}
444-
445-
private void maybeForceBuilderInitialization() {
446-
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
447387
}
448388

449389
@java.lang.Override
@@ -540,7 +480,7 @@ public Builder mergeFrom(com.google.cloud.vision.v1.AddProductToProductSetReques
540480
product_ = other.product_;
541481
onChanged();
542482
}
543-
this.mergeUnknownFields(other.unknownFields);
483+
this.mergeUnknownFields(other.getUnknownFields());
544484
onChanged();
545485
return this;
546486
}
@@ -555,18 +495,43 @@ public Builder mergeFrom(
555495
com.google.protobuf.CodedInputStream input,
556496
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
557497
throws java.io.IOException {
558-
com.google.cloud.vision.v1.AddProductToProductSetRequest parsedMessage = null;
498+
if (extensionRegistry == null) {
499+
throw new java.lang.NullPointerException();
500+
}
559501
try {
560-
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
502+
boolean done = false;
503+
while (!done) {
504+
int tag = input.readTag();
505+
switch (tag) {
506+
case 0:
507+
done = true;
508+
break;
509+
case 10:
510+
{
511+
name_ = input.readStringRequireUtf8();
512+
513+
break;
514+
} // case 10
515+
case 18:
516+
{
517+
product_ = input.readStringRequireUtf8();
518+
519+
break;
520+
} // case 18
521+
default:
522+
{
523+
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
524+
done = true; // was an endgroup tag
525+
}
526+
break;
527+
} // default:
528+
} // switch (tag)
529+
} // while (!done)
561530
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
562-
parsedMessage =
563-
(com.google.cloud.vision.v1.AddProductToProductSetRequest) e.getUnfinishedMessage();
564531
throw e.unwrapIOException();
565532
} finally {
566-
if (parsedMessage != null) {
567-
mergeFrom(parsedMessage);
568-
}
569-
}
533+
onChanged();
534+
} // finally
570535
return this;
571536
}
572537

@@ -854,7 +819,18 @@ public AddProductToProductSetRequest parsePartialFrom(
854819
com.google.protobuf.CodedInputStream input,
855820
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
856821
throws com.google.protobuf.InvalidProtocolBufferException {
857-
return new AddProductToProductSetRequest(input, extensionRegistry);
822+
Builder builder = newBuilder();
823+
try {
824+
builder.mergeFrom(input, extensionRegistry);
825+
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
826+
throw e.setUnfinishedMessage(builder.buildPartial());
827+
} catch (com.google.protobuf.UninitializedMessageException e) {
828+
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
829+
} catch (java.io.IOException e) {
830+
throw new com.google.protobuf.InvalidProtocolBufferException(e)
831+
.setUnfinishedMessage(builder.buildPartial());
832+
}
833+
return builder.buildPartial();
858834
}
859835
};
860836

0 commit comments

Comments
 (0)