diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java index a745dd186d79..37101634ba4f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AddProductToProductSetRequest.java @@ -67,7 +67,7 @@ private AddProductToProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -244,11 +244,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1.AddProductToProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getProduct().equals(other.getProduct()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -447,35 +446,35 @@ public com.google.cloud.vision.v1.AddProductToProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -739,7 +738,7 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java index 117b8fc9aa76..2238fb2d6a26 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateFileResponse.java @@ -69,7 +69,7 @@ private AnnotateFileResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -82,7 +82,7 @@ private AnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -94,7 +94,7 @@ private AnnotateFileResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -275,14 +275,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AnnotateFileResponse other = (com.google.cloud.vision.v1.AnnotateFileResponse) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -495,7 +494,7 @@ public com.google.cloud.vision.v1.AnnotateFileResponse buildPartial() { result.inputConfig_ = inputConfigBuilder_.build(); } if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -510,35 +509,35 @@ public com.google.cloud.vision.v1.AnnotateFileResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -615,7 +614,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, @@ -800,7 +799,7 @@ public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList(responses_); bitField0_ |= 0x00000002; @@ -1142,10 +1141,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuil com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -1153,7 +1149,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuil @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java index 08e0f4d477ac..dfac62d46331 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageRequest.java @@ -68,7 +68,7 @@ private AnnotateImageRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -95,7 +95,7 @@ private AnnotateImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -107,7 +107,7 @@ private AnnotateImageRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -332,18 +332,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AnnotateImageRequest other = (com.google.cloud.vision.v1.AnnotateImageRequest) obj; - boolean result = true; - result = result && (hasImage() == other.hasImage()); + if (hasImage() != other.hasImage()) return false; if (hasImage()) { - result = result && getImage().equals(other.getImage()); + if (!getImage().equals(other.getImage())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -566,7 +565,7 @@ public com.google.cloud.vision.v1.AnnotateImageRequest buildPartial() { result.image_ = imageBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -586,35 +585,35 @@ public com.google.cloud.vision.v1.AnnotateImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -694,7 +693,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.Image image_ = null; + private com.google.cloud.vision.v1.Image image_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.Image, com.google.cloud.vision.v1.Image.Builder, @@ -873,7 +872,7 @@ public com.google.cloud.vision.v1.ImageOrBuilder getImageOrBuilder() { java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1211,16 +1210,13 @@ public java.util.List getFeaturesBui com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, @@ -1404,7 +1400,7 @@ public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java index e4d2d3d32335..8d620488964c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AnnotateImageResponse.java @@ -57,7 +57,7 @@ private AnnotateImageResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -69,7 +69,7 @@ private AnnotateImageResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -81,7 +81,7 @@ private AnnotateImageResponse( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -93,7 +93,7 @@ private AnnotateImageResponse( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -105,7 +105,7 @@ private AnnotateImageResponse( } case 42: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { textAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000020; @@ -244,7 +244,7 @@ private AnnotateImageResponse( } case 178: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -257,7 +257,7 @@ private AnnotateImageResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -269,22 +269,22 @@ private AnnotateImageResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); } @@ -1194,51 +1194,48 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AnnotateImageResponse other = (com.google.cloud.vision.v1.AnnotateImageResponse) obj; - boolean result = true; - result = result && getFaceAnnotationsList().equals(other.getFaceAnnotationsList()); - result = result && getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList()); - result = result && getLogoAnnotationsList().equals(other.getLogoAnnotationsList()); - result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList()); - result = - result - && getLocalizedObjectAnnotationsList() - .equals(other.getLocalizedObjectAnnotationsList()); - result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList()); - result = result && (hasFullTextAnnotation() == other.hasFullTextAnnotation()); + if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false; + if (!getLocalizedObjectAnnotationsList().equals(other.getLocalizedObjectAnnotationsList())) + return false; + if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; if (hasFullTextAnnotation()) { - result = result && getFullTextAnnotation().equals(other.getFullTextAnnotation()); + if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false; } - result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation()); + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; if (hasSafeSearchAnnotation()) { - result = result && getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation()); + if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false; } - result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation()); + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; if (hasImagePropertiesAnnotation()) { - result = - result && getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation()); + if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation())) + return false; } - result = result && (hasCropHintsAnnotation() == other.hasCropHintsAnnotation()); + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; if (hasCropHintsAnnotation()) { - result = result && getCropHintsAnnotation().equals(other.getCropHintsAnnotation()); + if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false; } - result = result && (hasWebDetection() == other.hasWebDetection()); + if (hasWebDetection() != other.hasWebDetection()) return false; if (hasWebDetection()) { - result = result && getWebDetection().equals(other.getWebDetection()); + if (!getWebDetection().equals(other.getWebDetection())) return false; } - result = result && (hasProductSearchResults() == other.hasProductSearchResults()); + if (hasProductSearchResults() != other.hasProductSearchResults()) return false; if (hasProductSearchResults()) { - result = result && getProductSearchResults().equals(other.getProductSearchResults()); + if (!getProductSearchResults().equals(other.getProductSearchResults())) return false; } - result = result && (hasError() == other.hasError()); + if (hasError() != other.hasError()) return false; if (hasError()) { - result = result && getError().equals(other.getError()); + if (!getError().equals(other.getError())) return false; } - result = result && (hasContext() == other.hasContext()); + if (hasContext() != other.hasContext()) return false; if (hasContext()) { - result = result && getContext().equals(other.getContext()); + if (!getContext().equals(other.getContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1570,7 +1567,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -1579,7 +1576,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { result.faceAnnotations_ = faceAnnotationsBuilder_.build(); } if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1588,7 +1585,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); } if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -1597,7 +1594,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { result.logoAnnotations_ = logoAnnotationsBuilder_.build(); } if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -1606,7 +1603,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { result.labelAnnotations_ = labelAnnotationsBuilder_.build(); } if (localizedObjectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); bitField0_ = (bitField0_ & ~0x00000010); @@ -1616,7 +1613,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); } if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -1671,35 +1668,35 @@ public com.google.cloud.vision.v1.AnnotateImageResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1936,7 +1933,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList(faceAnnotations_); bitField0_ |= 0x00000001; @@ -2279,7 +2276,7 @@ public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuild com.google.cloud.vision.v1.FaceAnnotation.Builder, com.google.cloud.vision.v1.FaceAnnotationOrBuilder>( faceAnnotations_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); faceAnnotations_ = null; @@ -2291,7 +2288,7 @@ public com.google.cloud.vision.v1.FaceAnnotation.Builder addFaceAnnotationsBuild java.util.Collections.emptyList(); private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList( landmarkAnnotations_); @@ -2640,7 +2637,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotation com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( landmarkAnnotations_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); landmarkAnnotations_ = null; @@ -2652,7 +2649,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addLandmarkAnnotation java.util.Collections.emptyList(); private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList(logoAnnotations_); bitField0_ |= 0x00000004; @@ -2999,7 +2996,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBui com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( logoAnnotations_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); logoAnnotations_ = null; @@ -3011,7 +3008,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addLogoAnnotationsBui java.util.Collections.emptyList(); private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList(labelAnnotations_); bitField0_ |= 0x00000008; @@ -3358,7 +3355,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBu com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( labelAnnotations_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); labelAnnotations_ = null; @@ -3370,7 +3367,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addLabelAnnotationsBu localizedObjectAnnotations_ = java.util.Collections.emptyList(); private void ensureLocalizedObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = new java.util.ArrayList( localizedObjectAnnotations_); @@ -3777,7 +3774,7 @@ public Builder removeLocalizedObjectAnnotations(int index) { com.google.cloud.vision.v1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1.LocalizedObjectAnnotationOrBuilder>( localizedObjectAnnotations_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); localizedObjectAnnotations_ = null; @@ -3789,7 +3786,7 @@ public Builder removeLocalizedObjectAnnotations(int index) { java.util.Collections.emptyList(); private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { textAnnotations_ = new java.util.ArrayList(textAnnotations_); bitField0_ |= 0x00000020; @@ -4136,7 +4133,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBui com.google.cloud.vision.v1.EntityAnnotation.Builder, com.google.cloud.vision.v1.EntityAnnotationOrBuilder>( textAnnotations_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); textAnnotations_ = null; @@ -4144,7 +4141,7 @@ public com.google.cloud.vision.v1.EntityAnnotation.Builder addTextAnnotationsBui return textAnnotationsBuilder_; } - private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_ = null; + private com.google.cloud.vision.v1.TextAnnotation fullTextAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation, com.google.cloud.vision.v1.TextAnnotation.Builder, @@ -4353,7 +4350,7 @@ public com.google.cloud.vision.v1.TextAnnotationOrBuilder getFullTextAnnotationO return fullTextAnnotationBuilder_; } - private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_ = null; + private com.google.cloud.vision.v1.SafeSearchAnnotation safeSearchAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.SafeSearchAnnotation, com.google.cloud.vision.v1.SafeSearchAnnotation.Builder, @@ -4538,7 +4535,7 @@ public Builder clearSafeSearchAnnotation() { return safeSearchAnnotationBuilder_; } - private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_ = null; + private com.google.cloud.vision.v1.ImageProperties imagePropertiesAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ImageProperties, com.google.cloud.vision.v1.ImageProperties.Builder, @@ -4723,7 +4720,7 @@ public Builder clearImagePropertiesAnnotation() { return imagePropertiesAnnotationBuilder_; } - private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_ = null; + private com.google.cloud.vision.v1.CropHintsAnnotation cropHintsAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.CropHintsAnnotation, com.google.cloud.vision.v1.CropHintsAnnotation.Builder, @@ -4906,7 +4903,7 @@ public com.google.cloud.vision.v1.CropHintsAnnotation.Builder getCropHintsAnnota return cropHintsAnnotationBuilder_; } - private com.google.cloud.vision.v1.WebDetection webDetection_ = null; + private com.google.cloud.vision.v1.WebDetection webDetection_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.WebDetection, com.google.cloud.vision.v1.WebDetection.Builder, @@ -5088,7 +5085,7 @@ public com.google.cloud.vision.v1.WebDetectionOrBuilder getWebDetectionOrBuilder return webDetectionBuilder_; } - private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_ = null; + private com.google.cloud.vision.v1.ProductSearchResults productSearchResults_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ProductSearchResults, com.google.cloud.vision.v1.ProductSearchResults.Builder, @@ -5273,7 +5270,7 @@ public Builder clearProductSearchResults() { return productSearchResultsBuilder_; } - private com.google.rpc.Status error_ = null; + private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; @@ -5460,7 +5457,7 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return errorBuilder_; } - private com.google.cloud.vision.v1.ImageAnnotationContext context_ = null; + private com.google.cloud.vision.v1.ImageAnnotationContext context_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ImageAnnotationContext, com.google.cloud.vision.v1.ImageAnnotationContext.Builder, @@ -5653,7 +5650,7 @@ public com.google.cloud.vision.v1.ImageAnnotationContextOrBuilder getContextOrBu @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java index 31b924a527ec..a3fdc9f12984 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileRequest.java @@ -68,7 +68,7 @@ private AsyncAnnotateFileRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -111,7 +111,7 @@ private AsyncAnnotateFileRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -123,7 +123,7 @@ private AsyncAnnotateFileRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -397,22 +397,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1.AsyncAnnotateFileRequest) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -644,7 +643,7 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileRequest buildPartial() { result.inputConfig_ = inputConfigBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -669,35 +668,35 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -781,7 +780,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.InputConfig, com.google.cloud.vision.v1.InputConfig.Builder, @@ -966,7 +965,7 @@ public com.google.cloud.vision.v1.InputConfigOrBuilder getInputConfigOrBuilder() java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1304,16 +1303,13 @@ public java.util.List getFeaturesBui com.google.cloud.vision.v1.Feature, com.google.cloud.vision.v1.Feature.Builder, com.google.cloud.vision.v1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ImageContext, com.google.cloud.vision.v1.ImageContext.Builder, @@ -1495,7 +1491,7 @@ public com.google.cloud.vision.v1.ImageContextOrBuilder getImageContextOrBuilder return imageContextBuilder_; } - private com.google.cloud.vision.v1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, @@ -1679,7 +1675,7 @@ public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java index b35016f85034..cfc6ee07fdb8 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncAnnotateFileResponse.java @@ -66,7 +66,7 @@ private AsyncAnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -184,13 +184,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1.AsyncAnnotateFileResponse) obj; - boolean result = true; - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -393,35 +392,35 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -470,7 +469,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.OutputConfig, com.google.cloud.vision.v1.OutputConfig.Builder, @@ -654,7 +653,7 @@ public com.google.cloud.vision.v1.OutputConfigOrBuilder getOutputConfigOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java index a47e33c10a19..df27407d8348 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesRequest.java @@ -54,7 +54,7 @@ private AsyncBatchAnnotateFilesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -67,7 +67,7 @@ private AsyncBatchAnnotateFilesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -79,7 +79,7 @@ private AsyncBatchAnnotateFilesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -212,10 +212,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -413,7 +412,7 @@ public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest buildPartial() new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -427,35 +426,35 @@ public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -534,7 +533,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList(requests_); bitField0_ |= 0x00000001; @@ -881,10 +880,7 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder addRequestsBu com.google.cloud.vision.v1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -892,7 +888,7 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileRequest.Builder addRequestsBu @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java index 384465f40d32..a234e70e5ad9 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/AsyncBatchAnnotateFilesResponse.java @@ -53,7 +53,7 @@ private AsyncBatchAnnotateFilesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -66,7 +66,7 @@ private AsyncBatchAnnotateFilesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private AsyncBatchAnnotateFilesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -216,10 +216,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -416,7 +415,7 @@ public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse buildPartial() new com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -430,35 +429,35 @@ public com.google.cloud.vision.v1.AsyncBatchAnnotateFilesResponse buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -537,7 +536,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -903,10 +902,7 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder addResponses com.google.cloud.vision.v1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -914,7 +910,7 @@ public com.google.cloud.vision.v1.AsyncAnnotateFileResponse.Builder addResponses @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java index 0869e2df480a..726ca0643cd0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesRequest.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -64,7 +64,7 @@ private BatchAnnotateImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -76,7 +76,7 @@ private BatchAnnotateImagesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -208,10 +208,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1.BatchAnnotateImagesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -408,7 +407,7 @@ public com.google.cloud.vision.v1.BatchAnnotateImagesRequest buildPartial() { new com.google.cloud.vision.v1.BatchAnnotateImagesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -422,35 +421,35 @@ public com.google.cloud.vision.v1.BatchAnnotateImagesRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -529,7 +528,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList(requests_); bitField0_ |= 0x00000001; @@ -871,10 +870,7 @@ public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilde com.google.cloud.vision.v1.AnnotateImageRequest, com.google.cloud.vision.v1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -882,7 +878,7 @@ public com.google.cloud.vision.v1.AnnotateImageRequest.Builder addRequestsBuilde @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java index 8d6654a514b0..e94f59a5135c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchAnnotateImagesResponse.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -65,7 +65,7 @@ private BatchAnnotateImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -77,7 +77,7 @@ private BatchAnnotateImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -210,10 +210,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1.BatchAnnotateImagesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -410,7 +409,7 @@ public com.google.cloud.vision.v1.BatchAnnotateImagesResponse buildPartial() { new com.google.cloud.vision.v1.BatchAnnotateImagesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -424,35 +423,35 @@ public com.google.cloud.vision.v1.BatchAnnotateImagesResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -531,7 +530,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList(responses_); bitField0_ |= 0x00000001; @@ -873,10 +872,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuil com.google.cloud.vision.v1.AnnotateImageResponse, com.google.cloud.vision.v1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -884,7 +880,7 @@ public com.google.cloud.vision.v1.AnnotateImageResponse.Builder addResponsesBuil @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java index 7b9ccc16af1b..e7b6d34a63e7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BatchOperationMetadata.java @@ -91,7 +91,7 @@ private BatchOperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -495,18 +495,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.BatchOperationMetadata other = (com.google.cloud.vision.v1.BatchOperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasSubmitTime() == other.hasSubmitTime()); + if (state_ != other.state_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; if (hasSubmitTime()) { - result = result && getSubmitTime().equals(other.getSubmitTime()); + if (!getSubmitTime().equals(other.getSubmitTime())) return false; } - result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime() != other.hasEndTime()) return false; if (hasEndTime()) { - result = result && getEndTime().equals(other.getEndTime()); + if (!getEndTime().equals(other.getEndTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -731,35 +730,35 @@ public com.google.cloud.vision.v1.BatchOperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -892,7 +891,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp submitTime_ = null; + private com.google.protobuf.Timestamp submitTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1071,7 +1070,7 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { return submitTimeBuilder_; } - private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.Timestamp endTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1266,7 +1265,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java index 51ca4d9e7654..401de5cdab27 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Block.java @@ -25,7 +25,6 @@ private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Block() { paragraphs_ = java.util.Collections.emptyList(); blockType_ = 0; - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Block( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -110,7 +109,7 @@ private Block( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -122,7 +121,7 @@ private Block( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); } this.unknownFields = unknownFields.build(); @@ -657,23 +656,20 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Block other = (com.google.cloud.vision.v1.Block) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getParagraphsList().equals(other.getParagraphsList()); - result = result && blockType_ == other.blockType_; - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList().equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -906,7 +902,7 @@ public com.google.cloud.vision.v1.Block buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -923,35 +919,35 @@ public com.google.cloud.vision.v1.Block buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1036,7 +1032,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, @@ -1218,7 +1214,7 @@ public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getProper return propertyBuilder_; } - private com.google.cloud.vision.v1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1529,7 +1525,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder( java.util.Collections.emptyList(); private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(paragraphs_); bitField0_ |= 0x00000004; } @@ -1867,10 +1863,7 @@ public java.util.List getParagraph com.google.cloud.vision.v1.Paragraph, com.google.cloud.vision.v1.Paragraph.Builder, com.google.cloud.vision.v1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + paragraphs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); paragraphs_ = null; } return paragraphsBuilder_; @@ -1998,7 +1991,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java index a51e0f7978d7..2838d1748787 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/BoundingPoly.java @@ -53,7 +53,7 @@ private BoundingPoly( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private BoundingPoly( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -75,7 +75,7 @@ private BoundingPoly( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -87,10 +87,10 @@ private BoundingPoly( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); } this.unknownFields = unknownFields.build(); @@ -293,11 +293,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.BoundingPoly other = (com.google.cloud.vision.v1.BoundingPoly) obj; - boolean result = true; - result = result && getVerticesList().equals(other.getVerticesList()); - result = result && getNormalizedVerticesList().equals(other.getNormalizedVerticesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -504,7 +503,7 @@ public com.google.cloud.vision.v1.BoundingPoly buildPartial() { new com.google.cloud.vision.v1.BoundingPoly(this); int from_bitField0_ = bitField0_; if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -513,7 +512,7 @@ public com.google.cloud.vision.v1.BoundingPoly buildPartial() { result.vertices_ = verticesBuilder_.build(); } if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -527,35 +526,35 @@ public com.google.cloud.vision.v1.BoundingPoly buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -659,7 +658,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(vertices_); bitField0_ |= 0x00000001; } @@ -997,10 +996,7 @@ public java.util.List getVerticesBuil com.google.cloud.vision.v1.Vertex, com.google.cloud.vision.v1.Vertex.Builder, com.google.cloud.vision.v1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); vertices_ = null; } return verticesBuilder_; @@ -1010,7 +1006,7 @@ public java.util.List getVerticesBuil java.util.Collections.emptyList(); private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList( normalizedVertices_); @@ -1358,7 +1354,7 @@ public com.google.cloud.vision.v1.NormalizedVertex.Builder addNormalizedVertices com.google.cloud.vision.v1.NormalizedVertex.Builder, com.google.cloud.vision.v1.NormalizedVertexOrBuilder>( normalizedVertices_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); normalizedVertices_ = null; @@ -1368,7 +1364,7 @@ public com.google.cloud.vision.v1.NormalizedVertex.Builder addNormalizedVertices @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java index 2943a4181ff7..46e0828f6c66 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ColorInfo.java @@ -23,10 +23,7 @@ private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ColorInfo() { - score_ = 0F; - pixelFraction_ = 0F; - } + private ColorInfo() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -78,7 +75,7 @@ private ColorInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -236,21 +233,16 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.ColorInfo other = (com.google.cloud.vision.v1.ColorInfo) obj; - boolean result = true; - result = result && (hasColor() == other.hasColor()); + if (hasColor() != other.hasColor()) return false; if (hasColor()) { - result = result && getColor().equals(other.getColor()); + if (!getColor().equals(other.getColor())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getPixelFraction()) - == java.lang.Float.floatToIntBits(other.getPixelFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits(other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -462,35 +454,35 @@ public com.google.cloud.vision.v1.ColorInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -543,7 +535,7 @@ public Builder mergeFrom( return this; } - private com.google.type.Color color_ = null; + private com.google.type.Color color_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; @@ -805,7 +797,7 @@ public Builder clearPixelFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java index 76b9de67ff0c..da9ba645f905 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductRequest.java @@ -82,7 +82,7 @@ private CreateProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -306,15 +306,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.CreateProductRequest other = (com.google.cloud.vision.v1.CreateProductRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasProduct() == other.hasProduct()); + if (!getParent().equals(other.getParent())) return false; + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); + if (!getProduct().equals(other.getProduct())) return false; } - result = result && getProductId().equals(other.getProductId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductId().equals(other.getProductId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -527,35 +526,35 @@ public com.google.cloud.vision.v1.CreateProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -715,7 +714,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1.Product product_ = null; + private com.google.cloud.vision.v1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, @@ -1007,7 +1006,7 @@ public Builder setProductIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java index 2a9c27f70fb1..10f3d0c0c800 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateProductSetRequest.java @@ -83,7 +83,7 @@ private CreateProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -307,15 +307,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.CreateProductSetRequest other = (com.google.cloud.vision.v1.CreateProductSetRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasProductSet() == other.hasProductSet()); + if (!getParent().equals(other.getParent())) return false; + if (hasProductSet() != other.hasProductSet()) return false; if (hasProductSet()) { - result = result && getProductSet().equals(other.getProductSet()); + if (!getProductSet().equals(other.getProductSet())) return false; } - result = result && getProductSetId().equals(other.getProductSetId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSetId().equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -528,35 +527,35 @@ public com.google.cloud.vision.v1.CreateProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -712,7 +711,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1.ProductSet productSet_ = null; + private com.google.cloud.vision.v1.ProductSet productSet_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, @@ -1004,7 +1003,7 @@ public Builder setProductSetIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java index 86cc16c03967..1875cb6f52ff 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CreateReferenceImageRequest.java @@ -83,7 +83,7 @@ private CreateReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -312,15 +312,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1.CreateReferenceImageRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasReferenceImage() == other.hasReferenceImage()); + if (!getParent().equals(other.getParent())) return false; + if (hasReferenceImage() != other.hasReferenceImage()) return false; if (hasReferenceImage()) { - result = result && getReferenceImage().equals(other.getReferenceImage()); + if (!getReferenceImage().equals(other.getReferenceImage())) return false; } - result = result && getReferenceImageId().equals(other.getReferenceImageId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImageId().equals(other.getReferenceImageId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -534,35 +533,35 @@ public com.google.cloud.vision.v1.CreateReferenceImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -723,7 +722,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1.ReferenceImage referenceImage_ = null; + private com.google.cloud.vision.v1.ReferenceImage referenceImage_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ReferenceImage, com.google.cloud.vision.v1.ReferenceImage.Builder, @@ -1025,7 +1024,7 @@ public Builder setReferenceImageIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java index adffd13dd3ed..8dc272c1870b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHint.java @@ -22,10 +22,7 @@ private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CropHint() { - confidence_ = 0F; - importanceFraction_ = 0F; - } + private CropHint() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -79,7 +76,7 @@ private CropHint( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -242,21 +239,16 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.CropHint other = (com.google.cloud.vision.v1.CropHint) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getImportanceFraction()) - == java.lang.Float.floatToIntBits(other.getImportanceFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits(other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -467,35 +459,35 @@ public com.google.cloud.vision.v1.CropHint buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -548,7 +540,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -832,7 +824,7 @@ public Builder clearImportanceFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java index fdb1dccc496f..cdfa37e86fb7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsAnnotation.java @@ -52,7 +52,7 @@ private CropHintsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private CropHintsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private CropHintsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.CropHintsAnnotation other = (com.google.cloud.vision.v1.CropHintsAnnotation) obj; - boolean result = true; - result = result && getCropHintsList().equals(other.getCropHintsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCropHintsList().equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -406,7 +405,7 @@ public com.google.cloud.vision.v1.CropHintsAnnotation buildPartial() { new com.google.cloud.vision.v1.CropHintsAnnotation(this); int from_bitField0_ = bitField0_; if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -420,35 +419,35 @@ public com.google.cloud.vision.v1.CropHintsAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -525,7 +524,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(cropHints_); bitField0_ |= 0x00000001; } @@ -863,10 +862,7 @@ public java.util.List getCropHintsB com.google.cloud.vision.v1.CropHint, com.google.cloud.vision.v1.CropHint.Builder, com.google.cloud.vision.v1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + cropHints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); cropHints_ = null; } return cropHintsBuilder_; @@ -874,7 +870,7 @@ public java.util.List getCropHintsB @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java index c26e9dda2d12..b6734d381a75 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/CropHintsParams.java @@ -23,7 +23,7 @@ private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builde } private CropHintsParams() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); } @java.lang.Override @@ -52,31 +52,30 @@ private CropHintsParams( break; case 13: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) - && input.getBytesUntilLimit() > 0) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); } input.popLimit(limit); break; } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -88,8 +87,8 @@ private CropHintsParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -112,7 +111,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private java.util.List aspectRatios_; + private com.google.protobuf.Internal.FloatList aspectRatios_; /** * * @@ -162,7 +161,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } private int aspectRatiosMemoizedSerializedSize = -1; @@ -187,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); } for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.get(i)); + output.writeFloatNoTag(aspectRatios_.getFloat(i)); } unknownFields.writeTo(output); } @@ -224,10 +223,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.CropHintsParams other = (com.google.cloud.vision.v1.CropHintsParams) obj; - boolean result = true; - result = result && getAspectRatiosList().equals(other.getAspectRatiosList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getAspectRatiosList().equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -386,7 +384,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -416,8 +414,8 @@ public com.google.cloud.vision.v1.CropHintsParams buildPartial() { com.google.cloud.vision.v1.CropHintsParams result = new com.google.cloud.vision.v1.CropHintsParams(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.aspectRatios_ = aspectRatios_; @@ -427,35 +425,35 @@ public com.google.cloud.vision.v1.CropHintsParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -511,11 +509,11 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List aspectRatios_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(aspectRatios_); + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); bitField0_ |= 0x00000001; } } @@ -534,7 +532,9 @@ private void ensureAspectRatiosIsMutable() { * repeated float aspect_ratios = 1; */ public java.util.List getAspectRatiosList() { - return java.util.Collections.unmodifiableList(aspectRatios_); + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(aspectRatios_) + : aspectRatios_; } /** * @@ -568,7 +568,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } /** * @@ -586,7 +586,7 @@ public float getAspectRatios(int index) { */ public Builder setAspectRatios(int index, float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.set(index, value); + aspectRatios_.setFloat(index, value); onChanged(); return this; } @@ -606,7 +606,7 @@ public Builder setAspectRatios(int index, float value) { */ public Builder addAspectRatios(float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.add(value); + aspectRatios_.addFloat(value); onChanged(); return this; } @@ -645,7 +645,7 @@ public Builder addAllAspectRatios(java.lang.Iterable * repeated float aspect_ratios = 1; */ public Builder clearAspectRatios() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -653,7 +653,7 @@ public Builder clearAspectRatios() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java index fee23d1cf661..cbef7c101df7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductRequest.java @@ -59,7 +59,7 @@ private DeleteProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.DeleteProductRequest other = (com.google.cloud.vision.v1.DeleteProductRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1.DeleteProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -562,7 +561,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java index da1783664e2e..9c8f4d84c62a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteProductSetRequest.java @@ -59,7 +59,7 @@ private DeleteProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.DeleteProductSetRequest other = (com.google.cloud.vision.v1.DeleteProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1.DeleteProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -563,7 +562,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java index 7955732c1733..b006f5312554 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DeleteReferenceImageRequest.java @@ -59,7 +59,7 @@ private DeleteReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1.DeleteReferenceImageRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1.DeleteReferenceImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java index c6338a013fbc..894ca5066931 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/DominantColorsAnnotation.java @@ -52,7 +52,7 @@ private DominantColorsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private DominantColorsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private DominantColorsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.DominantColorsAnnotation other = (com.google.cloud.vision.v1.DominantColorsAnnotation) obj; - boolean result = true; - result = result && getColorsList().equals(other.getColorsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getColorsList().equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -406,7 +405,7 @@ public com.google.cloud.vision.v1.DominantColorsAnnotation buildPartial() { new com.google.cloud.vision.v1.DominantColorsAnnotation(this); int from_bitField0_ = bitField0_; if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -420,35 +419,35 @@ public com.google.cloud.vision.v1.DominantColorsAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -527,7 +526,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(colors_); bitField0_ |= 0x00000001; } @@ -865,10 +864,7 @@ public java.util.List getColorsBui com.google.cloud.vision.v1.ColorInfo, com.google.cloud.vision.v1.ColorInfo.Builder, com.google.cloud.vision.v1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + colors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); colors_ = null; } return colorsBuilder_; @@ -876,7 +872,7 @@ public java.util.List getColorsBui @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java index 7a2285fadf07..c9a517875e19 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/EntityAnnotation.java @@ -26,9 +26,6 @@ private EntityAnnotation() { mid_ = ""; locale_ = ""; description_ = ""; - score_ = 0F; - confidence_ = 0F; - topicality_ = 0F; locations_ = java.util.Collections.emptyList(); properties_ = java.util.Collections.emptyList(); } @@ -111,7 +108,7 @@ private EntityAnnotation( } case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000080; } @@ -122,7 +119,7 @@ private EntityAnnotation( } case 74: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } @@ -133,7 +130,7 @@ private EntityAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -145,10 +142,10 @@ private EntityAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); } this.unknownFields = unknownFields.build(); @@ -651,30 +648,23 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.EntityAnnotation other = (com.google.cloud.vision.v1.EntityAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLocale().equals(other.getLocale()); - result = result && getDescription().equals(other.getDescription()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getTopicality()) - == java.lang.Float.floatToIntBits(other.getTopicality())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLocale().equals(other.getLocale())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits(other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getLocationsList().equals(other.getLocationsList()); - result = result && getPropertiesList().equals(other.getPropertiesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -927,7 +917,7 @@ public com.google.cloud.vision.v1.EntityAnnotation buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000080); } @@ -936,7 +926,7 @@ public com.google.cloud.vision.v1.EntityAnnotation buildPartial() { result.locations_ = locationsBuilder_.build(); } if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); bitField0_ = (bitField0_ & ~0x00000100); } @@ -951,35 +941,35 @@ public com.google.cloud.vision.v1.EntityAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1559,7 +1549,7 @@ public Builder clearTopicality() { return this; } - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1754,7 +1744,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder java.util.Collections.emptyList(); private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(locations_); bitField0_ |= 0x00000080; } @@ -2165,10 +2155,7 @@ public com.google.cloud.vision.v1.LocationInfo.Builder addLocationsBuilder(int i com.google.cloud.vision.v1.LocationInfo, com.google.cloud.vision.v1.LocationInfo.Builder, com.google.cloud.vision.v1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); + locations_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; @@ -2178,7 +2165,7 @@ public com.google.cloud.vision.v1.LocationInfo.Builder addLocationsBuilder(int i java.util.Collections.emptyList(); private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(properties_); bitField0_ |= 0x00000100; } @@ -2534,10 +2521,7 @@ public java.util.List getProperties com.google.cloud.vision.v1.Property, com.google.cloud.vision.v1.Property.Builder, com.google.cloud.vision.v1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000100) == 0x00000100), - getParentForChildren(), - isClean()); + properties_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; @@ -2545,7 +2529,7 @@ public java.util.List getProperties @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java index 99eb95875670..f274ed4df83f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/FaceAnnotation.java @@ -24,11 +24,6 @@ private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder private FaceAnnotation() { landmarks_ = java.util.Collections.emptyList(); - rollAngle_ = 0F; - panAngle_ = 0F; - tiltAngle_ = 0F; - detectionConfidence_ = 0F; - landmarkingConfidence_ = 0F; joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; @@ -96,7 +91,7 @@ private FaceAnnotation( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -183,7 +178,7 @@ private FaceAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -195,7 +190,7 @@ private FaceAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); } this.unknownFields = unknownFields.build(); @@ -347,7 +342,7 @@ private Landmark( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1359,14 +1354,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1.FaceAnnotation.Landmark) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (hasPosition() == other.hasPosition()); + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { - result = result && getPosition().equals(other.getPosition()); + if (!getPosition().equals(other.getPosition())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1576,23 +1570,23 @@ public com.google.cloud.vision.v1.FaceAnnotation.Landmark buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1600,13 +1594,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1736,7 +1730,7 @@ public Builder clearType() { return this; } - private com.google.cloud.vision.v1.Position position_ = null; + private com.google.cloud.vision.v1.Position position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.Position, com.google.cloud.vision.v1.Position.Builder, @@ -1920,7 +1914,7 @@ public com.google.cloud.vision.v1.PositionOrBuilder getPositionOrBuilder() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2569,45 +2563,34 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.FaceAnnotation other = (com.google.cloud.vision.v1.FaceAnnotation) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && (hasFdBoundingPoly() == other.hasFdBoundingPoly()); + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; if (hasFdBoundingPoly()) { - result = result && getFdBoundingPoly().equals(other.getFdBoundingPoly()); - } - result = result && getLandmarksList().equals(other.getLandmarksList()); - result = - result - && (java.lang.Float.floatToIntBits(getRollAngle()) - == java.lang.Float.floatToIntBits(other.getRollAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getPanAngle()) - == java.lang.Float.floatToIntBits(other.getPanAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getTiltAngle()) - == java.lang.Float.floatToIntBits(other.getTiltAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getDetectionConfidence()) - == java.lang.Float.floatToIntBits(other.getDetectionConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - == java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())); - result = result && joyLikelihood_ == other.joyLikelihood_; - result = result && sorrowLikelihood_ == other.sorrowLikelihood_; - result = result && angerLikelihood_ == other.angerLikelihood_; - result = result && surpriseLikelihood_ == other.surpriseLikelihood_; - result = result && underExposedLikelihood_ == other.underExposedLikelihood_; - result = result && blurredLikelihood_ == other.blurredLikelihood_; - result = result && headwearLikelihood_ == other.headwearLikelihood_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList().equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits(other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits(other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2882,7 +2865,7 @@ public com.google.cloud.vision.v1.FaceAnnotation buildPartial() { result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); } if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -2909,35 +2892,35 @@ public com.google.cloud.vision.v1.FaceAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3052,7 +3035,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -3288,7 +3271,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder return boundingPolyBuilder_; } - private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly fdBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -3519,7 +3502,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getFdBoundingPolyOrBuild java.util.Collections.emptyList(); private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList(landmarks_); bitField0_ |= 0x00000004; @@ -3866,10 +3849,7 @@ public com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder addLandmarksBu com.google.cloud.vision.v1.FaceAnnotation.Landmark, com.google.cloud.vision.v1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); landmarks_ = null; } return landmarksBuilder_; @@ -4644,7 +4624,7 @@ public Builder clearHeadwearLikelihood() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java index 5c95dedc970a..4fc944fc51e3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Feature.java @@ -26,7 +26,6 @@ private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Feature() { type_ = 0; - maxResults_ = 0; model_ = ""; } @@ -75,7 +74,7 @@ private Feature( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -631,12 +630,11 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Feature other = (com.google.cloud.vision.v1.Feature) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getMaxResults() == other.getMaxResults()); - result = result && getModel().equals(other.getModel()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getMaxResults() != other.getMaxResults()) return false; + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -839,35 +837,35 @@ public com.google.cloud.vision.v1.Feature buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1150,7 +1148,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java index a6b8d513828b..cb50a9b98315 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsDestination.java @@ -59,7 +59,7 @@ private GcsDestination( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -201,10 +201,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.GcsDestination other = (com.google.cloud.vision.v1.GcsDestination) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -397,35 +396,35 @@ public com.google.cloud.vision.v1.GcsDestination buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -624,7 +623,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java index bc858f4e9061..023be392c26a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GcsSource.java @@ -59,7 +59,7 @@ private GcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -180,10 +180,9 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.GcsSource other = (com.google.cloud.vision.v1.GcsSource) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -374,35 +373,35 @@ public com.google.cloud.vision.v1.GcsSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -551,7 +550,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequest.java index fc301d2eb84d..250f50f07c75 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductRequest.java @@ -59,7 +59,7 @@ private GetProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.GetProductRequest other = (com.google.cloud.vision.v1.GetProductRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1.GetProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -561,7 +560,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java index 0ce0aec3f09b..a4a4eaa486e3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetProductSetRequest.java @@ -59,7 +59,7 @@ private GetProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.GetProductSetRequest other = (com.google.cloud.vision.v1.GetProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1.GetProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -562,7 +561,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java index a8e5a9ef61df..29565933e878 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/GetReferenceImageRequest.java @@ -59,7 +59,7 @@ private GetReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.GetReferenceImageRequest other = (com.google.cloud.vision.v1.GetReferenceImageRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1.GetReferenceImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -563,7 +562,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java index 03bb89f565bc..1d72bd800630 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Image.java @@ -73,7 +73,7 @@ private Image( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -216,14 +216,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Image other = (com.google.cloud.vision.v1.Image) obj; - boolean result = true; - result = result && getContent().equals(other.getContent()); - result = result && (hasSource() == other.hasSource()); + if (!getContent().equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; if (hasSource()) { - result = result && getSource().equals(other.getSource()); + if (!getSource().equals(other.getSource())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -429,35 +428,35 @@ public com.google.cloud.vision.v1.Image buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -560,7 +559,7 @@ public Builder clearContent() { return this; } - private com.google.cloud.vision.v1.ImageSource source_ = null; + private com.google.cloud.vision.v1.ImageSource source_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ImageSource, com.google.cloud.vision.v1.ImageSource.Builder, @@ -761,7 +760,7 @@ public com.google.cloud.vision.v1.ImageSourceOrBuilder getSourceOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java index 51ab2e4c45c8..4cc11bad9ab3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageAnnotationContext.java @@ -25,7 +25,6 @@ private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder private ImageAnnotationContext() { uri_ = ""; - pageNumber_ = 0; } @java.lang.Override @@ -66,7 +65,7 @@ private ImageAnnotationContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -208,11 +207,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ImageAnnotationContext other = (com.google.cloud.vision.v1.ImageAnnotationContext) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && (getPageNumber() == other.getPageNumber()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (getPageNumber() != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -411,35 +409,35 @@ public com.google.cloud.vision.v1.ImageAnnotationContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -635,7 +633,7 @@ public Builder clearPageNumber() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContext.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContext.java index 10d7156acdf5..e23d42a77a23 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageContext.java @@ -69,7 +69,7 @@ private ImageContext( case 18: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -126,7 +126,7 @@ private ImageContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -138,7 +138,7 @@ private ImageContext( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -478,26 +478,25 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.ImageContext other = (com.google.cloud.vision.v1.ImageContext) obj; - boolean result = true; - result = result && (hasLatLongRect() == other.hasLatLongRect()); + if (hasLatLongRect() != other.hasLatLongRect()) return false; if (hasLatLongRect()) { - result = result && getLatLongRect().equals(other.getLatLongRect()); + if (!getLatLongRect().equals(other.getLatLongRect())) return false; } - result = result && getLanguageHintsList().equals(other.getLanguageHintsList()); - result = result && (hasCropHintsParams() == other.hasCropHintsParams()); + if (!getLanguageHintsList().equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; if (hasCropHintsParams()) { - result = result && getCropHintsParams().equals(other.getCropHintsParams()); + if (!getCropHintsParams().equals(other.getCropHintsParams())) return false; } - result = result && (hasProductSearchParams() == other.hasProductSearchParams()); + if (hasProductSearchParams() != other.hasProductSearchParams()) return false; if (hasProductSearchParams()) { - result = result && getProductSearchParams().equals(other.getProductSearchParams()); + if (!getProductSearchParams().equals(other.getProductSearchParams())) return false; } - result = result && (hasWebDetectionParams() == other.hasWebDetectionParams()); + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; if (hasWebDetectionParams()) { - result = result && getWebDetectionParams().equals(other.getWebDetectionParams()); + if (!getWebDetectionParams().equals(other.getWebDetectionParams())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -732,7 +731,7 @@ public com.google.cloud.vision.v1.ImageContext buildPartial() { } else { result.latLongRect_ = latLongRectBuilder_.build(); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } @@ -759,35 +758,35 @@ public com.google.cloud.vision.v1.ImageContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -855,7 +854,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.LatLongRect latLongRect_ = null; + private com.google.cloud.vision.v1.LatLongRect latLongRect_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.LatLongRect, com.google.cloud.vision.v1.LatLongRect.Builder, @@ -1040,7 +1039,7 @@ public com.google.cloud.vision.v1.LatLongRectOrBuilder getLatLongRectOrBuilder() com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); bitField0_ |= 0x00000002; } @@ -1242,7 +1241,7 @@ public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1.CropHintsParams cropHintsParams_ = null; + private com.google.cloud.vision.v1.CropHintsParams cropHintsParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.CropHintsParams, com.google.cloud.vision.v1.CropHintsParams.Builder, @@ -1424,7 +1423,7 @@ public com.google.cloud.vision.v1.CropHintsParamsOrBuilder getCropHintsParamsOrB return cropHintsParamsBuilder_; } - private com.google.cloud.vision.v1.ProductSearchParams productSearchParams_ = null; + private com.google.cloud.vision.v1.ProductSearchParams productSearchParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ProductSearchParams, com.google.cloud.vision.v1.ProductSearchParams.Builder, @@ -1607,7 +1606,7 @@ public com.google.cloud.vision.v1.ProductSearchParams.Builder getProductSearchPa return productSearchParamsBuilder_; } - private com.google.cloud.vision.v1.WebDetectionParams webDetectionParams_ = null; + private com.google.cloud.vision.v1.WebDetectionParams webDetectionParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.WebDetectionParams, com.google.cloud.vision.v1.WebDetectionParams.Builder, @@ -1791,7 +1790,7 @@ public com.google.cloud.vision.v1.WebDetectionParamsOrBuilder getWebDetectionPar @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java index f1acf6db0fb2..d87050dfc9ed 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageProperties.java @@ -67,7 +67,7 @@ private ImageProperties( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -185,13 +185,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ImageProperties other = (com.google.cloud.vision.v1.ImageProperties) obj; - boolean result = true; - result = result && (hasDominantColors() == other.hasDominantColors()); + if (hasDominantColors() != other.hasDominantColors()) return false; if (hasDominantColors()) { - result = result && getDominantColors().equals(other.getDominantColors()); + if (!getDominantColors().equals(other.getDominantColors())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -394,35 +393,35 @@ public com.google.cloud.vision.v1.ImageProperties buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -469,7 +468,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.DominantColorsAnnotation dominantColors_ = null; + private com.google.cloud.vision.v1.DominantColorsAnnotation dominantColors_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.DominantColorsAnnotation, com.google.cloud.vision.v1.DominantColorsAnnotation.Builder, @@ -654,7 +653,7 @@ public com.google.cloud.vision.v1.DominantColorsAnnotation.Builder getDominantCo @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java index 994f74786519..03c1507c8c4f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImageSource.java @@ -67,7 +67,7 @@ private ImageSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -269,11 +269,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.ImageSource other = (com.google.cloud.vision.v1.ImageSource) obj; - boolean result = true; - result = result && getGcsImageUri().equals(other.getGcsImageUri()); - result = result && getImageUri().equals(other.getImageUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getGcsImageUri().equals(other.getGcsImageUri())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -471,35 +470,35 @@ public com.google.cloud.vision.v1.ImageSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -826,7 +825,7 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java index c67ade0b5490..926cc45b0726 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsGcsSource.java @@ -60,7 +60,7 @@ private ImportProductSetsGcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -276,10 +276,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1.ImportProductSetsGcsSource) obj; - boolean result = true; - result = result && getCsvFileUri().equals(other.getCsvFileUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCsvFileUri().equals(other.getCsvFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -474,35 +473,35 @@ public com.google.cloud.vision.v1.ImportProductSetsGcsSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -888,7 +887,7 @@ public Builder setCsvFileUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java index 99b8d56141cf..d20443a8ba91 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsInputConfig.java @@ -69,7 +69,7 @@ private ImportProductSetsInputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -232,18 +232,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1.ImportProductSetsInputConfig) obj; - boolean result = true; - result = result && getSourceCase().equals(other.getSourceCase()); - if (!result) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 1: - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -450,35 +448,35 @@ public com.google.cloud.vision.v1.ImportProductSetsInputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -763,7 +761,7 @@ public com.google.cloud.vision.v1.ImportProductSetsGcsSourceOrBuilder getGcsSour @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java index 124a091188d9..33bf1a61f194 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsRequest.java @@ -76,7 +76,7 @@ private ImportProductSetsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -246,14 +246,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ImportProductSetsRequest other = (com.google.cloud.vision.v1.ImportProductSetsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasInputConfig() == other.hasInputConfig()); + if (!getParent().equals(other.getParent())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -461,35 +460,35 @@ public com.google.cloud.vision.v1.ImportProductSetsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -641,7 +640,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1.ImportProductSetsInputConfig inputConfig_ = null; + private com.google.cloud.vision.v1.ImportProductSetsInputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ImportProductSetsInputConfig, com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder, @@ -826,7 +825,7 @@ public com.google.cloud.vision.v1.ImportProductSetsInputConfig.Builder getInputC @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java index d1d562f407de..db320dfb7c3f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ImportProductSetsResponse.java @@ -58,7 +58,7 @@ private ImportProductSetsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -70,7 +70,7 @@ private ImportProductSetsResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { statuses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -79,7 +79,7 @@ private ImportProductSetsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -91,10 +91,10 @@ private ImportProductSetsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); } this.unknownFields = unknownFields.build(); @@ -315,11 +315,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ImportProductSetsResponse other = (com.google.cloud.vision.v1.ImportProductSetsResponse) obj; - boolean result = true; - result = result && getReferenceImagesList().equals(other.getReferenceImagesList()); - result = result && getStatusesList().equals(other.getStatusesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImagesList().equals(other.getReferenceImagesList())) return false; + if (!getStatusesList().equals(other.getStatusesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -531,7 +530,7 @@ public com.google.cloud.vision.v1.ImportProductSetsResponse buildPartial() { new com.google.cloud.vision.v1.ImportProductSetsResponse(this); int from_bitField0_ = bitField0_; if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -540,7 +539,7 @@ public com.google.cloud.vision.v1.ImportProductSetsResponse buildPartial() { result.referenceImages_ = referenceImagesBuilder_.build(); } if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -554,35 +553,35 @@ public com.google.cloud.vision.v1.ImportProductSetsResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -688,7 +687,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(referenceImages_); bitField0_ |= 0x00000001; @@ -1031,7 +1030,7 @@ public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuild com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( referenceImages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); referenceImages_ = null; @@ -1042,7 +1041,7 @@ public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuild private java.util.List statuses_ = java.util.Collections.emptyList(); private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { statuses_ = new java.util.ArrayList(statuses_); bitField0_ |= 0x00000002; } @@ -1443,10 +1442,7 @@ public java.util.List getStatusesBuilderList() { com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - statuses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + statuses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); statuses_ = null; } return statusesBuilder_; @@ -1454,7 +1450,7 @@ public java.util.List getStatusesBuilderList() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java index 9baf4d699931..f64c2b02b001 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/InputConfig.java @@ -75,7 +75,7 @@ private InputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -243,14 +243,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.InputConfig other = (com.google.cloud.vision.v1.InputConfig) obj; - boolean result = true; - result = result && (hasGcsSource() == other.hasGcsSource()); + if (hasGcsSource() != other.hasGcsSource()) return false; if (hasGcsSource()) { - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; } - result = result && getMimeType().equals(other.getMimeType()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -458,35 +457,35 @@ public com.google.cloud.vision.v1.InputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -537,7 +536,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.GcsSource gcsSource_ = null; + private com.google.cloud.vision.v1.GcsSource gcsSource_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.GcsSource, com.google.cloud.vision.v1.GcsSource.Builder, @@ -819,7 +818,7 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java index d5c0c948dc7c..b3da05353ba0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LatLongRect.java @@ -78,7 +78,7 @@ private LatLongRect( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -238,17 +238,16 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.LatLongRect other = (com.google.cloud.vision.v1.LatLongRect) obj; - boolean result = true; - result = result && (hasMinLatLng() == other.hasMinLatLng()); + if (hasMinLatLng() != other.hasMinLatLng()) return false; if (hasMinLatLng()) { - result = result && getMinLatLng().equals(other.getMinLatLng()); + if (!getMinLatLng().equals(other.getMinLatLng())) return false; } - result = result && (hasMaxLatLng() == other.hasMaxLatLng()); + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; if (hasMaxLatLng()) { - result = result && getMaxLatLng().equals(other.getMaxLatLng()); + if (!getMaxLatLng().equals(other.getMaxLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -466,35 +465,35 @@ public com.google.cloud.vision.v1.LatLongRect buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -544,7 +543,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng minLatLng_ = null; + private com.google.type.LatLng minLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; @@ -714,7 +713,7 @@ public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { return minLatLngBuilder_; } - private com.google.type.LatLng maxLatLng_ = null; + private com.google.type.LatLng maxLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; @@ -886,7 +885,7 @@ public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java index d7defa9bea22..118ab82a19a6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsRequest.java @@ -24,7 +24,6 @@ private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder private ListProductSetsRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListProductSetsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -265,12 +264,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListProductSetsRequest other = (com.google.cloud.vision.v1.ListProductSetsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -473,35 +471,35 @@ public com.google.cloud.vision.v1.ListProductSetsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -797,7 +795,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java index b04df7c1a8eb..70d63557097e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductSetsResponse.java @@ -53,7 +53,7 @@ private ListProductSetsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { productSets_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -71,7 +71,7 @@ private ListProductSetsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -83,7 +83,7 @@ private ListProductSetsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { productSets_ = java.util.Collections.unmodifiableList(productSets_); } this.unknownFields = unknownFields.build(); @@ -267,11 +267,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListProductSetsResponse other = (com.google.cloud.vision.v1.ListProductSetsResponse) obj; - boolean result = true; - result = result && getProductSetsList().equals(other.getProductSetsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSetsList().equals(other.getProductSetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -472,7 +471,7 @@ public com.google.cloud.vision.v1.ListProductSetsResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { productSets_ = java.util.Collections.unmodifiableList(productSets_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -488,35 +487,35 @@ public com.google.cloud.vision.v1.ListProductSetsResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -599,7 +598,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductSetsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { productSets_ = new java.util.ArrayList(productSets_); bitField0_ |= 0x00000001; } @@ -938,10 +937,7 @@ public com.google.cloud.vision.v1.ProductSet.Builder addProductSetsBuilder(int i com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, com.google.cloud.vision.v1.ProductSetOrBuilder>( - productSets_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + productSets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); productSets_ = null; } return productSetsBuilder_; @@ -1048,7 +1044,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java index 1fd2fa80b13e..e7e12717932e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetRequest.java @@ -25,7 +25,6 @@ private ListProductsInProductSetRequest( private ListProductsInProductSetRequest() { name_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -74,7 +73,7 @@ private ListProductsInProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -268,12 +267,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1.ListProductsInProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -477,35 +475,35 @@ public com.google.cloud.vision.v1.ListProductsInProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -806,7 +804,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java index 18cd368a8606..51ca4da3333f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsInProductSetResponse.java @@ -54,7 +54,7 @@ private ListProductsInProductSetResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -72,7 +72,7 @@ private ListProductsInProductSetResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -84,7 +84,7 @@ private ListProductsInProductSetResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } this.unknownFields = unknownFields.build(); @@ -268,11 +268,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1.ListProductsInProductSetResponse) obj; - boolean result = true; - result = result && getProductsList().equals(other.getProductsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -474,7 +473,7 @@ public com.google.cloud.vision.v1.ListProductsInProductSetResponse buildPartial( int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -490,35 +489,35 @@ public com.google.cloud.vision.v1.ListProductsInProductSetResponse buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -601,7 +600,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(products_); bitField0_ |= 0x00000001; } @@ -939,10 +938,7 @@ public java.util.List getProductsBui com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -1049,7 +1045,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java index e217f316b63a..0a61c52bf7a1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsRequest.java @@ -24,7 +24,6 @@ private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private ListProductsRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListProductsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -267,12 +266,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListProductsRequest other = (com.google.cloud.vision.v1.ListProductsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -475,35 +473,35 @@ public com.google.cloud.vision.v1.ListProductsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -802,7 +800,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java index de15c4df5f5d..ace2c3c3c376 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListProductsResponse.java @@ -53,7 +53,7 @@ private ListProductsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -71,7 +71,7 @@ private ListProductsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -83,7 +83,7 @@ private ListProductsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } this.unknownFields = unknownFields.build(); @@ -267,11 +267,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListProductsResponse other = (com.google.cloud.vision.v1.ListProductsResponse) obj; - boolean result = true; - result = result && getProductsList().equals(other.getProductsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -472,7 +471,7 @@ public com.google.cloud.vision.v1.ListProductsResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -488,35 +487,35 @@ public com.google.cloud.vision.v1.ListProductsResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -598,7 +597,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(products_); bitField0_ |= 0x00000001; } @@ -936,10 +935,7 @@ public java.util.List getProductsBui com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, com.google.cloud.vision.v1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -1046,7 +1042,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java index 4502fc12cf1f..f708a4367296 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesRequest.java @@ -24,7 +24,6 @@ private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builde private ListReferenceImagesRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListReferenceImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -271,12 +270,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1.ListReferenceImagesRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -480,35 +478,35 @@ public com.google.cloud.vision.v1.ListReferenceImagesRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -819,7 +817,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java index 10155298dc85..488f0742576b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ListReferenceImagesResponse.java @@ -24,7 +24,6 @@ private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Build private ListReferenceImagesResponse() { referenceImages_ = java.util.Collections.emptyList(); - pageSize_ = 0; nextPageToken_ = ""; } @@ -54,7 +53,7 @@ private ListReferenceImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -78,7 +77,7 @@ private ListReferenceImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,7 +89,7 @@ private ListReferenceImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); } this.unknownFields = unknownFields.build(); @@ -293,12 +292,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1.ListReferenceImagesResponse) obj; - boolean result = true; - result = result && getReferenceImagesList().equals(other.getReferenceImagesList()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImagesList().equals(other.getReferenceImagesList())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -504,7 +502,7 @@ public com.google.cloud.vision.v1.ListReferenceImagesResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -521,35 +519,35 @@ public com.google.cloud.vision.v1.ListReferenceImagesResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -635,7 +633,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(referenceImages_); bitField0_ |= 0x00000001; @@ -978,7 +976,7 @@ public com.google.cloud.vision.v1.ReferenceImage.Builder addReferenceImagesBuild com.google.cloud.vision.v1.ReferenceImage.Builder, com.google.cloud.vision.v1.ReferenceImageOrBuilder>( referenceImages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); referenceImages_ = null; @@ -1126,7 +1124,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java index 4df828c0f23b..710a376662c1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocalizedObjectAnnotation.java @@ -26,7 +26,6 @@ private LocalizedObjectAnnotation() { mid_ = ""; languageCode_ = ""; name_ = ""; - score_ = 0F; } @java.lang.Override @@ -97,7 +96,7 @@ private LocalizedObjectAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -387,20 +386,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1.LocalizedObjectAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && getName().equals(other.getName()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getName().equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -623,35 +619,35 @@ public com.google.cloud.vision.v1.LocalizedObjectAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1051,7 +1047,7 @@ public Builder clearScore() { return this; } - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1235,7 +1231,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java index c0424daa59cf..f85600135a10 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/LocationInfo.java @@ -64,7 +64,7 @@ private LocationInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -179,13 +179,12 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.LocationInfo other = (com.google.cloud.vision.v1.LocationInfo) obj; - boolean result = true; - result = result && (hasLatLng() == other.hasLatLng()); + if (hasLatLng() != other.hasLatLng()) return false; if (hasLatLng()) { - result = result && getLatLng().equals(other.getLatLng()); + if (!getLatLng().equals(other.getLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -388,35 +387,35 @@ public com.google.cloud.vision.v1.LocationInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -463,7 +462,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng latLng_ = null; + private com.google.type.LatLng latLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; @@ -634,7 +633,7 @@ public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java index 16454d1a42f1..543b3b44bd8b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/NormalizedVertex.java @@ -24,10 +24,7 @@ private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder build super(builder); } - private NormalizedVertex() { - x_ = 0F; - y_ = 0F; - } + private NormalizedVertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -65,7 +62,7 @@ private NormalizedVertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -178,17 +175,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.NormalizedVertex other = (com.google.cloud.vision.v1.NormalizedVertex) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -388,35 +380,35 @@ public com.google.cloud.vision.v1.NormalizedVertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -556,7 +548,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java index 3a99128fd549..63a598205a13 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OperationMetadata.java @@ -89,7 +89,7 @@ private OperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -479,18 +479,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.OperationMetadata other = (com.google.cloud.vision.v1.OperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasCreateTime() == other.hasCreateTime()); + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - result = result && getCreateTime().equals(other.getCreateTime()); + if (!getCreateTime().equals(other.getCreateTime())) return false; } - result = result && (hasUpdateTime() == other.hasUpdateTime()); + if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { - result = result && getUpdateTime().equals(other.getUpdateTime()); + if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -713,35 +712,35 @@ public com.google.cloud.vision.v1.OperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -872,7 +871,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp createTime_ = null; + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1051,7 +1050,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } - private com.google.protobuf.Timestamp updateTime_ = null; + private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1232,7 +1231,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java index 89b8b343aa5e..bef792e8a7c0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/OutputConfig.java @@ -22,9 +22,7 @@ private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) super(builder); } - private OutputConfig() { - batchSize_ = 0; - } + private OutputConfig() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -73,7 +71,7 @@ private OutputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -219,14 +217,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.OutputConfig other = (com.google.cloud.vision.v1.OutputConfig) obj; - boolean result = true; - result = result && (hasGcsDestination() == other.hasGcsDestination()); + if (hasGcsDestination() != other.hasGcsDestination()) return false; if (hasGcsDestination()) { - result = result && getGcsDestination().equals(other.getGcsDestination()); + if (!getGcsDestination().equals(other.getGcsDestination())) return false; } - result = result && (getBatchSize() == other.getBatchSize()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getBatchSize() != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -434,35 +431,35 @@ public com.google.cloud.vision.v1.OutputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -512,7 +509,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.GcsDestination gcsDestination_ = null; + private com.google.cloud.vision.v1.GcsDestination gcsDestination_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.GcsDestination, com.google.cloud.vision.v1.GcsDestination.Builder, @@ -764,7 +761,7 @@ public Builder clearBatchSize() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java index ac2dfbf71a65..76fb3595a28a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Page.java @@ -23,10 +23,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Page() { - width_ = 0; - height_ = 0; blocks_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -82,7 +79,7 @@ private Page( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } @@ -97,7 +94,7 @@ private Page( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -109,7 +106,7 @@ private Page( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); } this.unknownFields = unknownFields.build(); @@ -352,20 +349,17 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Page other = (com.google.cloud.vision.v1.Page) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); - } - result = result && (getWidth() == other.getWidth()); - result = result && (getHeight() == other.getHeight()); - result = result && getBlocksList().equals(other.getBlocksList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProperty().equals(other.getProperty())) return false; + } + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -588,7 +582,7 @@ public com.google.cloud.vision.v1.Page buildPartial() { result.width_ = width_; result.height_ = height_; if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -604,35 +598,35 @@ public com.google.cloud.vision.v1.Page buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -717,7 +711,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, @@ -997,7 +991,7 @@ public Builder clearHeight() { java.util.Collections.emptyList(); private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(blocks_); bitField0_ |= 0x00000008; } @@ -1333,10 +1327,7 @@ public java.util.List getBlocksBuilder com.google.cloud.vision.v1.Block, com.google.cloud.vision.v1.Block.Builder, com.google.cloud.vision.v1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); + blocks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); blocks_ = null; } return blocksBuilder_; @@ -1388,7 +1379,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java index 73370d591097..981583b4eeb8 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Paragraph.java @@ -24,7 +24,6 @@ private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Paragraph() { words_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -86,7 +85,7 @@ private Paragraph( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -101,7 +100,7 @@ private Paragraph( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -113,7 +112,7 @@ private Paragraph( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); } this.unknownFields = unknownFields.build(); @@ -402,22 +401,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Paragraph other = (com.google.cloud.vision.v1.Paragraph) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getWordsList().equals(other.getWordsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getWordsList().equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -646,7 +642,7 @@ public com.google.cloud.vision.v1.Paragraph buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -662,35 +658,35 @@ public com.google.cloud.vision.v1.Paragraph buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -772,7 +768,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, @@ -954,7 +950,7 @@ public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getProper return propertyBuilder_; } - private com.google.cloud.vision.v1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1265,7 +1261,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder( java.util.Collections.emptyList(); private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(words_); bitField0_ |= 0x00000004; } @@ -1601,10 +1597,7 @@ public java.util.List getWordsBuilderLi com.google.cloud.vision.v1.Word, com.google.cloud.vision.v1.Word.Builder, com.google.cloud.vision.v1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + words_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); words_ = null; } return wordsBuilder_; @@ -1656,7 +1649,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java index 5f11e09e3fb2..663c9ab6e361 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Position.java @@ -24,11 +24,7 @@ private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Position() { - x_ = 0F; - y_ = 0F; - z_ = 0F; - } + private Position() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -71,7 +67,7 @@ private Position( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -204,21 +200,14 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Position other = (com.google.cloud.vision.v1.Position) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = - result - && (java.lang.Float.floatToIntBits(getZ()) - == java.lang.Float.floatToIntBits(other.getZ())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (java.lang.Float.floatToIntBits(getZ()) != java.lang.Float.floatToIntBits(other.getZ())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -421,35 +410,35 @@ public com.google.cloud.vision.v1.Position buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -636,7 +625,7 @@ public Builder clearZ() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java index a9b2fe2011db..b72874f33ccf 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Product.java @@ -84,7 +84,7 @@ private Product( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { productLabels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -96,7 +96,7 @@ private Product( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,7 +108,7 @@ private Product( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { productLabels_ = java.util.Collections.unmodifiableList(productLabels_); } this.unknownFields = unknownFields.build(); @@ -246,7 +246,7 @@ private KeyValue( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -419,11 +419,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.Product.KeyValue other = (com.google.cloud.vision.v1.Product.KeyValue) obj; - boolean result = true; - result = result && getKey().equals(other.getKey()); - result = result && getValue().equals(other.getValue()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -623,23 +622,23 @@ public com.google.cloud.vision.v1.Product.KeyValue buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -647,13 +646,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -906,7 +905,7 @@ public Builder setValueBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1304,14 +1303,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Product other = (com.google.cloud.vision.v1.Product) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getDisplayName().equals(other.getDisplayName()); - result = result && getDescription().equals(other.getDescription()); - result = result && getProductCategory().equals(other.getProductCategory()); - result = result && getProductLabelsList().equals(other.getProductLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getProductCategory().equals(other.getProductCategory())) return false; + if (!getProductLabelsList().equals(other.getProductLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1526,7 +1524,7 @@ public com.google.cloud.vision.v1.Product buildPartial() { result.description_ = description_; result.productCategory_ = productCategory_; if (productLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { productLabels_ = java.util.Collections.unmodifiableList(productLabels_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -1541,35 +1539,35 @@ public com.google.cloud.vision.v1.Product buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2073,7 +2071,7 @@ public Builder setProductCategoryBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureProductLabelsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { productLabels_ = new java.util.ArrayList(productLabels_); bitField0_ |= 0x00000010; @@ -2524,7 +2522,7 @@ public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuild com.google.cloud.vision.v1.Product.KeyValue.Builder, com.google.cloud.vision.v1.Product.KeyValueOrBuilder>( productLabels_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); productLabels_ = null; @@ -2534,7 +2532,7 @@ public com.google.cloud.vision.v1.Product.KeyValue.Builder addProductLabelsBuild @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java index 9ed0246ec52c..2ad4111817b8 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchParams.java @@ -62,7 +62,7 @@ private ProductSearchParams( case 58: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { productCategories_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -94,7 +94,7 @@ private ProductSearchParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -106,7 +106,7 @@ private ProductSearchParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { productCategories_ = productCategories_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -401,16 +401,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ProductSearchParams other = (com.google.cloud.vision.v1.ProductSearchParams) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getProductSet().equals(other.getProductSet()); - result = result && getProductCategoriesList().equals(other.getProductCategoriesList()); - result = result && getFilter().equals(other.getFilter()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSet().equals(other.getProductSet())) return false; + if (!getProductCategoriesList().equals(other.getProductCategoriesList())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -624,7 +623,7 @@ public com.google.cloud.vision.v1.ProductSearchParams buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } result.productSet_ = productSet_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { productCategories_ = productCategories_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } @@ -637,35 +636,35 @@ public com.google.cloud.vision.v1.ProductSearchParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -732,7 +731,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1036,7 +1035,7 @@ public Builder setProductSetBytes(com.google.protobuf.ByteString value) { com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureProductCategoriesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); bitField0_ |= 0x00000004; } @@ -1309,7 +1308,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResults.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResults.java index 80007860c380..163316e03d6f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResults.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSearchResults.java @@ -68,7 +68,7 @@ private ProductSearchResults( } case 42: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList< com.google.cloud.vision.v1.ProductSearchResults.Result>(); @@ -82,7 +82,7 @@ private ProductSearchResults( } case 50: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = new java.util.ArrayList< com.google.cloud.vision.v1.ProductSearchResults.GroupedResult>(); @@ -96,7 +96,7 @@ private ProductSearchResults( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,10 +108,10 @@ private ProductSearchResults( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); } this.unknownFields = unknownFields.build(); @@ -225,7 +225,6 @@ private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Result() { - score_ = 0F; image_ = ""; } @@ -283,7 +282,7 @@ private Result( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -472,18 +471,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ProductSearchResults.Result other = (com.google.cloud.vision.v1.ProductSearchResults.Result) obj; - boolean result = true; - result = result && (hasProduct() == other.hasProduct()); + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); - } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getImage().equals(other.getImage()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProduct().equals(other.getProduct())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getImage().equals(other.getImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -699,23 +695,23 @@ public com.google.cloud.vision.v1.ProductSearchResults.Result buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -723,13 +719,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -785,7 +781,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.Product product_ = null; + private com.google.cloud.vision.v1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, @@ -1115,7 +1111,7 @@ public Builder setImageBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1318,7 +1314,7 @@ private GroupedResult( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList< com.google.cloud.vision.v1.ProductSearchResults.Result>(); @@ -1332,7 +1328,7 @@ private GroupedResult( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1344,7 +1340,7 @@ private GroupedResult( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); } this.unknownFields = unknownFields.build(); @@ -1525,14 +1521,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1.ProductSearchResults.GroupedResult) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getResultsList().equals(other.getResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResultsList().equals(other.getResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1749,7 +1744,7 @@ public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult buildPartia result.boundingPoly_ = boundingPolyBuilder_.build(); } if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1764,23 +1759,23 @@ public com.google.cloud.vision.v1.ProductSearchResults.GroupedResult buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1788,13 +1783,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1875,7 +1870,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -2061,7 +2056,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingPolyOrBuilder java.util.Collections.emptyList(); private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList( results_); @@ -2415,10 +2410,7 @@ public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResults com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + results_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); results_ = null; } return resultsBuilder_; @@ -2427,7 +2419,7 @@ public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResults @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2740,15 +2732,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ProductSearchResults other = (com.google.cloud.vision.v1.ProductSearchResults) obj; - boolean result = true; - result = result && (hasIndexTime() == other.hasIndexTime()); + if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { - result = result && getIndexTime().equals(other.getIndexTime()); + if (!getIndexTime().equals(other.getIndexTime())) return false; } - result = result && getResultsList().equals(other.getResultsList()); - result = result && getProductGroupedResultsList().equals(other.getProductGroupedResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResultsList().equals(other.getResultsList())) return false; + if (!getProductGroupedResultsList().equals(other.getProductGroupedResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2971,7 +2962,7 @@ public com.google.cloud.vision.v1.ProductSearchResults buildPartial() { result.indexTime_ = indexTimeBuilder_.build(); } if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -2980,7 +2971,7 @@ public com.google.cloud.vision.v1.ProductSearchResults buildPartial() { result.results_ = resultsBuilder_.build(); } if (productGroupedResultsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -2995,35 +2986,35 @@ public com.google.cloud.vision.v1.ProductSearchResults buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3127,7 +3118,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.protobuf.Timestamp indexTime_ = null; + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -3315,7 +3306,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { java.util.Collections.emptyList(); private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList( results_); @@ -3664,10 +3655,7 @@ public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResults com.google.cloud.vision.v1.ProductSearchResults.Result, com.google.cloud.vision.v1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + results_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); results_ = null; } return resultsBuilder_; @@ -3677,7 +3665,7 @@ public com.google.cloud.vision.v1.ProductSearchResults.Result.Builder addResults productGroupedResults_ = java.util.Collections.emptyList(); private void ensureProductGroupedResultsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = new java.util.ArrayList( productGroupedResults_); @@ -4126,7 +4114,7 @@ public Builder removeProductGroupedResults(int index) { com.google.cloud.vision.v1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1.ProductSearchResults.GroupedResultOrBuilder>( productGroupedResults_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); productGroupedResults_ = null; @@ -4136,7 +4124,7 @@ public Builder removeProductGroupedResults(int index) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSet.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSet.java index 0ceb3b06c59b..77a7e72e8db5 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSet.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ProductSet.java @@ -98,7 +98,7 @@ private ProductSet( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -379,19 +379,18 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.ProductSet other = (com.google.cloud.vision.v1.ProductSet) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getDisplayName().equals(other.getDisplayName()); - result = result && (hasIndexTime() == other.hasIndexTime()); + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { - result = result && getIndexTime().equals(other.getIndexTime()); + if (!getIndexTime().equals(other.getIndexTime())) return false; } - result = result && (hasIndexError() == other.hasIndexError()); + if (hasIndexError() != other.hasIndexError()) return false; if (hasIndexError()) { - result = result && getIndexError().equals(other.getIndexError()); + if (!getIndexError().equals(other.getIndexError())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -620,35 +619,35 @@ public com.google.cloud.vision.v1.ProductSet buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -914,7 +913,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Timestamp indexTime_ = null; + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1116,7 +1115,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { return indexTimeBuilder_; } - private com.google.rpc.Status indexError_ = null; + private com.google.rpc.Status indexError_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; @@ -1306,7 +1305,7 @@ public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java index 9097bd7dd141..bb3d032afe35 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Property.java @@ -25,7 +25,6 @@ private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Property() { name_ = ""; value_ = ""; - uint64Value_ = 0L; } @java.lang.Override @@ -73,7 +72,7 @@ private Property( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -262,12 +261,11 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Property other = (com.google.cloud.vision.v1.Property) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getValue().equals(other.getValue()); - result = result && (getUint64Value() == other.getUint64Value()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (getUint64Value() != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -468,35 +466,35 @@ public com.google.cloud.vision.v1.Property buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -785,7 +783,7 @@ public Builder clearUint64Value() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java index 5808eefdd3ac..e43fb583647c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/ReferenceImage.java @@ -69,7 +69,7 @@ private ReferenceImage( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { boundingPolys_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -80,7 +80,7 @@ private ReferenceImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -92,7 +92,7 @@ private ReferenceImage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); } this.unknownFields = unknownFields.build(); @@ -363,12 +363,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.ReferenceImage other = (com.google.cloud.vision.v1.ReferenceImage) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getUri().equals(other.getUri()); - result = result && getBoundingPolysList().equals(other.getBoundingPolysList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getBoundingPolysList().equals(other.getBoundingPolysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -576,7 +575,7 @@ public com.google.cloud.vision.v1.ReferenceImage buildPartial() { result.name_ = name_; result.uri_ = uri_; if (boundingPolysBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -591,35 +590,35 @@ public com.google.cloud.vision.v1.ReferenceImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -917,7 +916,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureBoundingPolysIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { boundingPolys_ = new java.util.ArrayList(boundingPolys_); bitField0_ |= 0x00000004; @@ -1367,7 +1366,7 @@ public com.google.cloud.vision.v1.BoundingPoly.Builder addBoundingPolysBuilder(i com.google.cloud.vision.v1.BoundingPoly.Builder, com.google.cloud.vision.v1.BoundingPolyOrBuilder>( boundingPolys_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); boundingPolys_ = null; @@ -1377,7 +1376,7 @@ public com.google.cloud.vision.v1.BoundingPoly.Builder addBoundingPolysBuilder(i @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java index 4edadd58ffa5..eeb576c49df5 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/RemoveProductFromProductSetRequest.java @@ -68,7 +68,7 @@ private RemoveProductFromProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -245,11 +245,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1.RemoveProductFromProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getProduct().equals(other.getProduct()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -449,35 +448,35 @@ public com.google.cloud.vision.v1.RemoveProductFromProductSetRequest buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -743,7 +742,7 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java index 1cbac1ac01cf..407d6378699b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/SafeSearchAnnotation.java @@ -93,7 +93,7 @@ private SafeSearchAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -358,14 +358,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.SafeSearchAnnotation other = (com.google.cloud.vision.v1.SafeSearchAnnotation) obj; - boolean result = true; - result = result && adult_ == other.adult_; - result = result && spoof_ == other.spoof_; - result = result && medical_ == other.medical_; - result = result && violence_ == other.violence_; - result = result && racy_ == other.racy_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -580,35 +579,35 @@ public com.google.cloud.vision.v1.SafeSearchAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1085,7 +1084,7 @@ public Builder clearRacy() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java index 41caac9f9de7..b328412047c0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Symbol.java @@ -24,7 +24,6 @@ private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Symbol() { text_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -98,7 +97,7 @@ private Symbol( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -374,22 +373,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Symbol other = (com.google.cloud.vision.v1.Symbol) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getText().equals(other.getText()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getText().equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -615,35 +611,35 @@ public com.google.cloud.vision.v1.Symbol buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -700,7 +696,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, @@ -882,7 +878,7 @@ public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getProper return propertyBuilder_; } - private com.google.cloud.vision.v1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1329,7 +1325,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java index 13f7621cbf5f..985353ead641 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/TextAnnotation.java @@ -60,7 +60,7 @@ private TextAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -77,7 +77,7 @@ private TextAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -89,7 +89,7 @@ private TextAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); } this.unknownFields = unknownFields.build(); @@ -174,7 +174,6 @@ private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder build private DetectedLanguage() { languageCode_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -215,7 +214,7 @@ private DetectedLanguage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -360,14 +359,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage) obj; - boolean result = true; - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -569,23 +565,23 @@ public com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -593,13 +589,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -804,7 +800,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -912,7 +908,6 @@ private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) private DetectedBreak() { type_ = 0; - isPrefix_ = false; } @java.lang.Override @@ -953,7 +948,7 @@ private DetectedBreak( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1302,11 +1297,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1.TextAnnotation.DetectedBreak) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getIsPrefix() == other.getIsPrefix()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getIsPrefix() != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1507,23 +1501,23 @@ public com.google.cloud.vision.v1.TextAnnotation.DetectedBreak buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1531,13 +1525,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1715,7 +1709,7 @@ public Builder clearIsPrefix() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1913,7 +1907,7 @@ private TextProperty( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage>(); @@ -1944,7 +1938,7 @@ private TextProperty( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1956,7 +1950,7 @@ private TextProperty( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); } this.unknownFields = unknownFields.build(); @@ -2153,14 +2147,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1.TextAnnotation.TextProperty) obj; - boolean result = true; - result = result && getDetectedLanguagesList().equals(other.getDetectedLanguagesList()); - result = result && (hasDetectedBreak() == other.hasDetectedBreak()); + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; if (hasDetectedBreak()) { - result = result && getDetectedBreak().equals(other.getDetectedBreak()); + if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2370,7 +2363,7 @@ public com.google.cloud.vision.v1.TextAnnotation.TextProperty buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -2390,23 +2383,23 @@ public com.google.cloud.vision.v1.TextAnnotation.TextProperty buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2414,13 +2407,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2502,7 +2495,7 @@ public Builder mergeFrom( detectedLanguages_ = java.util.Collections.emptyList(); private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList( detectedLanguages_); @@ -2897,7 +2890,7 @@ public Builder removeDetectedLanguages(int index) { com.google.cloud.vision.v1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1.TextAnnotation.DetectedLanguageOrBuilder>( detectedLanguages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); detectedLanguages_ = null; @@ -2905,7 +2898,7 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } - private com.google.cloud.vision.v1.TextAnnotation.DetectedBreak detectedBreak_ = null; + private com.google.cloud.vision.v1.TextAnnotation.DetectedBreak detectedBreak_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1.TextAnnotation.DetectedBreak.Builder, @@ -3094,7 +3087,7 @@ public Builder clearDetectedBreak() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -3302,11 +3295,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.TextAnnotation other = (com.google.cloud.vision.v1.TextAnnotation) obj; - boolean result = true; - result = result && getPagesList().equals(other.getPagesList()); - result = result && getText().equals(other.getText()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!getText().equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3514,7 +3506,7 @@ public com.google.cloud.vision.v1.TextAnnotation buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -3530,35 +3522,35 @@ public com.google.cloud.vision.v1.TextAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3639,7 +3631,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(pages_); bitField0_ |= 0x00000001; } @@ -3975,10 +3967,7 @@ public java.util.List getPagesBuilderLi com.google.cloud.vision.v1.Page, com.google.cloud.vision.v1.Page.Builder, com.google.cloud.vision.v1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + pages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); pages_ = null; } return pagesBuilder_; @@ -4080,7 +4069,7 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java index 93cfa9b5dd3e..b1548f31670f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductRequest.java @@ -80,7 +80,7 @@ private UpdateProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -256,17 +256,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.UpdateProductRequest other = (com.google.cloud.vision.v1.UpdateProductRequest) obj; - boolean result = true; - result = result && (hasProduct() == other.hasProduct()); + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); + if (!getProduct().equals(other.getProduct())) return false; } - result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - result = result && getUpdateMask().equals(other.getUpdateMask()); + if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -484,35 +483,35 @@ public com.google.cloud.vision.v1.UpdateProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -563,7 +562,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.Product product_ = null; + private com.google.cloud.vision.v1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.Product, com.google.cloud.vision.v1.Product.Builder, @@ -753,7 +752,7 @@ public com.google.cloud.vision.v1.ProductOrBuilder getProductOrBuilder() { return productBuilder_; } - private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, @@ -970,7 +969,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java index 329485ca198d..663cebe7bf7b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/UpdateProductSetRequest.java @@ -81,7 +81,7 @@ private UpdateProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -253,17 +253,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.UpdateProductSetRequest other = (com.google.cloud.vision.v1.UpdateProductSetRequest) obj; - boolean result = true; - result = result && (hasProductSet() == other.hasProductSet()); + if (hasProductSet() != other.hasProductSet()) return false; if (hasProductSet()) { - result = result && getProductSet().equals(other.getProductSet()); + if (!getProductSet().equals(other.getProductSet())) return false; } - result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - result = result && getUpdateMask().equals(other.getUpdateMask()); + if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -481,35 +480,35 @@ public com.google.cloud.vision.v1.UpdateProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -561,7 +560,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1.ProductSet productSet_ = null; + private com.google.cloud.vision.v1.ProductSet productSet_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.ProductSet, com.google.cloud.vision.v1.ProductSet.Builder, @@ -742,7 +741,7 @@ public com.google.cloud.vision.v1.ProductSetOrBuilder getProductSetOrBuilder() { return productSetBuilder_; } - private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, @@ -950,7 +949,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java index c58a7ccfe000..6e27b7ff7aac 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Vertex.java @@ -23,10 +23,7 @@ private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Vertex() { - x_ = 0; - y_ = 0; - } + private Vertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -64,7 +61,7 @@ private Vertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -176,11 +173,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Vertex other = (com.google.cloud.vision.v1.Vertex) obj; - boolean result = true; - result = result && (getX() == other.getX()); - result = result && (getY() == other.getY()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getX() != other.getX()) return false; + if (getY() != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -377,35 +373,35 @@ public com.google.cloud.vision.v1.Vertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -545,7 +541,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java index 4f1ebfcce632..cd7434cfe598 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetection.java @@ -57,7 +57,7 @@ private WebDetection( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -70,7 +70,7 @@ private WebDetection( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -83,7 +83,7 @@ private WebDetection( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -96,7 +96,7 @@ private WebDetection( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -108,7 +108,7 @@ private WebDetection( } case 50: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -121,7 +121,7 @@ private WebDetection( } case 66: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000020; @@ -134,7 +134,7 @@ private WebDetection( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -146,22 +146,22 @@ private WebDetection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); } this.unknownFields = unknownFields.build(); @@ -264,7 +264,6 @@ private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebEntity() { entityId_ = ""; - score_ = 0F; description_ = ""; } @@ -313,7 +312,7 @@ private WebEntity( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -504,15 +503,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.WebDetection.WebEntity other = (com.google.cloud.vision.v1.WebDetection.WebEntity) obj; - boolean result = true; - result = result && getEntityId().equals(other.getEntityId()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getDescription().equals(other.getDescription()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getEntityId().equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -717,23 +713,23 @@ public com.google.cloud.vision.v1.WebDetection.WebEntity buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -741,13 +737,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1042,7 +1038,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1149,7 +1145,6 @@ private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebImage() { url_ = ""; - score_ = 0F; } @java.lang.Override @@ -1190,7 +1185,7 @@ private WebImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1331,14 +1326,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.WebDetection.WebImage other = (com.google.cloud.vision.v1.WebDetection.WebImage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1538,23 +1530,23 @@ public com.google.cloud.vision.v1.WebDetection.WebImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1562,13 +1554,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1762,7 +1754,7 @@ public Builder clearScore() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2021,7 +2013,6 @@ private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebPage() { url_ = ""; - score_ = 0F; pageTitle_ = ""; fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); @@ -2072,7 +2063,7 @@ private WebPage( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -2085,7 +2076,7 @@ private WebPage( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -2098,7 +2089,7 @@ private WebPage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2110,10 +2101,10 @@ private WebPage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } this.unknownFields = unknownFields.build(); @@ -2467,18 +2458,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.WebDetection.WebPage other = (com.google.cloud.vision.v1.WebDetection.WebPage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getPageTitle().equals(other.getPageTitle()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = - result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getPageTitle().equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2703,7 +2691,7 @@ public com.google.cloud.vision.v1.WebDetection.WebPage buildPartial() { result.score_ = score_; result.pageTitle_ = pageTitle_; if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -2712,7 +2700,7 @@ public com.google.cloud.vision.v1.WebDetection.WebPage buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -2727,23 +2715,23 @@ public com.google.cloud.vision.v1.WebDetection.WebPage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2751,13 +2739,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3106,7 +3094,7 @@ public Builder setPageTitleBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -3493,7 +3481,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingI com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -3505,7 +3493,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingI partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -3929,7 +3917,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -3940,7 +3928,7 @@ public Builder removePartialMatchingImages(int index) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -4104,7 +4092,7 @@ private WebLabel( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -4277,11 +4265,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.WebDetection.WebLabel other = (com.google.cloud.vision.v1.WebDetection.WebLabel) obj; - boolean result = true; - result = result && getLabel().equals(other.getLabel()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLabel().equals(other.getLabel())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -4481,23 +4468,23 @@ public com.google.cloud.vision.v1.WebDetection.WebLabel buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -4505,13 +4492,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -4766,7 +4753,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -5325,16 +5312,15 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.WebDetection other = (com.google.cloud.vision.v1.WebDetection) obj; - boolean result = true; - result = result && getWebEntitiesList().equals(other.getWebEntitiesList()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = - result && getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList()); - result = result && getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList()); - result = result && getBestGuessLabelsList().equals(other.getBestGuessLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getWebEntitiesList().equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList())) + return false; + if (!getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList().equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -5585,7 +5571,7 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { new com.google.cloud.vision.v1.WebDetection(this); int from_bitField0_ = bitField0_; if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -5594,7 +5580,7 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { result.webEntities_ = webEntitiesBuilder_.build(); } if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -5603,7 +5589,7 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -5612,7 +5598,7 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); @@ -5622,7 +5608,7 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); } if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -5631,7 +5617,7 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); } if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -5645,35 +5631,35 @@ public com.google.cloud.vision.v1.WebDetection buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -5885,7 +5871,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList( webEntities_); @@ -6233,10 +6219,7 @@ public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesB com.google.cloud.vision.v1.WebDetection.WebEntity, com.google.cloud.vision.v1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + webEntities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); webEntities_ = null; } return webEntitiesBuilder_; @@ -6246,7 +6229,7 @@ public com.google.cloud.vision.v1.WebDetection.WebEntity.Builder addWebEntitiesB java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -6613,7 +6596,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingI com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -6625,7 +6608,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addFullMatchingI partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -7030,7 +7013,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchi com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -7042,7 +7025,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addPartialMatchi pagesWithMatchingImages_ = java.util.Collections.emptyList(); private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList( pagesWithMatchingImages_); @@ -7411,7 +7394,7 @@ public Builder removePagesWithMatchingImages(int index) { com.google.cloud.vision.v1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1.WebDetection.WebPageOrBuilder>( pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); pagesWithMatchingImages_ = null; @@ -7423,7 +7406,7 @@ public Builder removePagesWithMatchingImages(int index) { visuallySimilarImages_ = java.util.Collections.emptyList(); private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList( visuallySimilarImages_); @@ -7792,7 +7775,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimil com.google.cloud.vision.v1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1.WebDetection.WebImageOrBuilder>( visuallySimilarImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); visuallySimilarImages_ = null; @@ -7804,7 +7787,7 @@ public com.google.cloud.vision.v1.WebDetection.WebImage.Builder addVisuallySimil java.util.Collections.emptyList(); private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList( bestGuessLabels_); @@ -8171,7 +8154,7 @@ public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabe com.google.cloud.vision.v1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1.WebDetection.WebLabelOrBuilder>( bestGuessLabels_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); bestGuessLabels_ = null; @@ -8181,7 +8164,7 @@ public com.google.cloud.vision.v1.WebDetection.WebLabel.Builder addBestGuessLabe @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java index 2cdacab7d29c..f5d4033388a0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/WebDetectionParams.java @@ -22,9 +22,7 @@ private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder bui super(builder); } - private WebDetectionParams() { - includeGeoResults_ = false; - } + private WebDetectionParams() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -57,7 +55,7 @@ private WebDetectionParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -149,10 +147,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1.WebDetectionParams other = (com.google.cloud.vision.v1.WebDetectionParams) obj; - boolean result = true; - result = result && (getIncludeGeoResults() == other.getIncludeGeoResults()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getIncludeGeoResults() != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -345,35 +342,35 @@ public com.google.cloud.vision.v1.WebDetectionParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -466,7 +463,7 @@ public Builder clearIncludeGeoResults() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Word.java b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Word.java index a469b1b8adc1..7d82ec04ac52 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Word.java +++ b/google-api-grpc/proto-google-cloud-vision-v1/src/main/java/com/google/cloud/vision/v1/Word.java @@ -24,7 +24,6 @@ private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Word() { symbols_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -86,7 +85,7 @@ private Word( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -101,7 +100,7 @@ private Word( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -113,7 +112,7 @@ private Word( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); } this.unknownFields = unknownFields.build(); @@ -406,22 +405,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1.Word other = (com.google.cloud.vision.v1.Word) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getSymbolsList().equals(other.getSymbolsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList().equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -649,7 +645,7 @@ public com.google.cloud.vision.v1.Word buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -665,35 +661,35 @@ public com.google.cloud.vision.v1.Word buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -775,7 +771,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.TextAnnotation.TextProperty, com.google.cloud.vision.v1.TextAnnotation.TextProperty.Builder, @@ -957,7 +953,7 @@ public com.google.cloud.vision.v1.TextAnnotation.TextPropertyOrBuilder getProper return propertyBuilder_; } - private com.google.cloud.vision.v1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1.BoundingPoly, com.google.cloud.vision.v1.BoundingPoly.Builder, @@ -1268,7 +1264,7 @@ public com.google.cloud.vision.v1.BoundingPolyOrBuilder getBoundingBoxOrBuilder( java.util.Collections.emptyList(); private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(symbols_); bitField0_ |= 0x00000004; } @@ -1624,10 +1620,7 @@ public java.util.List getSymbolsBuild com.google.cloud.vision.v1.Symbol, com.google.cloud.vision.v1.Symbol.Builder, com.google.cloud.vision.v1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + symbols_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); symbols_ = null; } return symbolsBuilder_; @@ -1679,7 +1672,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java index de743fa33b91..26bb887c0720 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageRequest.java @@ -69,7 +69,7 @@ private AnnotateImageRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -96,7 +96,7 @@ private AnnotateImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,7 +108,7 @@ private AnnotateImageRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -333,18 +333,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p1beta1.AnnotateImageRequest) obj; - boolean result = true; - result = result && (hasImage() == other.hasImage()); + if (hasImage() != other.hasImage()) return false; if (hasImage()) { - result = result && getImage().equals(other.getImage()); + if (!getImage().equals(other.getImage())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -568,7 +567,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest buildPartial() { result.image_ = imageBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -588,35 +587,35 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -697,7 +696,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.Image image_ = null; + private com.google.cloud.vision.v1p1beta1.Image image_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.Image, com.google.cloud.vision.v1p1beta1.Image.Builder, @@ -882,7 +881,7 @@ public com.google.cloud.vision.v1p1beta1.ImageOrBuilder getImageOrBuilder() { java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1221,16 +1220,13 @@ public com.google.cloud.vision.v1p1beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p1beta1.Feature, com.google.cloud.vision.v1p1beta1.Feature.Builder, com.google.cloud.vision.v1p1beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p1beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p1beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.ImageContext, com.google.cloud.vision.v1p1beta1.ImageContext.Builder, @@ -1414,7 +1410,7 @@ public com.google.cloud.vision.v1p1beta1.ImageContextOrBuilder getImageContextOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java index 7e0075e22e20..826c04748640 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/AnnotateImageResponse.java @@ -56,7 +56,7 @@ private AnnotateImageResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -69,7 +69,7 @@ private AnnotateImageResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -82,7 +82,7 @@ private AnnotateImageResponse( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -95,7 +95,7 @@ private AnnotateImageResponse( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -108,7 +108,7 @@ private AnnotateImageResponse( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { textAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -218,7 +218,7 @@ private AnnotateImageResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -230,19 +230,19 @@ private AnnotateImageResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); } this.unknownFields = unknownFields.build(); @@ -968,39 +968,38 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) obj; - boolean result = true; - result = result && getFaceAnnotationsList().equals(other.getFaceAnnotationsList()); - result = result && getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList()); - result = result && getLogoAnnotationsList().equals(other.getLogoAnnotationsList()); - result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList()); - result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList()); - result = result && (hasFullTextAnnotation() == other.hasFullTextAnnotation()); + if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false; + if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; if (hasFullTextAnnotation()) { - result = result && getFullTextAnnotation().equals(other.getFullTextAnnotation()); + if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false; } - result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation()); + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; if (hasSafeSearchAnnotation()) { - result = result && getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation()); + if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false; } - result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation()); + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; if (hasImagePropertiesAnnotation()) { - result = - result && getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation()); + if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation())) + return false; } - result = result && (hasCropHintsAnnotation() == other.hasCropHintsAnnotation()); + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; if (hasCropHintsAnnotation()) { - result = result && getCropHintsAnnotation().equals(other.getCropHintsAnnotation()); + if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false; } - result = result && (hasWebDetection() == other.hasWebDetection()); + if (hasWebDetection() != other.hasWebDetection()) return false; if (hasWebDetection()) { - result = result && getWebDetection().equals(other.getWebDetection()); + if (!getWebDetection().equals(other.getWebDetection())) return false; } - result = result && (hasError() == other.hasError()); + if (hasError() != other.hasError()) return false; if (hasError()) { - result = result && getError().equals(other.getError()); + if (!getError().equals(other.getError())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1302,7 +1301,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -1311,7 +1310,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { result.faceAnnotations_ = faceAnnotationsBuilder_.build(); } if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1320,7 +1319,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); } if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -1329,7 +1328,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { result.logoAnnotations_ = logoAnnotationsBuilder_.build(); } if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -1338,7 +1337,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { result.labelAnnotations_ = labelAnnotationsBuilder_.build(); } if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -1383,35 +1382,35 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1616,7 +1615,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList( faceAnnotations_); @@ -1965,7 +1964,7 @@ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotatio com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder>( faceAnnotations_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); faceAnnotations_ = null; @@ -1977,7 +1976,7 @@ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotatio landmarkAnnotations_ = java.util.Collections.emptyList(); private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList( landmarkAnnotations_); @@ -2347,7 +2346,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnn com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( landmarkAnnotations_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); landmarkAnnotations_ = null; @@ -2359,7 +2358,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnn java.util.Collections.emptyList(); private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList( logoAnnotations_); @@ -2709,7 +2708,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotat com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( logoAnnotations_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); logoAnnotations_ = null; @@ -2721,7 +2720,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotat java.util.Collections.emptyList(); private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList( labelAnnotations_); @@ -3071,7 +3070,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnota com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( labelAnnotations_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); labelAnnotations_ = null; @@ -3083,7 +3082,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnota java.util.Collections.emptyList(); private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { textAnnotations_ = new java.util.ArrayList( textAnnotations_); @@ -3433,7 +3432,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotat com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( textAnnotations_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); textAnnotations_ = null; @@ -3441,7 +3440,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotat return textAnnotationsBuilder_; } - private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, @@ -3651,7 +3650,7 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder getFullTextAnnot return fullTextAnnotationBuilder_; } - private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_ = null; + private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, @@ -3838,7 +3837,7 @@ public Builder clearSafeSearchAnnotation() { return safeSearchAnnotationBuilder_; } - private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_ = null; + private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, @@ -4025,7 +4024,7 @@ public Builder clearImagePropertiesAnnotation() { return imagePropertiesAnnotationBuilder_; } - private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_ = null; + private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, @@ -4211,7 +4210,7 @@ public Builder clearCropHintsAnnotation() { return cropHintsAnnotationBuilder_; } - private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_ = null; + private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, @@ -4393,7 +4392,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOr return webDetectionBuilder_; } - private com.google.rpc.Status error_ = null; + private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; @@ -4582,7 +4581,7 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java index 42279056346d..901da470185f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesRequest.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.AnnotateImageRequest>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -211,10 +211,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,7 +411,7 @@ public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest buildPartial new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -426,35 +425,35 @@ public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesRequest buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -534,7 +533,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -884,10 +883,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder addRequest com.google.cloud.vision.v1p1beta1.AnnotateImageRequest, com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -895,7 +891,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageRequest.Builder addRequest @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java index cfef7acd2597..2ef7e2bbd398 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BatchAnnotateImagesResponse.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.AnnotateImageResponse>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -212,10 +212,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -413,7 +412,7 @@ public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse buildPartia new com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -427,35 +426,35 @@ public com.google.cloud.vision.v1p1beta1.BatchAnnotateImagesResponse buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -536,7 +535,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -889,10 +888,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p1beta1.AnnotateImageResponse, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -900,7 +896,7 @@ public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder addRespon @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java index 517c93fdf744..c89752fe6f68 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Block.java @@ -25,7 +25,6 @@ private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Block() { paragraphs_ = java.util.Collections.emptyList(); blockType_ = 0; - confidence_ = 0F; } @java.lang.Override @@ -88,7 +87,7 @@ private Block( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -112,7 +111,7 @@ private Block( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,7 +123,7 @@ private Block( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); } this.unknownFields = unknownFields.build(); @@ -661,23 +660,20 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p1beta1.Block other = (com.google.cloud.vision.v1p1beta1.Block) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getParagraphsList().equals(other.getParagraphsList()); - result = result && blockType_ == other.blockType_; - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList().equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -912,7 +908,7 @@ public com.google.cloud.vision.v1p1beta1.Block buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -929,35 +925,35 @@ public com.google.cloud.vision.v1p1beta1.Block buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1042,7 +1038,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, @@ -1228,7 +1224,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -1540,7 +1536,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(paragraphs_); bitField0_ |= 0x00000004; @@ -1881,10 +1877,7 @@ public com.google.cloud.vision.v1p1beta1.Paragraph.Builder addParagraphsBuilder( com.google.cloud.vision.v1p1beta1.Paragraph, com.google.cloud.vision.v1p1beta1.Paragraph.Builder, com.google.cloud.vision.v1p1beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + paragraphs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); paragraphs_ = null; } return paragraphsBuilder_; @@ -2014,7 +2007,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java index 90c75f9090be..3b5a1a2a9e9c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/BoundingPoly.java @@ -52,7 +52,7 @@ private BoundingPoly( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private BoundingPoly( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private BoundingPoly( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.BoundingPoly other = (com.google.cloud.vision.v1p1beta1.BoundingPoly) obj; - boolean result = true; - result = result && getVerticesList().equals(other.getVerticesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -406,7 +405,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPoly buildPartial() { new com.google.cloud.vision.v1p1beta1.BoundingPoly(this); int from_bitField0_ = bitField0_; if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -420,35 +419,35 @@ public com.google.cloud.vision.v1p1beta1.BoundingPoly buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -525,7 +524,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(vertices_); bitField0_ |= 0x00000001; } @@ -864,10 +863,7 @@ public com.google.cloud.vision.v1p1beta1.Vertex.Builder addVerticesBuilder(int i com.google.cloud.vision.v1p1beta1.Vertex, com.google.cloud.vision.v1p1beta1.Vertex.Builder, com.google.cloud.vision.v1p1beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); vertices_ = null; } return verticesBuilder_; @@ -875,7 +871,7 @@ public com.google.cloud.vision.v1p1beta1.Vertex.Builder addVerticesBuilder(int i @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java index 9a3e6d27b040..76b6b9b93c29 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ColorInfo.java @@ -23,10 +23,7 @@ private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ColorInfo() { - score_ = 0F; - pixelFraction_ = 0F; - } + private ColorInfo() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -78,7 +75,7 @@ private ColorInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -237,21 +234,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.ColorInfo other = (com.google.cloud.vision.v1p1beta1.ColorInfo) obj; - boolean result = true; - result = result && (hasColor() == other.hasColor()); + if (hasColor() != other.hasColor()) return false; if (hasColor()) { - result = result && getColor().equals(other.getColor()); + if (!getColor().equals(other.getColor())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getPixelFraction()) - == java.lang.Float.floatToIntBits(other.getPixelFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits(other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -465,35 +457,35 @@ public com.google.cloud.vision.v1p1beta1.ColorInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +538,7 @@ public Builder mergeFrom( return this; } - private com.google.type.Color color_ = null; + private com.google.type.Color color_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; @@ -808,7 +800,7 @@ public Builder clearPixelFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java index 8d7b80ac09b1..82a1ce3d6a02 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHint.java @@ -22,10 +22,7 @@ private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CropHint() { - confidence_ = 0F; - importanceFraction_ = 0F; - } + private CropHint() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -79,7 +76,7 @@ private CropHint( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -243,21 +240,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.CropHint other = (com.google.cloud.vision.v1p1beta1.CropHint) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getImportanceFraction()) - == java.lang.Float.floatToIntBits(other.getImportanceFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits(other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -470,35 +462,35 @@ public com.google.cloud.vision.v1p1beta1.CropHint buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -551,7 +543,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -835,7 +827,7 @@ public Builder clearImportanceFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java index 4503cd5b579d..a2b6b72774c7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsAnnotation.java @@ -52,7 +52,7 @@ private CropHintsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private CropHintsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private CropHintsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p1beta1.CropHintsAnnotation) obj; - boolean result = true; - result = result && getCropHintsList().equals(other.getCropHintsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCropHintsList().equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation buildPartial() { new com.google.cloud.vision.v1p1beta1.CropHintsAnnotation(this); int from_bitField0_ = bitField0_; if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(cropHints_); bitField0_ |= 0x00000001; @@ -869,10 +868,7 @@ public com.google.cloud.vision.v1p1beta1.CropHint.Builder addCropHintsBuilder(in com.google.cloud.vision.v1p1beta1.CropHint, com.google.cloud.vision.v1p1beta1.CropHint.Builder, com.google.cloud.vision.v1p1beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + cropHints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); cropHints_ = null; } return cropHintsBuilder_; @@ -880,7 +876,7 @@ public com.google.cloud.vision.v1p1beta1.CropHint.Builder addCropHintsBuilder(in @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java index 00268cca1cc1..a33e987f2001 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/CropHintsParams.java @@ -23,7 +23,7 @@ private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builde } private CropHintsParams() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); } @java.lang.Override @@ -52,31 +52,30 @@ private CropHintsParams( break; case 13: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) - && input.getBytesUntilLimit() > 0) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); } input.popLimit(limit); break; } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -88,8 +87,8 @@ private CropHintsParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -112,7 +111,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private java.util.List aspectRatios_; + private com.google.protobuf.Internal.FloatList aspectRatios_; /** * * @@ -162,7 +161,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } private int aspectRatiosMemoizedSerializedSize = -1; @@ -187,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); } for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.get(i)); + output.writeFloatNoTag(aspectRatios_.getFloat(i)); } unknownFields.writeTo(output); } @@ -224,10 +223,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.CropHintsParams other = (com.google.cloud.vision.v1p1beta1.CropHintsParams) obj; - boolean result = true; - result = result && getAspectRatiosList().equals(other.getAspectRatiosList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getAspectRatiosList().equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -386,7 +384,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -416,8 +414,8 @@ public com.google.cloud.vision.v1p1beta1.CropHintsParams buildPartial() { com.google.cloud.vision.v1p1beta1.CropHintsParams result = new com.google.cloud.vision.v1p1beta1.CropHintsParams(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.aspectRatios_ = aspectRatios_; @@ -427,35 +425,35 @@ public com.google.cloud.vision.v1p1beta1.CropHintsParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -513,11 +511,11 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List aspectRatios_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(aspectRatios_); + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); bitField0_ |= 0x00000001; } } @@ -536,7 +534,9 @@ private void ensureAspectRatiosIsMutable() { * repeated float aspect_ratios = 1; */ public java.util.List getAspectRatiosList() { - return java.util.Collections.unmodifiableList(aspectRatios_); + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(aspectRatios_) + : aspectRatios_; } /** * @@ -570,7 +570,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } /** * @@ -588,7 +588,7 @@ public float getAspectRatios(int index) { */ public Builder setAspectRatios(int index, float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.set(index, value); + aspectRatios_.setFloat(index, value); onChanged(); return this; } @@ -608,7 +608,7 @@ public Builder setAspectRatios(int index, float value) { */ public Builder addAspectRatios(float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.add(value); + aspectRatios_.addFloat(value); onChanged(); return this; } @@ -647,7 +647,7 @@ public Builder addAllAspectRatios(java.lang.Iterable * repeated float aspect_ratios = 1; */ public Builder clearAspectRatios() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -655,7 +655,7 @@ public Builder clearAspectRatios() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java index 865b1974dd92..aa14b4b14f57 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/DominantColorsAnnotation.java @@ -52,7 +52,7 @@ private DominantColorsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private DominantColorsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private DominantColorsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation) obj; - boolean result = true; - result = result && getColorsList().equals(other.getColorsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getColorsList().equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation buildPartial() new com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation(this); int from_bitField0_ = bitField0_; if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(colors_); bitField0_ |= 0x00000001; } @@ -867,10 +866,7 @@ public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder addColorsBuilder(int com.google.cloud.vision.v1p1beta1.ColorInfo, com.google.cloud.vision.v1p1beta1.ColorInfo.Builder, com.google.cloud.vision.v1p1beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + colors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); colors_ = null; } return colorsBuilder_; @@ -878,7 +874,7 @@ public com.google.cloud.vision.v1p1beta1.ColorInfo.Builder addColorsBuilder(int @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java index a515950534c8..df284fea90cc 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/EntityAnnotation.java @@ -26,9 +26,6 @@ private EntityAnnotation() { mid_ = ""; locale_ = ""; description_ = ""; - score_ = 0F; - confidence_ = 0F; - topicality_ = 0F; locations_ = java.util.Collections.emptyList(); properties_ = java.util.Collections.emptyList(); } @@ -111,7 +108,7 @@ private EntityAnnotation( } case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000080; @@ -123,7 +120,7 @@ private EntityAnnotation( } case 74: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } @@ -134,7 +131,7 @@ private EntityAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -146,10 +143,10 @@ private EntityAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); } this.unknownFields = unknownFields.build(); @@ -650,30 +647,23 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.EntityAnnotation other = (com.google.cloud.vision.v1p1beta1.EntityAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLocale().equals(other.getLocale()); - result = result && getDescription().equals(other.getDescription()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getTopicality()) - == java.lang.Float.floatToIntBits(other.getTopicality())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLocale().equals(other.getLocale())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits(other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getLocationsList().equals(other.getLocationsList()); - result = result && getPropertiesList().equals(other.getPropertiesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -926,7 +916,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000080); } @@ -935,7 +925,7 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation buildPartial() { result.locations_ = locationsBuilder_.build(); } if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); bitField0_ = (bitField0_ & ~0x00000100); } @@ -950,35 +940,35 @@ public com.google.cloud.vision.v1p1beta1.EntityAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1554,7 +1544,7 @@ public Builder clearTopicality() { return this; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -1749,7 +1739,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOr java.util.Collections.emptyList(); private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(locations_); bitField0_ |= 0x00000080; @@ -2163,10 +2153,7 @@ public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder addLocationsBuilde com.google.cloud.vision.v1p1beta1.LocationInfo, com.google.cloud.vision.v1p1beta1.LocationInfo.Builder, com.google.cloud.vision.v1p1beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); + locations_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; @@ -2176,7 +2163,7 @@ public com.google.cloud.vision.v1p1beta1.LocationInfo.Builder addLocationsBuilde java.util.Collections.emptyList(); private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(properties_); bitField0_ |= 0x00000100; @@ -2535,10 +2522,7 @@ public com.google.cloud.vision.v1p1beta1.Property.Builder addPropertiesBuilder(i com.google.cloud.vision.v1p1beta1.Property, com.google.cloud.vision.v1p1beta1.Property.Builder, com.google.cloud.vision.v1p1beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000100) == 0x00000100), - getParentForChildren(), - isClean()); + properties_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; @@ -2546,7 +2530,7 @@ public com.google.cloud.vision.v1p1beta1.Property.Builder addPropertiesBuilder(i @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java index 628f149dc6fa..75075d58bf93 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/FaceAnnotation.java @@ -24,11 +24,6 @@ private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder private FaceAnnotation() { landmarks_ = java.util.Collections.emptyList(); - rollAngle_ = 0F; - panAngle_ = 0F; - tiltAngle_ = 0F; - detectionConfidence_ = 0F; - landmarkingConfidence_ = 0F; joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; @@ -96,7 +91,7 @@ private FaceAnnotation( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark>(); @@ -184,7 +179,7 @@ private FaceAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -196,7 +191,7 @@ private FaceAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); } this.unknownFields = unknownFields.build(); @@ -348,7 +343,7 @@ private Landmark( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1362,14 +1357,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (hasPosition() == other.hasPosition()); + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { - result = result && getPosition().equals(other.getPosition()); + if (!getPosition().equals(other.getPosition())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1580,23 +1574,23 @@ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1604,13 +1598,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1740,7 +1734,7 @@ public Builder clearType() { return this; } - private com.google.cloud.vision.v1p1beta1.Position position_ = null; + private com.google.cloud.vision.v1p1beta1.Position position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.Position, com.google.cloud.vision.v1p1beta1.Position.Builder, @@ -1925,7 +1919,7 @@ public com.google.cloud.vision.v1p1beta1.PositionOrBuilder getPositionOrBuilder( @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2578,45 +2572,34 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.FaceAnnotation other = (com.google.cloud.vision.v1p1beta1.FaceAnnotation) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && (hasFdBoundingPoly() == other.hasFdBoundingPoly()); + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; if (hasFdBoundingPoly()) { - result = result && getFdBoundingPoly().equals(other.getFdBoundingPoly()); - } - result = result && getLandmarksList().equals(other.getLandmarksList()); - result = - result - && (java.lang.Float.floatToIntBits(getRollAngle()) - == java.lang.Float.floatToIntBits(other.getRollAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getPanAngle()) - == java.lang.Float.floatToIntBits(other.getPanAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getTiltAngle()) - == java.lang.Float.floatToIntBits(other.getTiltAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getDetectionConfidence()) - == java.lang.Float.floatToIntBits(other.getDetectionConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - == java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())); - result = result && joyLikelihood_ == other.joyLikelihood_; - result = result && sorrowLikelihood_ == other.sorrowLikelihood_; - result = result && angerLikelihood_ == other.angerLikelihood_; - result = result && surpriseLikelihood_ == other.surpriseLikelihood_; - result = result && underExposedLikelihood_ == other.underExposedLikelihood_; - result = result && blurredLikelihood_ == other.blurredLikelihood_; - result = result && headwearLikelihood_ == other.headwearLikelihood_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList().equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits(other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits(other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2891,7 +2874,7 @@ public com.google.cloud.vision.v1p1beta1.FaceAnnotation buildPartial() { result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); } if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -2918,35 +2901,35 @@ public com.google.cloud.vision.v1p1beta1.FaceAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3062,7 +3045,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -3298,7 +3281,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingPolyOr return boundingPolyBuilder_; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly fdBoundingPoly_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly fdBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -3529,7 +3512,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getFdBoundingPoly java.util.Collections.emptyList(); private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList( landmarks_); @@ -3884,10 +3867,7 @@ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder addLand com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); landmarks_ = null; } return landmarksBuilder_; @@ -4662,7 +4642,7 @@ public Builder clearHeadwearLikelihood() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java index 8cd2751ed283..43250514dcf5 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Feature.java @@ -27,7 +27,6 @@ private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Feature() { type_ = 0; - maxResults_ = 0; model_ = ""; } @@ -76,7 +75,7 @@ private Feature( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -580,12 +579,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.Feature other = (com.google.cloud.vision.v1p1beta1.Feature) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getMaxResults() == other.getMaxResults()); - result = result && getModel().equals(other.getModel()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getMaxResults() != other.getMaxResults()) return false; + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -791,35 +789,35 @@ public com.google.cloud.vision.v1p1beta1.Feature buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1099,7 +1097,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java index 99588173699d..5e1662549654 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Image.java @@ -73,7 +73,7 @@ private Image( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -219,14 +219,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p1beta1.Image other = (com.google.cloud.vision.v1p1beta1.Image) obj; - boolean result = true; - result = result && getContent().equals(other.getContent()); - result = result && (hasSource() == other.hasSource()); + if (!getContent().equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; if (hasSource()) { - result = result && getSource().equals(other.getSource()); + if (!getSource().equals(other.getSource())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -434,35 +433,35 @@ public com.google.cloud.vision.v1p1beta1.Image buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -565,7 +564,7 @@ public Builder clearContent() { return this; } - private com.google.cloud.vision.v1p1beta1.ImageSource source_ = null; + private com.google.cloud.vision.v1p1beta1.ImageSource source_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.ImageSource, com.google.cloud.vision.v1p1beta1.ImageSource.Builder, @@ -767,7 +766,7 @@ public com.google.cloud.vision.v1p1beta1.ImageSourceOrBuilder getSourceOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java index 6093cc58fb31..065e47c3ab24 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageContext.java @@ -69,7 +69,7 @@ private ImageContext( case 18: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -112,7 +112,7 @@ private ImageContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,7 +124,7 @@ private ImageContext( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -419,22 +419,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.ImageContext other = (com.google.cloud.vision.v1p1beta1.ImageContext) obj; - boolean result = true; - result = result && (hasLatLongRect() == other.hasLatLongRect()); + if (hasLatLongRect() != other.hasLatLongRect()) return false; if (hasLatLongRect()) { - result = result && getLatLongRect().equals(other.getLatLongRect()); + if (!getLatLongRect().equals(other.getLatLongRect())) return false; } - result = result && getLanguageHintsList().equals(other.getLanguageHintsList()); - result = result && (hasCropHintsParams() == other.hasCropHintsParams()); + if (!getLanguageHintsList().equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; if (hasCropHintsParams()) { - result = result && getCropHintsParams().equals(other.getCropHintsParams()); + if (!getCropHintsParams().equals(other.getCropHintsParams())) return false; } - result = result && (hasWebDetectionParams() == other.hasWebDetectionParams()); + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; if (hasWebDetectionParams()) { - result = result && getWebDetectionParams().equals(other.getWebDetectionParams()); + if (!getWebDetectionParams().equals(other.getWebDetectionParams())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -659,7 +658,7 @@ public com.google.cloud.vision.v1p1beta1.ImageContext buildPartial() { } else { result.latLongRect_ = latLongRectBuilder_.build(); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } @@ -681,35 +680,35 @@ public com.google.cloud.vision.v1p1beta1.ImageContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -774,7 +773,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.LatLongRect latLongRect_ = null; + private com.google.cloud.vision.v1p1beta1.LatLongRect latLongRect_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.LatLongRect, com.google.cloud.vision.v1p1beta1.LatLongRect.Builder, @@ -960,7 +959,7 @@ public com.google.cloud.vision.v1p1beta1.LatLongRectOrBuilder getLatLongRectOrBu com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); bitField0_ |= 0x00000002; } @@ -1162,7 +1161,7 @@ public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p1beta1.CropHintsParams cropHintsParams_ = null; + private com.google.cloud.vision.v1p1beta1.CropHintsParams cropHintsParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.CropHintsParams, com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder, @@ -1345,7 +1344,7 @@ public com.google.cloud.vision.v1p1beta1.CropHintsParams.Builder getCropHintsPar return cropHintsParamsBuilder_; } - private com.google.cloud.vision.v1p1beta1.WebDetectionParams webDetectionParams_ = null; + private com.google.cloud.vision.v1p1beta1.WebDetectionParams webDetectionParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.WebDetectionParams, com.google.cloud.vision.v1p1beta1.WebDetectionParams.Builder, @@ -1533,7 +1532,7 @@ public Builder clearWebDetectionParams() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java index 0415d192c4ba..fdd8f3cf568c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageProperties.java @@ -67,7 +67,7 @@ private ImageProperties( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -186,13 +186,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.ImageProperties other = (com.google.cloud.vision.v1p1beta1.ImageProperties) obj; - boolean result = true; - result = result && (hasDominantColors() == other.hasDominantColors()); + if (hasDominantColors() != other.hasDominantColors()) return false; if (hasDominantColors()) { - result = result && getDominantColors().equals(other.getDominantColors()); + if (!getDominantColors().equals(other.getDominantColors())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -395,35 +394,35 @@ public com.google.cloud.vision.v1p1beta1.ImageProperties buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -472,7 +471,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominantColors_ = null; + private com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation dominantColors_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p1beta1.DominantColorsAnnotation.Builder, @@ -660,7 +659,7 @@ public Builder clearDominantColors() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java index ccf9a0a0ffa4..179d5b09757d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/ImageSource.java @@ -67,7 +67,7 @@ private ImageSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -264,11 +264,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.ImageSource other = (com.google.cloud.vision.v1p1beta1.ImageSource) obj; - boolean result = true; - result = result && getGcsImageUri().equals(other.getGcsImageUri()); - result = result && getImageUri().equals(other.getImageUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getGcsImageUri().equals(other.getGcsImageUri())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -466,35 +465,35 @@ public com.google.cloud.vision.v1p1beta1.ImageSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -806,7 +805,7 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java index e1ac2397e601..470d8ee02444 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LatLongRect.java @@ -78,7 +78,7 @@ private LatLongRect( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -239,17 +239,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.LatLongRect other = (com.google.cloud.vision.v1p1beta1.LatLongRect) obj; - boolean result = true; - result = result && (hasMinLatLng() == other.hasMinLatLng()); + if (hasMinLatLng() != other.hasMinLatLng()) return false; if (hasMinLatLng()) { - result = result && getMinLatLng().equals(other.getMinLatLng()); + if (!getMinLatLng().equals(other.getMinLatLng())) return false; } - result = result && (hasMaxLatLng() == other.hasMaxLatLng()); + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; if (hasMaxLatLng()) { - result = result && getMaxLatLng().equals(other.getMaxLatLng()); + if (!getMaxLatLng().equals(other.getMaxLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -467,35 +466,35 @@ public com.google.cloud.vision.v1p1beta1.LatLongRect buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -545,7 +544,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng minLatLng_ = null; + private com.google.type.LatLng minLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; @@ -715,7 +714,7 @@ public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { return minLatLngBuilder_; } - private com.google.type.LatLng maxLatLng_ = null; + private com.google.type.LatLng maxLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; @@ -887,7 +886,7 @@ public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java index 484f1028023a..d5a55b642ffa 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/LocationInfo.java @@ -64,7 +64,7 @@ private LocationInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -180,13 +180,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.LocationInfo other = (com.google.cloud.vision.v1p1beta1.LocationInfo) obj; - boolean result = true; - result = result && (hasLatLng() == other.hasLatLng()); + if (hasLatLng() != other.hasLatLng()) return false; if (hasLatLng()) { - result = result && getLatLng().equals(other.getLatLng()); + if (!getLatLng().equals(other.getLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -389,35 +388,35 @@ public com.google.cloud.vision.v1p1beta1.LocationInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -464,7 +463,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng latLng_ = null; + private com.google.type.LatLng latLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; @@ -635,7 +634,7 @@ public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java index e59b16c2f966..0ac4c5d2ed7d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Page.java @@ -23,10 +23,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Page() { - width_ = 0; - height_ = 0; blocks_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -83,7 +80,7 @@ private Page( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } @@ -99,7 +96,7 @@ private Page( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -111,7 +108,7 @@ private Page( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); } this.unknownFields = unknownFields.build(); @@ -354,20 +351,17 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p1beta1.Page other = (com.google.cloud.vision.v1p1beta1.Page) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); - } - result = result && (getWidth() == other.getWidth()); - result = result && (getHeight() == other.getHeight()); - result = result && getBlocksList().equals(other.getBlocksList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProperty().equals(other.getProperty())) return false; + } + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -593,7 +587,7 @@ public com.google.cloud.vision.v1p1beta1.Page buildPartial() { result.width_ = width_; result.height_ = height_; if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -609,35 +603,35 @@ public com.google.cloud.vision.v1p1beta1.Page buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -722,7 +716,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, @@ -1000,7 +994,7 @@ public Builder clearHeight() { java.util.Collections.emptyList(); private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(blocks_); bitField0_ |= 0x00000008; } @@ -1338,10 +1332,7 @@ public java.util.List getBlocks com.google.cloud.vision.v1p1beta1.Block, com.google.cloud.vision.v1p1beta1.Block.Builder, com.google.cloud.vision.v1p1beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); + blocks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); blocks_ = null; } return blocksBuilder_; @@ -1393,7 +1384,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java index 1c4432b28398..8b536b843e27 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Paragraph.java @@ -24,7 +24,6 @@ private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Paragraph() { words_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Paragraph( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Paragraph( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Paragraph( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); } this.unknownFields = unknownFields.build(); @@ -406,22 +405,19 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.Paragraph other = (com.google.cloud.vision.v1p1beta1.Paragraph) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getWordsList().equals(other.getWordsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getWordsList().equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -652,7 +648,7 @@ public com.google.cloud.vision.v1p1beta1.Paragraph buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -668,35 +664,35 @@ public com.google.cloud.vision.v1p1beta1.Paragraph buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -778,7 +774,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, @@ -964,7 +960,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -1276,7 +1272,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(words_); bitField0_ |= 0x00000004; } @@ -1614,10 +1610,7 @@ public java.util.List getWordsBu com.google.cloud.vision.v1p1beta1.Word, com.google.cloud.vision.v1p1beta1.Word.Builder, com.google.cloud.vision.v1p1beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + words_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); words_ = null; } return wordsBuilder_; @@ -1669,7 +1662,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java index ccf5d6b73644..fb5a22be8ae9 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Position.java @@ -24,11 +24,7 @@ private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Position() { - x_ = 0F; - y_ = 0F; - z_ = 0F; - } + private Position() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -71,7 +67,7 @@ private Position( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -205,21 +201,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.Position other = (com.google.cloud.vision.v1p1beta1.Position) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = - result - && (java.lang.Float.floatToIntBits(getZ()) - == java.lang.Float.floatToIntBits(other.getZ())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (java.lang.Float.floatToIntBits(getZ()) != java.lang.Float.floatToIntBits(other.getZ())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -424,35 +413,35 @@ public com.google.cloud.vision.v1p1beta1.Position buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -639,7 +628,7 @@ public Builder clearZ() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java index 94376c8a2aae..851274ddd857 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Property.java @@ -25,7 +25,6 @@ private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Property() { name_ = ""; value_ = ""; - uint64Value_ = 0L; } @java.lang.Override @@ -73,7 +72,7 @@ private Property( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -263,12 +262,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.Property other = (com.google.cloud.vision.v1p1beta1.Property) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getValue().equals(other.getValue()); - result = result && (getUint64Value() == other.getUint64Value()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (getUint64Value() != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -471,35 +469,35 @@ public com.google.cloud.vision.v1p1beta1.Property buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -788,7 +786,7 @@ public Builder clearUint64Value() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java index 618113555e66..0462bb3e3ba3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/SafeSearchAnnotation.java @@ -93,7 +93,7 @@ private SafeSearchAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -358,14 +358,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation) obj; - boolean result = true; - result = result && adult_ == other.adult_; - result = result && spoof_ == other.spoof_; - result = result && medical_ == other.medical_; - result = result && violence_ == other.violence_; - result = result && racy_ == other.racy_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -581,35 +580,35 @@ public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1087,7 +1086,7 @@ public Builder clearRacy() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java index 0270d98152a8..9626d8ba6399 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Symbol.java @@ -24,7 +24,6 @@ private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Symbol() { text_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -99,7 +98,7 @@ private Symbol( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -376,22 +375,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p1beta1.Symbol other = (com.google.cloud.vision.v1p1beta1.Symbol) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getText().equals(other.getText()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getText().equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -619,35 +615,35 @@ public com.google.cloud.vision.v1p1beta1.Symbol buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -704,7 +700,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, @@ -890,7 +886,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -1338,7 +1334,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java index 8d24e031049b..cbc6dafdb460 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/TextAnnotation.java @@ -60,7 +60,7 @@ private TextAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -78,7 +78,7 @@ private TextAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,7 +90,7 @@ private TextAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); } this.unknownFields = unknownFields.build(); @@ -175,7 +175,6 @@ private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder build private DetectedLanguage() { languageCode_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -216,7 +215,7 @@ private DetectedLanguage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -361,14 +360,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage) obj; - boolean result = true; - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -573,23 +569,23 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -597,13 +593,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -811,7 +807,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -921,7 +917,6 @@ private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) private DetectedBreak() { type_ = 0; - isPrefix_ = false; } @java.lang.Override @@ -962,7 +957,7 @@ private DetectedBreak( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1311,11 +1306,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getIsPrefix() == other.getIsPrefix()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getIsPrefix() != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1517,23 +1511,23 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak buildParti @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1541,13 +1535,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1733,7 +1727,7 @@ public Builder clearIsPrefix() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1937,7 +1931,7 @@ private TextProperty( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage>(); @@ -1969,7 +1963,7 @@ private TextProperty( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1981,7 +1975,7 @@ private TextProperty( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); } this.unknownFields = unknownFields.build(); @@ -2178,14 +2172,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty) obj; - boolean result = true; - result = result && getDetectedLanguagesList().equals(other.getDetectedLanguagesList()); - result = result && (hasDetectedBreak() == other.hasDetectedBreak()); + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; if (hasDetectedBreak()) { - result = result && getDetectedBreak().equals(other.getDetectedBreak()); + if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2396,7 +2389,7 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty buildPartia int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -2416,23 +2409,23 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2440,13 +2433,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2531,7 +2524,7 @@ public Builder mergeFrom( detectedLanguages_ = java.util.Collections.emptyList(); private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage>( @@ -2934,7 +2927,7 @@ public Builder removeDetectedLanguages(int index) { com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedLanguageOrBuilder>( detectedLanguages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); detectedLanguages_ = null; @@ -2942,7 +2935,7 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } - private com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detectedBreak_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak detectedBreak_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p1beta1.TextAnnotation.DetectedBreak.Builder, @@ -3141,7 +3134,7 @@ public Builder clearDetectedBreak() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -3352,11 +3345,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.TextAnnotation other = (com.google.cloud.vision.v1p1beta1.TextAnnotation) obj; - boolean result = true; - result = result && getPagesList().equals(other.getPagesList()); - result = result && getText().equals(other.getText()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!getText().equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3564,7 +3556,7 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -3580,35 +3572,35 @@ public com.google.cloud.vision.v1p1beta1.TextAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3690,7 +3682,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(pages_); bitField0_ |= 0x00000001; } @@ -4028,10 +4020,7 @@ public java.util.List getPagesBu com.google.cloud.vision.v1p1beta1.Page, com.google.cloud.vision.v1p1beta1.Page.Builder, com.google.cloud.vision.v1p1beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + pages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); pages_ = null; } return pagesBuilder_; @@ -4133,7 +4122,7 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java index 1d35a9843466..fa7ae4d6def7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Vertex.java @@ -23,10 +23,7 @@ private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Vertex() { - x_ = 0; - y_ = 0; - } + private Vertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -64,7 +61,7 @@ private Vertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -176,11 +173,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p1beta1.Vertex other = (com.google.cloud.vision.v1p1beta1.Vertex) obj; - boolean result = true; - result = result && (getX() == other.getX()); - result = result && (getY() == other.getY()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getX() != other.getX()) return false; + if (getY() != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +375,35 @@ public com.google.cloud.vision.v1p1beta1.Vertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -547,7 +543,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java index 39441240a81d..a4abbadae1f6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetection.java @@ -57,7 +57,7 @@ private WebDetection( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity>(); @@ -71,7 +71,7 @@ private WebDetection( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebImage>(); @@ -85,7 +85,7 @@ private WebDetection( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebImage>(); @@ -99,7 +99,7 @@ private WebDetection( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebPage>(); @@ -113,7 +113,7 @@ private WebDetection( } case 50: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebImage>(); @@ -127,7 +127,7 @@ private WebDetection( } case 66: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel>(); @@ -141,7 +141,7 @@ private WebDetection( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -153,22 +153,22 @@ private WebDetection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); } this.unknownFields = unknownFields.build(); @@ -271,7 +271,6 @@ private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebEntity() { entityId_ = ""; - score_ = 0F; description_ = ""; } @@ -320,7 +319,7 @@ private WebEntity( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -511,15 +510,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity) obj; - boolean result = true; - result = result && getEntityId().equals(other.getEntityId()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getDescription().equals(other.getDescription()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getEntityId().equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -725,23 +721,23 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -749,13 +745,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1050,7 +1046,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1157,7 +1153,6 @@ private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebImage() { url_ = ""; - score_ = 0F; } @java.lang.Override @@ -1198,7 +1193,7 @@ private WebImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1339,14 +1334,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebImage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1547,23 +1539,23 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1571,13 +1563,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1771,7 +1763,7 @@ public Builder clearScore() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2042,7 +2034,6 @@ private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebPage() { url_ = ""; - score_ = 0F; pageTitle_ = ""; fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); @@ -2093,7 +2084,7 @@ private WebPage( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebImage>(); @@ -2107,7 +2098,7 @@ private WebPage( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p1beta1.WebDetection.WebImage>(); @@ -2121,7 +2112,7 @@ private WebPage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2133,10 +2124,10 @@ private WebPage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } this.unknownFields = unknownFields.build(); @@ -2506,18 +2497,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebPage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getPageTitle().equals(other.getPageTitle()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = - result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getPageTitle().equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2743,7 +2731,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage buildPartial() { result.score_ = score_; result.pageTitle_ = pageTitle_; if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -2752,7 +2740,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -2767,23 +2755,23 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebPage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2791,13 +2779,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3146,7 +3134,7 @@ public Builder setPageTitleBytes(com.google.protobuf.ByteString value) { fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -3559,7 +3547,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -3571,7 +3559,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -4020,7 +4008,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -4031,7 +4019,7 @@ public Builder removePartialMatchingImages(int index) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -4195,7 +4183,7 @@ private WebLabel( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -4368,11 +4356,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel) obj; - boolean result = true; - result = result && getLabel().equals(other.getLabel()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLabel().equals(other.getLabel())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -4573,23 +4560,23 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -4597,13 +4584,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -4858,7 +4845,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -5447,16 +5434,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.WebDetection other = (com.google.cloud.vision.v1p1beta1.WebDetection) obj; - boolean result = true; - result = result && getWebEntitiesList().equals(other.getWebEntitiesList()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = - result && getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList()); - result = result && getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList()); - result = result && getBestGuessLabelsList().equals(other.getBestGuessLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getWebEntitiesList().equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList())) + return false; + if (!getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList().equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -5707,7 +5693,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { new com.google.cloud.vision.v1p1beta1.WebDetection(this); int from_bitField0_ = bitField0_; if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -5716,7 +5702,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { result.webEntities_ = webEntitiesBuilder_.build(); } if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -5725,7 +5711,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -5734,7 +5720,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); @@ -5744,7 +5730,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); } if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -5753,7 +5739,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); } if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -5767,35 +5753,35 @@ public com.google.cloud.vision.v1p1beta1.WebDetection buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -6007,7 +5993,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList( webEntities_); @@ -6362,10 +6348,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder addWebEn com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + webEntities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); webEntities_ = null; } return webEntitiesBuilder_; @@ -6375,7 +6358,7 @@ public com.google.cloud.vision.v1p1beta1.WebDetection.WebEntity.Builder addWebEn fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -6768,7 +6751,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -6780,7 +6763,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -7209,7 +7192,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -7221,7 +7204,7 @@ public Builder removePartialMatchingImages(int index) { pagesWithMatchingImages_ = java.util.Collections.emptyList(); private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList( pagesWithMatchingImages_); @@ -7611,7 +7594,7 @@ public Builder removePagesWithMatchingImages(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebPageOrBuilder>( pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); pagesWithMatchingImages_ = null; @@ -7623,7 +7606,7 @@ public Builder removePagesWithMatchingImages(int index) { visuallySimilarImages_ = java.util.Collections.emptyList(); private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList( visuallySimilarImages_); @@ -8016,7 +7999,7 @@ public Builder removeVisuallySimilarImages(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebImageOrBuilder>( visuallySimilarImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); visuallySimilarImages_ = null; @@ -8028,7 +8011,7 @@ public Builder removeVisuallySimilarImages(int index) { bestGuessLabels_ = java.util.Collections.emptyList(); private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList( bestGuessLabels_); @@ -8402,7 +8385,7 @@ public Builder removeBestGuessLabels(int index) { com.google.cloud.vision.v1p1beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p1beta1.WebDetection.WebLabelOrBuilder>( bestGuessLabels_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); bestGuessLabels_ = null; @@ -8412,7 +8395,7 @@ public Builder removeBestGuessLabels(int index) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java index 410dd0cf1481..f1ad4b11a0d1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/WebDetectionParams.java @@ -22,9 +22,7 @@ private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder bui super(builder); } - private WebDetectionParams() { - includeGeoResults_ = false; - } + private WebDetectionParams() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -57,7 +55,7 @@ private WebDetectionParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -149,10 +147,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p1beta1.WebDetectionParams other = (com.google.cloud.vision.v1p1beta1.WebDetectionParams) obj; - boolean result = true; - result = result && (getIncludeGeoResults() == other.getIncludeGeoResults()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getIncludeGeoResults() != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -345,35 +342,35 @@ public com.google.cloud.vision.v1p1beta1.WebDetectionParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -468,7 +465,7 @@ public Builder clearIncludeGeoResults() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java index c770674555a2..badc4d1339a6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p1beta1/src/main/java/com/google/cloud/vision/v1p1beta1/Word.java @@ -24,7 +24,6 @@ private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Word() { symbols_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Word( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Word( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Word( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); } this.unknownFields = unknownFields.build(); @@ -410,22 +409,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p1beta1.Word other = (com.google.cloud.vision.v1p1beta1.Word) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getSymbolsList().equals(other.getSymbolsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList().equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -656,7 +652,7 @@ public com.google.cloud.vision.v1p1beta1.Word buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -672,35 +668,35 @@ public com.google.cloud.vision.v1p1beta1.Word buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +778,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p1beta1.TextAnnotation.TextProperty.Builder, @@ -968,7 +964,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p1beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.BoundingPoly, com.google.cloud.vision.v1p1beta1.BoundingPoly.Builder, @@ -1280,7 +1276,7 @@ public com.google.cloud.vision.v1p1beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(symbols_); bitField0_ |= 0x00000004; } @@ -1637,10 +1633,7 @@ public com.google.cloud.vision.v1p1beta1.Symbol.Builder addSymbolsBuilder(int in com.google.cloud.vision.v1p1beta1.Symbol, com.google.cloud.vision.v1p1beta1.Symbol.Builder, com.google.cloud.vision.v1p1beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + symbols_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); symbols_ = null; } return symbolsBuilder_; @@ -1692,7 +1685,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java index d1e63674628a..dd2964a40a6a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateFileResponse.java @@ -69,7 +69,7 @@ private AnnotateFileResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.AnnotateImageResponse>(); @@ -83,7 +83,7 @@ private AnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -95,7 +95,7 @@ private AnnotateFileResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -277,14 +277,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p2beta1.AnnotateFileResponse) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -498,7 +497,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse buildPartial() { result.inputConfig_ = inputConfigBuilder_.build(); } if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -513,35 +512,35 @@ public com.google.cloud.vision.v1p2beta1.AnnotateFileResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -619,7 +618,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, @@ -805,7 +804,7 @@ public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -1158,10 +1157,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -1169,7 +1165,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addRespon @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java index 73e1dbe1ce27..adda5a7a05e8 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageRequest.java @@ -69,7 +69,7 @@ private AnnotateImageRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -96,7 +96,7 @@ private AnnotateImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,7 +108,7 @@ private AnnotateImageRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -333,18 +333,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p2beta1.AnnotateImageRequest) obj; - boolean result = true; - result = result && (hasImage() == other.hasImage()); + if (hasImage() != other.hasImage()) return false; if (hasImage()) { - result = result && getImage().equals(other.getImage()); + if (!getImage().equals(other.getImage())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -568,7 +567,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest buildPartial() { result.image_ = imageBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -588,35 +587,35 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -697,7 +696,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.Image image_ = null; + private com.google.cloud.vision.v1p2beta1.Image image_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.Image, com.google.cloud.vision.v1p2beta1.Image.Builder, @@ -882,7 +881,7 @@ public com.google.cloud.vision.v1p2beta1.ImageOrBuilder getImageOrBuilder() { java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1221,16 +1220,13 @@ public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, @@ -1414,7 +1410,7 @@ public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java index 38abe63fac01..6ca9009bdfd9 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AnnotateImageResponse.java @@ -56,7 +56,7 @@ private AnnotateImageResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -69,7 +69,7 @@ private AnnotateImageResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -82,7 +82,7 @@ private AnnotateImageResponse( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -95,7 +95,7 @@ private AnnotateImageResponse( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -108,7 +108,7 @@ private AnnotateImageResponse( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { textAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -235,7 +235,7 @@ private AnnotateImageResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -247,19 +247,19 @@ private AnnotateImageResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); } this.unknownFields = unknownFields.build(); @@ -1035,43 +1035,42 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p2beta1.AnnotateImageResponse) obj; - boolean result = true; - result = result && getFaceAnnotationsList().equals(other.getFaceAnnotationsList()); - result = result && getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList()); - result = result && getLogoAnnotationsList().equals(other.getLogoAnnotationsList()); - result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList()); - result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList()); - result = result && (hasFullTextAnnotation() == other.hasFullTextAnnotation()); + if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false; + if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; if (hasFullTextAnnotation()) { - result = result && getFullTextAnnotation().equals(other.getFullTextAnnotation()); + if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false; } - result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation()); + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; if (hasSafeSearchAnnotation()) { - result = result && getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation()); + if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false; } - result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation()); + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; if (hasImagePropertiesAnnotation()) { - result = - result && getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation()); + if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation())) + return false; } - result = result && (hasCropHintsAnnotation() == other.hasCropHintsAnnotation()); + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; if (hasCropHintsAnnotation()) { - result = result && getCropHintsAnnotation().equals(other.getCropHintsAnnotation()); + if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false; } - result = result && (hasWebDetection() == other.hasWebDetection()); + if (hasWebDetection() != other.hasWebDetection()) return false; if (hasWebDetection()) { - result = result && getWebDetection().equals(other.getWebDetection()); + if (!getWebDetection().equals(other.getWebDetection())) return false; } - result = result && (hasError() == other.hasError()); + if (hasError() != other.hasError()) return false; if (hasError()) { - result = result && getError().equals(other.getError()); + if (!getError().equals(other.getError())) return false; } - result = result && (hasContext() == other.hasContext()); + if (hasContext() != other.hasContext()) return false; if (hasContext()) { - result = result && getContext().equals(other.getContext()); + if (!getContext().equals(other.getContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1383,7 +1382,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -1392,7 +1391,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { result.faceAnnotations_ = faceAnnotationsBuilder_.build(); } if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1401,7 +1400,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); } if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -1410,7 +1409,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { result.logoAnnotations_ = logoAnnotationsBuilder_.build(); } if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -1419,7 +1418,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { result.labelAnnotations_ = labelAnnotationsBuilder_.build(); } if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -1469,35 +1468,35 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1705,7 +1704,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList( faceAnnotations_); @@ -2054,7 +2053,7 @@ public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder addFaceAnnotatio com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotationOrBuilder>( faceAnnotations_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); faceAnnotations_ = null; @@ -2066,7 +2065,7 @@ public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Builder addFaceAnnotatio landmarkAnnotations_ = java.util.Collections.emptyList(); private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList( landmarkAnnotations_); @@ -2436,7 +2435,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLandmarkAnn com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( landmarkAnnotations_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); landmarkAnnotations_ = null; @@ -2448,7 +2447,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLandmarkAnn java.util.Collections.emptyList(); private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList( logoAnnotations_); @@ -2798,7 +2797,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLogoAnnotat com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( logoAnnotations_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); logoAnnotations_ = null; @@ -2810,7 +2809,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLogoAnnotat java.util.Collections.emptyList(); private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList( labelAnnotations_); @@ -3160,7 +3159,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLabelAnnota com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( labelAnnotations_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); labelAnnotations_ = null; @@ -3172,7 +3171,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addLabelAnnota java.util.Collections.emptyList(); private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { textAnnotations_ = new java.util.ArrayList( textAnnotations_); @@ -3522,7 +3521,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addTextAnnotat com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p2beta1.EntityAnnotationOrBuilder>( textAnnotations_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); textAnnotations_ = null; @@ -3530,7 +3529,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation.Builder addTextAnnotat return textAnnotationsBuilder_; } - private com.google.cloud.vision.v1p2beta1.TextAnnotation fullTextAnnotation_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation fullTextAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation, com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder, @@ -3740,7 +3739,7 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation.Builder getFullTextAnnot return fullTextAnnotationBuilder_; } - private com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safeSearchAnnotation_ = null; + private com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation safeSearchAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation.Builder, @@ -3927,7 +3926,7 @@ public Builder clearSafeSearchAnnotation() { return safeSearchAnnotationBuilder_; } - private com.google.cloud.vision.v1p2beta1.ImageProperties imagePropertiesAnnotation_ = null; + private com.google.cloud.vision.v1p2beta1.ImageProperties imagePropertiesAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.ImageProperties, com.google.cloud.vision.v1p2beta1.ImageProperties.Builder, @@ -4114,7 +4113,7 @@ public Builder clearImagePropertiesAnnotation() { return imagePropertiesAnnotationBuilder_; } - private com.google.cloud.vision.v1p2beta1.CropHintsAnnotation cropHintsAnnotation_ = null; + private com.google.cloud.vision.v1p2beta1.CropHintsAnnotation cropHintsAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.CropHintsAnnotation, com.google.cloud.vision.v1p2beta1.CropHintsAnnotation.Builder, @@ -4300,7 +4299,7 @@ public Builder clearCropHintsAnnotation() { return cropHintsAnnotationBuilder_; } - private com.google.cloud.vision.v1p2beta1.WebDetection webDetection_ = null; + private com.google.cloud.vision.v1p2beta1.WebDetection webDetection_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.WebDetection, com.google.cloud.vision.v1p2beta1.WebDetection.Builder, @@ -4482,7 +4481,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetectionOrBuilder getWebDetectionOr return webDetectionBuilder_; } - private com.google.rpc.Status error_ = null; + private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; @@ -4669,7 +4668,7 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return errorBuilder_; } - private com.google.cloud.vision.v1p2beta1.ImageAnnotationContext context_ = null; + private com.google.cloud.vision.v1p2beta1.ImageAnnotationContext context_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.ImageAnnotationContext, com.google.cloud.vision.v1p2beta1.ImageAnnotationContext.Builder, @@ -4862,7 +4861,7 @@ public com.google.cloud.vision.v1p2beta1.ImageAnnotationContextOrBuilder getCont @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java index 5bbca74c3d35..09bc144d4fbe 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileRequest.java @@ -68,7 +68,7 @@ private AsyncAnnotateFileRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -111,7 +111,7 @@ private AsyncAnnotateFileRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -123,7 +123,7 @@ private AsyncAnnotateFileRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -397,22 +397,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -645,7 +644,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest buildPartial() result.inputConfig_ = inputConfigBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -670,35 +669,35 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +781,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p2beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.InputConfig, com.google.cloud.vision.v1p2beta1.InputConfig.Builder, @@ -968,7 +967,7 @@ public com.google.cloud.vision.v1p2beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1307,16 +1306,13 @@ public com.google.cloud.vision.v1p2beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p2beta1.Feature, com.google.cloud.vision.v1p2beta1.Feature.Builder, com.google.cloud.vision.v1p2beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p2beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.ImageContext, com.google.cloud.vision.v1p2beta1.ImageContext.Builder, @@ -1498,7 +1494,7 @@ public com.google.cloud.vision.v1p2beta1.ImageContextOrBuilder getImageContextOr return imageContextBuilder_; } - private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, @@ -1682,7 +1678,7 @@ public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java index 12fc2806f376..f2b2f9f83e4b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncAnnotateFileResponse.java @@ -66,7 +66,7 @@ private AsyncAnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -184,13 +184,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse) obj; - boolean result = true; - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -394,35 +393,35 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -471,7 +470,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p2beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.OutputConfig, com.google.cloud.vision.v1p2beta1.OutputConfig.Builder, @@ -655,7 +654,7 @@ public com.google.cloud.vision.v1p2beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java index cf800cb4dfff..45fa85683d83 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesRequest.java @@ -54,7 +54,7 @@ private AsyncBatchAnnotateFilesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest>(); @@ -68,7 +68,7 @@ private AsyncBatchAnnotateFilesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -80,7 +80,7 @@ private AsyncBatchAnnotateFilesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -215,10 +215,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -417,7 +416,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest buildPar new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -431,35 +430,35 @@ public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesRequest buildPar @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -541,7 +540,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -896,10 +895,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder addReq com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -907,7 +903,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileRequest.Builder addReq @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java index e39d6fe467fb..3140d94d4b65 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/AsyncBatchAnnotateFilesResponse.java @@ -53,7 +53,7 @@ private AsyncBatchAnnotateFilesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse>(); @@ -67,7 +67,7 @@ private AsyncBatchAnnotateFilesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -79,7 +79,7 @@ private AsyncBatchAnnotateFilesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -219,10 +219,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -422,7 +421,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse buildPa new com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -436,35 +435,35 @@ public com.google.cloud.vision.v1p2beta1.AsyncBatchAnnotateFilesResponse buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +545,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -920,10 +919,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder addRe com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -931,7 +927,7 @@ public com.google.cloud.vision.v1p2beta1.AsyncAnnotateFileResponse.Builder addRe @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java index ace773466961..6b130499453d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesRequest.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.AnnotateImageRequest>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -211,10 +211,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,7 +411,7 @@ public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest buildPartial new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -426,35 +425,35 @@ public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesRequest buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -534,7 +533,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -884,10 +883,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder addRequest com.google.cloud.vision.v1p2beta1.AnnotateImageRequest, com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -895,7 +891,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageRequest.Builder addRequest @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java index a52e3fd2e146..7abae9f4b5c1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BatchAnnotateImagesResponse.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.AnnotateImageResponse>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -212,10 +212,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -413,7 +412,7 @@ public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse buildPartia new com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -427,35 +426,35 @@ public com.google.cloud.vision.v1p2beta1.BatchAnnotateImagesResponse buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -536,7 +535,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -889,10 +888,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p2beta1.AnnotateImageResponse, com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p2beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -900,7 +896,7 @@ public com.google.cloud.vision.v1p2beta1.AnnotateImageResponse.Builder addRespon @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java index 12260752eed8..cf2949dc11af 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Block.java @@ -25,7 +25,6 @@ private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Block() { paragraphs_ = java.util.Collections.emptyList(); blockType_ = 0; - confidence_ = 0F; } @java.lang.Override @@ -88,7 +87,7 @@ private Block( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -112,7 +111,7 @@ private Block( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,7 +123,7 @@ private Block( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); } this.unknownFields = unknownFields.build(); @@ -661,23 +660,20 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p2beta1.Block other = (com.google.cloud.vision.v1p2beta1.Block) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getParagraphsList().equals(other.getParagraphsList()); - result = result && blockType_ == other.blockType_; - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList().equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -912,7 +908,7 @@ public com.google.cloud.vision.v1p2beta1.Block buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -929,35 +925,35 @@ public com.google.cloud.vision.v1p2beta1.Block buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1042,7 +1038,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, @@ -1228,7 +1224,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -1540,7 +1536,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(paragraphs_); bitField0_ |= 0x00000004; @@ -1881,10 +1877,7 @@ public com.google.cloud.vision.v1p2beta1.Paragraph.Builder addParagraphsBuilder( com.google.cloud.vision.v1p2beta1.Paragraph, com.google.cloud.vision.v1p2beta1.Paragraph.Builder, com.google.cloud.vision.v1p2beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + paragraphs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); paragraphs_ = null; } return paragraphsBuilder_; @@ -2014,7 +2007,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java index ba7ecd32b585..faa69ba595d8 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/BoundingPoly.java @@ -53,7 +53,7 @@ private BoundingPoly( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -64,7 +64,7 @@ private BoundingPoly( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -77,7 +77,7 @@ private BoundingPoly( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -89,10 +89,10 @@ private BoundingPoly( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); } this.unknownFields = unknownFields.build(); @@ -297,11 +297,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.BoundingPoly other = (com.google.cloud.vision.v1p2beta1.BoundingPoly) obj; - boolean result = true; - result = result && getVerticesList().equals(other.getVerticesList()); - result = result && getNormalizedVerticesList().equals(other.getNormalizedVerticesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -508,7 +507,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPoly buildPartial() { new com.google.cloud.vision.v1p2beta1.BoundingPoly(this); int from_bitField0_ = bitField0_; if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -517,7 +516,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPoly buildPartial() { result.vertices_ = verticesBuilder_.build(); } if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -531,35 +530,35 @@ public com.google.cloud.vision.v1p2beta1.BoundingPoly buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -663,7 +662,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(vertices_); bitField0_ |= 0x00000001; } @@ -1002,10 +1001,7 @@ public com.google.cloud.vision.v1p2beta1.Vertex.Builder addVerticesBuilder(int i com.google.cloud.vision.v1p2beta1.Vertex, com.google.cloud.vision.v1p2beta1.Vertex.Builder, com.google.cloud.vision.v1p2beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); vertices_ = null; } return verticesBuilder_; @@ -1015,7 +1011,7 @@ public com.google.cloud.vision.v1p2beta1.Vertex.Builder addVerticesBuilder(int i java.util.Collections.emptyList(); private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList( normalizedVertices_); @@ -1384,7 +1380,7 @@ public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder addNormalizedV com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p2beta1.NormalizedVertexOrBuilder>( normalizedVertices_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); normalizedVertices_ = null; @@ -1394,7 +1390,7 @@ public com.google.cloud.vision.v1p2beta1.NormalizedVertex.Builder addNormalizedV @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java index 05cc3a52aecf..f9ec5b4a4b54 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ColorInfo.java @@ -23,10 +23,7 @@ private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ColorInfo() { - score_ = 0F; - pixelFraction_ = 0F; - } + private ColorInfo() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -78,7 +75,7 @@ private ColorInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -237,21 +234,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.ColorInfo other = (com.google.cloud.vision.v1p2beta1.ColorInfo) obj; - boolean result = true; - result = result && (hasColor() == other.hasColor()); + if (hasColor() != other.hasColor()) return false; if (hasColor()) { - result = result && getColor().equals(other.getColor()); + if (!getColor().equals(other.getColor())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getPixelFraction()) - == java.lang.Float.floatToIntBits(other.getPixelFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits(other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -465,35 +457,35 @@ public com.google.cloud.vision.v1p2beta1.ColorInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +538,7 @@ public Builder mergeFrom( return this; } - private com.google.type.Color color_ = null; + private com.google.type.Color color_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; @@ -808,7 +800,7 @@ public Builder clearPixelFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java index f0f34a88be9d..0c88707f1bfb 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHint.java @@ -22,10 +22,7 @@ private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CropHint() { - confidence_ = 0F; - importanceFraction_ = 0F; - } + private CropHint() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -79,7 +76,7 @@ private CropHint( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -243,21 +240,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.CropHint other = (com.google.cloud.vision.v1p2beta1.CropHint) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getImportanceFraction()) - == java.lang.Float.floatToIntBits(other.getImportanceFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits(other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -470,35 +462,35 @@ public com.google.cloud.vision.v1p2beta1.CropHint buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -551,7 +543,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -835,7 +827,7 @@ public Builder clearImportanceFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java index 16838e2a1bb3..1e8dd9c46d22 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsAnnotation.java @@ -52,7 +52,7 @@ private CropHintsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private CropHintsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private CropHintsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p2beta1.CropHintsAnnotation) obj; - boolean result = true; - result = result && getCropHintsList().equals(other.getCropHintsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCropHintsList().equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation buildPartial() { new com.google.cloud.vision.v1p2beta1.CropHintsAnnotation(this); int from_bitField0_ = bitField0_; if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p2beta1.CropHintsAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(cropHints_); bitField0_ |= 0x00000001; @@ -869,10 +868,7 @@ public com.google.cloud.vision.v1p2beta1.CropHint.Builder addCropHintsBuilder(in com.google.cloud.vision.v1p2beta1.CropHint, com.google.cloud.vision.v1p2beta1.CropHint.Builder, com.google.cloud.vision.v1p2beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + cropHints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); cropHints_ = null; } return cropHintsBuilder_; @@ -880,7 +876,7 @@ public com.google.cloud.vision.v1p2beta1.CropHint.Builder addCropHintsBuilder(in @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java index f758e4217854..8ee29cb1f960 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/CropHintsParams.java @@ -23,7 +23,7 @@ private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builde } private CropHintsParams() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); } @java.lang.Override @@ -52,31 +52,30 @@ private CropHintsParams( break; case 13: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) - && input.getBytesUntilLimit() > 0) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); } input.popLimit(limit); break; } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -88,8 +87,8 @@ private CropHintsParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -112,7 +111,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private java.util.List aspectRatios_; + private com.google.protobuf.Internal.FloatList aspectRatios_; /** * * @@ -162,7 +161,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } private int aspectRatiosMemoizedSerializedSize = -1; @@ -187,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); } for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.get(i)); + output.writeFloatNoTag(aspectRatios_.getFloat(i)); } unknownFields.writeTo(output); } @@ -224,10 +223,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.CropHintsParams other = (com.google.cloud.vision.v1p2beta1.CropHintsParams) obj; - boolean result = true; - result = result && getAspectRatiosList().equals(other.getAspectRatiosList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getAspectRatiosList().equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -386,7 +384,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -416,8 +414,8 @@ public com.google.cloud.vision.v1p2beta1.CropHintsParams buildPartial() { com.google.cloud.vision.v1p2beta1.CropHintsParams result = new com.google.cloud.vision.v1p2beta1.CropHintsParams(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.aspectRatios_ = aspectRatios_; @@ -427,35 +425,35 @@ public com.google.cloud.vision.v1p2beta1.CropHintsParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -513,11 +511,11 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List aspectRatios_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(aspectRatios_); + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); bitField0_ |= 0x00000001; } } @@ -536,7 +534,9 @@ private void ensureAspectRatiosIsMutable() { * repeated float aspect_ratios = 1; */ public java.util.List getAspectRatiosList() { - return java.util.Collections.unmodifiableList(aspectRatios_); + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(aspectRatios_) + : aspectRatios_; } /** * @@ -570,7 +570,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } /** * @@ -588,7 +588,7 @@ public float getAspectRatios(int index) { */ public Builder setAspectRatios(int index, float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.set(index, value); + aspectRatios_.setFloat(index, value); onChanged(); return this; } @@ -608,7 +608,7 @@ public Builder setAspectRatios(int index, float value) { */ public Builder addAspectRatios(float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.add(value); + aspectRatios_.addFloat(value); onChanged(); return this; } @@ -647,7 +647,7 @@ public Builder addAllAspectRatios(java.lang.Iterable * repeated float aspect_ratios = 1; */ public Builder clearAspectRatios() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -655,7 +655,7 @@ public Builder clearAspectRatios() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java index a624063240c6..d55b0029c4f3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/DominantColorsAnnotation.java @@ -52,7 +52,7 @@ private DominantColorsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private DominantColorsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private DominantColorsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation) obj; - boolean result = true; - result = result && getColorsList().equals(other.getColorsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getColorsList().equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation buildPartial() new com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation(this); int from_bitField0_ = bitField0_; if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(colors_); bitField0_ |= 0x00000001; } @@ -867,10 +866,7 @@ public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder addColorsBuilder(int com.google.cloud.vision.v1p2beta1.ColorInfo, com.google.cloud.vision.v1p2beta1.ColorInfo.Builder, com.google.cloud.vision.v1p2beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + colors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); colors_ = null; } return colorsBuilder_; @@ -878,7 +874,7 @@ public com.google.cloud.vision.v1p2beta1.ColorInfo.Builder addColorsBuilder(int @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java index 69e4b23a03d8..e4ff8696132d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/EntityAnnotation.java @@ -26,9 +26,6 @@ private EntityAnnotation() { mid_ = ""; locale_ = ""; description_ = ""; - score_ = 0F; - confidence_ = 0F; - topicality_ = 0F; locations_ = java.util.Collections.emptyList(); properties_ = java.util.Collections.emptyList(); } @@ -111,7 +108,7 @@ private EntityAnnotation( } case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000080; @@ -123,7 +120,7 @@ private EntityAnnotation( } case 74: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } @@ -134,7 +131,7 @@ private EntityAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -146,10 +143,10 @@ private EntityAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); } this.unknownFields = unknownFields.build(); @@ -651,30 +648,23 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.EntityAnnotation other = (com.google.cloud.vision.v1p2beta1.EntityAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLocale().equals(other.getLocale()); - result = result && getDescription().equals(other.getDescription()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getTopicality()) - == java.lang.Float.floatToIntBits(other.getTopicality())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLocale().equals(other.getLocale())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits(other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getLocationsList().equals(other.getLocationsList()); - result = result && getPropertiesList().equals(other.getPropertiesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -927,7 +917,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000080); } @@ -936,7 +926,7 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation buildPartial() { result.locations_ = locationsBuilder_.build(); } if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); bitField0_ = (bitField0_ & ~0x00000100); } @@ -951,35 +941,35 @@ public com.google.cloud.vision.v1p2beta1.EntityAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1558,7 +1548,7 @@ public Builder clearTopicality() { return this; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -1753,7 +1743,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOr java.util.Collections.emptyList(); private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(locations_); bitField0_ |= 0x00000080; @@ -2167,10 +2157,7 @@ public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder addLocationsBuilde com.google.cloud.vision.v1p2beta1.LocationInfo, com.google.cloud.vision.v1p2beta1.LocationInfo.Builder, com.google.cloud.vision.v1p2beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); + locations_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; @@ -2180,7 +2167,7 @@ public com.google.cloud.vision.v1p2beta1.LocationInfo.Builder addLocationsBuilde java.util.Collections.emptyList(); private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(properties_); bitField0_ |= 0x00000100; @@ -2539,10 +2526,7 @@ public com.google.cloud.vision.v1p2beta1.Property.Builder addPropertiesBuilder(i com.google.cloud.vision.v1p2beta1.Property, com.google.cloud.vision.v1p2beta1.Property.Builder, com.google.cloud.vision.v1p2beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000100) == 0x00000100), - getParentForChildren(), - isClean()); + properties_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; @@ -2550,7 +2534,7 @@ public com.google.cloud.vision.v1p2beta1.Property.Builder addPropertiesBuilder(i @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java index e14fad9bddbb..e40f0cbd48d9 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/FaceAnnotation.java @@ -24,11 +24,6 @@ private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder private FaceAnnotation() { landmarks_ = java.util.Collections.emptyList(); - rollAngle_ = 0F; - panAngle_ = 0F; - tiltAngle_ = 0F; - detectionConfidence_ = 0F; - landmarkingConfidence_ = 0F; joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; @@ -96,7 +91,7 @@ private FaceAnnotation( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark>(); @@ -184,7 +179,7 @@ private FaceAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -196,7 +191,7 @@ private FaceAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); } this.unknownFields = unknownFields.build(); @@ -348,7 +343,7 @@ private Landmark( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1362,14 +1357,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (hasPosition() == other.hasPosition()); + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { - result = result && getPosition().equals(other.getPosition()); + if (!getPosition().equals(other.getPosition())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1580,23 +1574,23 @@ public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1604,13 +1598,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1740,7 +1734,7 @@ public Builder clearType() { return this; } - private com.google.cloud.vision.v1p2beta1.Position position_ = null; + private com.google.cloud.vision.v1p2beta1.Position position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.Position, com.google.cloud.vision.v1p2beta1.Position.Builder, @@ -1925,7 +1919,7 @@ public com.google.cloud.vision.v1p2beta1.PositionOrBuilder getPositionOrBuilder( @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2578,45 +2572,34 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.FaceAnnotation other = (com.google.cloud.vision.v1p2beta1.FaceAnnotation) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && (hasFdBoundingPoly() == other.hasFdBoundingPoly()); + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; if (hasFdBoundingPoly()) { - result = result && getFdBoundingPoly().equals(other.getFdBoundingPoly()); - } - result = result && getLandmarksList().equals(other.getLandmarksList()); - result = - result - && (java.lang.Float.floatToIntBits(getRollAngle()) - == java.lang.Float.floatToIntBits(other.getRollAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getPanAngle()) - == java.lang.Float.floatToIntBits(other.getPanAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getTiltAngle()) - == java.lang.Float.floatToIntBits(other.getTiltAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getDetectionConfidence()) - == java.lang.Float.floatToIntBits(other.getDetectionConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - == java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())); - result = result && joyLikelihood_ == other.joyLikelihood_; - result = result && sorrowLikelihood_ == other.sorrowLikelihood_; - result = result && angerLikelihood_ == other.angerLikelihood_; - result = result && surpriseLikelihood_ == other.surpriseLikelihood_; - result = result && underExposedLikelihood_ == other.underExposedLikelihood_; - result = result && blurredLikelihood_ == other.blurredLikelihood_; - result = result && headwearLikelihood_ == other.headwearLikelihood_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList().equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits(other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits(other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2891,7 +2874,7 @@ public com.google.cloud.vision.v1p2beta1.FaceAnnotation buildPartial() { result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); } if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -2918,35 +2901,35 @@ public com.google.cloud.vision.v1p2beta1.FaceAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3062,7 +3045,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -3298,7 +3281,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingPolyOr return boundingPolyBuilder_; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly fdBoundingPoly_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly fdBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -3529,7 +3512,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getFdBoundingPoly java.util.Collections.emptyList(); private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList( landmarks_); @@ -3884,10 +3867,7 @@ public com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder addLand com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p2beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p2beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); landmarks_ = null; } return landmarksBuilder_; @@ -4662,7 +4642,7 @@ public Builder clearHeadwearLikelihood() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java index db709e50a9e3..3e229e986790 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Feature.java @@ -26,7 +26,6 @@ private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Feature() { type_ = 0; - maxResults_ = 0; model_ = ""; } @@ -75,7 +74,7 @@ private Feature( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -588,12 +587,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.Feature other = (com.google.cloud.vision.v1p2beta1.Feature) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getMaxResults() == other.getMaxResults()); - result = result && getModel().equals(other.getModel()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getMaxResults() != other.getMaxResults()) return false; + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -798,35 +796,35 @@ public com.google.cloud.vision.v1p2beta1.Feature buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1109,7 +1107,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java index e8bbf27ad0c8..4c673aa80cc6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsDestination.java @@ -59,7 +59,7 @@ private GcsDestination( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -201,10 +201,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.GcsDestination other = (com.google.cloud.vision.v1p2beta1.GcsDestination) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -397,35 +396,35 @@ public com.google.cloud.vision.v1p2beta1.GcsDestination buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -625,7 +624,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java index 0297feb21134..d438f4eac86c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/GcsSource.java @@ -59,7 +59,7 @@ private GcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -181,10 +181,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.GcsSource other = (com.google.cloud.vision.v1p2beta1.GcsSource) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -377,35 +376,35 @@ public com.google.cloud.vision.v1p2beta1.GcsSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -554,7 +553,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java index 80a36afe3563..5623a25f04d2 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Image.java @@ -73,7 +73,7 @@ private Image( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -219,14 +219,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p2beta1.Image other = (com.google.cloud.vision.v1p2beta1.Image) obj; - boolean result = true; - result = result && getContent().equals(other.getContent()); - result = result && (hasSource() == other.hasSource()); + if (!getContent().equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; if (hasSource()) { - result = result && getSource().equals(other.getSource()); + if (!getSource().equals(other.getSource())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -434,35 +433,35 @@ public com.google.cloud.vision.v1p2beta1.Image buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -565,7 +564,7 @@ public Builder clearContent() { return this; } - private com.google.cloud.vision.v1p2beta1.ImageSource source_ = null; + private com.google.cloud.vision.v1p2beta1.ImageSource source_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.ImageSource, com.google.cloud.vision.v1p2beta1.ImageSource.Builder, @@ -767,7 +766,7 @@ public com.google.cloud.vision.v1p2beta1.ImageSourceOrBuilder getSourceOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java index 7b0201bcdd57..69c8ba3917c7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageAnnotationContext.java @@ -25,7 +25,6 @@ private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder private ImageAnnotationContext() { uri_ = ""; - pageNumber_ = 0; } @java.lang.Override @@ -66,7 +65,7 @@ private ImageAnnotationContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -208,11 +207,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p2beta1.ImageAnnotationContext) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && (getPageNumber() == other.getPageNumber()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (getPageNumber() != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,35 +410,35 @@ public com.google.cloud.vision.v1p2beta1.ImageAnnotationContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -636,7 +634,7 @@ public Builder clearPageNumber() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java index 93be97a385f4..79ff8a94fb7b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageContext.java @@ -69,7 +69,7 @@ private ImageContext( case 18: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -112,7 +112,7 @@ private ImageContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,7 +124,7 @@ private ImageContext( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -419,22 +419,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.ImageContext other = (com.google.cloud.vision.v1p2beta1.ImageContext) obj; - boolean result = true; - result = result && (hasLatLongRect() == other.hasLatLongRect()); + if (hasLatLongRect() != other.hasLatLongRect()) return false; if (hasLatLongRect()) { - result = result && getLatLongRect().equals(other.getLatLongRect()); + if (!getLatLongRect().equals(other.getLatLongRect())) return false; } - result = result && getLanguageHintsList().equals(other.getLanguageHintsList()); - result = result && (hasCropHintsParams() == other.hasCropHintsParams()); + if (!getLanguageHintsList().equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; if (hasCropHintsParams()) { - result = result && getCropHintsParams().equals(other.getCropHintsParams()); + if (!getCropHintsParams().equals(other.getCropHintsParams())) return false; } - result = result && (hasWebDetectionParams() == other.hasWebDetectionParams()); + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; if (hasWebDetectionParams()) { - result = result && getWebDetectionParams().equals(other.getWebDetectionParams()); + if (!getWebDetectionParams().equals(other.getWebDetectionParams())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -659,7 +658,7 @@ public com.google.cloud.vision.v1p2beta1.ImageContext buildPartial() { } else { result.latLongRect_ = latLongRectBuilder_.build(); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } @@ -681,35 +680,35 @@ public com.google.cloud.vision.v1p2beta1.ImageContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -774,7 +773,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.LatLongRect latLongRect_ = null; + private com.google.cloud.vision.v1p2beta1.LatLongRect latLongRect_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.LatLongRect, com.google.cloud.vision.v1p2beta1.LatLongRect.Builder, @@ -960,7 +959,7 @@ public com.google.cloud.vision.v1p2beta1.LatLongRectOrBuilder getLatLongRectOrBu com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); bitField0_ |= 0x00000002; } @@ -1162,7 +1161,7 @@ public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p2beta1.CropHintsParams cropHintsParams_ = null; + private com.google.cloud.vision.v1p2beta1.CropHintsParams cropHintsParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.CropHintsParams, com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder, @@ -1345,7 +1344,7 @@ public com.google.cloud.vision.v1p2beta1.CropHintsParams.Builder getCropHintsPar return cropHintsParamsBuilder_; } - private com.google.cloud.vision.v1p2beta1.WebDetectionParams webDetectionParams_ = null; + private com.google.cloud.vision.v1p2beta1.WebDetectionParams webDetectionParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.WebDetectionParams, com.google.cloud.vision.v1p2beta1.WebDetectionParams.Builder, @@ -1533,7 +1532,7 @@ public Builder clearWebDetectionParams() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java index c8e7029992b8..0baf3d809877 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageProperties.java @@ -67,7 +67,7 @@ private ImageProperties( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -186,13 +186,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.ImageProperties other = (com.google.cloud.vision.v1p2beta1.ImageProperties) obj; - boolean result = true; - result = result && (hasDominantColors() == other.hasDominantColors()); + if (hasDominantColors() != other.hasDominantColors()) return false; if (hasDominantColors()) { - result = result && getDominantColors().equals(other.getDominantColors()); + if (!getDominantColors().equals(other.getDominantColors())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -395,35 +394,35 @@ public com.google.cloud.vision.v1p2beta1.ImageProperties buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -472,7 +471,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominantColors_ = null; + private com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation dominantColors_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p2beta1.DominantColorsAnnotation.Builder, @@ -660,7 +659,7 @@ public Builder clearDominantColors() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java index dd3ec4e5d841..fdef97779fb2 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/ImageSource.java @@ -67,7 +67,7 @@ private ImageSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -270,11 +270,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.ImageSource other = (com.google.cloud.vision.v1p2beta1.ImageSource) obj; - boolean result = true; - result = result && getGcsImageUri().equals(other.getGcsImageUri()); - result = result && getImageUri().equals(other.getImageUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getGcsImageUri().equals(other.getGcsImageUri())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -472,35 +471,35 @@ public com.google.cloud.vision.v1p2beta1.ImageSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -827,7 +826,7 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java index 02a5274184ca..e2b14f8720ad 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/InputConfig.java @@ -75,7 +75,7 @@ private InputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -244,14 +244,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.InputConfig other = (com.google.cloud.vision.v1p2beta1.InputConfig) obj; - boolean result = true; - result = result && (hasGcsSource() == other.hasGcsSource()); + if (hasGcsSource() != other.hasGcsSource()) return false; if (hasGcsSource()) { - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; } - result = result && getMimeType().equals(other.getMimeType()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -459,35 +458,35 @@ public com.google.cloud.vision.v1p2beta1.InputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -538,7 +537,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p2beta1.GcsSource gcsSource_ = null; + private com.google.cloud.vision.v1p2beta1.GcsSource gcsSource_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.GcsSource, com.google.cloud.vision.v1p2beta1.GcsSource.Builder, @@ -821,7 +820,7 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java index 75fe9c4d6370..03e3cc15f92a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LatLongRect.java @@ -78,7 +78,7 @@ private LatLongRect( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -239,17 +239,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.LatLongRect other = (com.google.cloud.vision.v1p2beta1.LatLongRect) obj; - boolean result = true; - result = result && (hasMinLatLng() == other.hasMinLatLng()); + if (hasMinLatLng() != other.hasMinLatLng()) return false; if (hasMinLatLng()) { - result = result && getMinLatLng().equals(other.getMinLatLng()); + if (!getMinLatLng().equals(other.getMinLatLng())) return false; } - result = result && (hasMaxLatLng() == other.hasMaxLatLng()); + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; if (hasMaxLatLng()) { - result = result && getMaxLatLng().equals(other.getMaxLatLng()); + if (!getMaxLatLng().equals(other.getMaxLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -467,35 +466,35 @@ public com.google.cloud.vision.v1p2beta1.LatLongRect buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -545,7 +544,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng minLatLng_ = null; + private com.google.type.LatLng minLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; @@ -715,7 +714,7 @@ public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { return minLatLngBuilder_; } - private com.google.type.LatLng maxLatLng_ = null; + private com.google.type.LatLng maxLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; @@ -887,7 +886,7 @@ public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java index 770ec8769620..4b45053abb8c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/LocationInfo.java @@ -64,7 +64,7 @@ private LocationInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -180,13 +180,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.LocationInfo other = (com.google.cloud.vision.v1p2beta1.LocationInfo) obj; - boolean result = true; - result = result && (hasLatLng() == other.hasLatLng()); + if (hasLatLng() != other.hasLatLng()) return false; if (hasLatLng()) { - result = result && getLatLng().equals(other.getLatLng()); + if (!getLatLng().equals(other.getLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -389,35 +388,35 @@ public com.google.cloud.vision.v1p2beta1.LocationInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -464,7 +463,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng latLng_ = null; + private com.google.type.LatLng latLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; @@ -635,7 +634,7 @@ public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java index 54c7b84c75a4..ac3301d4ac4f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/NormalizedVertex.java @@ -24,10 +24,7 @@ private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder build super(builder); } - private NormalizedVertex() { - x_ = 0F; - y_ = 0F; - } + private NormalizedVertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -65,7 +62,7 @@ private NormalizedVertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -178,17 +175,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.NormalizedVertex other = (com.google.cloud.vision.v1p2beta1.NormalizedVertex) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -388,35 +380,35 @@ public com.google.cloud.vision.v1p2beta1.NormalizedVertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -558,7 +550,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java index efbbbb54a272..e4384c7a7cde 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OperationMetadata.java @@ -89,7 +89,7 @@ private OperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -483,18 +483,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.OperationMetadata other = (com.google.cloud.vision.v1p2beta1.OperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasCreateTime() == other.hasCreateTime()); + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - result = result && getCreateTime().equals(other.getCreateTime()); + if (!getCreateTime().equals(other.getCreateTime())) return false; } - result = result && (hasUpdateTime() == other.hasUpdateTime()); + if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { - result = result && getUpdateTime().equals(other.getUpdateTime()); + if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -717,35 +716,35 @@ public com.google.cloud.vision.v1p2beta1.OperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -878,7 +877,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp createTime_ = null; + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1057,7 +1056,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } - private com.google.protobuf.Timestamp updateTime_ = null; + private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1238,7 +1237,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java index ce158674fdac..85e4efe8d46c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/OutputConfig.java @@ -22,9 +22,7 @@ private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) super(builder); } - private OutputConfig() { - batchSize_ = 0; - } + private OutputConfig() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -73,7 +71,7 @@ private OutputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -219,14 +217,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.OutputConfig other = (com.google.cloud.vision.v1p2beta1.OutputConfig) obj; - boolean result = true; - result = result && (hasGcsDestination() == other.hasGcsDestination()); + if (hasGcsDestination() != other.hasGcsDestination()) return false; if (hasGcsDestination()) { - result = result && getGcsDestination().equals(other.getGcsDestination()); + if (!getGcsDestination().equals(other.getGcsDestination())) return false; } - result = result && (getBatchSize() == other.getBatchSize()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getBatchSize() != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -434,35 +431,35 @@ public com.google.cloud.vision.v1p2beta1.OutputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -512,7 +509,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p2beta1.GcsDestination gcsDestination_ = null; + private com.google.cloud.vision.v1p2beta1.GcsDestination gcsDestination_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.GcsDestination, com.google.cloud.vision.v1p2beta1.GcsDestination.Builder, @@ -761,7 +758,7 @@ public Builder clearBatchSize() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java index 2ecc3f9c4955..fb618dca9b0d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Page.java @@ -23,10 +23,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Page() { - width_ = 0; - height_ = 0; blocks_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -83,7 +80,7 @@ private Page( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } @@ -99,7 +96,7 @@ private Page( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -111,7 +108,7 @@ private Page( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); } this.unknownFields = unknownFields.build(); @@ -356,20 +353,17 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p2beta1.Page other = (com.google.cloud.vision.v1p2beta1.Page) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); - } - result = result && (getWidth() == other.getWidth()); - result = result && (getHeight() == other.getHeight()); - result = result && getBlocksList().equals(other.getBlocksList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProperty().equals(other.getProperty())) return false; + } + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -595,7 +589,7 @@ public com.google.cloud.vision.v1p2beta1.Page buildPartial() { result.width_ = width_; result.height_ = height_; if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -611,35 +605,35 @@ public com.google.cloud.vision.v1p2beta1.Page buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -724,7 +718,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, @@ -1008,7 +1002,7 @@ public Builder clearHeight() { java.util.Collections.emptyList(); private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(blocks_); bitField0_ |= 0x00000008; } @@ -1346,10 +1340,7 @@ public java.util.List getBlocks com.google.cloud.vision.v1p2beta1.Block, com.google.cloud.vision.v1p2beta1.Block.Builder, com.google.cloud.vision.v1p2beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); + blocks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); blocks_ = null; } return blocksBuilder_; @@ -1401,7 +1392,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java index 2e90d36d8f3b..0d5841f42867 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Paragraph.java @@ -24,7 +24,6 @@ private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Paragraph() { words_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Paragraph( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Paragraph( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Paragraph( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); } this.unknownFields = unknownFields.build(); @@ -406,22 +405,19 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.Paragraph other = (com.google.cloud.vision.v1p2beta1.Paragraph) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getWordsList().equals(other.getWordsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getWordsList().equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -652,7 +648,7 @@ public com.google.cloud.vision.v1p2beta1.Paragraph buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -668,35 +664,35 @@ public com.google.cloud.vision.v1p2beta1.Paragraph buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -778,7 +774,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, @@ -964,7 +960,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -1276,7 +1272,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(words_); bitField0_ |= 0x00000004; } @@ -1614,10 +1610,7 @@ public java.util.List getWordsBu com.google.cloud.vision.v1p2beta1.Word, com.google.cloud.vision.v1p2beta1.Word.Builder, com.google.cloud.vision.v1p2beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + words_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); words_ = null; } return wordsBuilder_; @@ -1669,7 +1662,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java index fabc4d638579..6a32c77d11a1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Position.java @@ -24,11 +24,7 @@ private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Position() { - x_ = 0F; - y_ = 0F; - z_ = 0F; - } + private Position() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -71,7 +67,7 @@ private Position( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -205,21 +201,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.Position other = (com.google.cloud.vision.v1p2beta1.Position) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = - result - && (java.lang.Float.floatToIntBits(getZ()) - == java.lang.Float.floatToIntBits(other.getZ())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (java.lang.Float.floatToIntBits(getZ()) != java.lang.Float.floatToIntBits(other.getZ())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -424,35 +413,35 @@ public com.google.cloud.vision.v1p2beta1.Position buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -639,7 +628,7 @@ public Builder clearZ() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java index 998cdbed05cf..b8aff973f759 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Property.java @@ -25,7 +25,6 @@ private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Property() { name_ = ""; value_ = ""; - uint64Value_ = 0L; } @java.lang.Override @@ -73,7 +72,7 @@ private Property( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -263,12 +262,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.Property other = (com.google.cloud.vision.v1p2beta1.Property) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getValue().equals(other.getValue()); - result = result && (getUint64Value() == other.getUint64Value()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (getUint64Value() != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -471,35 +469,35 @@ public com.google.cloud.vision.v1p2beta1.Property buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -788,7 +786,7 @@ public Builder clearUint64Value() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java index 22f87c44d7f5..50365662f929 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/SafeSearchAnnotation.java @@ -93,7 +93,7 @@ private SafeSearchAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -358,14 +358,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation) obj; - boolean result = true; - result = result && adult_ == other.adult_; - result = result && spoof_ == other.spoof_; - result = result && medical_ == other.medical_; - result = result && violence_ == other.violence_; - result = result && racy_ == other.racy_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -581,35 +580,35 @@ public com.google.cloud.vision.v1p2beta1.SafeSearchAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1087,7 +1086,7 @@ public Builder clearRacy() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java index dc3768845206..c13a69e09a36 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Symbol.java @@ -24,7 +24,6 @@ private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Symbol() { text_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -99,7 +98,7 @@ private Symbol( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -376,22 +375,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p2beta1.Symbol other = (com.google.cloud.vision.v1p2beta1.Symbol) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getText().equals(other.getText()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getText().equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -619,35 +615,35 @@ public com.google.cloud.vision.v1p2beta1.Symbol buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -704,7 +700,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, @@ -890,7 +886,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -1338,7 +1334,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java index e525232120ea..72cd7a2db1ce 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/TextAnnotation.java @@ -60,7 +60,7 @@ private TextAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -78,7 +78,7 @@ private TextAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,7 +90,7 @@ private TextAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); } this.unknownFields = unknownFields.build(); @@ -175,7 +175,6 @@ private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder build private DetectedLanguage() { languageCode_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -216,7 +215,7 @@ private DetectedLanguage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -361,14 +360,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage) obj; - boolean result = true; - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -573,23 +569,23 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -597,13 +593,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -811,7 +807,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -921,7 +917,6 @@ private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) private DetectedBreak() { type_ = 0; - isPrefix_ = false; } @java.lang.Override @@ -962,7 +957,7 @@ private DetectedBreak( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1311,11 +1306,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getIsPrefix() == other.getIsPrefix()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getIsPrefix() != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1517,23 +1511,23 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak buildParti @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1541,13 +1535,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1733,7 +1727,7 @@ public Builder clearIsPrefix() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1937,7 +1931,7 @@ private TextProperty( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage>(); @@ -1969,7 +1963,7 @@ private TextProperty( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1981,7 +1975,7 @@ private TextProperty( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); } this.unknownFields = unknownFields.build(); @@ -2178,14 +2172,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty) obj; - boolean result = true; - result = result && getDetectedLanguagesList().equals(other.getDetectedLanguagesList()); - result = result && (hasDetectedBreak() == other.hasDetectedBreak()); + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; if (hasDetectedBreak()) { - result = result && getDetectedBreak().equals(other.getDetectedBreak()); + if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2396,7 +2389,7 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty buildPartia int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -2416,23 +2409,23 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2440,13 +2433,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2531,7 +2524,7 @@ public Builder mergeFrom( detectedLanguages_ = java.util.Collections.emptyList(); private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage>( @@ -2934,7 +2927,7 @@ public Builder removeDetectedLanguages(int index) { com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedLanguageOrBuilder>( detectedLanguages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); detectedLanguages_ = null; @@ -2942,7 +2935,7 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } - private com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detectedBreak_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak detectedBreak_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p2beta1.TextAnnotation.DetectedBreak.Builder, @@ -3141,7 +3134,7 @@ public Builder clearDetectedBreak() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -3352,11 +3345,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.TextAnnotation other = (com.google.cloud.vision.v1p2beta1.TextAnnotation) obj; - boolean result = true; - result = result && getPagesList().equals(other.getPagesList()); - result = result && getText().equals(other.getText()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!getText().equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3564,7 +3556,7 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -3580,35 +3572,35 @@ public com.google.cloud.vision.v1p2beta1.TextAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3690,7 +3682,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(pages_); bitField0_ |= 0x00000001; } @@ -4028,10 +4020,7 @@ public java.util.List getPagesBu com.google.cloud.vision.v1p2beta1.Page, com.google.cloud.vision.v1p2beta1.Page.Builder, com.google.cloud.vision.v1p2beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + pages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); pages_ = null; } return pagesBuilder_; @@ -4133,7 +4122,7 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java index 65f8dee742d2..c2e831aec292 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Vertex.java @@ -23,10 +23,7 @@ private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Vertex() { - x_ = 0; - y_ = 0; - } + private Vertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -64,7 +61,7 @@ private Vertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -176,11 +173,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p2beta1.Vertex other = (com.google.cloud.vision.v1p2beta1.Vertex) obj; - boolean result = true; - result = result && (getX() == other.getX()); - result = result && (getY() == other.getY()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getX() != other.getX()) return false; + if (getY() != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +375,35 @@ public com.google.cloud.vision.v1p2beta1.Vertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -547,7 +543,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java index 5c0a0c6bea12..06338d9c82d7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetection.java @@ -57,7 +57,7 @@ private WebDetection( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity>(); @@ -71,7 +71,7 @@ private WebDetection( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebImage>(); @@ -85,7 +85,7 @@ private WebDetection( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebImage>(); @@ -99,7 +99,7 @@ private WebDetection( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebPage>(); @@ -113,7 +113,7 @@ private WebDetection( } case 50: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebImage>(); @@ -127,7 +127,7 @@ private WebDetection( } case 66: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel>(); @@ -141,7 +141,7 @@ private WebDetection( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -153,22 +153,22 @@ private WebDetection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); } this.unknownFields = unknownFields.build(); @@ -271,7 +271,6 @@ private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebEntity() { entityId_ = ""; - score_ = 0F; description_ = ""; } @@ -320,7 +319,7 @@ private WebEntity( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -511,15 +510,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity) obj; - boolean result = true; - result = result && getEntityId().equals(other.getEntityId()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getDescription().equals(other.getDescription()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getEntityId().equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -725,23 +721,23 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -749,13 +745,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1050,7 +1046,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1157,7 +1153,6 @@ private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebImage() { url_ = ""; - score_ = 0F; } @java.lang.Override @@ -1198,7 +1193,7 @@ private WebImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1339,14 +1334,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebImage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1547,23 +1539,23 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1571,13 +1563,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1771,7 +1763,7 @@ public Builder clearScore() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2042,7 +2034,6 @@ private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebPage() { url_ = ""; - score_ = 0F; pageTitle_ = ""; fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); @@ -2093,7 +2084,7 @@ private WebPage( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebImage>(); @@ -2107,7 +2098,7 @@ private WebPage( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p2beta1.WebDetection.WebImage>(); @@ -2121,7 +2112,7 @@ private WebPage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2133,10 +2124,10 @@ private WebPage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } this.unknownFields = unknownFields.build(); @@ -2506,18 +2497,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebPage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getPageTitle().equals(other.getPageTitle()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = - result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getPageTitle().equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2743,7 +2731,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage buildPartial() { result.score_ = score_; result.pageTitle_ = pageTitle_; if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -2752,7 +2740,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -2767,23 +2755,23 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebPage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2791,13 +2779,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3146,7 +3134,7 @@ public Builder setPageTitleBytes(com.google.protobuf.ByteString value) { fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -3559,7 +3547,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -3571,7 +3559,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -4020,7 +4008,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -4031,7 +4019,7 @@ public Builder removePartialMatchingImages(int index) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -4195,7 +4183,7 @@ private WebLabel( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -4368,11 +4356,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel) obj; - boolean result = true; - result = result && getLabel().equals(other.getLabel()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLabel().equals(other.getLabel())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -4573,23 +4560,23 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -4597,13 +4584,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -4858,7 +4845,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -5447,16 +5434,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.WebDetection other = (com.google.cloud.vision.v1p2beta1.WebDetection) obj; - boolean result = true; - result = result && getWebEntitiesList().equals(other.getWebEntitiesList()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = - result && getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList()); - result = result && getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList()); - result = result && getBestGuessLabelsList().equals(other.getBestGuessLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getWebEntitiesList().equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList())) + return false; + if (!getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList().equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -5707,7 +5693,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { new com.google.cloud.vision.v1p2beta1.WebDetection(this); int from_bitField0_ = bitField0_; if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -5716,7 +5702,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { result.webEntities_ = webEntitiesBuilder_.build(); } if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -5725,7 +5711,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -5734,7 +5720,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); @@ -5744,7 +5730,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); } if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -5753,7 +5739,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); } if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -5767,35 +5753,35 @@ public com.google.cloud.vision.v1p2beta1.WebDetection buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -6007,7 +5993,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList( webEntities_); @@ -6362,10 +6348,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder addWebEn com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + webEntities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); webEntities_ = null; } return webEntitiesBuilder_; @@ -6375,7 +6358,7 @@ public com.google.cloud.vision.v1p2beta1.WebDetection.WebEntity.Builder addWebEn fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -6768,7 +6751,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -6780,7 +6763,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -7209,7 +7192,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -7221,7 +7204,7 @@ public Builder removePartialMatchingImages(int index) { pagesWithMatchingImages_ = java.util.Collections.emptyList(); private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList( pagesWithMatchingImages_); @@ -7611,7 +7594,7 @@ public Builder removePagesWithMatchingImages(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebPageOrBuilder>( pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); pagesWithMatchingImages_ = null; @@ -7623,7 +7606,7 @@ public Builder removePagesWithMatchingImages(int index) { visuallySimilarImages_ = java.util.Collections.emptyList(); private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList( visuallySimilarImages_); @@ -8016,7 +7999,7 @@ public Builder removeVisuallySimilarImages(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebImageOrBuilder>( visuallySimilarImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); visuallySimilarImages_ = null; @@ -8028,7 +8011,7 @@ public Builder removeVisuallySimilarImages(int index) { bestGuessLabels_ = java.util.Collections.emptyList(); private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList( bestGuessLabels_); @@ -8402,7 +8385,7 @@ public Builder removeBestGuessLabels(int index) { com.google.cloud.vision.v1p2beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p2beta1.WebDetection.WebLabelOrBuilder>( bestGuessLabels_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); bestGuessLabels_ = null; @@ -8412,7 +8395,7 @@ public Builder removeBestGuessLabels(int index) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java index e0c500d41ab0..fcd73dbac1c4 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/WebDetectionParams.java @@ -22,9 +22,7 @@ private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder bui super(builder); } - private WebDetectionParams() { - includeGeoResults_ = false; - } + private WebDetectionParams() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -57,7 +55,7 @@ private WebDetectionParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -149,10 +147,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p2beta1.WebDetectionParams other = (com.google.cloud.vision.v1p2beta1.WebDetectionParams) obj; - boolean result = true; - result = result && (getIncludeGeoResults() == other.getIncludeGeoResults()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getIncludeGeoResults() != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -345,35 +342,35 @@ public com.google.cloud.vision.v1p2beta1.WebDetectionParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -468,7 +465,7 @@ public Builder clearIncludeGeoResults() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java index bb4f6b0825ea..7a4d0426ae3b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p2beta1/src/main/java/com/google/cloud/vision/v1p2beta1/Word.java @@ -24,7 +24,6 @@ private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Word() { symbols_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Word( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Word( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Word( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); } this.unknownFields = unknownFields.build(); @@ -410,22 +409,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p2beta1.Word other = (com.google.cloud.vision.v1p2beta1.Word) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getSymbolsList().equals(other.getSymbolsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList().equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -656,7 +652,7 @@ public com.google.cloud.vision.v1p2beta1.Word buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -672,35 +668,35 @@ public com.google.cloud.vision.v1p2beta1.Word buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +778,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p2beta1.TextAnnotation.TextProperty.Builder, @@ -968,7 +964,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p2beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p2beta1.BoundingPoly, com.google.cloud.vision.v1p2beta1.BoundingPoly.Builder, @@ -1280,7 +1276,7 @@ public com.google.cloud.vision.v1p2beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(symbols_); bitField0_ |= 0x00000004; } @@ -1637,10 +1633,7 @@ public com.google.cloud.vision.v1p2beta1.Symbol.Builder addSymbolsBuilder(int in com.google.cloud.vision.v1p2beta1.Symbol, com.google.cloud.vision.v1p2beta1.Symbol.Builder, com.google.cloud.vision.v1p2beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + symbols_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); symbols_ = null; } return symbolsBuilder_; @@ -1692,7 +1685,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java index 10b050e35c27..3eb17353ec83 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AddProductToProductSetRequest.java @@ -67,7 +67,7 @@ private AddProductToProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -244,11 +244,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getProduct().equals(other.getProduct()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -448,35 +447,35 @@ public com.google.cloud.vision.v1p3beta1.AddProductToProductSetRequest buildPart @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -743,7 +742,7 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java index d42ca1ea328b..693ef02a93a6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateFileResponse.java @@ -69,7 +69,7 @@ private AnnotateFileResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.AnnotateImageResponse>(); @@ -83,7 +83,7 @@ private AnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -95,7 +95,7 @@ private AnnotateFileResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -277,14 +277,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p3beta1.AnnotateFileResponse) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -498,7 +497,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse buildPartial() { result.inputConfig_ = inputConfigBuilder_.build(); } if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -513,35 +512,35 @@ public com.google.cloud.vision.v1p3beta1.AnnotateFileResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -619,7 +618,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, @@ -805,7 +804,7 @@ public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -1158,10 +1157,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -1169,7 +1165,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addRespon @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java index 1c9168370e87..163d8f9a8eb2 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageRequest.java @@ -69,7 +69,7 @@ private AnnotateImageRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -96,7 +96,7 @@ private AnnotateImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,7 +108,7 @@ private AnnotateImageRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -333,18 +333,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p3beta1.AnnotateImageRequest) obj; - boolean result = true; - result = result && (hasImage() == other.hasImage()); + if (hasImage() != other.hasImage()) return false; if (hasImage()) { - result = result && getImage().equals(other.getImage()); + if (!getImage().equals(other.getImage())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -568,7 +567,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest buildPartial() { result.image_ = imageBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -588,35 +587,35 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -697,7 +696,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.Image image_ = null; + private com.google.cloud.vision.v1p3beta1.Image image_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Image, com.google.cloud.vision.v1p3beta1.Image.Builder, @@ -882,7 +881,7 @@ public com.google.cloud.vision.v1p3beta1.ImageOrBuilder getImageOrBuilder() { java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1221,16 +1220,13 @@ public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, @@ -1414,7 +1410,7 @@ public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java index 124b3d54f39e..9cd69e97a03c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AnnotateImageResponse.java @@ -57,7 +57,7 @@ private AnnotateImageResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -70,7 +70,7 @@ private AnnotateImageResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -83,7 +83,7 @@ private AnnotateImageResponse( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -96,7 +96,7 @@ private AnnotateImageResponse( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -109,7 +109,7 @@ private AnnotateImageResponse( } case 42: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { textAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000020; @@ -253,7 +253,7 @@ private AnnotateImageResponse( } case 178: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation>(); @@ -267,7 +267,7 @@ private AnnotateImageResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -279,22 +279,22 @@ private AnnotateImageResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); } @@ -1212,51 +1212,48 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p3beta1.AnnotateImageResponse) obj; - boolean result = true; - result = result && getFaceAnnotationsList().equals(other.getFaceAnnotationsList()); - result = result && getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList()); - result = result && getLogoAnnotationsList().equals(other.getLogoAnnotationsList()); - result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList()); - result = - result - && getLocalizedObjectAnnotationsList() - .equals(other.getLocalizedObjectAnnotationsList()); - result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList()); - result = result && (hasFullTextAnnotation() == other.hasFullTextAnnotation()); + if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false; + if (!getLocalizedObjectAnnotationsList().equals(other.getLocalizedObjectAnnotationsList())) + return false; + if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; if (hasFullTextAnnotation()) { - result = result && getFullTextAnnotation().equals(other.getFullTextAnnotation()); + if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false; } - result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation()); + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; if (hasSafeSearchAnnotation()) { - result = result && getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation()); + if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false; } - result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation()); + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; if (hasImagePropertiesAnnotation()) { - result = - result && getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation()); + if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation())) + return false; } - result = result && (hasCropHintsAnnotation() == other.hasCropHintsAnnotation()); + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; if (hasCropHintsAnnotation()) { - result = result && getCropHintsAnnotation().equals(other.getCropHintsAnnotation()); + if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false; } - result = result && (hasWebDetection() == other.hasWebDetection()); + if (hasWebDetection() != other.hasWebDetection()) return false; if (hasWebDetection()) { - result = result && getWebDetection().equals(other.getWebDetection()); + if (!getWebDetection().equals(other.getWebDetection())) return false; } - result = result && (hasProductSearchResults() == other.hasProductSearchResults()); + if (hasProductSearchResults() != other.hasProductSearchResults()) return false; if (hasProductSearchResults()) { - result = result && getProductSearchResults().equals(other.getProductSearchResults()); + if (!getProductSearchResults().equals(other.getProductSearchResults())) return false; } - result = result && (hasError() == other.hasError()); + if (hasError() != other.hasError()) return false; if (hasError()) { - result = result && getError().equals(other.getError()); + if (!getError().equals(other.getError())) return false; } - result = result && (hasContext() == other.hasContext()); + if (hasContext() != other.hasContext()) return false; if (hasContext()) { - result = result && getContext().equals(other.getContext()); + if (!getContext().equals(other.getContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1589,7 +1586,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -1598,7 +1595,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { result.faceAnnotations_ = faceAnnotationsBuilder_.build(); } if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1607,7 +1604,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); } if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -1616,7 +1613,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { result.logoAnnotations_ = logoAnnotationsBuilder_.build(); } if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -1625,7 +1622,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { result.labelAnnotations_ = labelAnnotationsBuilder_.build(); } if (localizedObjectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); bitField0_ = (bitField0_ & ~0x00000010); @@ -1635,7 +1632,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); } if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -1690,35 +1687,35 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1956,7 +1953,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList( faceAnnotations_); @@ -2305,7 +2302,7 @@ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder addFaceAnnotatio com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotationOrBuilder>( faceAnnotations_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); faceAnnotations_ = null; @@ -2317,7 +2314,7 @@ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Builder addFaceAnnotatio landmarkAnnotations_ = java.util.Collections.emptyList(); private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList( landmarkAnnotations_); @@ -2687,7 +2684,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLandmarkAnn com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( landmarkAnnotations_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); landmarkAnnotations_ = null; @@ -2699,7 +2696,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLandmarkAnn java.util.Collections.emptyList(); private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList( logoAnnotations_); @@ -3049,7 +3046,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLogoAnnotat com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( logoAnnotations_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); logoAnnotations_ = null; @@ -3061,7 +3058,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLogoAnnotat java.util.Collections.emptyList(); private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList( labelAnnotations_); @@ -3411,7 +3408,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLabelAnnota com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( labelAnnotations_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); labelAnnotations_ = null; @@ -3423,7 +3420,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addLabelAnnota localizedObjectAnnotations_ = java.util.Collections.emptyList(); private void ensureLocalizedObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = new java.util.ArrayList( localizedObjectAnnotations_); @@ -3836,7 +3833,7 @@ public Builder removeLocalizedObjectAnnotations(int index) { com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotationOrBuilder>( localizedObjectAnnotations_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); localizedObjectAnnotations_ = null; @@ -3848,7 +3845,7 @@ public Builder removeLocalizedObjectAnnotations(int index) { java.util.Collections.emptyList(); private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { textAnnotations_ = new java.util.ArrayList( textAnnotations_); @@ -4198,7 +4195,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addTextAnnotat com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p3beta1.EntityAnnotationOrBuilder>( textAnnotations_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); textAnnotations_ = null; @@ -4206,7 +4203,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation.Builder addTextAnnotat return textAnnotationsBuilder_; } - private com.google.cloud.vision.v1p3beta1.TextAnnotation fullTextAnnotation_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation fullTextAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation, com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder, @@ -4416,7 +4413,7 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation.Builder getFullTextAnnot return fullTextAnnotationBuilder_; } - private com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation safeSearchAnnotation_ = null; + private com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation safeSearchAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation.Builder, @@ -4603,7 +4600,7 @@ public Builder clearSafeSearchAnnotation() { return safeSearchAnnotationBuilder_; } - private com.google.cloud.vision.v1p3beta1.ImageProperties imagePropertiesAnnotation_ = null; + private com.google.cloud.vision.v1p3beta1.ImageProperties imagePropertiesAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ImageProperties, com.google.cloud.vision.v1p3beta1.ImageProperties.Builder, @@ -4790,7 +4787,7 @@ public Builder clearImagePropertiesAnnotation() { return imagePropertiesAnnotationBuilder_; } - private com.google.cloud.vision.v1p3beta1.CropHintsAnnotation cropHintsAnnotation_ = null; + private com.google.cloud.vision.v1p3beta1.CropHintsAnnotation cropHintsAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.CropHintsAnnotation, com.google.cloud.vision.v1p3beta1.CropHintsAnnotation.Builder, @@ -4976,7 +4973,7 @@ public Builder clearCropHintsAnnotation() { return cropHintsAnnotationBuilder_; } - private com.google.cloud.vision.v1p3beta1.WebDetection webDetection_ = null; + private com.google.cloud.vision.v1p3beta1.WebDetection webDetection_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.WebDetection, com.google.cloud.vision.v1p3beta1.WebDetection.Builder, @@ -5158,7 +5155,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetectionOrBuilder getWebDetectionOr return webDetectionBuilder_; } - private com.google.cloud.vision.v1p3beta1.ProductSearchResults productSearchResults_ = null; + private com.google.cloud.vision.v1p3beta1.ProductSearchResults productSearchResults_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ProductSearchResults, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Builder, @@ -5345,7 +5342,7 @@ public Builder clearProductSearchResults() { return productSearchResultsBuilder_; } - private com.google.rpc.Status error_ = null; + private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; @@ -5532,7 +5529,7 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return errorBuilder_; } - private com.google.cloud.vision.v1p3beta1.ImageAnnotationContext context_ = null; + private com.google.cloud.vision.v1p3beta1.ImageAnnotationContext context_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ImageAnnotationContext, com.google.cloud.vision.v1p3beta1.ImageAnnotationContext.Builder, @@ -5725,7 +5722,7 @@ public com.google.cloud.vision.v1p3beta1.ImageAnnotationContextOrBuilder getCont @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java index b64bda20ece6..ff6473d5da88 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileRequest.java @@ -68,7 +68,7 @@ private AsyncAnnotateFileRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -111,7 +111,7 @@ private AsyncAnnotateFileRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -123,7 +123,7 @@ private AsyncAnnotateFileRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -397,22 +397,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -645,7 +644,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest buildPartial() result.inputConfig_ = inputConfigBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -670,35 +669,35 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +781,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, @@ -968,7 +967,7 @@ public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1307,16 +1306,13 @@ public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, @@ -1498,7 +1494,7 @@ public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOr return imageContextBuilder_; } - private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, @@ -1682,7 +1678,7 @@ public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java index 689c6ad3730a..fbf6cd390c6d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncAnnotateFileResponse.java @@ -66,7 +66,7 @@ private AsyncAnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -184,13 +184,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse) obj; - boolean result = true; - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -394,35 +393,35 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -471,7 +470,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, @@ -655,7 +654,7 @@ public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java index 03b907b6148e..64282783f4f3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesRequest.java @@ -54,7 +54,7 @@ private AsyncBatchAnnotateFilesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest>(); @@ -68,7 +68,7 @@ private AsyncBatchAnnotateFilesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -80,7 +80,7 @@ private AsyncBatchAnnotateFilesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -215,10 +215,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -417,7 +416,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest buildPar new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -431,35 +430,35 @@ public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesRequest buildPar @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -541,7 +540,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -896,10 +895,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder addReq com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -907,7 +903,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder addReq @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java index 181df23bf534..b654f6ff3902 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/AsyncBatchAnnotateFilesResponse.java @@ -53,7 +53,7 @@ private AsyncBatchAnnotateFilesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse>(); @@ -67,7 +67,7 @@ private AsyncBatchAnnotateFilesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -79,7 +79,7 @@ private AsyncBatchAnnotateFilesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -219,10 +219,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -422,7 +421,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse buildPa new com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -436,35 +435,35 @@ public com.google.cloud.vision.v1p3beta1.AsyncBatchAnnotateFilesResponse buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +545,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -920,10 +919,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder addRe com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -931,7 +927,7 @@ public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileResponse.Builder addRe @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java index 355de606c0af..34a0bd3e4fa7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesRequest.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.AnnotateImageRequest>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -211,10 +211,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,7 +411,7 @@ public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest buildPartial new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -426,35 +425,35 @@ public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesRequest buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -534,7 +533,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -884,10 +883,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder addRequest com.google.cloud.vision.v1p3beta1.AnnotateImageRequest, com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -895,7 +891,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageRequest.Builder addRequest @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java index 45da0bd7ff67..9b6772895eea 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchAnnotateImagesResponse.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.AnnotateImageResponse>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -212,10 +212,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -413,7 +412,7 @@ public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse buildPartia new com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -427,35 +426,35 @@ public com.google.cloud.vision.v1p3beta1.BatchAnnotateImagesResponse buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -536,7 +535,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -889,10 +888,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p3beta1.AnnotateImageResponse, com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p3beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -900,7 +896,7 @@ public com.google.cloud.vision.v1p3beta1.AnnotateImageResponse.Builder addRespon @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java index e71888831c48..70ed85ca7334 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BatchOperationMetadata.java @@ -91,7 +91,7 @@ private BatchOperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -497,18 +497,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.BatchOperationMetadata other = (com.google.cloud.vision.v1p3beta1.BatchOperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasSubmitTime() == other.hasSubmitTime()); + if (state_ != other.state_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; if (hasSubmitTime()) { - result = result && getSubmitTime().equals(other.getSubmitTime()); + if (!getSubmitTime().equals(other.getSubmitTime())) return false; } - result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime() != other.hasEndTime()) return false; if (hasEndTime()) { - result = result && getEndTime().equals(other.getEndTime()); + if (!getEndTime().equals(other.getEndTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -734,35 +733,35 @@ public com.google.cloud.vision.v1p3beta1.BatchOperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -895,7 +894,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp submitTime_ = null; + private com.google.protobuf.Timestamp submitTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1074,7 +1073,7 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { return submitTimeBuilder_; } - private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.Timestamp endTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1269,7 +1268,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java index a11172188d22..d44789b81d88 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Block.java @@ -25,7 +25,6 @@ private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Block() { paragraphs_ = java.util.Collections.emptyList(); blockType_ = 0; - confidence_ = 0F; } @java.lang.Override @@ -88,7 +87,7 @@ private Block( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -112,7 +111,7 @@ private Block( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,7 +123,7 @@ private Block( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); } this.unknownFields = unknownFields.build(); @@ -661,23 +660,20 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p3beta1.Block other = (com.google.cloud.vision.v1p3beta1.Block) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getParagraphsList().equals(other.getParagraphsList()); - result = result && blockType_ == other.blockType_; - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList().equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -912,7 +908,7 @@ public com.google.cloud.vision.v1p3beta1.Block buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -929,35 +925,35 @@ public com.google.cloud.vision.v1p3beta1.Block buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1042,7 +1038,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, @@ -1228,7 +1224,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -1540,7 +1536,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(paragraphs_); bitField0_ |= 0x00000004; @@ -1881,10 +1877,7 @@ public com.google.cloud.vision.v1p3beta1.Paragraph.Builder addParagraphsBuilder( com.google.cloud.vision.v1p3beta1.Paragraph, com.google.cloud.vision.v1p3beta1.Paragraph.Builder, com.google.cloud.vision.v1p3beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + paragraphs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); paragraphs_ = null; } return paragraphsBuilder_; @@ -2014,7 +2007,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java index 82043c47c8af..fb2febe51ac6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/BoundingPoly.java @@ -53,7 +53,7 @@ private BoundingPoly( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -64,7 +64,7 @@ private BoundingPoly( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -77,7 +77,7 @@ private BoundingPoly( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -89,10 +89,10 @@ private BoundingPoly( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); } this.unknownFields = unknownFields.build(); @@ -297,11 +297,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.BoundingPoly other = (com.google.cloud.vision.v1p3beta1.BoundingPoly) obj; - boolean result = true; - result = result && getVerticesList().equals(other.getVerticesList()); - result = result && getNormalizedVerticesList().equals(other.getNormalizedVerticesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -508,7 +507,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPoly buildPartial() { new com.google.cloud.vision.v1p3beta1.BoundingPoly(this); int from_bitField0_ = bitField0_; if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -517,7 +516,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPoly buildPartial() { result.vertices_ = verticesBuilder_.build(); } if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -531,35 +530,35 @@ public com.google.cloud.vision.v1p3beta1.BoundingPoly buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -663,7 +662,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(vertices_); bitField0_ |= 0x00000001; } @@ -1002,10 +1001,7 @@ public com.google.cloud.vision.v1p3beta1.Vertex.Builder addVerticesBuilder(int i com.google.cloud.vision.v1p3beta1.Vertex, com.google.cloud.vision.v1p3beta1.Vertex.Builder, com.google.cloud.vision.v1p3beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); vertices_ = null; } return verticesBuilder_; @@ -1015,7 +1011,7 @@ public com.google.cloud.vision.v1p3beta1.Vertex.Builder addVerticesBuilder(int i java.util.Collections.emptyList(); private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList( normalizedVertices_); @@ -1384,7 +1380,7 @@ public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addNormalizedV com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder>( normalizedVertices_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); normalizedVertices_ = null; @@ -1394,7 +1390,7 @@ public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addNormalizedV @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java index d122a1e2cf05..9a79e8d834bf 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ColorInfo.java @@ -23,10 +23,7 @@ private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ColorInfo() { - score_ = 0F; - pixelFraction_ = 0F; - } + private ColorInfo() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -78,7 +75,7 @@ private ColorInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -237,21 +234,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ColorInfo other = (com.google.cloud.vision.v1p3beta1.ColorInfo) obj; - boolean result = true; - result = result && (hasColor() == other.hasColor()); + if (hasColor() != other.hasColor()) return false; if (hasColor()) { - result = result && getColor().equals(other.getColor()); + if (!getColor().equals(other.getColor())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getPixelFraction()) - == java.lang.Float.floatToIntBits(other.getPixelFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits(other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -465,35 +457,35 @@ public com.google.cloud.vision.v1p3beta1.ColorInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +538,7 @@ public Builder mergeFrom( return this; } - private com.google.type.Color color_ = null; + private com.google.type.Color color_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; @@ -808,7 +800,7 @@ public Builder clearPixelFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java index b35a9fe2a081..d4fdf79e122f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductRequest.java @@ -83,7 +83,7 @@ private CreateProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -309,15 +309,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.CreateProductRequest other = (com.google.cloud.vision.v1p3beta1.CreateProductRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasProduct() == other.hasProduct()); + if (!getParent().equals(other.getParent())) return false; + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); + if (!getProduct().equals(other.getProduct())) return false; } - result = result && getProductId().equals(other.getProductId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductId().equals(other.getProductId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -531,35 +530,35 @@ public com.google.cloud.vision.v1p3beta1.CreateProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -720,7 +719,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p3beta1.Product product_ = null; + private com.google.cloud.vision.v1p3beta1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, @@ -1012,7 +1011,7 @@ public Builder setProductIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java index 67036c6cb3f8..22187b5f1667 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateProductSetRequest.java @@ -83,7 +83,7 @@ private CreateProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -307,15 +307,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.CreateProductSetRequest other = (com.google.cloud.vision.v1p3beta1.CreateProductSetRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasProductSet() == other.hasProductSet()); + if (!getParent().equals(other.getParent())) return false; + if (hasProductSet() != other.hasProductSet()) return false; if (hasProductSet()) { - result = result && getProductSet().equals(other.getProductSet()); + if (!getProductSet().equals(other.getProductSet())) return false; } - result = result && getProductSetId().equals(other.getProductSetId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSetId().equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -529,35 +528,35 @@ public com.google.cloud.vision.v1p3beta1.CreateProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -713,7 +712,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p3beta1.ProductSet productSet_ = null; + private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, @@ -1006,7 +1005,7 @@ public Builder setProductSetIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java index a021a633dc12..19b9e39afc62 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CreateReferenceImageRequest.java @@ -83,7 +83,7 @@ private CreateReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -312,15 +312,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasReferenceImage() == other.hasReferenceImage()); + if (!getParent().equals(other.getParent())) return false; + if (hasReferenceImage() != other.hasReferenceImage()) return false; if (hasReferenceImage()) { - result = result && getReferenceImage().equals(other.getReferenceImage()); + if (!getReferenceImage().equals(other.getReferenceImage())) return false; } - result = result && getReferenceImageId().equals(other.getReferenceImageId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImageId().equals(other.getReferenceImageId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -535,35 +534,35 @@ public com.google.cloud.vision.v1p3beta1.CreateReferenceImageRequest buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -726,7 +725,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p3beta1.ReferenceImage referenceImage_ = null; + private com.google.cloud.vision.v1p3beta1.ReferenceImage referenceImage_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ReferenceImage, com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, @@ -1028,7 +1027,7 @@ public Builder setReferenceImageIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java index 5f88729b260d..b36246e4e086 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHint.java @@ -22,10 +22,7 @@ private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CropHint() { - confidence_ = 0F; - importanceFraction_ = 0F; - } + private CropHint() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -79,7 +76,7 @@ private CropHint( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -243,21 +240,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.CropHint other = (com.google.cloud.vision.v1p3beta1.CropHint) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getImportanceFraction()) - == java.lang.Float.floatToIntBits(other.getImportanceFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits(other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -470,35 +462,35 @@ public com.google.cloud.vision.v1p3beta1.CropHint buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -551,7 +543,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -835,7 +827,7 @@ public Builder clearImportanceFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java index f58d0236607a..55553bc8f92e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsAnnotation.java @@ -52,7 +52,7 @@ private CropHintsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private CropHintsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private CropHintsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p3beta1.CropHintsAnnotation) obj; - boolean result = true; - result = result && getCropHintsList().equals(other.getCropHintsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCropHintsList().equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation buildPartial() { new com.google.cloud.vision.v1p3beta1.CropHintsAnnotation(this); int from_bitField0_ = bitField0_; if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p3beta1.CropHintsAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(cropHints_); bitField0_ |= 0x00000001; @@ -869,10 +868,7 @@ public com.google.cloud.vision.v1p3beta1.CropHint.Builder addCropHintsBuilder(in com.google.cloud.vision.v1p3beta1.CropHint, com.google.cloud.vision.v1p3beta1.CropHint.Builder, com.google.cloud.vision.v1p3beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + cropHints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); cropHints_ = null; } return cropHintsBuilder_; @@ -880,7 +876,7 @@ public com.google.cloud.vision.v1p3beta1.CropHint.Builder addCropHintsBuilder(in @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java index 41525e3c90fd..1362df8bc123 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/CropHintsParams.java @@ -23,7 +23,7 @@ private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builde } private CropHintsParams() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); } @java.lang.Override @@ -52,31 +52,30 @@ private CropHintsParams( break; case 13: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) - && input.getBytesUntilLimit() > 0) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); } input.popLimit(limit); break; } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -88,8 +87,8 @@ private CropHintsParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -112,7 +111,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private java.util.List aspectRatios_; + private com.google.protobuf.Internal.FloatList aspectRatios_; /** * * @@ -162,7 +161,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } private int aspectRatiosMemoizedSerializedSize = -1; @@ -187,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); } for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.get(i)); + output.writeFloatNoTag(aspectRatios_.getFloat(i)); } unknownFields.writeTo(output); } @@ -224,10 +223,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.CropHintsParams other = (com.google.cloud.vision.v1p3beta1.CropHintsParams) obj; - boolean result = true; - result = result && getAspectRatiosList().equals(other.getAspectRatiosList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getAspectRatiosList().equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -386,7 +384,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -416,8 +414,8 @@ public com.google.cloud.vision.v1p3beta1.CropHintsParams buildPartial() { com.google.cloud.vision.v1p3beta1.CropHintsParams result = new com.google.cloud.vision.v1p3beta1.CropHintsParams(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.aspectRatios_ = aspectRatios_; @@ -427,35 +425,35 @@ public com.google.cloud.vision.v1p3beta1.CropHintsParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -513,11 +511,11 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List aspectRatios_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(aspectRatios_); + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); bitField0_ |= 0x00000001; } } @@ -536,7 +534,9 @@ private void ensureAspectRatiosIsMutable() { * repeated float aspect_ratios = 1; */ public java.util.List getAspectRatiosList() { - return java.util.Collections.unmodifiableList(aspectRatios_); + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(aspectRatios_) + : aspectRatios_; } /** * @@ -570,7 +570,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } /** * @@ -588,7 +588,7 @@ public float getAspectRatios(int index) { */ public Builder setAspectRatios(int index, float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.set(index, value); + aspectRatios_.setFloat(index, value); onChanged(); return this; } @@ -608,7 +608,7 @@ public Builder setAspectRatios(int index, float value) { */ public Builder addAspectRatios(float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.add(value); + aspectRatios_.addFloat(value); onChanged(); return this; } @@ -647,7 +647,7 @@ public Builder addAllAspectRatios(java.lang.Iterable * repeated float aspect_ratios = 1; */ public Builder clearAspectRatios() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -655,7 +655,7 @@ public Builder clearAspectRatios() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java index 3b4674c42ca4..5ae24c35333b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductRequest.java @@ -59,7 +59,7 @@ private DeleteProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.DeleteProductRequest other = (com.google.cloud.vision.v1p3beta1.DeleteProductRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p3beta1.DeleteProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java index 1eaaef881fab..2d1a61a6e5c3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteProductSetRequest.java @@ -59,7 +59,7 @@ private DeleteProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest other = (com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p3beta1.DeleteProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java index 960881c86cc6..419558816622 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DeleteReferenceImageRequest.java @@ -59,7 +59,7 @@ private DeleteReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -381,35 +380,35 @@ public com.google.cloud.vision.v1p3beta1.DeleteReferenceImageRequest buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -567,7 +566,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java index 421f8f9c6d3f..91948d900cb2 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/DominantColorsAnnotation.java @@ -52,7 +52,7 @@ private DominantColorsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private DominantColorsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private DominantColorsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation) obj; - boolean result = true; - result = result && getColorsList().equals(other.getColorsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getColorsList().equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation buildPartial() new com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation(this); int from_bitField0_ = bitField0_; if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(colors_); bitField0_ |= 0x00000001; } @@ -867,10 +866,7 @@ public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder addColorsBuilder(int com.google.cloud.vision.v1p3beta1.ColorInfo, com.google.cloud.vision.v1p3beta1.ColorInfo.Builder, com.google.cloud.vision.v1p3beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + colors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); colors_ = null; } return colorsBuilder_; @@ -878,7 +874,7 @@ public com.google.cloud.vision.v1p3beta1.ColorInfo.Builder addColorsBuilder(int @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java index 5acaac95a302..16e3bbe90a1a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/EntityAnnotation.java @@ -26,9 +26,6 @@ private EntityAnnotation() { mid_ = ""; locale_ = ""; description_ = ""; - score_ = 0F; - confidence_ = 0F; - topicality_ = 0F; locations_ = java.util.Collections.emptyList(); properties_ = java.util.Collections.emptyList(); } @@ -111,7 +108,7 @@ private EntityAnnotation( } case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000080; @@ -123,7 +120,7 @@ private EntityAnnotation( } case 74: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } @@ -134,7 +131,7 @@ private EntityAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -146,10 +143,10 @@ private EntityAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); } this.unknownFields = unknownFields.build(); @@ -651,30 +648,23 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.EntityAnnotation other = (com.google.cloud.vision.v1p3beta1.EntityAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLocale().equals(other.getLocale()); - result = result && getDescription().equals(other.getDescription()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getTopicality()) - == java.lang.Float.floatToIntBits(other.getTopicality())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLocale().equals(other.getLocale())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits(other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getLocationsList().equals(other.getLocationsList()); - result = result && getPropertiesList().equals(other.getPropertiesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -927,7 +917,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000080); } @@ -936,7 +926,7 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation buildPartial() { result.locations_ = locationsBuilder_.build(); } if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); bitField0_ = (bitField0_ & ~0x00000100); } @@ -951,35 +941,35 @@ public com.google.cloud.vision.v1p3beta1.EntityAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1558,7 +1548,7 @@ public Builder clearTopicality() { return this; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -1753,7 +1743,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOr java.util.Collections.emptyList(); private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(locations_); bitField0_ |= 0x00000080; @@ -2167,10 +2157,7 @@ public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder addLocationsBuilde com.google.cloud.vision.v1p3beta1.LocationInfo, com.google.cloud.vision.v1p3beta1.LocationInfo.Builder, com.google.cloud.vision.v1p3beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); + locations_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; @@ -2180,7 +2167,7 @@ public com.google.cloud.vision.v1p3beta1.LocationInfo.Builder addLocationsBuilde java.util.Collections.emptyList(); private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(properties_); bitField0_ |= 0x00000100; @@ -2539,10 +2526,7 @@ public com.google.cloud.vision.v1p3beta1.Property.Builder addPropertiesBuilder(i com.google.cloud.vision.v1p3beta1.Property, com.google.cloud.vision.v1p3beta1.Property.Builder, com.google.cloud.vision.v1p3beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000100) == 0x00000100), - getParentForChildren(), - isClean()); + properties_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; @@ -2550,7 +2534,7 @@ public com.google.cloud.vision.v1p3beta1.Property.Builder addPropertiesBuilder(i @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java index 27ceeee80577..88f7e7a72a71 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/FaceAnnotation.java @@ -24,11 +24,6 @@ private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder private FaceAnnotation() { landmarks_ = java.util.Collections.emptyList(); - rollAngle_ = 0F; - panAngle_ = 0F; - tiltAngle_ = 0F; - detectionConfidence_ = 0F; - landmarkingConfidence_ = 0F; joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; @@ -96,7 +91,7 @@ private FaceAnnotation( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark>(); @@ -184,7 +179,7 @@ private FaceAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -196,7 +191,7 @@ private FaceAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); } this.unknownFields = unknownFields.build(); @@ -348,7 +343,7 @@ private Landmark( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1362,14 +1357,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (hasPosition() == other.hasPosition()); + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { - result = result && getPosition().equals(other.getPosition()); + if (!getPosition().equals(other.getPosition())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1580,23 +1574,23 @@ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1604,13 +1598,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1740,7 +1734,7 @@ public Builder clearType() { return this; } - private com.google.cloud.vision.v1p3beta1.Position position_ = null; + private com.google.cloud.vision.v1p3beta1.Position position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Position, com.google.cloud.vision.v1p3beta1.Position.Builder, @@ -1925,7 +1919,7 @@ public com.google.cloud.vision.v1p3beta1.PositionOrBuilder getPositionOrBuilder( @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2578,45 +2572,34 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.FaceAnnotation other = (com.google.cloud.vision.v1p3beta1.FaceAnnotation) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && (hasFdBoundingPoly() == other.hasFdBoundingPoly()); + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; if (hasFdBoundingPoly()) { - result = result && getFdBoundingPoly().equals(other.getFdBoundingPoly()); - } - result = result && getLandmarksList().equals(other.getLandmarksList()); - result = - result - && (java.lang.Float.floatToIntBits(getRollAngle()) - == java.lang.Float.floatToIntBits(other.getRollAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getPanAngle()) - == java.lang.Float.floatToIntBits(other.getPanAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getTiltAngle()) - == java.lang.Float.floatToIntBits(other.getTiltAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getDetectionConfidence()) - == java.lang.Float.floatToIntBits(other.getDetectionConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - == java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())); - result = result && joyLikelihood_ == other.joyLikelihood_; - result = result && sorrowLikelihood_ == other.sorrowLikelihood_; - result = result && angerLikelihood_ == other.angerLikelihood_; - result = result && surpriseLikelihood_ == other.surpriseLikelihood_; - result = result && underExposedLikelihood_ == other.underExposedLikelihood_; - result = result && blurredLikelihood_ == other.blurredLikelihood_; - result = result && headwearLikelihood_ == other.headwearLikelihood_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList().equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits(other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits(other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2891,7 +2874,7 @@ public com.google.cloud.vision.v1p3beta1.FaceAnnotation buildPartial() { result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); } if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -2918,35 +2901,35 @@ public com.google.cloud.vision.v1p3beta1.FaceAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3062,7 +3045,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -3298,7 +3281,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOr return boundingPolyBuilder_; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly fdBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -3529,7 +3512,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getFdBoundingPoly java.util.Collections.emptyList(); private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList( landmarks_); @@ -3884,10 +3867,7 @@ public com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder addLand com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p3beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p3beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); landmarks_ = null; } return landmarksBuilder_; @@ -4662,7 +4642,7 @@ public Builder clearHeadwearLikelihood() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java index c1afbdc6a80b..1bc177808935 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Feature.java @@ -26,7 +26,6 @@ private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Feature() { type_ = 0; - maxResults_ = 0; model_ = ""; } @@ -75,7 +74,7 @@ private Feature( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -632,12 +631,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.Feature other = (com.google.cloud.vision.v1p3beta1.Feature) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getMaxResults() == other.getMaxResults()); - result = result && getModel().equals(other.getModel()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getMaxResults() != other.getMaxResults()) return false; + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -842,35 +840,35 @@ public com.google.cloud.vision.v1p3beta1.Feature buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1153,7 +1151,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java index bc5ff970a645..2632d4760718 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsDestination.java @@ -59,7 +59,7 @@ private GcsDestination( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -201,10 +201,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.GcsDestination other = (com.google.cloud.vision.v1p3beta1.GcsDestination) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -397,35 +396,35 @@ public com.google.cloud.vision.v1p3beta1.GcsDestination buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -625,7 +624,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java index f460a0f2d559..1a6ff8e2b04f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GcsSource.java @@ -59,7 +59,7 @@ private GcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -181,10 +181,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.GcsSource other = (com.google.cloud.vision.v1p3beta1.GcsSource) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -377,35 +376,35 @@ public com.google.cloud.vision.v1p3beta1.GcsSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -554,7 +553,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java index e7e062ae9271..42e63927f45d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductRequest.java @@ -59,7 +59,7 @@ private GetProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.GetProductRequest other = (com.google.cloud.vision.v1p3beta1.GetProductRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1p3beta1.GetProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -563,7 +562,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java index 0e0dc9487def..0195f6cab8b7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetProductSetRequest.java @@ -59,7 +59,7 @@ private GetProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.GetProductSetRequest other = (com.google.cloud.vision.v1p3beta1.GetProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p3beta1.GetProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java index 0a792d8b49cc..acc16b29148e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/GetReferenceImageRequest.java @@ -59,7 +59,7 @@ private GetReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest other = (com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p3beta1.GetReferenceImageRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java index 2699dfe1f420..61b041230b08 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Image.java @@ -73,7 +73,7 @@ private Image( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -219,14 +219,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p3beta1.Image other = (com.google.cloud.vision.v1p3beta1.Image) obj; - boolean result = true; - result = result && getContent().equals(other.getContent()); - result = result && (hasSource() == other.hasSource()); + if (!getContent().equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; if (hasSource()) { - result = result && getSource().equals(other.getSource()); + if (!getSource().equals(other.getSource())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -434,35 +433,35 @@ public com.google.cloud.vision.v1p3beta1.Image buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -565,7 +564,7 @@ public Builder clearContent() { return this; } - private com.google.cloud.vision.v1p3beta1.ImageSource source_ = null; + private com.google.cloud.vision.v1p3beta1.ImageSource source_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ImageSource, com.google.cloud.vision.v1p3beta1.ImageSource.Builder, @@ -767,7 +766,7 @@ public com.google.cloud.vision.v1p3beta1.ImageSourceOrBuilder getSourceOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java index 59e247f8ddd2..5d1a7f40e095 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageAnnotationContext.java @@ -25,7 +25,6 @@ private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder private ImageAnnotationContext() { uri_ = ""; - pageNumber_ = 0; } @java.lang.Override @@ -66,7 +65,7 @@ private ImageAnnotationContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -208,11 +207,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p3beta1.ImageAnnotationContext) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && (getPageNumber() == other.getPageNumber()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (getPageNumber() != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,35 +410,35 @@ public com.google.cloud.vision.v1p3beta1.ImageAnnotationContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -636,7 +634,7 @@ public Builder clearPageNumber() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java index 5d441a91a4e0..efbef7f09b72 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageContext.java @@ -69,7 +69,7 @@ private ImageContext( case 18: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -129,7 +129,7 @@ private ImageContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -141,7 +141,7 @@ private ImageContext( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -484,26 +484,25 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImageContext other = (com.google.cloud.vision.v1p3beta1.ImageContext) obj; - boolean result = true; - result = result && (hasLatLongRect() == other.hasLatLongRect()); + if (hasLatLongRect() != other.hasLatLongRect()) return false; if (hasLatLongRect()) { - result = result && getLatLongRect().equals(other.getLatLongRect()); + if (!getLatLongRect().equals(other.getLatLongRect())) return false; } - result = result && getLanguageHintsList().equals(other.getLanguageHintsList()); - result = result && (hasCropHintsParams() == other.hasCropHintsParams()); + if (!getLanguageHintsList().equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; if (hasCropHintsParams()) { - result = result && getCropHintsParams().equals(other.getCropHintsParams()); + if (!getCropHintsParams().equals(other.getCropHintsParams())) return false; } - result = result && (hasProductSearchParams() == other.hasProductSearchParams()); + if (hasProductSearchParams() != other.hasProductSearchParams()) return false; if (hasProductSearchParams()) { - result = result && getProductSearchParams().equals(other.getProductSearchParams()); + if (!getProductSearchParams().equals(other.getProductSearchParams())) return false; } - result = result && (hasWebDetectionParams() == other.hasWebDetectionParams()); + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; if (hasWebDetectionParams()) { - result = result && getWebDetectionParams().equals(other.getWebDetectionParams()); + if (!getWebDetectionParams().equals(other.getWebDetectionParams())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -738,7 +737,7 @@ public com.google.cloud.vision.v1p3beta1.ImageContext buildPartial() { } else { result.latLongRect_ = latLongRectBuilder_.build(); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } @@ -765,35 +764,35 @@ public com.google.cloud.vision.v1p3beta1.ImageContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -861,7 +860,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.LatLongRect latLongRect_ = null; + private com.google.cloud.vision.v1p3beta1.LatLongRect latLongRect_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.LatLongRect, com.google.cloud.vision.v1p3beta1.LatLongRect.Builder, @@ -1047,7 +1046,7 @@ public com.google.cloud.vision.v1p3beta1.LatLongRectOrBuilder getLatLongRectOrBu com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); bitField0_ |= 0x00000002; } @@ -1249,7 +1248,7 @@ public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p3beta1.CropHintsParams cropHintsParams_ = null; + private com.google.cloud.vision.v1p3beta1.CropHintsParams cropHintsParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.CropHintsParams, com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder, @@ -1432,7 +1431,7 @@ public com.google.cloud.vision.v1p3beta1.CropHintsParams.Builder getCropHintsPar return cropHintsParamsBuilder_; } - private com.google.cloud.vision.v1p3beta1.ProductSearchParams productSearchParams_ = null; + private com.google.cloud.vision.v1p3beta1.ProductSearchParams productSearchParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ProductSearchParams, com.google.cloud.vision.v1p3beta1.ProductSearchParams.Builder, @@ -1618,7 +1617,7 @@ public Builder clearProductSearchParams() { return productSearchParamsBuilder_; } - private com.google.cloud.vision.v1p3beta1.WebDetectionParams webDetectionParams_ = null; + private com.google.cloud.vision.v1p3beta1.WebDetectionParams webDetectionParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.WebDetectionParams, com.google.cloud.vision.v1p3beta1.WebDetectionParams.Builder, @@ -1806,7 +1805,7 @@ public Builder clearWebDetectionParams() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java index 1d65c4872e0a..138910c5dc39 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageProperties.java @@ -67,7 +67,7 @@ private ImageProperties( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -186,13 +186,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImageProperties other = (com.google.cloud.vision.v1p3beta1.ImageProperties) obj; - boolean result = true; - result = result && (hasDominantColors() == other.hasDominantColors()); + if (hasDominantColors() != other.hasDominantColors()) return false; if (hasDominantColors()) { - result = result && getDominantColors().equals(other.getDominantColors()); + if (!getDominantColors().equals(other.getDominantColors())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -395,35 +394,35 @@ public com.google.cloud.vision.v1p3beta1.ImageProperties buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -472,7 +471,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominantColors_ = null; + private com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation dominantColors_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p3beta1.DominantColorsAnnotation.Builder, @@ -660,7 +659,7 @@ public Builder clearDominantColors() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java index ef45fb129efa..450e0f93fa04 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImageSource.java @@ -67,7 +67,7 @@ private ImageSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -270,11 +270,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImageSource other = (com.google.cloud.vision.v1p3beta1.ImageSource) obj; - boolean result = true; - result = result && getGcsImageUri().equals(other.getGcsImageUri()); - result = result && getImageUri().equals(other.getImageUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getGcsImageUri().equals(other.getGcsImageUri())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -472,35 +471,35 @@ public com.google.cloud.vision.v1p3beta1.ImageSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -827,7 +826,7 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java index 1ff7157768da..ac80eaca925d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsGcsSource.java @@ -60,7 +60,7 @@ private ImportProductSetsGcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -268,10 +268,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource) obj; - boolean result = true; - result = result && getCsvFileUri().equals(other.getCsvFileUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCsvFileUri().equals(other.getCsvFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -467,35 +466,35 @@ public com.google.cloud.vision.v1p3beta1.ImportProductSetsGcsSource buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -862,7 +861,7 @@ public Builder setCsvFileUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java index 9b5e914b9927..d8cb7690954b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsInputConfig.java @@ -71,7 +71,7 @@ private ImportProductSetsInputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -236,18 +236,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig) obj; - boolean result = true; - result = result && getSourceCase().equals(other.getSourceCase()); - if (!result) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 1: - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -455,35 +453,35 @@ public com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig buildParti @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -776,7 +774,7 @@ public Builder clearGcsSource() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java index 6196930e7c77..9cc6409663d6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsRequest.java @@ -77,7 +77,7 @@ private ImportProductSetsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -247,14 +247,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasInputConfig() == other.hasInputConfig()); + if (!getParent().equals(other.getParent())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -463,35 +462,35 @@ public com.google.cloud.vision.v1p3beta1.ImportProductSetsRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -643,7 +642,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p3beta1.ImportProductSetsInputConfig.Builder, @@ -832,7 +831,7 @@ public Builder clearInputConfig() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java index 5ec6c60f83da..4d31ed808f37 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ImportProductSetsResponse.java @@ -58,7 +58,7 @@ private ImportProductSetsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -71,7 +71,7 @@ private ImportProductSetsResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { statuses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -80,7 +80,7 @@ private ImportProductSetsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -92,10 +92,10 @@ private ImportProductSetsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); } this.unknownFields = unknownFields.build(); @@ -317,11 +317,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse other = (com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse) obj; - boolean result = true; - result = result && getReferenceImagesList().equals(other.getReferenceImagesList()); - result = result && getStatusesList().equals(other.getStatusesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImagesList().equals(other.getReferenceImagesList())) return false; + if (!getStatusesList().equals(other.getStatusesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -534,7 +533,7 @@ public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse buildPartial( new com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse(this); int from_bitField0_ = bitField0_; if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -543,7 +542,7 @@ public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse buildPartial( result.referenceImages_ = referenceImagesBuilder_.build(); } if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -557,35 +556,35 @@ public com.google.cloud.vision.v1p3beta1.ImportProductSetsResponse buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -691,7 +690,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList( referenceImages_); @@ -1040,7 +1039,7 @@ public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImag com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( referenceImages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); referenceImages_ = null; @@ -1051,7 +1050,7 @@ public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImag private java.util.List statuses_ = java.util.Collections.emptyList(); private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { statuses_ = new java.util.ArrayList(statuses_); bitField0_ |= 0x00000002; } @@ -1452,10 +1451,7 @@ public java.util.List getStatusesBuilderList() { com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - statuses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + statuses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); statuses_ = null; } return statusesBuilder_; @@ -1463,7 +1459,7 @@ public java.util.List getStatusesBuilderList() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java index 61441a162011..6f4c5f7e50a4 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/InputConfig.java @@ -75,7 +75,7 @@ private InputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -244,14 +244,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.InputConfig other = (com.google.cloud.vision.v1p3beta1.InputConfig) obj; - boolean result = true; - result = result && (hasGcsSource() == other.hasGcsSource()); + if (hasGcsSource() != other.hasGcsSource()) return false; if (hasGcsSource()) { - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; } - result = result && getMimeType().equals(other.getMimeType()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -459,35 +458,35 @@ public com.google.cloud.vision.v1p3beta1.InputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -538,7 +537,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.GcsSource gcsSource_ = null; + private com.google.cloud.vision.v1p3beta1.GcsSource gcsSource_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.GcsSource, com.google.cloud.vision.v1p3beta1.GcsSource.Builder, @@ -821,7 +820,7 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java index e83ec11fd725..bd9ccdb09cc5 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LatLongRect.java @@ -78,7 +78,7 @@ private LatLongRect( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -239,17 +239,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.LatLongRect other = (com.google.cloud.vision.v1p3beta1.LatLongRect) obj; - boolean result = true; - result = result && (hasMinLatLng() == other.hasMinLatLng()); + if (hasMinLatLng() != other.hasMinLatLng()) return false; if (hasMinLatLng()) { - result = result && getMinLatLng().equals(other.getMinLatLng()); + if (!getMinLatLng().equals(other.getMinLatLng())) return false; } - result = result && (hasMaxLatLng() == other.hasMaxLatLng()); + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; if (hasMaxLatLng()) { - result = result && getMaxLatLng().equals(other.getMaxLatLng()); + if (!getMaxLatLng().equals(other.getMaxLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -467,35 +466,35 @@ public com.google.cloud.vision.v1p3beta1.LatLongRect buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -545,7 +544,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng minLatLng_ = null; + private com.google.type.LatLng minLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; @@ -715,7 +714,7 @@ public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { return minLatLngBuilder_; } - private com.google.type.LatLng maxLatLng_ = null; + private com.google.type.LatLng maxLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; @@ -887,7 +886,7 @@ public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java index 4220fe770ee3..b91562f2680c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsRequest.java @@ -24,7 +24,6 @@ private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder private ListProductSetsRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListProductSetsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -265,12 +264,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListProductSetsRequest other = (com.google.cloud.vision.v1p3beta1.ListProductSetsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -474,35 +472,35 @@ public com.google.cloud.vision.v1p3beta1.ListProductSetsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -798,7 +796,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java index 19da6149c903..4899ef379264 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductSetsResponse.java @@ -53,7 +53,7 @@ private ListProductSetsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { productSets_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -72,7 +72,7 @@ private ListProductSetsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -84,7 +84,7 @@ private ListProductSetsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { productSets_ = java.util.Collections.unmodifiableList(productSets_); } this.unknownFields = unknownFields.build(); @@ -268,11 +268,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListProductSetsResponse other = (com.google.cloud.vision.v1p3beta1.ListProductSetsResponse) obj; - boolean result = true; - result = result && getProductSetsList().equals(other.getProductSetsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSetsList().equals(other.getProductSetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -474,7 +473,7 @@ public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse buildPartial() int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { productSets_ = java.util.Collections.unmodifiableList(productSets_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -490,35 +489,35 @@ public com.google.cloud.vision.v1p3beta1.ListProductSetsResponse buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -601,7 +600,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductSetsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { productSets_ = new java.util.ArrayList(productSets_); bitField0_ |= 0x00000001; @@ -943,10 +942,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSet.Builder addProductSetsBuilde com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder>( - productSets_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + productSets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); productSets_ = null; } return productSetsBuilder_; @@ -1053,7 +1049,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java index e7a23eec203a..6b4b33e4a9ac 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetRequest.java @@ -25,7 +25,6 @@ private ListProductsInProductSetRequest( private ListProductsInProductSetRequest() { name_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -74,7 +73,7 @@ private ListProductsInProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -268,12 +267,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -480,35 +478,35 @@ public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetRequest buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -812,7 +810,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java index 7fadc84a4767..5075c89fcbb0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsInProductSetResponse.java @@ -54,7 +54,7 @@ private ListProductsInProductSetResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -72,7 +72,7 @@ private ListProductsInProductSetResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -84,7 +84,7 @@ private ListProductsInProductSetResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } this.unknownFields = unknownFields.build(); @@ -268,11 +268,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse) obj; - boolean result = true; - result = result && getProductsList().equals(other.getProductsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -478,7 +477,7 @@ public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse buildP int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -494,35 +493,35 @@ public com.google.cloud.vision.v1p3beta1.ListProductsInProductSetResponse buildP @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -609,7 +608,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(products_); bitField0_ |= 0x00000001; } @@ -948,10 +947,7 @@ public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder(int com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -1058,7 +1054,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java index 4ff8621215e6..dd9e23b20dcc 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsRequest.java @@ -24,7 +24,6 @@ private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private ListProductsRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListProductsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -267,12 +266,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListProductsRequest other = (com.google.cloud.vision.v1p3beta1.ListProductsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -476,35 +474,35 @@ public com.google.cloud.vision.v1p3beta1.ListProductsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -805,7 +803,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java index 0fd80ddc6b62..280aea74d076 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListProductsResponse.java @@ -53,7 +53,7 @@ private ListProductsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -71,7 +71,7 @@ private ListProductsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -83,7 +83,7 @@ private ListProductsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } this.unknownFields = unknownFields.build(); @@ -267,11 +267,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListProductsResponse other = (com.google.cloud.vision.v1p3beta1.ListProductsResponse) obj; - boolean result = true; - result = result && getProductsList().equals(other.getProductsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -473,7 +472,7 @@ public com.google.cloud.vision.v1p3beta1.ListProductsResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -489,35 +488,35 @@ public com.google.cloud.vision.v1p3beta1.ListProductsResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -600,7 +599,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(products_); bitField0_ |= 0x00000001; } @@ -939,10 +938,7 @@ public com.google.cloud.vision.v1p3beta1.Product.Builder addProductsBuilder(int com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, com.google.cloud.vision.v1p3beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -1049,7 +1045,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java index 43896001cc3c..333e7c34a9e7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesRequest.java @@ -24,7 +24,6 @@ private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builde private ListReferenceImagesRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListReferenceImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -271,12 +270,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -481,35 +479,35 @@ public com.google.cloud.vision.v1p3beta1.ListReferenceImagesRequest buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -821,7 +819,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java index d2df0367016c..00baa4c9fb99 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ListReferenceImagesResponse.java @@ -24,7 +24,6 @@ private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Build private ListReferenceImagesResponse() { referenceImages_ = java.util.Collections.emptyList(); - pageSize_ = 0; nextPageToken_ = ""; } @@ -54,7 +53,7 @@ private ListReferenceImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -79,7 +78,7 @@ private ListReferenceImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -91,7 +90,7 @@ private ListReferenceImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); } this.unknownFields = unknownFields.build(); @@ -295,12 +294,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse) obj; - boolean result = true; - result = result && getReferenceImagesList().equals(other.getReferenceImagesList()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImagesList().equals(other.getReferenceImagesList())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -507,7 +505,7 @@ public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse buildPartia int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -524,35 +522,35 @@ public com.google.cloud.vision.v1p3beta1.ListReferenceImagesResponse buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -640,7 +638,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList( referenceImages_); @@ -989,7 +987,7 @@ public com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder addReferenceImag com.google.cloud.vision.v1p3beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p3beta1.ReferenceImageOrBuilder>( referenceImages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); referenceImages_ = null; @@ -1137,7 +1135,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java index 0b3aa8f155e5..e72b39d0d7a3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocalizedObjectAnnotation.java @@ -26,7 +26,6 @@ private LocalizedObjectAnnotation() { mid_ = ""; languageCode_ = ""; name_ = ""; - score_ = 0F; } @java.lang.Override @@ -97,7 +96,7 @@ private LocalizedObjectAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -387,20 +386,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && getName().equals(other.getName()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getName().equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -624,35 +620,35 @@ public com.google.cloud.vision.v1p3beta1.LocalizedObjectAnnotation buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1052,7 +1048,7 @@ public Builder clearScore() { return this; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -1236,7 +1232,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingPolyOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java index 536d29c92ccd..1f0b7d25d7d6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/LocationInfo.java @@ -64,7 +64,7 @@ private LocationInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -180,13 +180,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.LocationInfo other = (com.google.cloud.vision.v1p3beta1.LocationInfo) obj; - boolean result = true; - result = result && (hasLatLng() == other.hasLatLng()); + if (hasLatLng() != other.hasLatLng()) return false; if (hasLatLng()) { - result = result && getLatLng().equals(other.getLatLng()); + if (!getLatLng().equals(other.getLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -389,35 +388,35 @@ public com.google.cloud.vision.v1p3beta1.LocationInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -464,7 +463,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng latLng_ = null; + private com.google.type.LatLng latLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; @@ -635,7 +634,7 @@ public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedBoundingPoly.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedBoundingPoly.java index 5466318757d4..5208b6ef688e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedBoundingPoly.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedBoundingPoly.java @@ -52,7 +52,7 @@ private NormalizedBoundingPoly( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -65,7 +65,7 @@ private NormalizedBoundingPoly( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -77,7 +77,7 @@ private NormalizedBoundingPoly( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); } this.unknownFields = unknownFields.build(); @@ -210,10 +210,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly other = (com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly) obj; - boolean result = true; - result = result && getVerticesList().equals(other.getVerticesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -410,7 +409,7 @@ public com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly buildPartial() { new com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly(this); int from_bitField0_ = bitField0_; if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -424,35 +423,35 @@ public com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -531,7 +530,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(vertices_); bitField0_ |= 0x00000001; @@ -878,10 +877,7 @@ public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addVerticesBui com.google.cloud.vision.v1p3beta1.NormalizedVertex, com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p3beta1.NormalizedVertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); vertices_ = null; } return verticesBuilder_; @@ -889,7 +885,7 @@ public com.google.cloud.vision.v1p3beta1.NormalizedVertex.Builder addVerticesBui @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java index 46852cfb1dc8..91a4d98aec74 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/NormalizedVertex.java @@ -24,10 +24,7 @@ private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder build super(builder); } - private NormalizedVertex() { - x_ = 0F; - y_ = 0F; - } + private NormalizedVertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -65,7 +62,7 @@ private NormalizedVertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -178,17 +175,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.NormalizedVertex other = (com.google.cloud.vision.v1p3beta1.NormalizedVertex) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -388,35 +380,35 @@ public com.google.cloud.vision.v1p3beta1.NormalizedVertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -558,7 +550,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java index 915f2f868c87..80d6e8910711 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OperationMetadata.java @@ -89,7 +89,7 @@ private OperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -483,18 +483,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.OperationMetadata other = (com.google.cloud.vision.v1p3beta1.OperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasCreateTime() == other.hasCreateTime()); + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - result = result && getCreateTime().equals(other.getCreateTime()); + if (!getCreateTime().equals(other.getCreateTime())) return false; } - result = result && (hasUpdateTime() == other.hasUpdateTime()); + if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { - result = result && getUpdateTime().equals(other.getUpdateTime()); + if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -717,35 +716,35 @@ public com.google.cloud.vision.v1p3beta1.OperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -878,7 +877,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp createTime_ = null; + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1057,7 +1056,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } - private com.google.protobuf.Timestamp updateTime_ = null; + private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1238,7 +1237,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java index 57c88eda04b6..a98064ffc913 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/OutputConfig.java @@ -22,9 +22,7 @@ private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) super(builder); } - private OutputConfig() { - batchSize_ = 0; - } + private OutputConfig() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -73,7 +71,7 @@ private OutputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -220,14 +218,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.OutputConfig other = (com.google.cloud.vision.v1p3beta1.OutputConfig) obj; - boolean result = true; - result = result && (hasGcsDestination() == other.hasGcsDestination()); + if (hasGcsDestination() != other.hasGcsDestination()) return false; if (hasGcsDestination()) { - result = result && getGcsDestination().equals(other.getGcsDestination()); + if (!getGcsDestination().equals(other.getGcsDestination())) return false; } - result = result && (getBatchSize() == other.getBatchSize()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getBatchSize() != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -435,35 +432,35 @@ public com.google.cloud.vision.v1p3beta1.OutputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -513,7 +510,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.GcsDestination gcsDestination_ = null; + private com.google.cloud.vision.v1p3beta1.GcsDestination gcsDestination_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.GcsDestination, com.google.cloud.vision.v1p3beta1.GcsDestination.Builder, @@ -765,7 +762,7 @@ public Builder clearBatchSize() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java index 6ce34ddd4d6e..34ecf75a4d1a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Page.java @@ -23,10 +23,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Page() { - width_ = 0; - height_ = 0; blocks_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -83,7 +80,7 @@ private Page( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } @@ -99,7 +96,7 @@ private Page( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -111,7 +108,7 @@ private Page( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); } this.unknownFields = unknownFields.build(); @@ -356,20 +353,17 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p3beta1.Page other = (com.google.cloud.vision.v1p3beta1.Page) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); - } - result = result && (getWidth() == other.getWidth()); - result = result && (getHeight() == other.getHeight()); - result = result && getBlocksList().equals(other.getBlocksList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProperty().equals(other.getProperty())) return false; + } + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -595,7 +589,7 @@ public com.google.cloud.vision.v1p3beta1.Page buildPartial() { result.width_ = width_; result.height_ = height_; if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -611,35 +605,35 @@ public com.google.cloud.vision.v1p3beta1.Page buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -724,7 +718,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, @@ -1008,7 +1002,7 @@ public Builder clearHeight() { java.util.Collections.emptyList(); private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(blocks_); bitField0_ |= 0x00000008; } @@ -1346,10 +1340,7 @@ public java.util.List getBlocks com.google.cloud.vision.v1p3beta1.Block, com.google.cloud.vision.v1p3beta1.Block.Builder, com.google.cloud.vision.v1p3beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); + blocks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); blocks_ = null; } return blocksBuilder_; @@ -1401,7 +1392,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java index 38b441fa031a..a0600665138b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Paragraph.java @@ -24,7 +24,6 @@ private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Paragraph() { words_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Paragraph( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Paragraph( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Paragraph( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); } this.unknownFields = unknownFields.build(); @@ -406,22 +405,19 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.Paragraph other = (com.google.cloud.vision.v1p3beta1.Paragraph) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getWordsList().equals(other.getWordsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getWordsList().equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -652,7 +648,7 @@ public com.google.cloud.vision.v1p3beta1.Paragraph buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -668,35 +664,35 @@ public com.google.cloud.vision.v1p3beta1.Paragraph buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -778,7 +774,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, @@ -964,7 +960,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -1276,7 +1272,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(words_); bitField0_ |= 0x00000004; } @@ -1614,10 +1610,7 @@ public java.util.List getWordsBu com.google.cloud.vision.v1p3beta1.Word, com.google.cloud.vision.v1p3beta1.Word.Builder, com.google.cloud.vision.v1p3beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + words_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); words_ = null; } return wordsBuilder_; @@ -1669,7 +1662,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java index 6a6a690177ed..48904d04e136 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Position.java @@ -24,11 +24,7 @@ private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Position() { - x_ = 0F; - y_ = 0F; - z_ = 0F; - } + private Position() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -71,7 +67,7 @@ private Position( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -205,21 +201,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.Position other = (com.google.cloud.vision.v1p3beta1.Position) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = - result - && (java.lang.Float.floatToIntBits(getZ()) - == java.lang.Float.floatToIntBits(other.getZ())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (java.lang.Float.floatToIntBits(getZ()) != java.lang.Float.floatToIntBits(other.getZ())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -424,35 +413,35 @@ public com.google.cloud.vision.v1p3beta1.Position buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -639,7 +628,7 @@ public Builder clearZ() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java index 43b3819106d9..ecacef1f0a7c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Product.java @@ -84,7 +84,7 @@ private Product( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { productLabels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -97,7 +97,7 @@ private Product( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -109,7 +109,7 @@ private Product( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { productLabels_ = java.util.Collections.unmodifiableList(productLabels_); } this.unknownFields = unknownFields.build(); @@ -247,7 +247,7 @@ private KeyValue( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -420,11 +420,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.Product.KeyValue other = (com.google.cloud.vision.v1p3beta1.Product.KeyValue) obj; - boolean result = true; - result = result && getKey().equals(other.getKey()); - result = result && getValue().equals(other.getValue()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -624,23 +623,23 @@ public com.google.cloud.vision.v1p3beta1.Product.KeyValue buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -648,13 +647,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -909,7 +908,7 @@ public Builder setValueBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1309,14 +1308,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.Product other = (com.google.cloud.vision.v1p3beta1.Product) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getDisplayName().equals(other.getDisplayName()); - result = result && getDescription().equals(other.getDescription()); - result = result && getProductCategory().equals(other.getProductCategory()); - result = result && getProductLabelsList().equals(other.getProductLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getProductCategory().equals(other.getProductCategory())) return false; + if (!getProductLabelsList().equals(other.getProductLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1533,7 +1531,7 @@ public com.google.cloud.vision.v1p3beta1.Product buildPartial() { result.description_ = description_; result.productCategory_ = productCategory_; if (productLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { productLabels_ = java.util.Collections.unmodifiableList(productLabels_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -1548,35 +1546,35 @@ public com.google.cloud.vision.v1p3beta1.Product buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2080,7 +2078,7 @@ public Builder setProductCategoryBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureProductLabelsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { productLabels_ = new java.util.ArrayList( productLabels_); @@ -2538,7 +2536,7 @@ public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder addProductLabe com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p3beta1.Product.KeyValueOrBuilder>( productLabels_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); productLabels_ = null; @@ -2548,7 +2546,7 @@ public com.google.cloud.vision.v1p3beta1.Product.KeyValue.Builder addProductLabe @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java index 4c01ed34a9b6..5d3b8ec3713a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchParams.java @@ -111,7 +111,7 @@ private ProductSearchParams( case 58: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { productCategories_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000080; } @@ -143,7 +143,7 @@ private ProductSearchParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -155,7 +155,7 @@ private ProductSearchParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000080) != 0)) { productCategories_ = productCategories_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -704,24 +704,23 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ProductSearchParams other = (com.google.cloud.vision.v1p3beta1.ProductSearchParams) obj; - boolean result = true; - result = result && getCatalogName().equals(other.getCatalogName()); - result = result && category_ == other.category_; - result = result && getProductCategory().equals(other.getProductCategory()); - result = result && (hasNormalizedBoundingPoly() == other.hasNormalizedBoundingPoly()); + if (!getCatalogName().equals(other.getCatalogName())) return false; + if (category_ != other.category_) return false; + if (!getProductCategory().equals(other.getProductCategory())) return false; + if (hasNormalizedBoundingPoly() != other.hasNormalizedBoundingPoly()) return false; if (hasNormalizedBoundingPoly()) { - result = result && getNormalizedBoundingPoly().equals(other.getNormalizedBoundingPoly()); + if (!getNormalizedBoundingPoly().equals(other.getNormalizedBoundingPoly())) return false; } - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); - } - result = result && view_ == other.view_; - result = result && getProductSet().equals(other.getProductSet()); - result = result && getProductCategoriesList().equals(other.getProductCategoriesList()); - result = result && getFilter().equals(other.getFilter()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; + } + if (view_ != other.view_) return false; + if (!getProductSet().equals(other.getProductSet())) return false; + if (!getProductCategoriesList().equals(other.getProductCategoriesList())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -971,7 +970,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchParams buildPartial() { } result.view_ = view_; result.productSet_ = productSet_; - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000080) != 0)) { productCategories_ = productCategories_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000080); } @@ -984,35 +983,35 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1394,7 +1393,7 @@ public Builder setProductCategoryBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly normalizedBoundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly normalizedBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly, com.google.cloud.vision.v1p3beta1.NormalizedBoundingPoly.Builder, @@ -1608,7 +1607,7 @@ public Builder clearNormalizedBoundingPoly() { return normalizedBoundingPolyBuilder_; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -2000,7 +1999,7 @@ public Builder setProductSetBytes(com.google.protobuf.ByteString value) { com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureProductCategoriesIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000080) != 0)) { productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); bitField0_ |= 0x00000080; } @@ -2273,7 +2272,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java index 93f6100f88dc..2dbc29612472 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSearchResults.java @@ -77,7 +77,7 @@ private ProductSearchResults( } case 26: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { products_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo>(); @@ -98,7 +98,7 @@ private ProductSearchResults( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { results_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result>(); @@ -112,7 +112,7 @@ private ProductSearchResults( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,10 +124,10 @@ private ProductSearchResults( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); } this.unknownFields = unknownFields.build(); @@ -237,7 +237,6 @@ private ProductInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { private ProductInfo() { productId_ = ""; imageUri_ = ""; - score_ = 0F; } @java.lang.Override @@ -285,7 +284,7 @@ private ProductInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -482,15 +481,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo) obj; - boolean result = true; - result = result && getProductId().equals(other.getProductId()); - result = result && getImageUri().equals(other.getImageUri()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductId().equals(other.getProductId())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -700,23 +696,23 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo buildP @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -724,13 +720,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1045,7 +1041,7 @@ public Builder clearScore() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1190,7 +1186,6 @@ private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Result() { - score_ = 0F; image_ = ""; } @@ -1248,7 +1243,7 @@ private Result( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1441,18 +1436,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result) obj; - boolean result = true; - result = result && (hasProduct() == other.hasProduct()); + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); - } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getImage().equals(other.getImage()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProduct().equals(other.getProduct())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getImage().equals(other.getImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1669,23 +1661,23 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1693,13 +1685,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1758,7 +1750,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.Product product_ = null; + private com.google.cloud.vision.v1p3beta1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, @@ -2094,7 +2086,7 @@ public Builder setImageBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2485,17 +2477,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ProductSearchResults other = (com.google.cloud.vision.v1p3beta1.ProductSearchResults) obj; - boolean result = true; - result = result && category_ == other.category_; - result = result && getProductCategory().equals(other.getProductCategory()); - result = result && (hasIndexTime() == other.hasIndexTime()); + if (category_ != other.category_) return false; + if (!getProductCategory().equals(other.getProductCategory())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { - result = result && getIndexTime().equals(other.getIndexTime()); + if (!getIndexTime().equals(other.getIndexTime())) return false; } - result = result && getProductsList().equals(other.getProductsList()); - result = result && getResultsList().equals(other.getResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getResultsList().equals(other.getResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2729,7 +2720,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults buildPartial() { result.indexTime_ = indexTimeBuilder_.build(); } if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -2738,7 +2729,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults buildPartial() { result.products_ = productsBuilder_.build(); } if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -2753,35 +2744,35 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3080,7 +3071,7 @@ public Builder setProductCategoryBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Timestamp indexTime_ = null; + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -3268,7 +3259,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { products_ = java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { products_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo>(products_); @@ -3651,10 +3642,7 @@ public Builder removeProducts(int index) { com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfo.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ProductInfoOrBuilder>( - products_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -3664,7 +3652,7 @@ public Builder removeProducts(int index) { java.util.Collections.emptyList(); private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { results_ = new java.util.ArrayList( results_); @@ -4020,10 +4008,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder add com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p3beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); + results_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); results_ = null; } return resultsBuilder_; @@ -4031,7 +4016,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSearchResults.Result.Builder add @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java index 1f0618600822..2d058e74cbbf 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ProductSet.java @@ -98,7 +98,7 @@ private ProductSet( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -380,19 +380,18 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ProductSet other = (com.google.cloud.vision.v1p3beta1.ProductSet) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getDisplayName().equals(other.getDisplayName()); - result = result && (hasIndexTime() == other.hasIndexTime()); + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { - result = result && getIndexTime().equals(other.getIndexTime()); + if (!getIndexTime().equals(other.getIndexTime())) return false; } - result = result && (hasIndexError() == other.hasIndexError()); + if (hasIndexError() != other.hasIndexError()) return false; if (hasIndexError()) { - result = result && getIndexError().equals(other.getIndexError()); + if (!getIndexError().equals(other.getIndexError())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -622,35 +621,35 @@ public com.google.cloud.vision.v1p3beta1.ProductSet buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -916,7 +915,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Timestamp indexTime_ = null; + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1118,7 +1117,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { return indexTimeBuilder_; } - private com.google.rpc.Status indexError_ = null; + private com.google.rpc.Status indexError_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; @@ -1308,7 +1307,7 @@ public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java index 546c6396d55a..2e923f7f8203 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Property.java @@ -25,7 +25,6 @@ private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Property() { name_ = ""; value_ = ""; - uint64Value_ = 0L; } @java.lang.Override @@ -73,7 +72,7 @@ private Property( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -263,12 +262,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.Property other = (com.google.cloud.vision.v1p3beta1.Property) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getValue().equals(other.getValue()); - result = result && (getUint64Value() == other.getUint64Value()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (getUint64Value() != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -471,35 +469,35 @@ public com.google.cloud.vision.v1p3beta1.Property buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -788,7 +786,7 @@ public Builder clearUint64Value() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java index 5661223804e5..08746a809699 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/ReferenceImage.java @@ -69,7 +69,7 @@ private ReferenceImage( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { boundingPolys_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -81,7 +81,7 @@ private ReferenceImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -93,7 +93,7 @@ private ReferenceImage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); } this.unknownFields = unknownFields.build(); @@ -365,12 +365,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.ReferenceImage other = (com.google.cloud.vision.v1p3beta1.ReferenceImage) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getUri().equals(other.getUri()); - result = result && getBoundingPolysList().equals(other.getBoundingPolysList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getBoundingPolysList().equals(other.getBoundingPolysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -578,7 +577,7 @@ public com.google.cloud.vision.v1p3beta1.ReferenceImage buildPartial() { result.name_ = name_; result.uri_ = uri_; if (boundingPolysBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -593,35 +592,35 @@ public com.google.cloud.vision.v1p3beta1.ReferenceImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -920,7 +919,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureBoundingPolysIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { boundingPolys_ = new java.util.ArrayList(boundingPolys_); bitField0_ |= 0x00000004; @@ -1375,7 +1374,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder addBoundingPolysBu com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder>( boundingPolys_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); boundingPolys_ = null; @@ -1385,7 +1384,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder addBoundingPolysBu @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java index 2fe6743d11fe..d07548205c73 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/RemoveProductFromProductSetRequest.java @@ -68,7 +68,7 @@ private RemoveProductFromProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -245,11 +245,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getProduct().equals(other.getProduct()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -452,35 +451,35 @@ public com.google.cloud.vision.v1p3beta1.RemoveProductFromProductSetRequest buil @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -748,7 +747,7 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java index d133839495ba..32803d37437b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/SafeSearchAnnotation.java @@ -93,7 +93,7 @@ private SafeSearchAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -358,14 +358,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation) obj; - boolean result = true; - result = result && adult_ == other.adult_; - result = result && spoof_ == other.spoof_; - result = result && medical_ == other.medical_; - result = result && violence_ == other.violence_; - result = result && racy_ == other.racy_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -581,35 +580,35 @@ public com.google.cloud.vision.v1p3beta1.SafeSearchAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1087,7 +1086,7 @@ public Builder clearRacy() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java index 9d60af55155d..64d1950c7398 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Symbol.java @@ -24,7 +24,6 @@ private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Symbol() { text_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -99,7 +98,7 @@ private Symbol( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -376,22 +375,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p3beta1.Symbol other = (com.google.cloud.vision.v1p3beta1.Symbol) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getText().equals(other.getText()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getText().equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -619,35 +615,35 @@ public com.google.cloud.vision.v1p3beta1.Symbol buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -704,7 +700,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, @@ -890,7 +886,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -1338,7 +1334,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java index af4c0bdad6ec..a28a96b42b84 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/TextAnnotation.java @@ -60,7 +60,7 @@ private TextAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -78,7 +78,7 @@ private TextAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,7 +90,7 @@ private TextAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); } this.unknownFields = unknownFields.build(); @@ -175,7 +175,6 @@ private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder build private DetectedLanguage() { languageCode_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -216,7 +215,7 @@ private DetectedLanguage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -361,14 +360,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage) obj; - boolean result = true; - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -573,23 +569,23 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -597,13 +593,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -811,7 +807,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -921,7 +917,6 @@ private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) private DetectedBreak() { type_ = 0; - isPrefix_ = false; } @java.lang.Override @@ -962,7 +957,7 @@ private DetectedBreak( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1311,11 +1306,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getIsPrefix() == other.getIsPrefix()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getIsPrefix() != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1517,23 +1511,23 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak buildParti @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1541,13 +1535,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1733,7 +1727,7 @@ public Builder clearIsPrefix() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1937,7 +1931,7 @@ private TextProperty( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage>(); @@ -1969,7 +1963,7 @@ private TextProperty( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1981,7 +1975,7 @@ private TextProperty( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); } this.unknownFields = unknownFields.build(); @@ -2178,14 +2172,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty) obj; - boolean result = true; - result = result && getDetectedLanguagesList().equals(other.getDetectedLanguagesList()); - result = result && (hasDetectedBreak() == other.hasDetectedBreak()); + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; if (hasDetectedBreak()) { - result = result && getDetectedBreak().equals(other.getDetectedBreak()); + if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2396,7 +2389,7 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty buildPartia int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -2416,23 +2409,23 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2440,13 +2433,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2531,7 +2524,7 @@ public Builder mergeFrom( detectedLanguages_ = java.util.Collections.emptyList(); private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage>( @@ -2934,7 +2927,7 @@ public Builder removeDetectedLanguages(int index) { com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedLanguageOrBuilder>( detectedLanguages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); detectedLanguages_ = null; @@ -2942,7 +2935,7 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } - private com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detectedBreak_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak detectedBreak_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p3beta1.TextAnnotation.DetectedBreak.Builder, @@ -3141,7 +3134,7 @@ public Builder clearDetectedBreak() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -3352,11 +3345,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.TextAnnotation other = (com.google.cloud.vision.v1p3beta1.TextAnnotation) obj; - boolean result = true; - result = result && getPagesList().equals(other.getPagesList()); - result = result && getText().equals(other.getText()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!getText().equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3564,7 +3556,7 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -3580,35 +3572,35 @@ public com.google.cloud.vision.v1p3beta1.TextAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3690,7 +3682,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(pages_); bitField0_ |= 0x00000001; } @@ -4028,10 +4020,7 @@ public java.util.List getPagesBu com.google.cloud.vision.v1p3beta1.Page, com.google.cloud.vision.v1p3beta1.Page.Builder, com.google.cloud.vision.v1p3beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + pages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); pages_ = null; } return pagesBuilder_; @@ -4133,7 +4122,7 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java index a7754354b951..f6ad7d2a05eb 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductRequest.java @@ -81,7 +81,7 @@ private UpdateProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -259,17 +259,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.UpdateProductRequest other = (com.google.cloud.vision.v1p3beta1.UpdateProductRequest) obj; - boolean result = true; - result = result && (hasProduct() == other.hasProduct()); + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); + if (!getProduct().equals(other.getProduct())) return false; } - result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - result = result && getUpdateMask().equals(other.getUpdateMask()); + if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -488,35 +487,35 @@ public com.google.cloud.vision.v1p3beta1.UpdateProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -568,7 +567,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.Product product_ = null; + private com.google.cloud.vision.v1p3beta1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.Product, com.google.cloud.vision.v1p3beta1.Product.Builder, @@ -758,7 +757,7 @@ public com.google.cloud.vision.v1p3beta1.ProductOrBuilder getProductOrBuilder() return productBuilder_; } - private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, @@ -975,7 +974,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java index 4aaf02dc794b..746faea3adf3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/UpdateProductSetRequest.java @@ -81,7 +81,7 @@ private UpdateProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -253,17 +253,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest other = (com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest) obj; - boolean result = true; - result = result && (hasProductSet() == other.hasProductSet()); + if (hasProductSet() != other.hasProductSet()) return false; if (hasProductSet()) { - result = result && getProductSet().equals(other.getProductSet()); + if (!getProductSet().equals(other.getProductSet())) return false; } - result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - result = result && getUpdateMask().equals(other.getUpdateMask()); + if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -482,35 +481,35 @@ public com.google.cloud.vision.v1p3beta1.UpdateProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -562,7 +561,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p3beta1.ProductSet productSet_ = null; + private com.google.cloud.vision.v1p3beta1.ProductSet productSet_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.ProductSet, com.google.cloud.vision.v1p3beta1.ProductSet.Builder, @@ -744,7 +743,7 @@ public com.google.cloud.vision.v1p3beta1.ProductSetOrBuilder getProductSetOrBuil return productSetBuilder_; } - private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, @@ -952,7 +951,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java index 6158a4a19d91..26883dd98b5d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Vertex.java @@ -23,10 +23,7 @@ private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Vertex() { - x_ = 0; - y_ = 0; - } + private Vertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -64,7 +61,7 @@ private Vertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -176,11 +173,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p3beta1.Vertex other = (com.google.cloud.vision.v1p3beta1.Vertex) obj; - boolean result = true; - result = result && (getX() == other.getX()); - result = result && (getY() == other.getY()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getX() != other.getX()) return false; + if (getY() != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +375,35 @@ public com.google.cloud.vision.v1p3beta1.Vertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -547,7 +543,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java index c994180ccc3a..40d0dc0718fe 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetection.java @@ -57,7 +57,7 @@ private WebDetection( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity>(); @@ -71,7 +71,7 @@ private WebDetection( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebImage>(); @@ -85,7 +85,7 @@ private WebDetection( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebImage>(); @@ -99,7 +99,7 @@ private WebDetection( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebPage>(); @@ -113,7 +113,7 @@ private WebDetection( } case 50: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebImage>(); @@ -127,7 +127,7 @@ private WebDetection( } case 66: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel>(); @@ -141,7 +141,7 @@ private WebDetection( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -153,22 +153,22 @@ private WebDetection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); } this.unknownFields = unknownFields.build(); @@ -271,7 +271,6 @@ private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebEntity() { entityId_ = ""; - score_ = 0F; description_ = ""; } @@ -320,7 +319,7 @@ private WebEntity( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -511,15 +510,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity) obj; - boolean result = true; - result = result && getEntityId().equals(other.getEntityId()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getDescription().equals(other.getDescription()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getEntityId().equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -725,23 +721,23 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -749,13 +745,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1050,7 +1046,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1157,7 +1153,6 @@ private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebImage() { url_ = ""; - score_ = 0F; } @java.lang.Override @@ -1198,7 +1193,7 @@ private WebImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1339,14 +1334,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebImage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1547,23 +1539,23 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1571,13 +1563,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1771,7 +1763,7 @@ public Builder clearScore() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2042,7 +2034,6 @@ private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebPage() { url_ = ""; - score_ = 0F; pageTitle_ = ""; fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); @@ -2093,7 +2084,7 @@ private WebPage( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebImage>(); @@ -2107,7 +2098,7 @@ private WebPage( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p3beta1.WebDetection.WebImage>(); @@ -2121,7 +2112,7 @@ private WebPage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2133,10 +2124,10 @@ private WebPage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } this.unknownFields = unknownFields.build(); @@ -2506,18 +2497,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebPage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getPageTitle().equals(other.getPageTitle()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = - result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getPageTitle().equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2743,7 +2731,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage buildPartial() { result.score_ = score_; result.pageTitle_ = pageTitle_; if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -2752,7 +2740,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -2767,23 +2755,23 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebPage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2791,13 +2779,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3146,7 +3134,7 @@ public Builder setPageTitleBytes(com.google.protobuf.ByteString value) { fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -3559,7 +3547,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -3571,7 +3559,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -4020,7 +4008,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -4031,7 +4019,7 @@ public Builder removePartialMatchingImages(int index) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -4195,7 +4183,7 @@ private WebLabel( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -4368,11 +4356,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel) obj; - boolean result = true; - result = result && getLabel().equals(other.getLabel()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLabel().equals(other.getLabel())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -4573,23 +4560,23 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -4597,13 +4584,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -4858,7 +4845,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -5447,16 +5434,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.WebDetection other = (com.google.cloud.vision.v1p3beta1.WebDetection) obj; - boolean result = true; - result = result && getWebEntitiesList().equals(other.getWebEntitiesList()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = - result && getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList()); - result = result && getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList()); - result = result && getBestGuessLabelsList().equals(other.getBestGuessLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getWebEntitiesList().equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList())) + return false; + if (!getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList().equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -5707,7 +5693,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { new com.google.cloud.vision.v1p3beta1.WebDetection(this); int from_bitField0_ = bitField0_; if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -5716,7 +5702,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { result.webEntities_ = webEntitiesBuilder_.build(); } if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -5725,7 +5711,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -5734,7 +5720,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); @@ -5744,7 +5730,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); } if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -5753,7 +5739,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); } if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -5767,35 +5753,35 @@ public com.google.cloud.vision.v1p3beta1.WebDetection buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -6007,7 +5993,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList( webEntities_); @@ -6362,10 +6348,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder addWebEn com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + webEntities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); webEntities_ = null; } return webEntitiesBuilder_; @@ -6375,7 +6358,7 @@ public com.google.cloud.vision.v1p3beta1.WebDetection.WebEntity.Builder addWebEn fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -6768,7 +6751,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -6780,7 +6763,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -7209,7 +7192,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -7221,7 +7204,7 @@ public Builder removePartialMatchingImages(int index) { pagesWithMatchingImages_ = java.util.Collections.emptyList(); private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList( pagesWithMatchingImages_); @@ -7611,7 +7594,7 @@ public Builder removePagesWithMatchingImages(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebPageOrBuilder>( pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); pagesWithMatchingImages_ = null; @@ -7623,7 +7606,7 @@ public Builder removePagesWithMatchingImages(int index) { visuallySimilarImages_ = java.util.Collections.emptyList(); private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList( visuallySimilarImages_); @@ -8016,7 +7999,7 @@ public Builder removeVisuallySimilarImages(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebImageOrBuilder>( visuallySimilarImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); visuallySimilarImages_ = null; @@ -8028,7 +8011,7 @@ public Builder removeVisuallySimilarImages(int index) { bestGuessLabels_ = java.util.Collections.emptyList(); private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList( bestGuessLabels_); @@ -8402,7 +8385,7 @@ public Builder removeBestGuessLabels(int index) { com.google.cloud.vision.v1p3beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p3beta1.WebDetection.WebLabelOrBuilder>( bestGuessLabels_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); bestGuessLabels_ = null; @@ -8412,7 +8395,7 @@ public Builder removeBestGuessLabels(int index) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java index 6b14249e3ee5..9ca8facdd3e1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/WebDetectionParams.java @@ -22,9 +22,7 @@ private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder bui super(builder); } - private WebDetectionParams() { - includeGeoResults_ = false; - } + private WebDetectionParams() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -57,7 +55,7 @@ private WebDetectionParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -149,10 +147,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p3beta1.WebDetectionParams other = (com.google.cloud.vision.v1p3beta1.WebDetectionParams) obj; - boolean result = true; - result = result && (getIncludeGeoResults() == other.getIncludeGeoResults()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getIncludeGeoResults() != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -345,35 +342,35 @@ public com.google.cloud.vision.v1p3beta1.WebDetectionParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -468,7 +465,7 @@ public Builder clearIncludeGeoResults() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java index 608dead234c3..36d9268ce738 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p3beta1/src/main/java/com/google/cloud/vision/v1p3beta1/Word.java @@ -24,7 +24,6 @@ private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Word() { symbols_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Word( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Word( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Word( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); } this.unknownFields = unknownFields.build(); @@ -410,22 +409,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p3beta1.Word other = (com.google.cloud.vision.v1p3beta1.Word) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getSymbolsList().equals(other.getSymbolsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList().equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -656,7 +652,7 @@ public com.google.cloud.vision.v1p3beta1.Word buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -672,35 +668,35 @@ public com.google.cloud.vision.v1p3beta1.Word buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +778,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p3beta1.TextAnnotation.TextProperty.Builder, @@ -968,7 +964,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p3beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p3beta1.BoundingPoly, com.google.cloud.vision.v1p3beta1.BoundingPoly.Builder, @@ -1280,7 +1276,7 @@ public com.google.cloud.vision.v1p3beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(symbols_); bitField0_ |= 0x00000004; } @@ -1637,10 +1633,7 @@ public com.google.cloud.vision.v1p3beta1.Symbol.Builder addSymbolsBuilder(int in com.google.cloud.vision.v1p3beta1.Symbol, com.google.cloud.vision.v1p3beta1.Symbol.Builder, com.google.cloud.vision.v1p3beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + symbols_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); symbols_ = null; } return symbolsBuilder_; @@ -1692,7 +1685,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java index 750b50a78e56..392cdd3b1750 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AddProductToProductSetRequest.java @@ -67,7 +67,7 @@ private AddProductToProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -244,11 +244,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest other = (com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getProduct().equals(other.getProduct()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -448,35 +447,35 @@ public com.google.cloud.vision.v1p4beta1.AddProductToProductSetRequest buildPart @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -743,7 +742,7 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java index 0b50c97d8e32..ad1e4de39bf0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileRequest.java @@ -24,7 +24,7 @@ private AnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private AnnotateFileRequest() { features_ = java.util.Collections.emptyList(); - pages_ = java.util.Collections.emptyList(); + pages_ = emptyIntList(); } @java.lang.Override @@ -69,7 +69,7 @@ private AnnotateFileRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -96,31 +96,30 @@ private AnnotateFileRequest( } case 32: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - pages_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + pages_ = newIntList(); mutable_bitField0_ |= 0x00000008; } - pages_.add(input.readInt32()); + pages_.addInt(input.readInt32()); break; } case 34: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008) - && input.getBytesUntilLimit() > 0) { - pages_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) { + pages_ = newIntList(); mutable_bitField0_ |= 0x00000008; } while (input.getBytesUntilLimit() > 0) { - pages_.add(input.readInt32()); + pages_.addInt(input.readInt32()); } input.popLimit(limit); break; } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -132,11 +131,11 @@ private AnnotateFileRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { - pages_ = java.util.Collections.unmodifiableList(pages_); + if (((mutable_bitField0_ & 0x00000008) != 0)) { + pages_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -306,7 +305,7 @@ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOr } public static final int PAGES_FIELD_NUMBER = 4; - private java.util.List pages_; + private com.google.protobuf.Internal.IntList pages_; /** * * @@ -368,7 +367,7 @@ public int getPagesCount() { * repeated int32 pages = 4; */ public int getPages(int index) { - return pages_.get(index); + return pages_.getInt(index); } private int pagesMemoizedSerializedSize = -1; @@ -402,7 +401,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeUInt32NoTag(pagesMemoizedSerializedSize); } for (int i = 0; i < pages_.size(); i++) { - output.writeInt32NoTag(pages_.get(i)); + output.writeInt32NoTag(pages_.getInt(i)); } unknownFields.writeTo(output); } @@ -425,7 +424,7 @@ public int getSerializedSize() { { int dataSize = 0; for (int i = 0; i < pages_.size(); i++) { - dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(pages_.get(i)); + dataSize += com.google.protobuf.CodedOutputStream.computeInt32SizeNoTag(pages_.getInt(i)); } size += dataSize; if (!getPagesList().isEmpty()) { @@ -450,19 +449,18 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AnnotateFileRequest other = (com.google.cloud.vision.v1p4beta1.AnnotateFileRequest) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && getPagesList().equals(other.getPagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -654,7 +652,7 @@ public Builder clear() { imageContext_ = null; imageContextBuilder_ = null; } - pages_ = java.util.Collections.emptyList(); + pages_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -691,7 +689,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest buildPartial() { result.inputConfig_ = inputConfigBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -704,8 +702,8 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest buildPartial() { } else { result.imageContext_ = imageContextBuilder_.build(); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - pages_ = java.util.Collections.unmodifiableList(pages_); + if (((bitField0_ & 0x00000008) != 0)) { + pages_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000008); } result.pages_ = pages_; @@ -716,35 +714,35 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -835,7 +833,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, @@ -1021,7 +1019,7 @@ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1360,16 +1358,13 @@ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, @@ -1551,11 +1546,11 @@ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOr return imageContextBuilder_; } - private java.util.List pages_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.IntList pages_ = emptyIntList(); private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - pages_ = new java.util.ArrayList(pages_); + if (!((bitField0_ & 0x00000008) != 0)) { + pages_ = mutableCopy(pages_); bitField0_ |= 0x00000008; } } @@ -1578,7 +1573,9 @@ private void ensurePagesIsMutable() { * repeated int32 pages = 4; */ public java.util.List getPagesList() { - return java.util.Collections.unmodifiableList(pages_); + return ((bitField0_ & 0x00000008) != 0) + ? java.util.Collections.unmodifiableList(pages_) + : pages_; } /** * @@ -1620,7 +1617,7 @@ public int getPagesCount() { * repeated int32 pages = 4; */ public int getPages(int index) { - return pages_.get(index); + return pages_.getInt(index); } /** * @@ -1642,7 +1639,7 @@ public int getPages(int index) { */ public Builder setPages(int index, int value) { ensurePagesIsMutable(); - pages_.set(index, value); + pages_.setInt(index, value); onChanged(); return this; } @@ -1666,7 +1663,7 @@ public Builder setPages(int index, int value) { */ public Builder addPages(int value) { ensurePagesIsMutable(); - pages_.add(value); + pages_.addInt(value); onChanged(); return this; } @@ -1713,7 +1710,7 @@ public Builder addAllPages(java.lang.Iterable value * repeated int32 pages = 4; */ public Builder clearPages() { - pages_ = java.util.Collections.emptyList(); + pages_ = emptyIntList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); return this; @@ -1721,7 +1718,7 @@ public Builder clearPages() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java index 461962b0f86a..7caa5fa9b9cd 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateFileResponse.java @@ -25,7 +25,6 @@ private AnnotateFileResponse(com.google.protobuf.GeneratedMessageV3.Builder b private AnnotateFileResponse() { responses_ = java.util.Collections.emptyList(); - totalPages_ = 0; } @java.lang.Override @@ -70,7 +69,7 @@ private AnnotateFileResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AnnotateImageResponse>(); @@ -89,7 +88,7 @@ private AnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -101,7 +100,7 @@ private AnnotateFileResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -304,15 +303,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AnnotateFileResponse other = (com.google.cloud.vision.v1p4beta1.AnnotateFileResponse) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && (getTotalPages() == other.getTotalPages()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (getTotalPages() != other.getTotalPages()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -530,7 +528,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse buildPartial() { result.inputConfig_ = inputConfigBuilder_.build(); } if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -546,35 +544,35 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -655,7 +653,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, @@ -841,7 +839,7 @@ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -1194,10 +1192,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -1249,7 +1244,7 @@ public Builder clearTotalPages() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java index c08533736809..2ca3ea4022f1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageRequest.java @@ -69,7 +69,7 @@ private AnnotateImageRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -96,7 +96,7 @@ private AnnotateImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,7 +108,7 @@ private AnnotateImageRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -333,18 +333,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AnnotateImageRequest other = (com.google.cloud.vision.v1p4beta1.AnnotateImageRequest) obj; - boolean result = true; - result = result && (hasImage() == other.hasImage()); + if (hasImage() != other.hasImage()) return false; if (hasImage()) { - result = result && getImage().equals(other.getImage()); + if (!getImage().equals(other.getImage())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -568,7 +567,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest buildPartial() { result.image_ = imageBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -588,35 +587,35 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -697,7 +696,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.Image image_ = null; + private com.google.cloud.vision.v1p4beta1.Image image_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.Image, com.google.cloud.vision.v1p4beta1.Image.Builder, @@ -882,7 +881,7 @@ public com.google.cloud.vision.v1p4beta1.ImageOrBuilder getImageOrBuilder() { java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1221,16 +1220,13 @@ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, @@ -1414,7 +1410,7 @@ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java index 364ff420f825..152adac3dfed 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AnnotateImageResponse.java @@ -57,7 +57,7 @@ private AnnotateImageResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -70,7 +70,7 @@ private AnnotateImageResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -83,7 +83,7 @@ private AnnotateImageResponse( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -96,7 +96,7 @@ private AnnotateImageResponse( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; @@ -109,7 +109,7 @@ private AnnotateImageResponse( } case 42: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { textAnnotations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000020; @@ -253,7 +253,7 @@ private AnnotateImageResponse( } case 178: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation>(); @@ -267,7 +267,7 @@ private AnnotateImageResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -279,22 +279,22 @@ private AnnotateImageResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); } @@ -1212,51 +1212,48 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p4beta1.AnnotateImageResponse) obj; - boolean result = true; - result = result && getFaceAnnotationsList().equals(other.getFaceAnnotationsList()); - result = result && getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList()); - result = result && getLogoAnnotationsList().equals(other.getLogoAnnotationsList()); - result = result && getLabelAnnotationsList().equals(other.getLabelAnnotationsList()); - result = - result - && getLocalizedObjectAnnotationsList() - .equals(other.getLocalizedObjectAnnotationsList()); - result = result && getTextAnnotationsList().equals(other.getTextAnnotationsList()); - result = result && (hasFullTextAnnotation() == other.hasFullTextAnnotation()); + if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false; + if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false; + if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false; + if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false; + if (!getLocalizedObjectAnnotationsList().equals(other.getLocalizedObjectAnnotationsList())) + return false; + if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false; + if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; if (hasFullTextAnnotation()) { - result = result && getFullTextAnnotation().equals(other.getFullTextAnnotation()); + if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false; } - result = result && (hasSafeSearchAnnotation() == other.hasSafeSearchAnnotation()); + if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; if (hasSafeSearchAnnotation()) { - result = result && getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation()); + if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false; } - result = result && (hasImagePropertiesAnnotation() == other.hasImagePropertiesAnnotation()); + if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; if (hasImagePropertiesAnnotation()) { - result = - result && getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation()); + if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation())) + return false; } - result = result && (hasCropHintsAnnotation() == other.hasCropHintsAnnotation()); + if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; if (hasCropHintsAnnotation()) { - result = result && getCropHintsAnnotation().equals(other.getCropHintsAnnotation()); + if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false; } - result = result && (hasWebDetection() == other.hasWebDetection()); + if (hasWebDetection() != other.hasWebDetection()) return false; if (hasWebDetection()) { - result = result && getWebDetection().equals(other.getWebDetection()); + if (!getWebDetection().equals(other.getWebDetection())) return false; } - result = result && (hasProductSearchResults() == other.hasProductSearchResults()); + if (hasProductSearchResults() != other.hasProductSearchResults()) return false; if (hasProductSearchResults()) { - result = result && getProductSearchResults().equals(other.getProductSearchResults()); + if (!getProductSearchResults().equals(other.getProductSearchResults())) return false; } - result = result && (hasError() == other.hasError()); + if (hasError() != other.hasError()) return false; if (hasError()) { - result = result && getError().equals(other.getError()); + if (!getError().equals(other.getError())) return false; } - result = result && (hasContext() == other.hasContext()); + if (hasContext() != other.hasContext()) return false; if (hasContext()) { - result = result && getContext().equals(other.getContext()); + if (!getContext().equals(other.getContext())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1589,7 +1586,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (faceAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -1598,7 +1595,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { result.faceAnnotations_ = faceAnnotationsBuilder_.build(); } if (landmarkAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1607,7 +1604,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); } if (logoAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -1616,7 +1613,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { result.logoAnnotations_ = logoAnnotationsBuilder_.build(); } if (labelAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -1625,7 +1622,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { result.labelAnnotations_ = labelAnnotationsBuilder_.build(); } if (localizedObjectAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = java.util.Collections.unmodifiableList(localizedObjectAnnotations_); bitField0_ = (bitField0_ & ~0x00000010); @@ -1635,7 +1632,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { result.localizedObjectAnnotations_ = localizedObjectAnnotationsBuilder_.build(); } if (textAnnotationsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -1690,35 +1687,35 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1956,7 +1953,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureFaceAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList( faceAnnotations_); @@ -2305,7 +2302,7 @@ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotatio com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotationOrBuilder>( faceAnnotations_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); faceAnnotations_ = null; @@ -2317,7 +2314,7 @@ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Builder addFaceAnnotatio landmarkAnnotations_ = java.util.Collections.emptyList(); private void ensureLandmarkAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList( landmarkAnnotations_); @@ -2687,7 +2684,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnn com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( landmarkAnnotations_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); landmarkAnnotations_ = null; @@ -2699,7 +2696,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLandmarkAnn java.util.Collections.emptyList(); private void ensureLogoAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList( logoAnnotations_); @@ -3049,7 +3046,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotat com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( logoAnnotations_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); logoAnnotations_ = null; @@ -3061,7 +3058,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLogoAnnotat java.util.Collections.emptyList(); private void ensureLabelAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList( labelAnnotations_); @@ -3411,7 +3408,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnota com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( labelAnnotations_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); labelAnnotations_ = null; @@ -3423,7 +3420,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addLabelAnnota localizedObjectAnnotations_ = java.util.Collections.emptyList(); private void ensureLocalizedObjectAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { localizedObjectAnnotations_ = new java.util.ArrayList( localizedObjectAnnotations_); @@ -3836,7 +3833,7 @@ public Builder removeLocalizedObjectAnnotations(int index) { com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation.Builder, com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotationOrBuilder>( localizedObjectAnnotations_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); localizedObjectAnnotations_ = null; @@ -3848,7 +3845,7 @@ public Builder removeLocalizedObjectAnnotations(int index) { java.util.Collections.emptyList(); private void ensureTextAnnotationsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { textAnnotations_ = new java.util.ArrayList( textAnnotations_); @@ -4198,7 +4195,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotat com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p4beta1.EntityAnnotationOrBuilder>( textAnnotations_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); textAnnotations_ = null; @@ -4206,7 +4203,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation.Builder addTextAnnotat return textAnnotationsBuilder_; } - private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation fullTextAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation, com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder, @@ -4416,7 +4413,7 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation.Builder getFullTextAnnot return fullTextAnnotationBuilder_; } - private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_ = null; + private com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation safeSearchAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation.Builder, @@ -4603,7 +4600,7 @@ public Builder clearSafeSearchAnnotation() { return safeSearchAnnotationBuilder_; } - private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_ = null; + private com.google.cloud.vision.v1p4beta1.ImageProperties imagePropertiesAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImageProperties, com.google.cloud.vision.v1p4beta1.ImageProperties.Builder, @@ -4790,7 +4787,7 @@ public Builder clearImagePropertiesAnnotation() { return imagePropertiesAnnotationBuilder_; } - private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_ = null; + private com.google.cloud.vision.v1p4beta1.CropHintsAnnotation cropHintsAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.CropHintsAnnotation, com.google.cloud.vision.v1p4beta1.CropHintsAnnotation.Builder, @@ -4976,7 +4973,7 @@ public Builder clearCropHintsAnnotation() { return cropHintsAnnotationBuilder_; } - private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_ = null; + private com.google.cloud.vision.v1p4beta1.WebDetection webDetection_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection, com.google.cloud.vision.v1p4beta1.WebDetection.Builder, @@ -5158,7 +5155,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder getWebDetectionOr return webDetectionBuilder_; } - private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_ = null; + private com.google.cloud.vision.v1p4beta1.ProductSearchResults productSearchResults_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ProductSearchResults, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Builder, @@ -5345,7 +5342,7 @@ public Builder clearProductSearchResults() { return productSearchResultsBuilder_; } - private com.google.rpc.Status error_ = null; + private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; @@ -5532,7 +5529,7 @@ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return errorBuilder_; } - private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_ = null; + private com.google.cloud.vision.v1p4beta1.ImageAnnotationContext context_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImageAnnotationContext, com.google.cloud.vision.v1p4beta1.ImageAnnotationContext.Builder, @@ -5725,7 +5722,7 @@ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContextOrBuilder getCont @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java index 51e52d97d2cc..a4c5ea023f23 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileRequest.java @@ -68,7 +68,7 @@ private AsyncAnnotateFileRequest( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -111,7 +111,7 @@ private AsyncAnnotateFileRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -123,7 +123,7 @@ private AsyncAnnotateFileRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); } this.unknownFields = unknownFields.build(); @@ -397,22 +397,21 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest) obj; - boolean result = true; - result = result && (hasInputConfig() == other.hasInputConfig()); + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && getFeaturesList().equals(other.getFeaturesList()); - result = result && (hasImageContext() == other.hasImageContext()); + if (!getFeaturesList().equals(other.getFeaturesList())) return false; + if (hasImageContext() != other.hasImageContext()) return false; if (hasImageContext()) { - result = result && getImageContext().equals(other.getImageContext()); + if (!getImageContext().equals(other.getImageContext())) return false; } - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -645,7 +644,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest buildPartial() result.inputConfig_ = inputConfigBuilder_.build(); } if (featuresBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { features_ = java.util.Collections.unmodifiableList(features_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -670,35 +669,35 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +781,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.InputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.InputConfig, com.google.cloud.vision.v1p4beta1.InputConfig.Builder, @@ -968,7 +967,7 @@ public com.google.cloud.vision.v1p4beta1.InputConfigOrBuilder getInputConfigOrBu java.util.Collections.emptyList(); private void ensureFeaturesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { features_ = new java.util.ArrayList(features_); bitField0_ |= 0x00000002; } @@ -1307,16 +1306,13 @@ public com.google.cloud.vision.v1p4beta1.Feature.Builder addFeaturesBuilder(int com.google.cloud.vision.v1p4beta1.Feature, com.google.cloud.vision.v1p4beta1.Feature.Builder, com.google.cloud.vision.v1p4beta1.FeatureOrBuilder>( - features_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + features_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); features_ = null; } return featuresBuilder_; } - private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_ = null; + private com.google.cloud.vision.v1p4beta1.ImageContext imageContext_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImageContext, com.google.cloud.vision.v1p4beta1.ImageContext.Builder, @@ -1498,7 +1494,7 @@ public com.google.cloud.vision.v1p4beta1.ImageContextOrBuilder getImageContextOr return imageContextBuilder_; } - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, @@ -1682,7 +1678,7 @@ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java index 2952a8a573e0..cd7c7e5ed8b2 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncAnnotateFileResponse.java @@ -66,7 +66,7 @@ private AsyncAnnotateFileResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -184,13 +184,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse other = (com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse) obj; - boolean result = true; - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -394,35 +393,35 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -471,7 +470,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, @@ -655,7 +654,7 @@ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java index ec7e1435b289..d15de6bc599e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesRequest.java @@ -54,7 +54,7 @@ private AsyncBatchAnnotateFilesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest>(); @@ -68,7 +68,7 @@ private AsyncBatchAnnotateFilesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -80,7 +80,7 @@ private AsyncBatchAnnotateFilesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -215,10 +215,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -417,7 +416,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest buildPar new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -431,35 +430,35 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesRequest buildPar @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -541,7 +540,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -896,10 +895,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addReq com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -907,7 +903,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileRequest.Builder addReq @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java index 9562b72ad22c..029ac9691dde 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateFilesResponse.java @@ -53,7 +53,7 @@ private AsyncBatchAnnotateFilesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse>(); @@ -67,7 +67,7 @@ private AsyncBatchAnnotateFilesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -79,7 +79,7 @@ private AsyncBatchAnnotateFilesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -219,10 +219,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -422,7 +421,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse buildPa new com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -436,35 +435,35 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateFilesResponse buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +545,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -920,10 +919,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addRe com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -931,7 +927,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncAnnotateFileResponse.Builder addRe @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java index 72c14fff7beb..1770749bba58 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesRequest.java @@ -53,7 +53,7 @@ private AsyncBatchAnnotateImagesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AnnotateImageRequest>(); @@ -83,7 +83,7 @@ private AsyncBatchAnnotateImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -95,7 +95,7 @@ private AsyncBatchAnnotateImagesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -276,14 +276,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -494,7 +493,7 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest buildPa int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -514,35 +513,35 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesRequest buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -627,7 +626,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -977,16 +976,13 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequest com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; } - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, @@ -1170,7 +1166,7 @@ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java index 5e39d836715a..b71cb0f55b6e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/AsyncBatchAnnotateImagesResponse.java @@ -67,7 +67,7 @@ private AsyncBatchAnnotateImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -185,13 +185,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse) obj; - boolean result = true; - result = result && (hasOutputConfig() == other.hasOutputConfig()); + if (hasOutputConfig() != other.hasOutputConfig()) return false; if (hasOutputConfig()) { - result = result && getOutputConfig().equals(other.getOutputConfig()); + if (!getOutputConfig().equals(other.getOutputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -399,35 +398,35 @@ public com.google.cloud.vision.v1p4beta1.AsyncBatchAnnotateImagesResponse buildP @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -480,7 +479,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.OutputConfig outputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.OutputConfig, com.google.cloud.vision.v1p4beta1.OutputConfig.Builder, @@ -664,7 +663,7 @@ public com.google.cloud.vision.v1p4beta1.OutputConfigOrBuilder getOutputConfigOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java index ce8fbd1655d1..b209164d0337 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesRequest.java @@ -52,7 +52,7 @@ private BatchAnnotateFilesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AnnotateFileRequest>(); @@ -66,7 +66,7 @@ private BatchAnnotateFilesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateFilesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -216,10 +216,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -416,7 +415,7 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest buildPartial( new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -430,35 +429,35 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesRequest buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -537,7 +536,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -904,10 +903,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder addRequests com.google.cloud.vision.v1p4beta1.AnnotateFileRequest, com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -915,7 +911,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileRequest.Builder addRequests @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java index cecc8b9a4ad6..75f5bf15c785 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateFilesResponse.java @@ -52,7 +52,7 @@ private BatchAnnotateFilesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AnnotateFileResponse>(); @@ -66,7 +66,7 @@ private BatchAnnotateFilesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateFilesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -216,10 +216,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -417,7 +416,7 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse buildPartial new com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -431,35 +430,35 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateFilesResponse buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -539,7 +538,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -907,10 +906,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder addRespons com.google.cloud.vision.v1p4beta1.AnnotateFileResponse, com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateFileResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -918,7 +914,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateFileResponse.Builder addRespons @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java index d63c16ad3d6d..3c75db837f3a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesRequest.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesRequest( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AnnotateImageRequest>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesRequest( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); } this.unknownFields = unknownFields.build(); @@ -211,10 +211,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest) obj; - boolean result = true; - result = result && getRequestsList().equals(other.getRequestsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getRequestsList().equals(other.getRequestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,7 +411,7 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest buildPartial new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest(this); int from_bitField0_ = bitField0_; if (requestsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { requests_ = java.util.Collections.unmodifiableList(requests_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -426,35 +425,35 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesRequest buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -534,7 +533,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureRequestsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { requests_ = new java.util.ArrayList( requests_); @@ -884,10 +883,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequest com.google.cloud.vision.v1p4beta1.AnnotateImageRequest, com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageRequestOrBuilder>( - requests_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + requests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); requests_ = null; } return requestsBuilder_; @@ -895,7 +891,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageRequest.Builder addRequest @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java index abf1f3a9e9a2..2ef9b76382ba 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchAnnotateImagesResponse.java @@ -52,7 +52,7 @@ private BatchAnnotateImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.AnnotateImageResponse>(); @@ -66,7 +66,7 @@ private BatchAnnotateImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -78,7 +78,7 @@ private BatchAnnotateImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); } this.unknownFields = unknownFields.build(); @@ -212,10 +212,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse other = (com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse) obj; - boolean result = true; - result = result && getResponsesList().equals(other.getResponsesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -413,7 +412,7 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse buildPartia new com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse(this); int from_bitField0_ = bitField0_; if (responsesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { responses_ = java.util.Collections.unmodifiableList(responses_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -427,35 +426,35 @@ public com.google.cloud.vision.v1p4beta1.BatchAnnotateImagesResponse buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -536,7 +535,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureResponsesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { responses_ = new java.util.ArrayList( responses_); @@ -889,10 +888,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addRespon com.google.cloud.vision.v1p4beta1.AnnotateImageResponse, com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder, com.google.cloud.vision.v1p4beta1.AnnotateImageResponseOrBuilder>( - responses_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); responses_ = null; } return responsesBuilder_; @@ -900,7 +896,7 @@ public com.google.cloud.vision.v1p4beta1.AnnotateImageResponse.Builder addRespon @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java index 5aedd2386a4b..63e6e7000c5d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BatchOperationMetadata.java @@ -91,7 +91,7 @@ private BatchOperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -497,18 +497,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.BatchOperationMetadata other = (com.google.cloud.vision.v1p4beta1.BatchOperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasSubmitTime() == other.hasSubmitTime()); + if (state_ != other.state_) return false; + if (hasSubmitTime() != other.hasSubmitTime()) return false; if (hasSubmitTime()) { - result = result && getSubmitTime().equals(other.getSubmitTime()); + if (!getSubmitTime().equals(other.getSubmitTime())) return false; } - result = result && (hasEndTime() == other.hasEndTime()); + if (hasEndTime() != other.hasEndTime()) return false; if (hasEndTime()) { - result = result && getEndTime().equals(other.getEndTime()); + if (!getEndTime().equals(other.getEndTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -734,35 +733,35 @@ public com.google.cloud.vision.v1p4beta1.BatchOperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -895,7 +894,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp submitTime_ = null; + private com.google.protobuf.Timestamp submitTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1074,7 +1073,7 @@ public com.google.protobuf.TimestampOrBuilder getSubmitTimeOrBuilder() { return submitTimeBuilder_; } - private com.google.protobuf.Timestamp endTime_ = null; + private com.google.protobuf.Timestamp endTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1269,7 +1268,7 @@ public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java index f708176aac6d..963facc8f7d7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Block.java @@ -25,7 +25,6 @@ private Block(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Block() { paragraphs_ = java.util.Collections.emptyList(); blockType_ = 0; - confidence_ = 0F; } @java.lang.Override @@ -88,7 +87,7 @@ private Block( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -112,7 +111,7 @@ private Block( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -124,7 +123,7 @@ private Block( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); } this.unknownFields = unknownFields.build(); @@ -661,23 +660,20 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p4beta1.Block other = (com.google.cloud.vision.v1p4beta1.Block) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getParagraphsList().equals(other.getParagraphsList()); - result = result && blockType_ == other.blockType_; - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getParagraphsList().equals(other.getParagraphsList())) return false; + if (blockType_ != other.blockType_) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -912,7 +908,7 @@ public com.google.cloud.vision.v1p4beta1.Block buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (paragraphsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { paragraphs_ = java.util.Collections.unmodifiableList(paragraphs_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -929,35 +925,35 @@ public com.google.cloud.vision.v1p4beta1.Block buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1042,7 +1038,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, @@ -1228,7 +1224,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1540,7 +1536,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureParagraphsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { paragraphs_ = new java.util.ArrayList(paragraphs_); bitField0_ |= 0x00000004; @@ -1881,10 +1877,7 @@ public com.google.cloud.vision.v1p4beta1.Paragraph.Builder addParagraphsBuilder( com.google.cloud.vision.v1p4beta1.Paragraph, com.google.cloud.vision.v1p4beta1.Paragraph.Builder, com.google.cloud.vision.v1p4beta1.ParagraphOrBuilder>( - paragraphs_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + paragraphs_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); paragraphs_ = null; } return paragraphsBuilder_; @@ -2014,7 +2007,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java index c97813c77749..51ecf02fe761 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/BoundingPoly.java @@ -53,7 +53,7 @@ private BoundingPoly( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -64,7 +64,7 @@ private BoundingPoly( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; @@ -77,7 +77,7 @@ private BoundingPoly( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -89,10 +89,10 @@ private BoundingPoly( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); } this.unknownFields = unknownFields.build(); @@ -297,11 +297,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.BoundingPoly other = (com.google.cloud.vision.v1p4beta1.BoundingPoly) obj; - boolean result = true; - result = result && getVerticesList().equals(other.getVerticesList()); - result = result && getNormalizedVerticesList().equals(other.getNormalizedVerticesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getVerticesList().equals(other.getVerticesList())) return false; + if (!getNormalizedVerticesList().equals(other.getNormalizedVerticesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -508,7 +507,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPoly buildPartial() { new com.google.cloud.vision.v1p4beta1.BoundingPoly(this); int from_bitField0_ = bitField0_; if (verticesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { vertices_ = java.util.Collections.unmodifiableList(vertices_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -517,7 +516,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPoly buildPartial() { result.vertices_ = verticesBuilder_.build(); } if (normalizedVerticesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = java.util.Collections.unmodifiableList(normalizedVertices_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -531,35 +530,35 @@ public com.google.cloud.vision.v1p4beta1.BoundingPoly buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -663,7 +662,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureVerticesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { vertices_ = new java.util.ArrayList(vertices_); bitField0_ |= 0x00000001; } @@ -1002,10 +1001,7 @@ public com.google.cloud.vision.v1p4beta1.Vertex.Builder addVerticesBuilder(int i com.google.cloud.vision.v1p4beta1.Vertex, com.google.cloud.vision.v1p4beta1.Vertex.Builder, com.google.cloud.vision.v1p4beta1.VertexOrBuilder>( - vertices_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + vertices_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); vertices_ = null; } return verticesBuilder_; @@ -1015,7 +1011,7 @@ public com.google.cloud.vision.v1p4beta1.Vertex.Builder addVerticesBuilder(int i java.util.Collections.emptyList(); private void ensureNormalizedVerticesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { normalizedVertices_ = new java.util.ArrayList( normalizedVertices_); @@ -1384,7 +1380,7 @@ public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder addNormalizedV com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder, com.google.cloud.vision.v1p4beta1.NormalizedVertexOrBuilder>( normalizedVertices_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); normalizedVertices_ = null; @@ -1394,7 +1390,7 @@ public com.google.cloud.vision.v1p4beta1.NormalizedVertex.Builder addNormalizedV @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java index 260619aafb8e..162f8b4f2b59 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ColorInfo.java @@ -23,10 +23,7 @@ private ColorInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private ColorInfo() { - score_ = 0F; - pixelFraction_ = 0F; - } + private ColorInfo() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -78,7 +75,7 @@ private ColorInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -237,21 +234,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ColorInfo other = (com.google.cloud.vision.v1p4beta1.ColorInfo) obj; - boolean result = true; - result = result && (hasColor() == other.hasColor()); + if (hasColor() != other.hasColor()) return false; if (hasColor()) { - result = result && getColor().equals(other.getColor()); + if (!getColor().equals(other.getColor())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getPixelFraction()) - == java.lang.Float.floatToIntBits(other.getPixelFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getPixelFraction()) + != java.lang.Float.floatToIntBits(other.getPixelFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -465,35 +457,35 @@ public com.google.cloud.vision.v1p4beta1.ColorInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -546,7 +538,7 @@ public Builder mergeFrom( return this; } - private com.google.type.Color color_ = null; + private com.google.type.Color color_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.Color, com.google.type.Color.Builder, com.google.type.ColorOrBuilder> colorBuilder_; @@ -808,7 +800,7 @@ public Builder clearPixelFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java index 8aae90edaee0..1964f9d446f6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductRequest.java @@ -83,7 +83,7 @@ private CreateProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -309,15 +309,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.CreateProductRequest other = (com.google.cloud.vision.v1p4beta1.CreateProductRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasProduct() == other.hasProduct()); + if (!getParent().equals(other.getParent())) return false; + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); + if (!getProduct().equals(other.getProduct())) return false; } - result = result && getProductId().equals(other.getProductId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductId().equals(other.getProductId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -531,35 +530,35 @@ public com.google.cloud.vision.v1p4beta1.CreateProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -720,7 +719,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p4beta1.Product product_ = null; + private com.google.cloud.vision.v1p4beta1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, @@ -1012,7 +1011,7 @@ public Builder setProductIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java index a7390df81aea..1925b851a24d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateProductSetRequest.java @@ -83,7 +83,7 @@ private CreateProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -307,15 +307,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.CreateProductSetRequest other = (com.google.cloud.vision.v1p4beta1.CreateProductSetRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasProductSet() == other.hasProductSet()); + if (!getParent().equals(other.getParent())) return false; + if (hasProductSet() != other.hasProductSet()) return false; if (hasProductSet()) { - result = result && getProductSet().equals(other.getProductSet()); + if (!getProductSet().equals(other.getProductSet())) return false; } - result = result && getProductSetId().equals(other.getProductSetId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSetId().equals(other.getProductSetId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -529,35 +528,35 @@ public com.google.cloud.vision.v1p4beta1.CreateProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -713,7 +712,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p4beta1.ProductSet productSet_ = null; + private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, @@ -1006,7 +1005,7 @@ public Builder setProductSetIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java index 47412104c01c..ff69e2da31a0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CreateReferenceImageRequest.java @@ -83,7 +83,7 @@ private CreateReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -312,15 +312,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasReferenceImage() == other.hasReferenceImage()); + if (!getParent().equals(other.getParent())) return false; + if (hasReferenceImage() != other.hasReferenceImage()) return false; if (hasReferenceImage()) { - result = result && getReferenceImage().equals(other.getReferenceImage()); + if (!getReferenceImage().equals(other.getReferenceImage())) return false; } - result = result && getReferenceImageId().equals(other.getReferenceImageId()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImageId().equals(other.getReferenceImageId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -535,35 +534,35 @@ public com.google.cloud.vision.v1p4beta1.CreateReferenceImageRequest buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -726,7 +725,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p4beta1.ReferenceImage referenceImage_ = null; + private com.google.cloud.vision.v1p4beta1.ReferenceImage referenceImage_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ReferenceImage, com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, @@ -1028,7 +1027,7 @@ public Builder setReferenceImageIdBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java index 170f71cb8b88..281954b87115 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHint.java @@ -22,10 +22,7 @@ private CropHint(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private CropHint() { - confidence_ = 0F; - importanceFraction_ = 0F; - } + private CropHint() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -79,7 +76,7 @@ private CropHint( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -243,21 +240,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.CropHint other = (com.google.cloud.vision.v1p4beta1.CropHint) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getImportanceFraction()) - == java.lang.Float.floatToIntBits(other.getImportanceFraction())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getImportanceFraction()) + != java.lang.Float.floatToIntBits(other.getImportanceFraction())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -470,35 +462,35 @@ public com.google.cloud.vision.v1p4beta1.CropHint buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -551,7 +543,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -835,7 +827,7 @@ public Builder clearImportanceFraction() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java index 1383a886a4ed..23ccaeacf416 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsAnnotation.java @@ -52,7 +52,7 @@ private CropHintsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private CropHintsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private CropHintsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.CropHintsAnnotation other = (com.google.cloud.vision.v1p4beta1.CropHintsAnnotation) obj; - boolean result = true; - result = result && getCropHintsList().equals(other.getCropHintsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCropHintsList().equals(other.getCropHintsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation buildPartial() { new com.google.cloud.vision.v1p4beta1.CropHintsAnnotation(this); int from_bitField0_ = bitField0_; if (cropHintsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { cropHints_ = java.util.Collections.unmodifiableList(cropHints_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p4beta1.CropHintsAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureCropHintsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { cropHints_ = new java.util.ArrayList(cropHints_); bitField0_ |= 0x00000001; @@ -869,10 +868,7 @@ public com.google.cloud.vision.v1p4beta1.CropHint.Builder addCropHintsBuilder(in com.google.cloud.vision.v1p4beta1.CropHint, com.google.cloud.vision.v1p4beta1.CropHint.Builder, com.google.cloud.vision.v1p4beta1.CropHintOrBuilder>( - cropHints_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + cropHints_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); cropHints_ = null; } return cropHintsBuilder_; @@ -880,7 +876,7 @@ public com.google.cloud.vision.v1p4beta1.CropHint.Builder addCropHintsBuilder(in @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java index 2685cb74d5ed..7947afbbba7c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/CropHintsParams.java @@ -23,7 +23,7 @@ private CropHintsParams(com.google.protobuf.GeneratedMessageV3.Builder builde } private CropHintsParams() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); } @java.lang.Override @@ -52,31 +52,30 @@ private CropHintsParams( break; case 13: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); break; } case 10: { int length = input.readRawVarint32(); int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001) - && input.getBytesUntilLimit() > 0) { - aspectRatios_ = new java.util.ArrayList(); + if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { + aspectRatios_ = newFloatList(); mutable_bitField0_ |= 0x00000001; } while (input.getBytesUntilLimit() > 0) { - aspectRatios_.add(input.readFloat()); + aspectRatios_.addFloat(input.readFloat()); } input.popLimit(limit); break; } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -88,8 +87,8 @@ private CropHintsParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((mutable_bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); // C } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); @@ -112,7 +111,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } public static final int ASPECT_RATIOS_FIELD_NUMBER = 1; - private java.util.List aspectRatios_; + private com.google.protobuf.Internal.FloatList aspectRatios_; /** * * @@ -162,7 +161,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } private int aspectRatiosMemoizedSerializedSize = -1; @@ -187,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeUInt32NoTag(aspectRatiosMemoizedSerializedSize); } for (int i = 0; i < aspectRatios_.size(); i++) { - output.writeFloatNoTag(aspectRatios_.get(i)); + output.writeFloatNoTag(aspectRatios_.getFloat(i)); } unknownFields.writeTo(output); } @@ -224,10 +223,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.CropHintsParams other = (com.google.cloud.vision.v1p4beta1.CropHintsParams) obj; - boolean result = true; - result = result && getAspectRatiosList().equals(other.getAspectRatiosList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getAspectRatiosList().equals(other.getAspectRatiosList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -386,7 +384,7 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -416,8 +414,8 @@ public com.google.cloud.vision.v1p4beta1.CropHintsParams buildPartial() { com.google.cloud.vision.v1p4beta1.CropHintsParams result = new com.google.cloud.vision.v1p4beta1.CropHintsParams(this); int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = java.util.Collections.unmodifiableList(aspectRatios_); + if (((bitField0_ & 0x00000001) != 0)) { + aspectRatios_.makeImmutable(); bitField0_ = (bitField0_ & ~0x00000001); } result.aspectRatios_ = aspectRatios_; @@ -427,35 +425,35 @@ public com.google.cloud.vision.v1p4beta1.CropHintsParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -513,11 +511,11 @@ public Builder mergeFrom( private int bitField0_; - private java.util.List aspectRatios_ = java.util.Collections.emptyList(); + private com.google.protobuf.Internal.FloatList aspectRatios_ = emptyFloatList(); private void ensureAspectRatiosIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - aspectRatios_ = new java.util.ArrayList(aspectRatios_); + if (!((bitField0_ & 0x00000001) != 0)) { + aspectRatios_ = mutableCopy(aspectRatios_); bitField0_ |= 0x00000001; } } @@ -536,7 +534,9 @@ private void ensureAspectRatiosIsMutable() { * repeated float aspect_ratios = 1; */ public java.util.List getAspectRatiosList() { - return java.util.Collections.unmodifiableList(aspectRatios_); + return ((bitField0_ & 0x00000001) != 0) + ? java.util.Collections.unmodifiableList(aspectRatios_) + : aspectRatios_; } /** * @@ -570,7 +570,7 @@ public int getAspectRatiosCount() { * repeated float aspect_ratios = 1; */ public float getAspectRatios(int index) { - return aspectRatios_.get(index); + return aspectRatios_.getFloat(index); } /** * @@ -588,7 +588,7 @@ public float getAspectRatios(int index) { */ public Builder setAspectRatios(int index, float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.set(index, value); + aspectRatios_.setFloat(index, value); onChanged(); return this; } @@ -608,7 +608,7 @@ public Builder setAspectRatios(int index, float value) { */ public Builder addAspectRatios(float value) { ensureAspectRatiosIsMutable(); - aspectRatios_.add(value); + aspectRatios_.addFloat(value); onChanged(); return this; } @@ -647,7 +647,7 @@ public Builder addAllAspectRatios(java.lang.Iterable * repeated float aspect_ratios = 1; */ public Builder clearAspectRatios() { - aspectRatios_ = java.util.Collections.emptyList(); + aspectRatios_ = emptyFloatList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; @@ -655,7 +655,7 @@ public Builder clearAspectRatios() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java index 834625cb9e22..9f4947e9d494 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductRequest.java @@ -59,7 +59,7 @@ private DeleteProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.DeleteProductRequest other = (com.google.cloud.vision.v1p4beta1.DeleteProductRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p4beta1.DeleteProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java index 403e565b8edd..0f635a37c974 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteProductSetRequest.java @@ -59,7 +59,7 @@ private DeleteProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest other = (com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p4beta1.DeleteProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java index 0e44666aa4bc..95c332dcca59 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DeleteReferenceImageRequest.java @@ -59,7 +59,7 @@ private DeleteReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -381,35 +380,35 @@ public com.google.cloud.vision.v1p4beta1.DeleteReferenceImageRequest buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -567,7 +566,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java index 40927054160b..0a7b1cda1bcf 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/DominantColorsAnnotation.java @@ -52,7 +52,7 @@ private DominantColorsAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -63,7 +63,7 @@ private DominantColorsAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -75,7 +75,7 @@ private DominantColorsAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); } this.unknownFields = unknownFields.build(); @@ -207,10 +207,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation other = (com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation) obj; - boolean result = true; - result = result && getColorsList().equals(other.getColorsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getColorsList().equals(other.getColorsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -407,7 +406,7 @@ public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation buildPartial() new com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation(this); int from_bitField0_ = bitField0_; if (colorsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { colors_ = java.util.Collections.unmodifiableList(colors_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -421,35 +420,35 @@ public com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -528,7 +527,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureColorsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { colors_ = new java.util.ArrayList(colors_); bitField0_ |= 0x00000001; } @@ -867,10 +866,7 @@ public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder addColorsBuilder(int com.google.cloud.vision.v1p4beta1.ColorInfo, com.google.cloud.vision.v1p4beta1.ColorInfo.Builder, com.google.cloud.vision.v1p4beta1.ColorInfoOrBuilder>( - colors_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + colors_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); colors_ = null; } return colorsBuilder_; @@ -878,7 +874,7 @@ public com.google.cloud.vision.v1p4beta1.ColorInfo.Builder addColorsBuilder(int @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java index 87cf8bc3683c..d202a4e925a0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/EntityAnnotation.java @@ -26,9 +26,6 @@ private EntityAnnotation() { mid_ = ""; locale_ = ""; description_ = ""; - score_ = 0F; - confidence_ = 0F; - topicality_ = 0F; locations_ = java.util.Collections.emptyList(); properties_ = java.util.Collections.emptyList(); } @@ -111,7 +108,7 @@ private EntityAnnotation( } case 66: { - if (!((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (!((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000080; @@ -123,7 +120,7 @@ private EntityAnnotation( } case 74: { - if (!((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (!((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000100; } @@ -134,7 +131,7 @@ private EntityAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -146,10 +143,10 @@ private EntityAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000080) == 0x00000080)) { + if (((mutable_bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); } - if (((mutable_bitField0_ & 0x00000100) == 0x00000100)) { + if (((mutable_bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); } this.unknownFields = unknownFields.build(); @@ -652,30 +649,23 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.EntityAnnotation other = (com.google.cloud.vision.v1p4beta1.EntityAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLocale().equals(other.getLocale()); - result = result && getDescription().equals(other.getDescription()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getTopicality()) - == java.lang.Float.floatToIntBits(other.getTopicality())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLocale().equals(other.getLocale())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (java.lang.Float.floatToIntBits(getTopicality()) + != java.lang.Float.floatToIntBits(other.getTopicality())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getLocationsList().equals(other.getLocationsList()); - result = result && getPropertiesList().equals(other.getPropertiesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLocationsList().equals(other.getLocationsList())) return false; + if (!getPropertiesList().equals(other.getPropertiesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -928,7 +918,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } if (locationsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (((bitField0_ & 0x00000080) != 0)) { locations_ = java.util.Collections.unmodifiableList(locations_); bitField0_ = (bitField0_ & ~0x00000080); } @@ -937,7 +927,7 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation buildPartial() { result.locations_ = locationsBuilder_.build(); } if (propertiesBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (((bitField0_ & 0x00000100) != 0)) { properties_ = java.util.Collections.unmodifiableList(properties_); bitField0_ = (bitField0_ & ~0x00000100); } @@ -952,35 +942,35 @@ public com.google.cloud.vision.v1p4beta1.EntityAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1562,7 +1552,7 @@ public Builder clearTopicality() { return this; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1757,7 +1747,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOr java.util.Collections.emptyList(); private void ensureLocationsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { + if (!((bitField0_ & 0x00000080) != 0)) { locations_ = new java.util.ArrayList(locations_); bitField0_ |= 0x00000080; @@ -2171,10 +2161,7 @@ public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder addLocationsBuilde com.google.cloud.vision.v1p4beta1.LocationInfo, com.google.cloud.vision.v1p4beta1.LocationInfo.Builder, com.google.cloud.vision.v1p4beta1.LocationInfoOrBuilder>( - locations_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); + locations_, ((bitField0_ & 0x00000080) != 0), getParentForChildren(), isClean()); locations_ = null; } return locationsBuilder_; @@ -2184,7 +2171,7 @@ public com.google.cloud.vision.v1p4beta1.LocationInfo.Builder addLocationsBuilde java.util.Collections.emptyList(); private void ensurePropertiesIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { + if (!((bitField0_ & 0x00000100) != 0)) { properties_ = new java.util.ArrayList(properties_); bitField0_ |= 0x00000100; @@ -2543,10 +2530,7 @@ public com.google.cloud.vision.v1p4beta1.Property.Builder addPropertiesBuilder(i com.google.cloud.vision.v1p4beta1.Property, com.google.cloud.vision.v1p4beta1.Property.Builder, com.google.cloud.vision.v1p4beta1.PropertyOrBuilder>( - properties_, - ((bitField0_ & 0x00000100) == 0x00000100), - getParentForChildren(), - isClean()); + properties_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); properties_ = null; } return propertiesBuilder_; @@ -2554,7 +2538,7 @@ public com.google.cloud.vision.v1p4beta1.Property.Builder addPropertiesBuilder(i @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java index 5d689680aa27..74841ad38bf3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/FaceAnnotation.java @@ -24,11 +24,6 @@ private FaceAnnotation(com.google.protobuf.GeneratedMessageV3.Builder builder private FaceAnnotation() { landmarks_ = java.util.Collections.emptyList(); - rollAngle_ = 0F; - panAngle_ = 0F; - tiltAngle_ = 0F; - detectionConfidence_ = 0F; - landmarkingConfidence_ = 0F; joyLikelihood_ = 0; sorrowLikelihood_ = 0; angerLikelihood_ = 0; @@ -96,7 +91,7 @@ private FaceAnnotation( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark>(); @@ -184,7 +179,7 @@ private FaceAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -196,7 +191,7 @@ private FaceAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); } this.unknownFields = unknownFields.build(); @@ -348,7 +343,7 @@ private Landmark( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1362,14 +1357,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark other = (com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (hasPosition() == other.hasPosition()); + if (type_ != other.type_) return false; + if (hasPosition() != other.hasPosition()) return false; if (hasPosition()) { - result = result && getPosition().equals(other.getPosition()); + if (!getPosition().equals(other.getPosition())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1580,23 +1574,23 @@ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1604,13 +1598,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1740,7 +1734,7 @@ public Builder clearType() { return this; } - private com.google.cloud.vision.v1p4beta1.Position position_ = null; + private com.google.cloud.vision.v1p4beta1.Position position_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.Position, com.google.cloud.vision.v1p4beta1.Position.Builder, @@ -1925,7 +1919,7 @@ public com.google.cloud.vision.v1p4beta1.PositionOrBuilder getPositionOrBuilder( @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2578,45 +2572,34 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.FaceAnnotation other = (com.google.cloud.vision.v1p4beta1.FaceAnnotation) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && (hasFdBoundingPoly() == other.hasFdBoundingPoly()); + if (hasFdBoundingPoly() != other.hasFdBoundingPoly()) return false; if (hasFdBoundingPoly()) { - result = result && getFdBoundingPoly().equals(other.getFdBoundingPoly()); - } - result = result && getLandmarksList().equals(other.getLandmarksList()); - result = - result - && (java.lang.Float.floatToIntBits(getRollAngle()) - == java.lang.Float.floatToIntBits(other.getRollAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getPanAngle()) - == java.lang.Float.floatToIntBits(other.getPanAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getTiltAngle()) - == java.lang.Float.floatToIntBits(other.getTiltAngle())); - result = - result - && (java.lang.Float.floatToIntBits(getDetectionConfidence()) - == java.lang.Float.floatToIntBits(other.getDetectionConfidence())); - result = - result - && (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) - == java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())); - result = result && joyLikelihood_ == other.joyLikelihood_; - result = result && sorrowLikelihood_ == other.sorrowLikelihood_; - result = result && angerLikelihood_ == other.angerLikelihood_; - result = result && surpriseLikelihood_ == other.surpriseLikelihood_; - result = result && underExposedLikelihood_ == other.underExposedLikelihood_; - result = result && blurredLikelihood_ == other.blurredLikelihood_; - result = result && headwearLikelihood_ == other.headwearLikelihood_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getFdBoundingPoly().equals(other.getFdBoundingPoly())) return false; + } + if (!getLandmarksList().equals(other.getLandmarksList())) return false; + if (java.lang.Float.floatToIntBits(getRollAngle()) + != java.lang.Float.floatToIntBits(other.getRollAngle())) return false; + if (java.lang.Float.floatToIntBits(getPanAngle()) + != java.lang.Float.floatToIntBits(other.getPanAngle())) return false; + if (java.lang.Float.floatToIntBits(getTiltAngle()) + != java.lang.Float.floatToIntBits(other.getTiltAngle())) return false; + if (java.lang.Float.floatToIntBits(getDetectionConfidence()) + != java.lang.Float.floatToIntBits(other.getDetectionConfidence())) return false; + if (java.lang.Float.floatToIntBits(getLandmarkingConfidence()) + != java.lang.Float.floatToIntBits(other.getLandmarkingConfidence())) return false; + if (joyLikelihood_ != other.joyLikelihood_) return false; + if (sorrowLikelihood_ != other.sorrowLikelihood_) return false; + if (angerLikelihood_ != other.angerLikelihood_) return false; + if (surpriseLikelihood_ != other.surpriseLikelihood_) return false; + if (underExposedLikelihood_ != other.underExposedLikelihood_) return false; + if (blurredLikelihood_ != other.blurredLikelihood_) return false; + if (headwearLikelihood_ != other.headwearLikelihood_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2891,7 +2874,7 @@ public com.google.cloud.vision.v1p4beta1.FaceAnnotation buildPartial() { result.fdBoundingPoly_ = fdBoundingPolyBuilder_.build(); } if (landmarksBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { landmarks_ = java.util.Collections.unmodifiableList(landmarks_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -2918,35 +2901,35 @@ public com.google.cloud.vision.v1p4beta1.FaceAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3062,7 +3045,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -3298,7 +3281,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOr return boundingPolyBuilder_; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly fdBoundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly fdBoundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -3529,7 +3512,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getFdBoundingPoly java.util.Collections.emptyList(); private void ensureLandmarksIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { landmarks_ = new java.util.ArrayList( landmarks_); @@ -3884,10 +3867,7 @@ public com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder addLand com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark, com.google.cloud.vision.v1p4beta1.FaceAnnotation.Landmark.Builder, com.google.cloud.vision.v1p4beta1.FaceAnnotation.LandmarkOrBuilder>( - landmarks_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + landmarks_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); landmarks_ = null; } return landmarksBuilder_; @@ -4662,7 +4642,7 @@ public Builder clearHeadwearLikelihood() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java index 01b2dea5878b..2d2899670b1c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Feature.java @@ -26,7 +26,6 @@ private Feature(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Feature() { type_ = 0; - maxResults_ = 0; model_ = ""; } @@ -75,7 +74,7 @@ private Feature( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -632,12 +631,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.Feature other = (com.google.cloud.vision.v1p4beta1.Feature) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getMaxResults() == other.getMaxResults()); - result = result && getModel().equals(other.getModel()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getMaxResults() != other.getMaxResults()) return false; + if (!getModel().equals(other.getModel())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -842,35 +840,35 @@ public com.google.cloud.vision.v1p4beta1.Feature buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1153,7 +1151,7 @@ public Builder setModelBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java index b4a3953746ee..18136b78af70 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsDestination.java @@ -59,7 +59,7 @@ private GcsDestination( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -201,10 +201,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.GcsDestination other = (com.google.cloud.vision.v1p4beta1.GcsDestination) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -397,35 +396,35 @@ public com.google.cloud.vision.v1p4beta1.GcsDestination buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -625,7 +624,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java index a424c7d422dc..4b81784c43bb 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GcsSource.java @@ -59,7 +59,7 @@ private GcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -181,10 +181,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.GcsSource other = (com.google.cloud.vision.v1p4beta1.GcsSource) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -377,35 +376,35 @@ public com.google.cloud.vision.v1p4beta1.GcsSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -554,7 +553,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java index 5d5f3c3a2b85..a998f82a946d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductRequest.java @@ -59,7 +59,7 @@ private GetProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.GetProductRequest other = (com.google.cloud.vision.v1p4beta1.GetProductRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +378,35 @@ public com.google.cloud.vision.v1p4beta1.GetProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -563,7 +562,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java index b85005c6e9f7..cbeb56fd7447 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetProductSetRequest.java @@ -59,7 +59,7 @@ private GetProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.GetProductSetRequest other = (com.google.cloud.vision.v1p4beta1.GetProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p4beta1.GetProductSetRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java index 8b891a5fb5e9..80525fcae53d 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/GetReferenceImageRequest.java @@ -59,7 +59,7 @@ private GetReferenceImageRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -183,10 +183,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest other = (com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -380,35 +379,35 @@ public com.google.cloud.vision.v1p4beta1.GetReferenceImageRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -564,7 +563,7 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java index ca0ac903b04c..4948f0e54312 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Image.java @@ -73,7 +73,7 @@ private Image( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -219,14 +219,13 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p4beta1.Image other = (com.google.cloud.vision.v1p4beta1.Image) obj; - boolean result = true; - result = result && getContent().equals(other.getContent()); - result = result && (hasSource() == other.hasSource()); + if (!getContent().equals(other.getContent())) return false; + if (hasSource() != other.hasSource()) return false; if (hasSource()) { - result = result && getSource().equals(other.getSource()); + if (!getSource().equals(other.getSource())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -434,35 +433,35 @@ public com.google.cloud.vision.v1p4beta1.Image buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -565,7 +564,7 @@ public Builder clearContent() { return this; } - private com.google.cloud.vision.v1p4beta1.ImageSource source_ = null; + private com.google.cloud.vision.v1p4beta1.ImageSource source_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImageSource, com.google.cloud.vision.v1p4beta1.ImageSource.Builder, @@ -767,7 +766,7 @@ public com.google.cloud.vision.v1p4beta1.ImageSourceOrBuilder getSourceOrBuilder @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java index 5b297f5c2b80..ff0776e21d61 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageAnnotationContext.java @@ -25,7 +25,6 @@ private ImageAnnotationContext(com.google.protobuf.GeneratedMessageV3.Builder private ImageAnnotationContext() { uri_ = ""; - pageNumber_ = 0; } @java.lang.Override @@ -66,7 +65,7 @@ private ImageAnnotationContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -208,11 +207,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImageAnnotationContext other = (com.google.cloud.vision.v1p4beta1.ImageAnnotationContext) obj; - boolean result = true; - result = result && getUri().equals(other.getUri()); - result = result && (getPageNumber() == other.getPageNumber()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUri().equals(other.getUri())) return false; + if (getPageNumber() != other.getPageNumber()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -412,35 +410,35 @@ public com.google.cloud.vision.v1p4beta1.ImageAnnotationContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -636,7 +634,7 @@ public Builder clearPageNumber() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java index 11ffeb0fc83d..e8f8e540a2b7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageContext.java @@ -69,7 +69,7 @@ private ImageContext( case 18: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -129,7 +129,7 @@ private ImageContext( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -141,7 +141,7 @@ private ImageContext( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -484,26 +484,25 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImageContext other = (com.google.cloud.vision.v1p4beta1.ImageContext) obj; - boolean result = true; - result = result && (hasLatLongRect() == other.hasLatLongRect()); + if (hasLatLongRect() != other.hasLatLongRect()) return false; if (hasLatLongRect()) { - result = result && getLatLongRect().equals(other.getLatLongRect()); + if (!getLatLongRect().equals(other.getLatLongRect())) return false; } - result = result && getLanguageHintsList().equals(other.getLanguageHintsList()); - result = result && (hasCropHintsParams() == other.hasCropHintsParams()); + if (!getLanguageHintsList().equals(other.getLanguageHintsList())) return false; + if (hasCropHintsParams() != other.hasCropHintsParams()) return false; if (hasCropHintsParams()) { - result = result && getCropHintsParams().equals(other.getCropHintsParams()); + if (!getCropHintsParams().equals(other.getCropHintsParams())) return false; } - result = result && (hasProductSearchParams() == other.hasProductSearchParams()); + if (hasProductSearchParams() != other.hasProductSearchParams()) return false; if (hasProductSearchParams()) { - result = result && getProductSearchParams().equals(other.getProductSearchParams()); + if (!getProductSearchParams().equals(other.getProductSearchParams())) return false; } - result = result && (hasWebDetectionParams() == other.hasWebDetectionParams()); + if (hasWebDetectionParams() != other.hasWebDetectionParams()) return false; if (hasWebDetectionParams()) { - result = result && getWebDetectionParams().equals(other.getWebDetectionParams()); + if (!getWebDetectionParams().equals(other.getWebDetectionParams())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -738,7 +737,7 @@ public com.google.cloud.vision.v1p4beta1.ImageContext buildPartial() { } else { result.latLongRect_ = latLongRectBuilder_.build(); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { languageHints_ = languageHints_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000002); } @@ -765,35 +764,35 @@ public com.google.cloud.vision.v1p4beta1.ImageContext buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -861,7 +860,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.LatLongRect latLongRect_ = null; + private com.google.cloud.vision.v1p4beta1.LatLongRect latLongRect_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.LatLongRect, com.google.cloud.vision.v1p4beta1.LatLongRect.Builder, @@ -1047,7 +1046,7 @@ public com.google.cloud.vision.v1p4beta1.LatLongRectOrBuilder getLatLongRectOrBu com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureLanguageHintsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { languageHints_ = new com.google.protobuf.LazyStringArrayList(languageHints_); bitField0_ |= 0x00000002; } @@ -1249,7 +1248,7 @@ public Builder addLanguageHintsBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p4beta1.CropHintsParams cropHintsParams_ = null; + private com.google.cloud.vision.v1p4beta1.CropHintsParams cropHintsParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.CropHintsParams, com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder, @@ -1432,7 +1431,7 @@ public com.google.cloud.vision.v1p4beta1.CropHintsParams.Builder getCropHintsPar return cropHintsParamsBuilder_; } - private com.google.cloud.vision.v1p4beta1.ProductSearchParams productSearchParams_ = null; + private com.google.cloud.vision.v1p4beta1.ProductSearchParams productSearchParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ProductSearchParams, com.google.cloud.vision.v1p4beta1.ProductSearchParams.Builder, @@ -1618,7 +1617,7 @@ public Builder clearProductSearchParams() { return productSearchParamsBuilder_; } - private com.google.cloud.vision.v1p4beta1.WebDetectionParams webDetectionParams_ = null; + private com.google.cloud.vision.v1p4beta1.WebDetectionParams webDetectionParams_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetectionParams, com.google.cloud.vision.v1p4beta1.WebDetectionParams.Builder, @@ -1806,7 +1805,7 @@ public Builder clearWebDetectionParams() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java index ac1e216ee2d2..20a4de431566 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageProperties.java @@ -67,7 +67,7 @@ private ImageProperties( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -186,13 +186,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImageProperties other = (com.google.cloud.vision.v1p4beta1.ImageProperties) obj; - boolean result = true; - result = result && (hasDominantColors() == other.hasDominantColors()); + if (hasDominantColors() != other.hasDominantColors()) return false; if (hasDominantColors()) { - result = result && getDominantColors().equals(other.getDominantColors()); + if (!getDominantColors().equals(other.getDominantColors())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -395,35 +394,35 @@ public com.google.cloud.vision.v1p4beta1.ImageProperties buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -472,7 +471,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominantColors_ = null; + private com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation dominantColors_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation, com.google.cloud.vision.v1p4beta1.DominantColorsAnnotation.Builder, @@ -660,7 +659,7 @@ public Builder clearDominantColors() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java index fde5f54f0f82..83a8211cdf38 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImageSource.java @@ -67,7 +67,7 @@ private ImageSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -270,11 +270,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImageSource other = (com.google.cloud.vision.v1p4beta1.ImageSource) obj; - boolean result = true; - result = result && getGcsImageUri().equals(other.getGcsImageUri()); - result = result && getImageUri().equals(other.getImageUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getGcsImageUri().equals(other.getGcsImageUri())) return false; + if (!getImageUri().equals(other.getImageUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -472,35 +471,35 @@ public com.google.cloud.vision.v1p4beta1.ImageSource buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -827,7 +826,7 @@ public Builder setImageUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java index 64b03bc2ede0..eb9e7c637ed7 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsGcsSource.java @@ -60,7 +60,7 @@ private ImportProductSetsGcsSource( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -276,10 +276,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource) obj; - boolean result = true; - result = result && getCsvFileUri().equals(other.getCsvFileUri()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getCsvFileUri().equals(other.getCsvFileUri())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -475,35 +474,35 @@ public com.google.cloud.vision.v1p4beta1.ImportProductSetsGcsSource buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -890,7 +889,7 @@ public Builder setCsvFileUriBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java index beb12206d508..18645879dae5 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsInputConfig.java @@ -71,7 +71,7 @@ private ImportProductSetsInputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -236,18 +236,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig) obj; - boolean result = true; - result = result && getSourceCase().equals(other.getSourceCase()); - if (!result) return false; + if (!getSourceCase().equals(other.getSourceCase())) return false; switch (sourceCase_) { case 1: - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; break; case 0: default: } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -455,35 +453,35 @@ public com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig buildParti @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -776,7 +774,7 @@ public Builder clearGcsSource() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java index 60f2a95c9ddf..439750a78419 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsRequest.java @@ -77,7 +77,7 @@ private ImportProductSetsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -247,14 +247,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (hasInputConfig() == other.hasInputConfig()); + if (!getParent().equals(other.getParent())) return false; + if (hasInputConfig() != other.hasInputConfig()) return false; if (hasInputConfig()) { - result = result && getInputConfig().equals(other.getInputConfig()); + if (!getInputConfig().equals(other.getInputConfig())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -463,35 +462,35 @@ public com.google.cloud.vision.v1p4beta1.ImportProductSetsRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -643,7 +642,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig inputConfig_ = null; + private com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig inputConfig_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig, com.google.cloud.vision.v1p4beta1.ImportProductSetsInputConfig.Builder, @@ -832,7 +831,7 @@ public Builder clearInputConfig() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java index 9e2d4de575d1..530eef284cb6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ImportProductSetsResponse.java @@ -58,7 +58,7 @@ private ImportProductSetsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -71,7 +71,7 @@ private ImportProductSetsResponse( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { statuses_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000002; } @@ -80,7 +80,7 @@ private ImportProductSetsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -92,10 +92,10 @@ private ImportProductSetsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); } this.unknownFields = unknownFields.build(); @@ -317,11 +317,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse other = (com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse) obj; - boolean result = true; - result = result && getReferenceImagesList().equals(other.getReferenceImagesList()); - result = result && getStatusesList().equals(other.getStatusesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImagesList().equals(other.getReferenceImagesList())) return false; + if (!getStatusesList().equals(other.getStatusesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -534,7 +533,7 @@ public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse buildPartial( new com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse(this); int from_bitField0_ = bitField0_; if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -543,7 +542,7 @@ public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse buildPartial( result.referenceImages_ = referenceImagesBuilder_.build(); } if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { statuses_ = java.util.Collections.unmodifiableList(statuses_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -557,35 +556,35 @@ public com.google.cloud.vision.v1p4beta1.ImportProductSetsResponse buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -691,7 +690,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList( referenceImages_); @@ -1040,7 +1039,7 @@ public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImag com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( referenceImages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); referenceImages_ = null; @@ -1051,7 +1050,7 @@ public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImag private java.util.List statuses_ = java.util.Collections.emptyList(); private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { statuses_ = new java.util.ArrayList(statuses_); bitField0_ |= 0x00000002; } @@ -1452,10 +1451,7 @@ public java.util.List getStatusesBuilderList() { com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>( - statuses_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + statuses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); statuses_ = null; } return statusesBuilder_; @@ -1463,7 +1459,7 @@ public java.util.List getStatusesBuilderList() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java index 3194615b79cc..567c064023fe 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/InputConfig.java @@ -81,7 +81,7 @@ private InputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -275,15 +275,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.InputConfig other = (com.google.cloud.vision.v1p4beta1.InputConfig) obj; - boolean result = true; - result = result && (hasGcsSource() == other.hasGcsSource()); + if (hasGcsSource() != other.hasGcsSource()) return false; if (hasGcsSource()) { - result = result && getGcsSource().equals(other.getGcsSource()); + if (!getGcsSource().equals(other.getGcsSource())) return false; } - result = result && getContent().equals(other.getContent()); - result = result && getMimeType().equals(other.getMimeType()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getContent().equals(other.getContent())) return false; + if (!getMimeType().equals(other.getMimeType())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -496,35 +495,35 @@ public com.google.cloud.vision.v1p4beta1.InputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -578,7 +577,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.GcsSource gcsSource_ = null; + private com.google.cloud.vision.v1p4beta1.GcsSource gcsSource_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.GcsSource, com.google.cloud.vision.v1p4beta1.GcsSource.Builder, @@ -920,7 +919,7 @@ public Builder setMimeTypeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java index cdf8e6eda221..86557396b352 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LatLongRect.java @@ -78,7 +78,7 @@ private LatLongRect( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -239,17 +239,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.LatLongRect other = (com.google.cloud.vision.v1p4beta1.LatLongRect) obj; - boolean result = true; - result = result && (hasMinLatLng() == other.hasMinLatLng()); + if (hasMinLatLng() != other.hasMinLatLng()) return false; if (hasMinLatLng()) { - result = result && getMinLatLng().equals(other.getMinLatLng()); + if (!getMinLatLng().equals(other.getMinLatLng())) return false; } - result = result && (hasMaxLatLng() == other.hasMaxLatLng()); + if (hasMaxLatLng() != other.hasMaxLatLng()) return false; if (hasMaxLatLng()) { - result = result && getMaxLatLng().equals(other.getMaxLatLng()); + if (!getMaxLatLng().equals(other.getMaxLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -467,35 +466,35 @@ public com.google.cloud.vision.v1p4beta1.LatLongRect buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -545,7 +544,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng minLatLng_ = null; + private com.google.type.LatLng minLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> minLatLngBuilder_; @@ -715,7 +714,7 @@ public com.google.type.LatLngOrBuilder getMinLatLngOrBuilder() { return minLatLngBuilder_; } - private com.google.type.LatLng maxLatLng_ = null; + private com.google.type.LatLng maxLatLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> maxLatLngBuilder_; @@ -887,7 +886,7 @@ public com.google.type.LatLngOrBuilder getMaxLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java index 6f68a4264d3e..e0146ca0df98 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsRequest.java @@ -24,7 +24,6 @@ private ListProductSetsRequest(com.google.protobuf.GeneratedMessageV3.Builder private ListProductSetsRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListProductSetsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -265,12 +264,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListProductSetsRequest other = (com.google.cloud.vision.v1p4beta1.ListProductSetsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -474,35 +472,35 @@ public com.google.cloud.vision.v1p4beta1.ListProductSetsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -798,7 +796,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java index 26deb75befab..0454d804851f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductSetsResponse.java @@ -53,7 +53,7 @@ private ListProductSetsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { productSets_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -72,7 +72,7 @@ private ListProductSetsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -84,7 +84,7 @@ private ListProductSetsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { productSets_ = java.util.Collections.unmodifiableList(productSets_); } this.unknownFields = unknownFields.build(); @@ -268,11 +268,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListProductSetsResponse other = (com.google.cloud.vision.v1p4beta1.ListProductSetsResponse) obj; - boolean result = true; - result = result && getProductSetsList().equals(other.getProductSetsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSetsList().equals(other.getProductSetsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -474,7 +473,7 @@ public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse buildPartial() int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productSetsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { productSets_ = java.util.Collections.unmodifiableList(productSets_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -490,35 +489,35 @@ public com.google.cloud.vision.v1p4beta1.ListProductSetsResponse buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -601,7 +600,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductSetsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { productSets_ = new java.util.ArrayList(productSets_); bitField0_ |= 0x00000001; @@ -943,10 +942,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSet.Builder addProductSetsBuilde com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder>( - productSets_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + productSets_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); productSets_ = null; } return productSetsBuilder_; @@ -1053,7 +1049,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java index cc04467c3943..e23a3bb7c6a6 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetRequest.java @@ -25,7 +25,6 @@ private ListProductsInProductSetRequest( private ListProductsInProductSetRequest() { name_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -74,7 +73,7 @@ private ListProductsInProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -268,12 +267,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest other = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -480,35 +478,35 @@ public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetRequest buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -812,7 +810,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java index a971fabb25bf..4655a59d2254 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsInProductSetResponse.java @@ -54,7 +54,7 @@ private ListProductsInProductSetResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -72,7 +72,7 @@ private ListProductsInProductSetResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -84,7 +84,7 @@ private ListProductsInProductSetResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } this.unknownFields = unknownFields.build(); @@ -268,11 +268,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse other = (com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse) obj; - boolean result = true; - result = result && getProductsList().equals(other.getProductsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -478,7 +477,7 @@ public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse buildP int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -494,35 +493,35 @@ public com.google.cloud.vision.v1p4beta1.ListProductsInProductSetResponse buildP @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -609,7 +608,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(products_); bitField0_ |= 0x00000001; } @@ -948,10 +947,7 @@ public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder(int com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -1058,7 +1054,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java index 893300dedf01..f4c91bbf6b2c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsRequest.java @@ -24,7 +24,6 @@ private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder bu private ListProductsRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListProductsRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -267,12 +266,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListProductsRequest other = (com.google.cloud.vision.v1p4beta1.ListProductsRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -476,35 +474,35 @@ public com.google.cloud.vision.v1p4beta1.ListProductsRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -805,7 +803,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java index cda64ba17e46..b97387cbc0d3 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListProductsResponse.java @@ -53,7 +53,7 @@ private ListProductsResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -71,7 +71,7 @@ private ListProductsResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -83,7 +83,7 @@ private ListProductsResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); } this.unknownFields = unknownFields.build(); @@ -267,11 +267,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListProductsResponse other = (com.google.cloud.vision.v1p4beta1.ListProductsResponse) obj; - boolean result = true; - result = result && getProductsList().equals(other.getProductsList()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductsList().equals(other.getProductsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -473,7 +472,7 @@ public com.google.cloud.vision.v1p4beta1.ListProductsResponse buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (productsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { products_ = java.util.Collections.unmodifiableList(products_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -489,35 +488,35 @@ public com.google.cloud.vision.v1p4beta1.ListProductsResponse buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -600,7 +599,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureProductsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { products_ = new java.util.ArrayList(products_); bitField0_ |= 0x00000001; } @@ -939,10 +938,7 @@ public com.google.cloud.vision.v1p4beta1.Product.Builder addProductsBuilder(int com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, com.google.cloud.vision.v1p4beta1.ProductOrBuilder>( - products_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); products_ = null; } return productsBuilder_; @@ -1049,7 +1045,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java index 6b07025f1b16..ba1531cc7657 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesRequest.java @@ -24,7 +24,6 @@ private ListReferenceImagesRequest(com.google.protobuf.GeneratedMessageV3.Builde private ListReferenceImagesRequest() { parent_ = ""; - pageSize_ = 0; pageToken_ = ""; } @@ -73,7 +72,7 @@ private ListReferenceImagesRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -271,12 +270,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest other = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest) obj; - boolean result = true; - result = result && getParent().equals(other.getParent()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getPageToken().equals(other.getPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -481,35 +479,35 @@ public com.google.cloud.vision.v1p4beta1.ListReferenceImagesRequest buildPartial @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -821,7 +819,7 @@ public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java index 6ffbae377ba5..20044051d4ea 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ListReferenceImagesResponse.java @@ -24,7 +24,6 @@ private ListReferenceImagesResponse(com.google.protobuf.GeneratedMessageV3.Build private ListReferenceImagesResponse() { referenceImages_ = java.util.Collections.emptyList(); - pageSize_ = 0; nextPageToken_ = ""; } @@ -54,7 +53,7 @@ private ListReferenceImagesResponse( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; @@ -79,7 +78,7 @@ private ListReferenceImagesResponse( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -91,7 +90,7 @@ private ListReferenceImagesResponse( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); } this.unknownFields = unknownFields.build(); @@ -295,12 +294,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse other = (com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse) obj; - boolean result = true; - result = result && getReferenceImagesList().equals(other.getReferenceImagesList()); - result = result && (getPageSize() == other.getPageSize()); - result = result && getNextPageToken().equals(other.getNextPageToken()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getReferenceImagesList().equals(other.getReferenceImagesList())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -507,7 +505,7 @@ public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse buildPartia int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (referenceImagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { referenceImages_ = java.util.Collections.unmodifiableList(referenceImages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -524,35 +522,35 @@ public com.google.cloud.vision.v1p4beta1.ListReferenceImagesResponse buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -640,7 +638,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureReferenceImagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { referenceImages_ = new java.util.ArrayList( referenceImages_); @@ -989,7 +987,7 @@ public com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder addReferenceImag com.google.cloud.vision.v1p4beta1.ReferenceImage.Builder, com.google.cloud.vision.v1p4beta1.ReferenceImageOrBuilder>( referenceImages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); referenceImages_ = null; @@ -1137,7 +1135,7 @@ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java index bf31ee908878..a787d2f5419e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocalizedObjectAnnotation.java @@ -26,7 +26,6 @@ private LocalizedObjectAnnotation() { mid_ = ""; languageCode_ = ""; name_ = ""; - score_ = 0F; } @java.lang.Override @@ -97,7 +96,7 @@ private LocalizedObjectAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -387,20 +386,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation other = (com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation) obj; - boolean result = true; - result = result && getMid().equals(other.getMid()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && getName().equals(other.getName()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (!getMid().equals(other.getMid())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getName().equals(other.getName())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -624,35 +620,35 @@ public com.google.cloud.vision.v1p4beta1.LocalizedObjectAnnotation buildPartial( @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1052,7 +1048,7 @@ public Builder clearScore() { return this; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1236,7 +1232,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOr @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java index b7929dd811dd..af708d133e06 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/LocationInfo.java @@ -64,7 +64,7 @@ private LocationInfo( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -180,13 +180,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.LocationInfo other = (com.google.cloud.vision.v1p4beta1.LocationInfo) obj; - boolean result = true; - result = result && (hasLatLng() == other.hasLatLng()); + if (hasLatLng() != other.hasLatLng()) return false; if (hasLatLng()) { - result = result && getLatLng().equals(other.getLatLng()); + if (!getLatLng().equals(other.getLatLng())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -389,35 +388,35 @@ public com.google.cloud.vision.v1p4beta1.LocationInfo buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -464,7 +463,7 @@ public Builder mergeFrom( return this; } - private com.google.type.LatLng latLng_ = null; + private com.google.type.LatLng latLng_; private com.google.protobuf.SingleFieldBuilderV3< com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> latLngBuilder_; @@ -635,7 +634,7 @@ public com.google.type.LatLngOrBuilder getLatLngOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java index 2bd0b6fcef47..5a78220d4dc0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/NormalizedVertex.java @@ -24,10 +24,7 @@ private NormalizedVertex(com.google.protobuf.GeneratedMessageV3.Builder build super(builder); } - private NormalizedVertex() { - x_ = 0F; - y_ = 0F; - } + private NormalizedVertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -65,7 +62,7 @@ private NormalizedVertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -178,17 +175,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.NormalizedVertex other = (com.google.cloud.vision.v1p4beta1.NormalizedVertex) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -388,35 +380,35 @@ public com.google.cloud.vision.v1p4beta1.NormalizedVertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -558,7 +550,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java index 52c1df8795a9..9ff6ee66a77c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OperationMetadata.java @@ -89,7 +89,7 @@ private OperationMetadata( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -483,18 +483,17 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.OperationMetadata other = (com.google.cloud.vision.v1p4beta1.OperationMetadata) obj; - boolean result = true; - result = result && state_ == other.state_; - result = result && (hasCreateTime() == other.hasCreateTime()); + if (state_ != other.state_) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; if (hasCreateTime()) { - result = result && getCreateTime().equals(other.getCreateTime()); + if (!getCreateTime().equals(other.getCreateTime())) return false; } - result = result && (hasUpdateTime() == other.hasUpdateTime()); + if (hasUpdateTime() != other.hasUpdateTime()) return false; if (hasUpdateTime()) { - result = result && getUpdateTime().equals(other.getUpdateTime()); + if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -717,35 +716,35 @@ public com.google.cloud.vision.v1p4beta1.OperationMetadata buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -878,7 +877,7 @@ public Builder clearState() { return this; } - private com.google.protobuf.Timestamp createTime_ = null; + private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1057,7 +1056,7 @@ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTimeBuilder_; } - private com.google.protobuf.Timestamp updateTime_ = null; + private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1238,7 +1237,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java index 3954ac8d7431..1348aeaba6be 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/OutputConfig.java @@ -22,9 +22,7 @@ private OutputConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) super(builder); } - private OutputConfig() { - batchSize_ = 0; - } + private OutputConfig() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -73,7 +71,7 @@ private OutputConfig( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -220,14 +218,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.OutputConfig other = (com.google.cloud.vision.v1p4beta1.OutputConfig) obj; - boolean result = true; - result = result && (hasGcsDestination() == other.hasGcsDestination()); + if (hasGcsDestination() != other.hasGcsDestination()) return false; if (hasGcsDestination()) { - result = result && getGcsDestination().equals(other.getGcsDestination()); + if (!getGcsDestination().equals(other.getGcsDestination())) return false; } - result = result && (getBatchSize() == other.getBatchSize()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getBatchSize() != other.getBatchSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -435,35 +432,35 @@ public com.google.cloud.vision.v1p4beta1.OutputConfig buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -513,7 +510,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.GcsDestination gcsDestination_ = null; + private com.google.cloud.vision.v1p4beta1.GcsDestination gcsDestination_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.GcsDestination, com.google.cloud.vision.v1p4beta1.GcsDestination.Builder, @@ -765,7 +762,7 @@ public Builder clearBatchSize() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java index 97d06344567a..cddfb3fb68c0 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Page.java @@ -23,10 +23,7 @@ private Page(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Page() { - width_ = 0; - height_ = 0; blocks_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -83,7 +80,7 @@ private Page( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000008; } @@ -99,7 +96,7 @@ private Page( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -111,7 +108,7 @@ private Page( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); } this.unknownFields = unknownFields.build(); @@ -356,20 +353,17 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p4beta1.Page other = (com.google.cloud.vision.v1p4beta1.Page) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); - } - result = result && (getWidth() == other.getWidth()); - result = result && (getHeight() == other.getHeight()); - result = result && getBlocksList().equals(other.getBlocksList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProperty().equals(other.getProperty())) return false; + } + if (getWidth() != other.getWidth()) return false; + if (getHeight() != other.getHeight()) return false; + if (!getBlocksList().equals(other.getBlocksList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -595,7 +589,7 @@ public com.google.cloud.vision.v1p4beta1.Page buildPartial() { result.width_ = width_; result.height_ = height_; if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { blocks_ = java.util.Collections.unmodifiableList(blocks_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -611,35 +605,35 @@ public com.google.cloud.vision.v1p4beta1.Page buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -724,7 +718,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, @@ -1008,7 +1002,7 @@ public Builder clearHeight() { java.util.Collections.emptyList(); private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { blocks_ = new java.util.ArrayList(blocks_); bitField0_ |= 0x00000008; } @@ -1346,10 +1340,7 @@ public java.util.List getBlocks com.google.cloud.vision.v1p4beta1.Block, com.google.cloud.vision.v1p4beta1.Block.Builder, com.google.cloud.vision.v1p4beta1.BlockOrBuilder>( - blocks_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); + blocks_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); blocks_ = null; } return blocksBuilder_; @@ -1401,7 +1392,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java index 39fc35a8004d..aa414d113788 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Paragraph.java @@ -24,7 +24,6 @@ private Paragraph(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Paragraph() { words_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Paragraph( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Paragraph( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Paragraph( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); } this.unknownFields = unknownFields.build(); @@ -406,22 +405,19 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.Paragraph other = (com.google.cloud.vision.v1p4beta1.Paragraph) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getWordsList().equals(other.getWordsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getWordsList().equals(other.getWordsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -652,7 +648,7 @@ public com.google.cloud.vision.v1p4beta1.Paragraph buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (wordsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { words_ = java.util.Collections.unmodifiableList(words_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -668,35 +664,35 @@ public com.google.cloud.vision.v1p4beta1.Paragraph buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -778,7 +774,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, @@ -964,7 +960,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1276,7 +1272,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureWordsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { words_ = new java.util.ArrayList(words_); bitField0_ |= 0x00000004; } @@ -1614,10 +1610,7 @@ public java.util.List getWordsBu com.google.cloud.vision.v1p4beta1.Word, com.google.cloud.vision.v1p4beta1.Word.Builder, com.google.cloud.vision.v1p4beta1.WordOrBuilder>( - words_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + words_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); words_ = null; } return wordsBuilder_; @@ -1669,7 +1662,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java index f393fbe070b6..2c9f60ed3296 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Position.java @@ -24,11 +24,7 @@ private Position(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Position() { - x_ = 0F; - y_ = 0F; - z_ = 0F; - } + private Position() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -71,7 +67,7 @@ private Position( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -205,21 +201,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.Position other = (com.google.cloud.vision.v1p4beta1.Position) obj; - boolean result = true; - result = - result - && (java.lang.Float.floatToIntBits(getX()) - == java.lang.Float.floatToIntBits(other.getX())); - result = - result - && (java.lang.Float.floatToIntBits(getY()) - == java.lang.Float.floatToIntBits(other.getY())); - result = - result - && (java.lang.Float.floatToIntBits(getZ()) - == java.lang.Float.floatToIntBits(other.getZ())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (java.lang.Float.floatToIntBits(getX()) != java.lang.Float.floatToIntBits(other.getX())) + return false; + if (java.lang.Float.floatToIntBits(getY()) != java.lang.Float.floatToIntBits(other.getY())) + return false; + if (java.lang.Float.floatToIntBits(getZ()) != java.lang.Float.floatToIntBits(other.getZ())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -424,35 +413,35 @@ public com.google.cloud.vision.v1p4beta1.Position buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -639,7 +628,7 @@ public Builder clearZ() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java index aabc404d9e91..5aa7e98cbf2e 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Product.java @@ -84,7 +84,7 @@ private Product( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { productLabels_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000010; @@ -97,7 +97,7 @@ private Product( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -109,7 +109,7 @@ private Product( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { productLabels_ = java.util.Collections.unmodifiableList(productLabels_); } this.unknownFields = unknownFields.build(); @@ -247,7 +247,7 @@ private KeyValue( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -420,11 +420,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.Product.KeyValue other = (com.google.cloud.vision.v1p4beta1.Product.KeyValue) obj; - boolean result = true; - result = result && getKey().equals(other.getKey()); - result = result && getValue().equals(other.getValue()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getKey().equals(other.getKey())) return false; + if (!getValue().equals(other.getValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -624,23 +623,23 @@ public com.google.cloud.vision.v1p4beta1.Product.KeyValue buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -648,13 +647,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -909,7 +908,7 @@ public Builder setValueBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1309,14 +1308,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.Product other = (com.google.cloud.vision.v1p4beta1.Product) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getDisplayName().equals(other.getDisplayName()); - result = result && getDescription().equals(other.getDescription()); - result = result && getProductCategory().equals(other.getProductCategory()); - result = result && getProductLabelsList().equals(other.getProductLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!getProductCategory().equals(other.getProductCategory())) return false; + if (!getProductLabelsList().equals(other.getProductLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1533,7 +1531,7 @@ public com.google.cloud.vision.v1p4beta1.Product buildPartial() { result.description_ = description_; result.productCategory_ = productCategory_; if (productLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { productLabels_ = java.util.Collections.unmodifiableList(productLabels_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -1548,35 +1546,35 @@ public com.google.cloud.vision.v1p4beta1.Product buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2080,7 +2078,7 @@ public Builder setProductCategoryBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureProductLabelsIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { productLabels_ = new java.util.ArrayList( productLabels_); @@ -2538,7 +2536,7 @@ public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder addProductLabe com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder, com.google.cloud.vision.v1p4beta1.Product.KeyValueOrBuilder>( productLabels_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); productLabels_ = null; @@ -2548,7 +2546,7 @@ public com.google.cloud.vision.v1p4beta1.Product.KeyValue.Builder addProductLabe @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java index b4b26124cd0d..e082eb7a9641 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchParams.java @@ -62,7 +62,7 @@ private ProductSearchParams( case 58: { java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { productCategories_ = new com.google.protobuf.LazyStringArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -94,7 +94,7 @@ private ProductSearchParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -106,7 +106,7 @@ private ProductSearchParams( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { productCategories_ = productCategories_.getUnmodifiableView(); } this.unknownFields = unknownFields.build(); @@ -403,16 +403,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ProductSearchParams other = (com.google.cloud.vision.v1p4beta1.ProductSearchParams) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getProductSet().equals(other.getProductSet()); - result = result && getProductCategoriesList().equals(other.getProductCategoriesList()); - result = result && getFilter().equals(other.getFilter()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProductSet().equals(other.getProductSet())) return false; + if (!getProductCategoriesList().equals(other.getProductCategoriesList())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -627,7 +626,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchParams buildPartial() { result.boundingPoly_ = boundingPolyBuilder_.build(); } result.productSet_ = productSet_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { productCategories_ = productCategories_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000004); } @@ -640,35 +639,35 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -737,7 +736,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1046,7 +1045,7 @@ public Builder setProductSetBytes(com.google.protobuf.ByteString value) { com.google.protobuf.LazyStringArrayList.EMPTY; private void ensureProductCategoriesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { productCategories_ = new com.google.protobuf.LazyStringArrayList(productCategories_); bitField0_ |= 0x00000004; } @@ -1319,7 +1318,7 @@ public Builder setFilterBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java index eadbfb2b0bd0..f46f0f385d4b 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSearchResults.java @@ -68,7 +68,7 @@ private ProductSearchResults( } case 42: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result>(); @@ -82,7 +82,7 @@ private ProductSearchResults( } case 50: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult>(); @@ -96,7 +96,7 @@ private ProductSearchResults( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -108,10 +108,10 @@ private ProductSearchResults( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); } this.unknownFields = unknownFields.build(); @@ -225,7 +225,6 @@ private Result(com.google.protobuf.GeneratedMessageV3.Builder builder) { } private Result() { - score_ = 0F; image_ = ""; } @@ -283,7 +282,7 @@ private Result( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -474,18 +473,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result) obj; - boolean result = true; - result = result && (hasProduct() == other.hasProduct()); + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); - } - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getImage().equals(other.getImage()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getProduct().equals(other.getProduct())) return false; + } + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getImage().equals(other.getImage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -702,23 +698,23 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -726,13 +722,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -791,7 +787,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.Product product_ = null; + private com.google.cloud.vision.v1p4beta1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, @@ -1121,7 +1117,7 @@ public Builder setImageBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1328,7 +1324,7 @@ private GroupedResult( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result>(); @@ -1342,7 +1338,7 @@ private GroupedResult( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1354,7 +1350,7 @@ private GroupedResult( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); } this.unknownFields = unknownFields.build(); @@ -1537,14 +1533,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult) obj; - boolean result = true; - result = result && (hasBoundingPoly() == other.hasBoundingPoly()); + if (hasBoundingPoly() != other.hasBoundingPoly()) return false; if (hasBoundingPoly()) { - result = result && getBoundingPoly().equals(other.getBoundingPoly()); + if (!getBoundingPoly().equals(other.getBoundingPoly())) return false; } - result = result && getResultsList().equals(other.getResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResultsList().equals(other.getResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1765,7 +1760,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult buil result.boundingPoly_ = boundingPolyBuilder_.build(); } if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -1780,23 +1775,23 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult buil @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1804,13 +1799,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1892,7 +1887,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingPoly_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -2078,7 +2073,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingPolyOr results_ = java.util.Collections.emptyList(); private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result>(results_); @@ -2454,10 +2449,7 @@ public Builder removeResults(int index) { com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + results_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); results_ = null; } return resultsBuilder_; @@ -2466,7 +2458,7 @@ public Builder removeResults(int index) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2781,15 +2773,14 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ProductSearchResults other = (com.google.cloud.vision.v1p4beta1.ProductSearchResults) obj; - boolean result = true; - result = result && (hasIndexTime() == other.hasIndexTime()); + if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { - result = result && getIndexTime().equals(other.getIndexTime()); + if (!getIndexTime().equals(other.getIndexTime())) return false; } - result = result && getResultsList().equals(other.getResultsList()); - result = result && getProductGroupedResultsList().equals(other.getProductGroupedResultsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getResultsList().equals(other.getResultsList())) return false; + if (!getProductGroupedResultsList().equals(other.getProductGroupedResultsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3013,7 +3004,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults buildPartial() { result.indexTime_ = indexTimeBuilder_.build(); } if (resultsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { results_ = java.util.Collections.unmodifiableList(results_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -3022,7 +3013,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults buildPartial() { result.results_ = resultsBuilder_.build(); } if (productGroupedResultsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = java.util.Collections.unmodifiableList(productGroupedResults_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -3037,35 +3028,35 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3170,7 +3161,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.protobuf.Timestamp indexTime_ = null; + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -3358,7 +3349,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { java.util.Collections.emptyList(); private void ensureResultsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { results_ = new java.util.ArrayList( results_); @@ -3714,10 +3705,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder add com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result, com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.ResultOrBuilder>( - results_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); + results_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); results_ = null; } return resultsBuilder_; @@ -3727,7 +3715,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSearchResults.Result.Builder add productGroupedResults_ = java.util.Collections.emptyList(); private void ensureProductGroupedResultsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { productGroupedResults_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult>( @@ -4184,7 +4172,7 @@ public Builder removeProductGroupedResults(int index) { com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResult.Builder, com.google.cloud.vision.v1p4beta1.ProductSearchResults.GroupedResultOrBuilder>( productGroupedResults_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); productGroupedResults_ = null; @@ -4194,7 +4182,7 @@ public Builder removeProductGroupedResults(int index) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java index fbb96d75daf0..ae91642dd1e9 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ProductSet.java @@ -98,7 +98,7 @@ private ProductSet( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -383,19 +383,18 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ProductSet other = (com.google.cloud.vision.v1p4beta1.ProductSet) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getDisplayName().equals(other.getDisplayName()); - result = result && (hasIndexTime() == other.hasIndexTime()); + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (hasIndexTime() != other.hasIndexTime()) return false; if (hasIndexTime()) { - result = result && getIndexTime().equals(other.getIndexTime()); + if (!getIndexTime().equals(other.getIndexTime())) return false; } - result = result && (hasIndexError() == other.hasIndexError()); + if (hasIndexError() != other.hasIndexError()) return false; if (hasIndexError()) { - result = result && getIndexError().equals(other.getIndexError()); + if (!getIndexError().equals(other.getIndexError())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -625,35 +624,35 @@ public com.google.cloud.vision.v1p4beta1.ProductSet buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -919,7 +918,7 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { return this; } - private com.google.protobuf.Timestamp indexTime_ = null; + private com.google.protobuf.Timestamp indexTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, @@ -1130,7 +1129,7 @@ public com.google.protobuf.TimestampOrBuilder getIndexTimeOrBuilder() { return indexTimeBuilder_; } - private com.google.rpc.Status indexError_ = null; + private com.google.rpc.Status indexError_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> indexErrorBuilder_; @@ -1320,7 +1319,7 @@ public com.google.rpc.StatusOrBuilder getIndexErrorOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java index d615f6ff760a..f0001be3e9de 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Property.java @@ -25,7 +25,6 @@ private Property(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Property() { name_ = ""; value_ = ""; - uint64Value_ = 0L; } @java.lang.Override @@ -73,7 +72,7 @@ private Property( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -263,12 +262,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.Property other = (com.google.cloud.vision.v1p4beta1.Property) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getValue().equals(other.getValue()); - result = result && (getUint64Value() == other.getUint64Value()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getValue().equals(other.getValue())) return false; + if (getUint64Value() != other.getUint64Value()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -471,35 +469,35 @@ public com.google.cloud.vision.v1p4beta1.Property buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -788,7 +786,7 @@ public Builder clearUint64Value() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java index 905df6291550..6ffc9d80c5ed 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/ReferenceImage.java @@ -69,7 +69,7 @@ private ReferenceImage( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { boundingPolys_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; @@ -81,7 +81,7 @@ private ReferenceImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -93,7 +93,7 @@ private ReferenceImage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); } this.unknownFields = unknownFields.build(); @@ -365,12 +365,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.ReferenceImage other = (com.google.cloud.vision.v1p4beta1.ReferenceImage) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getUri().equals(other.getUri()); - result = result && getBoundingPolysList().equals(other.getBoundingPolysList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getUri().equals(other.getUri())) return false; + if (!getBoundingPolysList().equals(other.getBoundingPolysList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -578,7 +577,7 @@ public com.google.cloud.vision.v1p4beta1.ReferenceImage buildPartial() { result.name_ = name_; result.uri_ = uri_; if (boundingPolysBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { boundingPolys_ = java.util.Collections.unmodifiableList(boundingPolys_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -593,35 +592,35 @@ public com.google.cloud.vision.v1p4beta1.ReferenceImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -920,7 +919,7 @@ public Builder setUriBytes(com.google.protobuf.ByteString value) { java.util.Collections.emptyList(); private void ensureBoundingPolysIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { boundingPolys_ = new java.util.ArrayList(boundingPolys_); bitField0_ |= 0x00000004; @@ -1375,7 +1374,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder addBoundingPolysBu com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder>( boundingPolys_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); boundingPolys_ = null; @@ -1385,7 +1384,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder addBoundingPolysBu @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java index 1612204bd707..3274f6d6c96f 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/RemoveProductFromProductSetRequest.java @@ -68,7 +68,7 @@ private RemoveProductFromProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -245,11 +245,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest other = (com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest) obj; - boolean result = true; - result = result && getName().equals(other.getName()); - result = result && getProduct().equals(other.getProduct()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getName().equals(other.getName())) return false; + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -452,35 +451,35 @@ public com.google.cloud.vision.v1p4beta1.RemoveProductFromProductSetRequest buil @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -748,7 +747,7 @@ public Builder setProductBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java index 01a9070efc23..5fc7bf8f02ec 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/SafeSearchAnnotation.java @@ -93,7 +93,7 @@ private SafeSearchAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -358,14 +358,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation other = (com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation) obj; - boolean result = true; - result = result && adult_ == other.adult_; - result = result && spoof_ == other.spoof_; - result = result && medical_ == other.medical_; - result = result && violence_ == other.violence_; - result = result && racy_ == other.racy_; - result = result && unknownFields.equals(other.unknownFields); - return result; + if (adult_ != other.adult_) return false; + if (spoof_ != other.spoof_) return false; + if (medical_ != other.medical_) return false; + if (violence_ != other.violence_) return false; + if (racy_ != other.racy_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -581,35 +580,35 @@ public com.google.cloud.vision.v1p4beta1.SafeSearchAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1087,7 +1086,7 @@ public Builder clearRacy() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java index e3e4f628403b..8a3c543c2605 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Symbol.java @@ -24,7 +24,6 @@ private Symbol(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Symbol() { text_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -99,7 +98,7 @@ private Symbol( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -376,22 +375,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p4beta1.Symbol other = (com.google.cloud.vision.v1p4beta1.Symbol) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getText().equals(other.getText()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getText().equals(other.getText())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -619,35 +615,35 @@ public com.google.cloud.vision.v1p4beta1.Symbol buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -704,7 +700,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, @@ -890,7 +886,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1338,7 +1334,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java index 7e6243c44dd9..0b8e30795b8a 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/TextAnnotation.java @@ -60,7 +60,7 @@ private TextAnnotation( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000001; } @@ -78,7 +78,7 @@ private TextAnnotation( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -90,7 +90,7 @@ private TextAnnotation( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); } this.unknownFields = unknownFields.build(); @@ -175,7 +175,6 @@ private DetectedLanguage(com.google.protobuf.GeneratedMessageV3.Builder build private DetectedLanguage() { languageCode_ = ""; - confidence_ = 0F; } @java.lang.Override @@ -216,7 +215,7 @@ private DetectedLanguage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -361,14 +360,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage) obj; - boolean result = true; - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -573,23 +569,23 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage buildPa @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -597,13 +593,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -811,7 +807,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -921,7 +917,6 @@ private DetectedBreak(com.google.protobuf.GeneratedMessageV3.Builder builder) private DetectedBreak() { type_ = 0; - isPrefix_ = false; } @java.lang.Override @@ -962,7 +957,7 @@ private DetectedBreak( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1311,11 +1306,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak) obj; - boolean result = true; - result = result && type_ == other.type_; - result = result && (getIsPrefix() == other.getIsPrefix()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (type_ != other.type_) return false; + if (getIsPrefix() != other.getIsPrefix()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1517,23 +1511,23 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak buildParti @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1541,13 +1535,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1733,7 +1727,7 @@ public Builder clearIsPrefix() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1937,7 +1931,7 @@ private TextProperty( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage>(); @@ -1969,7 +1963,7 @@ private TextProperty( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1981,7 +1975,7 @@ private TextProperty( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); } this.unknownFields = unknownFields.build(); @@ -2178,14 +2172,13 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty other = (com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty) obj; - boolean result = true; - result = result && getDetectedLanguagesList().equals(other.getDetectedLanguagesList()); - result = result && (hasDetectedBreak() == other.hasDetectedBreak()); + if (!getDetectedLanguagesList().equals(other.getDetectedLanguagesList())) return false; + if (hasDetectedBreak() != other.hasDetectedBreak()) return false; if (hasDetectedBreak()) { - result = result && getDetectedBreak().equals(other.getDetectedBreak()); + if (!getDetectedBreak().equals(other.getDetectedBreak())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2396,7 +2389,7 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty buildPartia int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (detectedLanguagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = java.util.Collections.unmodifiableList(detectedLanguages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -2416,23 +2409,23 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty buildPartia @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2440,13 +2433,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2531,7 +2524,7 @@ public Builder mergeFrom( detectedLanguages_ = java.util.Collections.emptyList(); private void ensureDetectedLanguagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { detectedLanguages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage>( @@ -2934,7 +2927,7 @@ public Builder removeDetectedLanguages(int index) { com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguage.Builder, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedLanguageOrBuilder>( detectedLanguages_, - ((bitField0_ & 0x00000001) == 0x00000001), + ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); detectedLanguages_ = null; @@ -2942,7 +2935,7 @@ public Builder removeDetectedLanguages(int index) { return detectedLanguagesBuilder_; } - private com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detectedBreak_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak detectedBreak_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak, com.google.cloud.vision.v1p4beta1.TextAnnotation.DetectedBreak.Builder, @@ -3141,7 +3134,7 @@ public Builder clearDetectedBreak() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -3352,11 +3345,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.TextAnnotation other = (com.google.cloud.vision.v1p4beta1.TextAnnotation) obj; - boolean result = true; - result = result && getPagesList().equals(other.getPagesList()); - result = result && getText().equals(other.getText()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getPagesList().equals(other.getPagesList())) return false; + if (!getText().equals(other.getText())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3564,7 +3556,7 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation buildPartial() { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (pagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { pages_ = java.util.Collections.unmodifiableList(pages_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -3580,35 +3572,35 @@ public com.google.cloud.vision.v1p4beta1.TextAnnotation buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3690,7 +3682,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensurePagesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { pages_ = new java.util.ArrayList(pages_); bitField0_ |= 0x00000001; } @@ -4028,10 +4020,7 @@ public java.util.List getPagesBu com.google.cloud.vision.v1p4beta1.Page, com.google.cloud.vision.v1p4beta1.Page.Builder, com.google.cloud.vision.v1p4beta1.PageOrBuilder>( - pages_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + pages_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); pages_ = null; } return pagesBuilder_; @@ -4133,7 +4122,7 @@ public Builder setTextBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java index 60c158b4afec..c2620e0a05a1 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductRequest.java @@ -81,7 +81,7 @@ private UpdateProductRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -259,17 +259,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.UpdateProductRequest other = (com.google.cloud.vision.v1p4beta1.UpdateProductRequest) obj; - boolean result = true; - result = result && (hasProduct() == other.hasProduct()); + if (hasProduct() != other.hasProduct()) return false; if (hasProduct()) { - result = result && getProduct().equals(other.getProduct()); + if (!getProduct().equals(other.getProduct())) return false; } - result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - result = result && getUpdateMask().equals(other.getUpdateMask()); + if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -488,35 +487,35 @@ public com.google.cloud.vision.v1p4beta1.UpdateProductRequest buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -568,7 +567,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.Product product_ = null; + private com.google.cloud.vision.v1p4beta1.Product product_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.Product, com.google.cloud.vision.v1p4beta1.Product.Builder, @@ -758,7 +757,7 @@ public com.google.cloud.vision.v1p4beta1.ProductOrBuilder getProductOrBuilder() return productBuilder_; } - private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, @@ -975,7 +974,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java index cde274944ea8..e5e085caf71c 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/UpdateProductSetRequest.java @@ -81,7 +81,7 @@ private UpdateProductSetRequest( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -253,17 +253,16 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest other = (com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest) obj; - boolean result = true; - result = result && (hasProductSet() == other.hasProductSet()); + if (hasProductSet() != other.hasProductSet()) return false; if (hasProductSet()) { - result = result && getProductSet().equals(other.getProductSet()); + if (!getProductSet().equals(other.getProductSet())) return false; } - result = result && (hasUpdateMask() == other.hasUpdateMask()); + if (hasUpdateMask() != other.hasUpdateMask()) return false; if (hasUpdateMask()) { - result = result && getUpdateMask().equals(other.getUpdateMask()); + if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -482,35 +481,35 @@ public com.google.cloud.vision.v1p4beta1.UpdateProductSetRequest buildPartial() @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -562,7 +561,7 @@ public Builder mergeFrom( return this; } - private com.google.cloud.vision.v1p4beta1.ProductSet productSet_ = null; + private com.google.cloud.vision.v1p4beta1.ProductSet productSet_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.ProductSet, com.google.cloud.vision.v1p4beta1.ProductSet.Builder, @@ -744,7 +743,7 @@ public com.google.cloud.vision.v1p4beta1.ProductSetOrBuilder getProductSetOrBuil return productSetBuilder_; } - private com.google.protobuf.FieldMask updateMask_ = null; + private com.google.protobuf.FieldMask updateMask_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.FieldMask, com.google.protobuf.FieldMask.Builder, @@ -952,7 +951,7 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java index fdba9b29cd70..df567f0be7c8 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Vertex.java @@ -23,10 +23,7 @@ private Vertex(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private Vertex() { - x_ = 0; - y_ = 0; - } + private Vertex() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -64,7 +61,7 @@ private Vertex( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -176,11 +173,10 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p4beta1.Vertex other = (com.google.cloud.vision.v1p4beta1.Vertex) obj; - boolean result = true; - result = result && (getX() == other.getX()); - result = result && (getY() == other.getY()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getX() != other.getX()) return false; + if (getY() != other.getY()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -379,35 +375,35 @@ public com.google.cloud.vision.v1p4beta1.Vertex buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -547,7 +543,7 @@ public Builder clearY() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java index c3c5a8cc4d93..4cebf5034649 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetection.java @@ -57,7 +57,7 @@ private WebDetection( break; case 10: { - if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity>(); @@ -71,7 +71,7 @@ private WebDetection( } case 18: { - if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); @@ -85,7 +85,7 @@ private WebDetection( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); @@ -99,7 +99,7 @@ private WebDetection( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebPage>(); @@ -113,7 +113,7 @@ private WebDetection( } case 50: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); @@ -127,7 +127,7 @@ private WebDetection( } case 66: { - if (!((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (!((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel>(); @@ -141,7 +141,7 @@ private WebDetection( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -153,22 +153,22 @@ private WebDetection( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) { + if (((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); } - if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) { + if (((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); } - if (((mutable_bitField0_ & 0x00000020) == 0x00000020)) { + if (((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); } this.unknownFields = unknownFields.build(); @@ -271,7 +271,6 @@ private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebEntity() { entityId_ = ""; - score_ = 0F; description_ = ""; } @@ -320,7 +319,7 @@ private WebEntity( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -511,15 +510,12 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) obj; - boolean result = true; - result = result && getEntityId().equals(other.getEntityId()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getDescription().equals(other.getDescription()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getEntityId().equals(other.getEntityId())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -725,23 +721,23 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -749,13 +745,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1050,7 +1046,7 @@ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1157,7 +1153,6 @@ private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebImage() { url_ = ""; - score_ = 0F; } @java.lang.Override @@ -1198,7 +1193,7 @@ private WebImage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -1339,14 +1334,11 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -1547,23 +1539,23 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -1571,13 +1563,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -1771,7 +1763,7 @@ public Builder clearScore() { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -1935,7 +1927,7 @@ private WebLabel( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2108,11 +2100,10 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) obj; - boolean result = true; - result = result && getLabel().equals(other.getLabel()); - result = result && getLanguageCode().equals(other.getLanguageCode()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getLabel().equals(other.getLabel())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -2313,23 +2304,23 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -2337,13 +2328,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -2598,7 +2589,7 @@ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -2869,7 +2860,6 @@ private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { private WebPage() { url_ = ""; - score_ = 0F; pageTitle_ = ""; fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); @@ -2920,7 +2910,7 @@ private WebPage( } case 34: { - if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (!((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); @@ -2934,7 +2924,7 @@ private WebPage( } case 42: { - if (!((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (!((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); @@ -2948,7 +2938,7 @@ private WebPage( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -2960,10 +2950,10 @@ private WebPage( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) { + if (((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } - if (((mutable_bitField0_ & 0x00000010) == 0x00000010)) { + if (((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } this.unknownFields = unknownFields.build(); @@ -3333,18 +3323,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) obj; - boolean result = true; - result = result && getUrl().equals(other.getUrl()); - result = - result - && (java.lang.Float.floatToIntBits(getScore()) - == java.lang.Float.floatToIntBits(other.getScore())); - result = result && getPageTitle().equals(other.getPageTitle()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = - result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getUrl().equals(other.getUrl())) return false; + if (java.lang.Float.floatToIntBits(getScore()) + != java.lang.Float.floatToIntBits(other.getScore())) return false; + if (!getPageTitle().equals(other.getPageTitle())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) + return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -3570,7 +3557,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage buildPartial() { result.score_ = score_; result.pageTitle_ = pageTitle_; if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } @@ -3579,7 +3566,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -3594,23 +3581,23 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override @@ -3618,13 +3605,13 @@ public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -3973,7 +3960,7 @@ public Builder setPageTitleBytes(com.google.protobuf.ByteString value) { fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -4386,7 +4373,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -4398,7 +4385,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -4847,7 +4834,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -4858,7 +4845,7 @@ public Builder removePartialMatchingImages(int index) { @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override @@ -5452,16 +5439,15 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.WebDetection other = (com.google.cloud.vision.v1p4beta1.WebDetection) obj; - boolean result = true; - result = result && getWebEntitiesList().equals(other.getWebEntitiesList()); - result = result && getFullMatchingImagesList().equals(other.getFullMatchingImagesList()); - result = result && getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList()); - result = - result && getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList()); - result = result && getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList()); - result = result && getBestGuessLabelsList().equals(other.getBestGuessLabelsList()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getWebEntitiesList().equals(other.getWebEntitiesList())) return false; + if (!getFullMatchingImagesList().equals(other.getFullMatchingImagesList())) return false; + if (!getPartialMatchingImagesList().equals(other.getPartialMatchingImagesList())) return false; + if (!getPagesWithMatchingImagesList().equals(other.getPagesWithMatchingImagesList())) + return false; + if (!getVisuallySimilarImagesList().equals(other.getVisuallySimilarImagesList())) return false; + if (!getBestGuessLabelsList().equals(other.getBestGuessLabelsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -5712,7 +5698,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { new com.google.cloud.vision.v1p4beta1.WebDetection(this); int from_bitField0_ = bitField0_; if (webEntitiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (((bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); bitField0_ = (bitField0_ & ~0x00000001); } @@ -5721,7 +5707,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { result.webEntities_ = webEntitiesBuilder_.build(); } if (fullMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000002); } @@ -5730,7 +5716,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -5739,7 +5725,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } if (pagesWithMatchingImagesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); @@ -5749,7 +5735,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); } if (visuallySimilarImagesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); bitField0_ = (bitField0_ & ~0x00000010); } @@ -5758,7 +5744,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); } if (bestGuessLabelsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); bitField0_ = (bitField0_ & ~0x00000020); } @@ -5772,35 +5758,35 @@ public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -6012,7 +5998,7 @@ public Builder mergeFrom( java.util.Collections.emptyList(); private void ensureWebEntitiesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { + if (!((bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList( webEntities_); @@ -6367,10 +6353,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEn com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder>( - webEntities_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); + webEntities_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); webEntities_ = null; } return webEntitiesBuilder_; @@ -6380,7 +6363,7 @@ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEn fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { + if (!((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); @@ -6773,7 +6756,7 @@ public Builder removeFullMatchingImages(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, - ((bitField0_ & 0x00000002) == 0x00000002), + ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; @@ -6785,7 +6768,7 @@ public Builder removeFullMatchingImages(int index) { partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); @@ -7214,7 +7197,7 @@ public Builder removePartialMatchingImages(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, - ((bitField0_ & 0x00000004) == 0x00000004), + ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; @@ -7226,7 +7209,7 @@ public Builder removePartialMatchingImages(int index) { pagesWithMatchingImages_ = java.util.Collections.emptyList(); private void ensurePagesWithMatchingImagesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { + if (!((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList( pagesWithMatchingImages_); @@ -7616,7 +7599,7 @@ public Builder removePagesWithMatchingImages(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder>( pagesWithMatchingImages_, - ((bitField0_ & 0x00000008) == 0x00000008), + ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); pagesWithMatchingImages_ = null; @@ -7628,7 +7611,7 @@ public Builder removePagesWithMatchingImages(int index) { visuallySimilarImages_ = java.util.Collections.emptyList(); private void ensureVisuallySimilarImagesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { + if (!((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList( visuallySimilarImages_); @@ -8021,7 +8004,7 @@ public Builder removeVisuallySimilarImages(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( visuallySimilarImages_, - ((bitField0_ & 0x00000010) == 0x00000010), + ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); visuallySimilarImages_ = null; @@ -8033,7 +8016,7 @@ public Builder removeVisuallySimilarImages(int index) { bestGuessLabels_ = java.util.Collections.emptyList(); private void ensureBestGuessLabelsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { + if (!((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList( bestGuessLabels_); @@ -8425,7 +8408,7 @@ public Builder removeBestGuessLabels(int index) { com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder>( bestGuessLabels_, - ((bitField0_ & 0x00000020) == 0x00000020), + ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); bestGuessLabels_ = null; @@ -8435,7 +8418,7 @@ public Builder removeBestGuessLabels(int index) { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java index ecfcd76e098e..f22e66064bfc 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/WebDetectionParams.java @@ -22,9 +22,7 @@ private WebDetectionParams(com.google.protobuf.GeneratedMessageV3.Builder bui super(builder); } - private WebDetectionParams() { - includeGeoResults_ = false; - } + private WebDetectionParams() {} @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { @@ -57,7 +55,7 @@ private WebDetectionParams( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -149,10 +147,9 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.vision.v1p4beta1.WebDetectionParams other = (com.google.cloud.vision.v1p4beta1.WebDetectionParams) obj; - boolean result = true; - result = result && (getIncludeGeoResults() == other.getIncludeGeoResults()); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (getIncludeGeoResults() != other.getIncludeGeoResults()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -345,35 +342,35 @@ public com.google.cloud.vision.v1p4beta1.WebDetectionParams buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -468,7 +465,7 @@ public Builder clearIncludeGeoResults() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java index 2e62a89c31ba..4ea0ea459aff 100644 --- a/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java +++ b/google-api-grpc/proto-google-cloud-vision-v1p4beta1/src/main/java/com/google/cloud/vision/v1p4beta1/Word.java @@ -24,7 +24,6 @@ private Word(com.google.protobuf.GeneratedMessageV3.Builder builder) { private Word() { symbols_ = java.util.Collections.emptyList(); - confidence_ = 0F; } @java.lang.Override @@ -87,7 +86,7 @@ private Word( } case 26: { - if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(); mutable_bitField0_ |= 0x00000004; } @@ -103,7 +102,7 @@ private Word( } default: { - if (!parseUnknownFieldProto3(input, unknownFields, extensionRegistry, tag)) { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; @@ -115,7 +114,7 @@ private Word( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { - if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) { + if (((mutable_bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); } this.unknownFields = unknownFields.build(); @@ -410,22 +409,19 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.vision.v1p4beta1.Word other = (com.google.cloud.vision.v1p4beta1.Word) obj; - boolean result = true; - result = result && (hasProperty() == other.hasProperty()); + if (hasProperty() != other.hasProperty()) return false; if (hasProperty()) { - result = result && getProperty().equals(other.getProperty()); + if (!getProperty().equals(other.getProperty())) return false; } - result = result && (hasBoundingBox() == other.hasBoundingBox()); + if (hasBoundingBox() != other.hasBoundingBox()) return false; if (hasBoundingBox()) { - result = result && getBoundingBox().equals(other.getBoundingBox()); - } - result = result && getSymbolsList().equals(other.getSymbolsList()); - result = - result - && (java.lang.Float.floatToIntBits(getConfidence()) - == java.lang.Float.floatToIntBits(other.getConfidence())); - result = result && unknownFields.equals(other.unknownFields); - return result; + if (!getBoundingBox().equals(other.getBoundingBox())) return false; + } + if (!getSymbolsList().equals(other.getSymbolsList())) return false; + if (java.lang.Float.floatToIntBits(getConfidence()) + != java.lang.Float.floatToIntBits(other.getConfidence())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; } @java.lang.Override @@ -656,7 +652,7 @@ public com.google.cloud.vision.v1p4beta1.Word buildPartial() { result.boundingBox_ = boundingBoxBuilder_.build(); } if (symbolsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (((bitField0_ & 0x00000004) != 0)) { symbols_ = java.util.Collections.unmodifiableList(symbols_); bitField0_ = (bitField0_ & ~0x00000004); } @@ -672,35 +668,35 @@ public com.google.cloud.vision.v1p4beta1.Word buildPartial() { @java.lang.Override public Builder clone() { - return (Builder) super.clone(); + return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.setField(field, value); + return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return (Builder) super.clearField(field); + return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return (Builder) super.clearOneof(oneof); + return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return (Builder) super.setRepeatedField(field, index, value); + return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return (Builder) super.addRepeatedField(field, value); + return super.addRepeatedField(field, value); } @java.lang.Override @@ -782,7 +778,7 @@ public Builder mergeFrom( private int bitField0_; - private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_ = null; + private com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty property_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty, com.google.cloud.vision.v1p4beta1.TextAnnotation.TextProperty.Builder, @@ -968,7 +964,7 @@ public Builder clearProperty() { return propertyBuilder_; } - private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_ = null; + private com.google.cloud.vision.v1p4beta1.BoundingPoly boundingBox_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p4beta1.BoundingPoly, com.google.cloud.vision.v1p4beta1.BoundingPoly.Builder, @@ -1280,7 +1276,7 @@ public com.google.cloud.vision.v1p4beta1.BoundingPolyOrBuilder getBoundingBoxOrB java.util.Collections.emptyList(); private void ensureSymbolsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { + if (!((bitField0_ & 0x00000004) != 0)) { symbols_ = new java.util.ArrayList(symbols_); bitField0_ |= 0x00000004; } @@ -1637,10 +1633,7 @@ public com.google.cloud.vision.v1p4beta1.Symbol.Builder addSymbolsBuilder(int in com.google.cloud.vision.v1p4beta1.Symbol, com.google.cloud.vision.v1p4beta1.Symbol.Builder, com.google.cloud.vision.v1p4beta1.SymbolOrBuilder>( - symbols_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); + symbols_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); symbols_ = null; } return symbolsBuilder_; @@ -1692,7 +1685,7 @@ public Builder clearConfidence() { @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFieldsProto3(unknownFields); + return super.setUnknownFields(unknownFields); } @java.lang.Override diff --git a/google-cloud-clients/google-cloud-vision/synth.metadata b/google-cloud-clients/google-cloud-vision/synth.metadata index e6952abf476a..d57e831332d5 100644 --- a/google-cloud-clients/google-cloud-vision/synth.metadata +++ b/google-cloud-clients/google-cloud-vision/synth.metadata @@ -1,19 +1,19 @@ { - "updateTime": "2019-03-28T08:04:02.055515Z", + "updateTime": "2019-03-30T08:03:24.223672Z", "sources": [ { "generator": { "name": "artman", - "version": "0.16.20", - "dockerImage": "googleapis/artman@sha256:e3c054a2fb85a12481c722af616c7fb6f1d02d862248385eecbec3e4240ebd1e" + "version": "0.16.21", + "dockerImage": "googleapis/artman@sha256:854131ec1af7b3a313253474c24748dc0acd217a58a0b74dbfb559f340a15d78" } }, { "git": { "name": "googleapis", "remote": "https://github.com/googleapis/googleapis.git", - "sha": "6a84b3267b0a95e922608b9891219075047eee29", - "internalRef": "240640999" + "sha": "fd67be4b51a8c809b97100ccf1c3cffd15b85d7b", + "internalRef": "241096997" } } ],