All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.vision.v1p4beta1.WebDetection Maven / Gradle / Ivy

There is a newer version: 0.142.0
Show newest version
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/vision/v1p4beta1/web_detection.proto

package com.google.cloud.vision.v1p4beta1;

/**
 *
 *
 * 
 * Relevant information for the image from the Internet.
 * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection} */ public final class WebDetection extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection) WebDetectionOrBuilder { private static final long serialVersionUID = 0L; // Use WebDetection.newBuilder() to construct. private WebDetection(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WebDetection() { webEntities_ = java.util.Collections.emptyList(); fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); pagesWithMatchingImages_ = java.util.Collections.emptyList(); visuallySimilarImages_ = java.util.Collections.emptyList(); bestGuessLabels_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WebDetection( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { if (!((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity>(); mutable_bitField0_ |= 0x00000001; } webEntities_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.parser(), extensionRegistry)); break; } case 18: { if (!((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); mutable_bitField0_ |= 0x00000002; } fullMatchingImages_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); break; } case 26: { if (!((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); mutable_bitField0_ |= 0x00000004; } partialMatchingImages_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebPage>(); mutable_bitField0_ |= 0x00000008; } pagesWithMatchingImages_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.parser(), extensionRegistry)); break; } case 50: { if (!((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); mutable_bitField0_ |= 0x00000010; } visuallySimilarImages_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); break; } case 66: { if (!((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel>(); mutable_bitField0_ |= 0x00000020; } bestGuessLabels_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.parser(), extensionRegistry)); break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); } if (((mutable_bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } if (((mutable_bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } if (((mutable_bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } if (((mutable_bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); } if (((mutable_bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.class, com.google.cloud.vision.v1p4beta1.WebDetection.Builder.class); } public interface WebEntityOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) com.google.protobuf.MessageOrBuilder { /** * * *
     * Opaque entity ID.
     * 
* * string entity_id = 1; */ java.lang.String getEntityId(); /** * * *
     * Opaque entity ID.
     * 
* * string entity_id = 1; */ com.google.protobuf.ByteString getEntityIdBytes(); /** * * *
     * Overall relevancy score for the entity.
     * Not normalized and not comparable across different image queries.
     * 
* * float score = 2; */ float getScore(); /** * * *
     * Canonical description of the entity, in English.
     * 
* * string description = 3; */ java.lang.String getDescription(); /** * * *
     * Canonical description of the entity, in English.
     * 
* * string description = 3; */ com.google.protobuf.ByteString getDescriptionBytes(); } /** * * *
   * Entity deduced from similar images on the Internet.
   * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebEntity} */ public static final class WebEntity extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) WebEntityOrBuilder { private static final long serialVersionUID = 0L; // Use WebEntity.newBuilder() to construct. private WebEntity(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WebEntity() { entityId_ = ""; description_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WebEntity( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); entityId_ = s; break; } case 21: { score_ = input.readFloat(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); description_ = s; break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder.class); } public static final int ENTITY_ID_FIELD_NUMBER = 1; private volatile java.lang.Object entityId_; /** * * *
     * Opaque entity ID.
     * 
* * string entity_id = 1; */ public java.lang.String getEntityId() { java.lang.Object ref = entityId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); entityId_ = s; return s; } } /** * * *
     * Opaque entity ID.
     * 
* * string entity_id = 1; */ public com.google.protobuf.ByteString getEntityIdBytes() { java.lang.Object ref = entityId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); entityId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_FIELD_NUMBER = 2; private float score_; /** * * *
     * Overall relevancy score for the entity.
     * Not normalized and not comparable across different image queries.
     * 
* * float score = 2; */ public float getScore() { return score_; } public static final int DESCRIPTION_FIELD_NUMBER = 3; private volatile java.lang.Object description_; /** * * *
     * Canonical description of the entity, in English.
     * 
* * string description = 3; */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } } /** * * *
     * Canonical description of the entity, in English.
     * 
* * string description = 3; */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getEntityIdBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entityId_); } if (score_ != 0F) { output.writeFloat(2, score_); } if (!getDescriptionBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getEntityIdBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entityId_); } if (score_ != 0F) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_); } if (!getDescriptionBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity)) { return super.equals(obj); } com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) obj; 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 public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + ENTITY_ID_FIELD_NUMBER; hash = (53 * hash) + getEntityId().hashCode(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; hash = (53 * hash) + getDescription().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Entity deduced from similar images on the Internet.
     * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebEntity} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder.class); } // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); entityId_ = ""; score_ = 0F; description_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebEntity_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstanceForType() { return com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity build() { com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity buildPartial() { com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity(this); result.entityId_ = entityId_; result.score_ = score_; result.description_ = description_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) { return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity other) { if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()) return this; if (!other.getEntityId().isEmpty()) { entityId_ = other.entityId_; onChanged(); } if (other.getScore() != 0F) { setScore(other.getScore()); } if (!other.getDescription().isEmpty()) { description_ = other.description_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object entityId_ = ""; /** * * *
       * Opaque entity ID.
       * 
* * string entity_id = 1; */ public java.lang.String getEntityId() { java.lang.Object ref = entityId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); entityId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Opaque entity ID.
       * 
* * string entity_id = 1; */ public com.google.protobuf.ByteString getEntityIdBytes() { java.lang.Object ref = entityId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); entityId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Opaque entity ID.
       * 
* * string entity_id = 1; */ public Builder setEntityId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } entityId_ = value; onChanged(); return this; } /** * * *
       * Opaque entity ID.
       * 
* * string entity_id = 1; */ public Builder clearEntityId() { entityId_ = getDefaultInstance().getEntityId(); onChanged(); return this; } /** * * *
       * Opaque entity ID.
       * 
* * string entity_id = 1; */ public Builder setEntityIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); entityId_ = value; onChanged(); return this; } private float score_; /** * * *
       * Overall relevancy score for the entity.
       * Not normalized and not comparable across different image queries.
       * 
* * float score = 2; */ public float getScore() { return score_; } /** * * *
       * Overall relevancy score for the entity.
       * Not normalized and not comparable across different image queries.
       * 
* * float score = 2; */ public Builder setScore(float value) { score_ = value; onChanged(); return this; } /** * * *
       * Overall relevancy score for the entity.
       * Not normalized and not comparable across different image queries.
       * 
* * float score = 2; */ public Builder clearScore() { score_ = 0F; onChanged(); return this; } private java.lang.Object description_ = ""; /** * * *
       * Canonical description of the entity, in English.
       * 
* * string description = 3; */ public java.lang.String getDescription() { java.lang.Object ref = description_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); description_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Canonical description of the entity, in English.
       * 
* * string description = 3; */ public com.google.protobuf.ByteString getDescriptionBytes() { java.lang.Object ref = description_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); description_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Canonical description of the entity, in English.
       * 
* * string description = 3; */ public Builder setDescription(java.lang.String value) { if (value == null) { throw new NullPointerException(); } description_ = value; onChanged(); return this; } /** * * *
       * Canonical description of the entity, in English.
       * 
* * string description = 3; */ public Builder clearDescription() { description_ = getDefaultInstance().getDescription(); onChanged(); return this; } /** * * *
       * Canonical description of the entity, in English.
       * 
* * string description = 3; */ public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); description_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebEntity) private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity(); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public WebEntity parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WebEntity(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface WebImageOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebImage) com.google.protobuf.MessageOrBuilder { /** * * *
     * The result image URL.
     * 
* * string url = 1; */ java.lang.String getUrl(); /** * * *
     * The result image URL.
     * 
* * string url = 1; */ com.google.protobuf.ByteString getUrlBytes(); /** * * *
     * (Deprecated) Overall relevancy score for the image.
     * 
* * float score = 2; */ float getScore(); } /** * * *
   * Metadata for online images.
   * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebImage} */ public static final class WebImage extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebImage) WebImageOrBuilder { private static final long serialVersionUID = 0L; // Use WebImage.newBuilder() to construct. private WebImage(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WebImage() { url_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WebImage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); url_ = s; break; } case 21: { score_ = input.readFloat(); break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder.class); } public static final int URL_FIELD_NUMBER = 1; private volatile java.lang.Object url_; /** * * *
     * The result image URL.
     * 
* * string url = 1; */ public java.lang.String getUrl() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); url_ = s; return s; } } /** * * *
     * The result image URL.
     * 
* * string url = 1; */ public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_FIELD_NUMBER = 2; private float score_; /** * * *
     * (Deprecated) Overall relevancy score for the image.
     * 
* * float score = 2; */ public float getScore() { return score_; } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getUrlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); } if (score_ != 0F) { output.writeFloat(2, score_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUrlBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); } if (score_ != 0F) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebImage)) { return super.equals(obj); } com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) obj; 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 public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Metadata for online images.
     * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebImage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebImage) com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder.class); } // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); url_ = ""; score_ = 0F; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebImage_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstanceForType() { return com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage build() { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage buildPartial() { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebImage(this); result.url_ = url_; result.score_ = score_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) { return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage other) { if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()) return this; if (!other.getUrl().isEmpty()) { url_ = other.url_; onChanged(); } if (other.getScore() != 0F) { setScore(other.getScore()); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.vision.v1p4beta1.WebDetection.WebImage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebImage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object url_ = ""; /** * * *
       * The result image URL.
       * 
* * string url = 1; */ public java.lang.String getUrl() { java.lang.Object ref = url_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); url_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The result image URL.
       * 
* * string url = 1; */ public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The result image URL.
       * 
* * string url = 1; */ public Builder setUrl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } url_ = value; onChanged(); return this; } /** * * *
       * The result image URL.
       * 
* * string url = 1; */ public Builder clearUrl() { url_ = getDefaultInstance().getUrl(); onChanged(); return this; } /** * * *
       * The result image URL.
       * 
* * string url = 1; */ public Builder setUrlBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); url_ = value; onChanged(); return this; } private float score_; /** * * *
       * (Deprecated) Overall relevancy score for the image.
       * 
* * float score = 2; */ public float getScore() { return score_; } /** * * *
       * (Deprecated) Overall relevancy score for the image.
       * 
* * float score = 2; */ public Builder setScore(float value) { score_ = value; onChanged(); return this; } /** * * *
       * (Deprecated) Overall relevancy score for the image.
       * 
* * float score = 2; */ public Builder clearScore() { score_ = 0F; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebImage) private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebImage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebImage(); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public WebImage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WebImage(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface WebLabelOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) com.google.protobuf.MessageOrBuilder { /** * * *
     * Label for extra metadata.
     * 
* * string label = 1; */ java.lang.String getLabel(); /** * * *
     * Label for extra metadata.
     * 
* * string label = 1; */ com.google.protobuf.ByteString getLabelBytes(); /** * * *
     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
     * For more information, see
     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     * 
* * string language_code = 2; */ java.lang.String getLanguageCode(); /** * * *
     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
     * For more information, see
     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     * 
* * string language_code = 2; */ com.google.protobuf.ByteString getLanguageCodeBytes(); } /** * * *
   * Label to provide extra metadata for the web detection.
   * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebLabel} */ public static final class WebLabel extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) WebLabelOrBuilder { private static final long serialVersionUID = 0L; // Use WebLabel.newBuilder() to construct. private WebLabel(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WebLabel() { label_ = ""; languageCode_ = ""; } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WebLabel( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); label_ = s; break; } case 18: { java.lang.String s = input.readStringRequireUtf8(); languageCode_ = s; break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder.class); } public static final int LABEL_FIELD_NUMBER = 1; private volatile java.lang.Object label_; /** * * *
     * Label for extra metadata.
     * 
* * string label = 1; */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); label_ = s; return s; } } /** * * *
     * Label for extra metadata.
     * 
* * string label = 1; */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int LANGUAGE_CODE_FIELD_NUMBER = 2; private volatile java.lang.Object languageCode_; /** * * *
     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
     * For more information, see
     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     * 
* * string language_code = 2; */ public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } } /** * * *
     * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
     * For more information, see
     * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
     * 
* * string language_code = 2; */ public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getLabelBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, label_); } if (!getLanguageCodeBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, languageCode_); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getLabelBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, label_); } if (!getLanguageCodeBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, languageCode_); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel)) { return super.equals(obj); } com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) obj; 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 public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + LABEL_FIELD_NUMBER; hash = (53 * hash) + getLabel().hashCode(); hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Label to provide extra metadata for the web detection.
     * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebLabel} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder.class); } // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); label_ = ""; languageCode_ = ""; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebLabel_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstanceForType() { return com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel build() { com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel buildPartial() { com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel(this); result.label_ = label_; result.languageCode_ = languageCode_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) { return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel other) { if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()) return this; if (!other.getLabel().isEmpty()) { label_ = other.label_; onChanged(); } if (!other.getLanguageCode().isEmpty()) { languageCode_ = other.languageCode_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private java.lang.Object label_ = ""; /** * * *
       * Label for extra metadata.
       * 
* * string label = 1; */ public java.lang.String getLabel() { java.lang.Object ref = label_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); label_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Label for extra metadata.
       * 
* * string label = 1; */ public com.google.protobuf.ByteString getLabelBytes() { java.lang.Object ref = label_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); label_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Label for extra metadata.
       * 
* * string label = 1; */ public Builder setLabel(java.lang.String value) { if (value == null) { throw new NullPointerException(); } label_ = value; onChanged(); return this; } /** * * *
       * Label for extra metadata.
       * 
* * string label = 1; */ public Builder clearLabel() { label_ = getDefaultInstance().getLabel(); onChanged(); return this; } /** * * *
       * Label for extra metadata.
       * 
* * string label = 1; */ public Builder setLabelBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); label_ = value; onChanged(); return this; } private java.lang.Object languageCode_ = ""; /** * * *
       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
       * For more information, see
       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       * 
* * string language_code = 2; */ public java.lang.String getLanguageCode() { java.lang.Object ref = languageCode_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); languageCode_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
       * For more information, see
       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       * 
* * string language_code = 2; */ public com.google.protobuf.ByteString getLanguageCodeBytes() { java.lang.Object ref = languageCode_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); languageCode_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
       * For more information, see
       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       * 
* * string language_code = 2; */ public Builder setLanguageCode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } languageCode_ = value; onChanged(); return this; } /** * * *
       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
       * For more information, see
       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       * 
* * string language_code = 2; */ public Builder clearLanguageCode() { languageCode_ = getDefaultInstance().getLanguageCode(); onChanged(); return this; } /** * * *
       * The BCP-47 language code for `label`, such as "en-US" or "sr-Latn".
       * For more information, see
       * http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
       * 
* * string language_code = 2; */ public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); languageCode_ = value; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebLabel) private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel(); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public WebLabel parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WebLabel(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public interface WebPageOrBuilder extends // @@protoc_insertion_point(interface_extends:google.cloud.vision.v1p4beta1.WebDetection.WebPage) com.google.protobuf.MessageOrBuilder { /** * * *
     * The result web page URL.
     * 
* * string url = 1; */ java.lang.String getUrl(); /** * * *
     * The result web page URL.
     * 
* * string url = 1; */ com.google.protobuf.ByteString getUrlBytes(); /** * * *
     * (Deprecated) Overall relevancy score for the web page.
     * 
* * float score = 2; */ float getScore(); /** * * *
     * Title for the web page, may contain HTML markups.
     * 
* * string page_title = 3; */ java.lang.String getPageTitle(); /** * * *
     * Title for the web page, may contain HTML markups.
     * 
* * string page_title = 3; */ com.google.protobuf.ByteString getPageTitleBytes(); /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ java.util.List getFullMatchingImagesList(); /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index); /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ int getFullMatchingImagesCount(); /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ java.util.List getFullMatchingImagesOrBuilderList(); /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder( int index); /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ java.util.List getPartialMatchingImagesList(); /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages(int index); /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ int getPartialMatchingImagesCount(); /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ java.util.List getPartialMatchingImagesOrBuilderList(); /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder(int index); } /** * * *
   * Metadata for web pages.
   * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebPage} */ public static final class WebPage extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p4beta1.WebDetection.WebPage) WebPageOrBuilder { private static final long serialVersionUID = 0L; // Use WebPage.newBuilder() to construct. private WebPage(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private WebPage() { url_ = ""; pageTitle_ = ""; fullMatchingImages_ = java.util.Collections.emptyList(); partialMatchingImages_ = java.util.Collections.emptyList(); } @java.lang.Override public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } private WebPage( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { this(); if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { java.lang.String s = input.readStringRequireUtf8(); url_ = s; break; } case 21: { score_ = input.readFloat(); break; } case 26: { java.lang.String s = input.readStringRequireUtf8(); pageTitle_ = s; break; } case 34: { if (!((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); mutable_bitField0_ |= 0x00000008; } fullMatchingImages_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); break; } case 42: { if (!((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage>(); mutable_bitField0_ |= 0x00000010; } partialMatchingImages_.add( input.readMessage( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.parser(), extensionRegistry)); break; } default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { done = true; } break; } } } } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(this); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { if (((mutable_bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); } if (((mutable_bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder.class); } private int bitField0_; public static final int URL_FIELD_NUMBER = 1; private volatile java.lang.Object url_; /** * * *
     * The result web page URL.
     * 
* * string url = 1; */ public java.lang.String getUrl() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); url_ = s; return s; } } /** * * *
     * The result web page URL.
     * 
* * string url = 1; */ public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int SCORE_FIELD_NUMBER = 2; private float score_; /** * * *
     * (Deprecated) Overall relevancy score for the web page.
     * 
* * float score = 2; */ public float getScore() { return score_; } public static final int PAGE_TITLE_FIELD_NUMBER = 3; private volatile java.lang.Object pageTitle_; /** * * *
     * Title for the web page, may contain HTML markups.
     * 
* * string page_title = 3; */ public java.lang.String getPageTitle() { java.lang.Object ref = pageTitle_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageTitle_ = s; return s; } } /** * * *
     * Title for the web page, may contain HTML markups.
     * 
* * string page_title = 3; */ public com.google.protobuf.ByteString getPageTitleBytes() { java.lang.Object ref = pageTitle_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); pageTitle_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 4; private java.util.List fullMatchingImages_; /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public java.util.List getFullMatchingImagesList() { return fullMatchingImages_; } /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getFullMatchingImagesOrBuilderList() { return fullMatchingImages_; } /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public int getFullMatchingImagesCount() { return fullMatchingImages_.size(); } /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages( int index) { return fullMatchingImages_.get(index); } /** * * *
     * Fully matching images on the page.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(int index) { return fullMatchingImages_.get(index); } public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 5; private java.util.List partialMatchingImages_; /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public java.util.List getPartialMatchingImagesList() { return partialMatchingImages_; } /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getPartialMatchingImagesOrBuilderList() { return partialMatchingImages_; } /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public int getPartialMatchingImagesCount() { return partialMatchingImages_.size(); } /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages( int index) { return partialMatchingImages_.get(index); } /** * * *
     * Partial matching images on the page.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its
     * crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder(int index) { return partialMatchingImages_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!getUrlBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, url_); } if (score_ != 0F) { output.writeFloat(2, score_); } if (!getPageTitleBytes().isEmpty()) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageTitle_); } for (int i = 0; i < fullMatchingImages_.size(); i++) { output.writeMessage(4, fullMatchingImages_.get(i)); } for (int i = 0; i < partialMatchingImages_.size(); i++) { output.writeMessage(5, partialMatchingImages_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!getUrlBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, url_); } if (score_ != 0F) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, score_); } if (!getPageTitleBytes().isEmpty()) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageTitle_); } for (int i = 0; i < fullMatchingImages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, fullMatchingImages_.get(i)); } for (int i = 0; i < partialMatchingImages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 5, partialMatchingImages_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebPage)) { return super.equals(obj); } com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) obj; 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 public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + URL_FIELD_NUMBER; hash = (53 * hash) + getUrl().hashCode(); hash = (37 * hash) + SCORE_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getScore()); hash = (37 * hash) + PAGE_TITLE_FIELD_NUMBER; hash = (53 * hash) + getPageTitle().hashCode(); if (getFullMatchingImagesCount() > 0) { hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; hash = (53 * hash) + getFullMatchingImagesList().hashCode(); } if (getPartialMatchingImagesCount() > 0) { hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebPage prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
     * Metadata for web pages.
     * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection.WebPage} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection.WebPage) com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.class, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder.class); } // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getFullMatchingImagesFieldBuilder(); getPartialMatchingImagesFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); url_ = ""; score_ = 0F; pageTitle_ = ""; if (fullMatchingImagesBuilder_ == null) { fullMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { fullMatchingImagesBuilder_.clear(); } if (partialMatchingImagesBuilder_ == null) { partialMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); } else { partialMatchingImagesBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_WebPage_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstanceForType() { return com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage build() { com.google.cloud.vision.v1p4beta1.WebDetection.WebPage result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage buildPartial() { com.google.cloud.vision.v1p4beta1.WebDetection.WebPage result = new com.google.cloud.vision.v1p4beta1.WebDetection.WebPage(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; result.url_ = url_; result.score_ = score_; result.pageTitle_ = pageTitle_; if (fullMatchingImagesBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } result.fullMatchingImages_ = fullMatchingImages_; } else { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000010); } result.partialMatchingImages_ = partialMatchingImages_; } else { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } result.bitField0_ = to_bitField0_; onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) { return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage other) { if (other == com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()) return this; if (!other.getUrl().isEmpty()) { url_ = other.url_; onChanged(); } if (other.getScore() != 0F) { setScore(other.getScore()); } if (!other.getPageTitle().isEmpty()) { pageTitle_ = other.pageTitle_; onChanged(); } if (fullMatchingImagesBuilder_ == null) { if (!other.fullMatchingImages_.isEmpty()) { if (fullMatchingImages_.isEmpty()) { fullMatchingImages_ = other.fullMatchingImages_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.addAll(other.fullMatchingImages_); } onChanged(); } } else { if (!other.fullMatchingImages_.isEmpty()) { if (fullMatchingImagesBuilder_.isEmpty()) { fullMatchingImagesBuilder_.dispose(); fullMatchingImagesBuilder_ = null; fullMatchingImages_ = other.fullMatchingImages_; bitField0_ = (bitField0_ & ~0x00000008); fullMatchingImagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFullMatchingImagesFieldBuilder() : null; } else { fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); } } } if (partialMatchingImagesBuilder_ == null) { if (!other.partialMatchingImages_.isEmpty()) { if (partialMatchingImages_.isEmpty()) { partialMatchingImages_ = other.partialMatchingImages_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.addAll(other.partialMatchingImages_); } onChanged(); } } else { if (!other.partialMatchingImages_.isEmpty()) { if (partialMatchingImagesBuilder_.isEmpty()) { partialMatchingImagesBuilder_.dispose(); partialMatchingImagesBuilder_ = null; partialMatchingImages_ = other.partialMatchingImages_; bitField0_ = (bitField0_ & ~0x00000010); partialMatchingImagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPartialMatchingImagesFieldBuilder() : null; } else { partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.vision.v1p4beta1.WebDetection.WebPage parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection.WebPage) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.lang.Object url_ = ""; /** * * *
       * The result web page URL.
       * 
* * string url = 1; */ public java.lang.String getUrl() { java.lang.Object ref = url_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); url_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * The result web page URL.
       * 
* * string url = 1; */ public com.google.protobuf.ByteString getUrlBytes() { java.lang.Object ref = url_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); url_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * The result web page URL.
       * 
* * string url = 1; */ public Builder setUrl(java.lang.String value) { if (value == null) { throw new NullPointerException(); } url_ = value; onChanged(); return this; } /** * * *
       * The result web page URL.
       * 
* * string url = 1; */ public Builder clearUrl() { url_ = getDefaultInstance().getUrl(); onChanged(); return this; } /** * * *
       * The result web page URL.
       * 
* * string url = 1; */ public Builder setUrlBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); url_ = value; onChanged(); return this; } private float score_; /** * * *
       * (Deprecated) Overall relevancy score for the web page.
       * 
* * float score = 2; */ public float getScore() { return score_; } /** * * *
       * (Deprecated) Overall relevancy score for the web page.
       * 
* * float score = 2; */ public Builder setScore(float value) { score_ = value; onChanged(); return this; } /** * * *
       * (Deprecated) Overall relevancy score for the web page.
       * 
* * float score = 2; */ public Builder clearScore() { score_ = 0F; onChanged(); return this; } private java.lang.Object pageTitle_ = ""; /** * * *
       * Title for the web page, may contain HTML markups.
       * 
* * string page_title = 3; */ public java.lang.String getPageTitle() { java.lang.Object ref = pageTitle_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); pageTitle_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
       * Title for the web page, may contain HTML markups.
       * 
* * string page_title = 3; */ public com.google.protobuf.ByteString getPageTitleBytes() { java.lang.Object ref = pageTitle_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); pageTitle_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
       * Title for the web page, may contain HTML markups.
       * 
* * string page_title = 3; */ public Builder setPageTitle(java.lang.String value) { if (value == null) { throw new NullPointerException(); } pageTitle_ = value; onChanged(); return this; } /** * * *
       * Title for the web page, may contain HTML markups.
       * 
* * string page_title = 3; */ public Builder clearPageTitle() { pageTitle_ = getDefaultInstance().getPageTitle(); onChanged(); return this; } /** * * *
       * Title for the web page, may contain HTML markups.
       * 
* * string page_title = 3; */ public Builder setPageTitleBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); pageTitle_ = value; onChanged(); return this; } private java.util.List fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public java.util.List getFullMatchingImagesList() { if (fullMatchingImagesBuilder_ == null) { return java.util.Collections.unmodifiableList(fullMatchingImages_); } else { return fullMatchingImagesBuilder_.getMessageList(); } } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public int getFullMatchingImagesCount() { if (fullMatchingImagesBuilder_ == null) { return fullMatchingImages_.size(); } else { return fullMatchingImagesBuilder_.getCount(); } } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages( int index) { if (fullMatchingImagesBuilder_ == null) { return fullMatchingImages_.get(index); } else { return fullMatchingImagesBuilder_.getMessage(index); } } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder setFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (fullMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFullMatchingImagesIsMutable(); fullMatchingImages_.set(index, value); onChanged(); } else { fullMatchingImagesBuilder_.setMessage(index, value); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder setFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.set(index, builderForValue.build()); onChanged(); } else { fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder addFullMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (fullMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(value); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(value); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder addFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (fullMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(index, value); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(index, value); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder addFullMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(builderForValue.build()); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder addFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(index, builderForValue.build()); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder addAllFullMatchingImages( java.lang.Iterable values) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fullMatchingImages_); onChanged(); } else { fullMatchingImagesBuilder_.addAllMessages(values); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder clearFullMatchingImages() { if (fullMatchingImagesBuilder_ == null) { fullMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { fullMatchingImagesBuilder_.clear(); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public Builder removeFullMatchingImages(int index) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.remove(index); onChanged(); } else { fullMatchingImagesBuilder_.remove(index); } return this; } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder(int index) { return getFullMatchingImagesFieldBuilder().getBuilder(index); } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(int index) { if (fullMatchingImagesBuilder_ == null) { return fullMatchingImages_.get(index); } else { return fullMatchingImagesBuilder_.getMessageOrBuilder(index); } } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getFullMatchingImagesOrBuilderList() { if (fullMatchingImagesBuilder_ != null) { return fullMatchingImagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fullMatchingImages_); } } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { return getFullMatchingImagesFieldBuilder() .addBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder(int index) { return getFullMatchingImagesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
       * Fully matching images on the page.
       * Can include resized copies of the query image.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 4; * */ public java.util.List getFullMatchingImagesBuilderList() { return getFullMatchingImagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getFullMatchingImagesFieldBuilder() { if (fullMatchingImagesBuilder_ == null) { fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; } return fullMatchingImagesBuilder_; } private java.util.List partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public java.util.List getPartialMatchingImagesList() { if (partialMatchingImagesBuilder_ == null) { return java.util.Collections.unmodifiableList(partialMatchingImages_); } else { return partialMatchingImagesBuilder_.getMessageList(); } } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public int getPartialMatchingImagesCount() { if (partialMatchingImagesBuilder_ == null) { return partialMatchingImages_.size(); } else { return partialMatchingImagesBuilder_.getCount(); } } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages( int index) { if (partialMatchingImagesBuilder_ == null) { return partialMatchingImages_.get(index); } else { return partialMatchingImagesBuilder_.getMessage(index); } } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder setPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (partialMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.set(index, value); onChanged(); } else { partialMatchingImagesBuilder_.setMessage(index, value); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder setPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.set(index, builderForValue.build()); onChanged(); } else { partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder addPartialMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (partialMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(value); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(value); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder addPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (partialMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(index, value); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(index, value); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder addPartialMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(builderForValue.build()); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder addPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(index, builderForValue.build()); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder addAllPartialMatchingImages( java.lang.Iterable values) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialMatchingImages_); onChanged(); } else { partialMatchingImagesBuilder_.addAllMessages(values); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder clearPartialMatchingImages() { if (partialMatchingImagesBuilder_ == null) { partialMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { partialMatchingImagesBuilder_.clear(); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public Builder removePartialMatchingImages(int index) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.remove(index); onChanged(); } else { partialMatchingImagesBuilder_.remove(index); } return this; } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder(int index) { return getPartialMatchingImagesFieldBuilder().getBuilder(index); } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder(int index) { if (partialMatchingImagesBuilder_ == null) { return partialMatchingImages_.get(index); } else { return partialMatchingImagesBuilder_.getMessageOrBuilder(index); } } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getPartialMatchingImagesOrBuilderList() { if (partialMatchingImagesBuilder_ != null) { return partialMatchingImagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(partialMatchingImages_); } } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { return getPartialMatchingImagesFieldBuilder() .addBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder(int index) { return getPartialMatchingImagesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
       * Partial matching images on the page.
       * Those images are similar enough to share some key-point features. For
       * example an original image will likely have partial matching for its
       * crops.
       * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 5; * */ public java.util.List getPartialMatchingImagesBuilderList() { return getPartialMatchingImagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getPartialMatchingImagesFieldBuilder() { if (partialMatchingImagesBuilder_ == null) { partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; } return partialMatchingImagesBuilder_; } @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection.WebPage) private static final com.google.cloud.vision.v1p4beta1.WebDetection.WebPage DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection.WebPage(); } public static com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public WebPage parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WebPage(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getDefaultInstanceForType() { return DEFAULT_INSTANCE; } } public static final int WEB_ENTITIES_FIELD_NUMBER = 1; private java.util.List webEntities_; /** * * *
   * Deduced entities from similar images on the Internet.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public java.util.List getWebEntitiesList() { return webEntities_; } /** * * *
   * Deduced entities from similar images on the Internet.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public java.util.List getWebEntitiesOrBuilderList() { return webEntities_; } /** * * *
   * Deduced entities from similar images on the Internet.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public int getWebEntitiesCount() { return webEntities_.size(); } /** * * *
   * Deduced entities from similar images on the Internet.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index) { return webEntities_.get(index); } /** * * *
   * Deduced entities from similar images on the Internet.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder( int index) { return webEntities_.get(index); } public static final int FULL_MATCHING_IMAGES_FIELD_NUMBER = 2; private java.util.List fullMatchingImages_; /** * * *
   * Fully matching images from the Internet.
   * Can include resized copies of the query image.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public java.util.List getFullMatchingImagesList() { return fullMatchingImages_; } /** * * *
   * Fully matching images from the Internet.
   * Can include resized copies of the query image.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public java.util.List getFullMatchingImagesOrBuilderList() { return fullMatchingImages_; } /** * * *
   * Fully matching images from the Internet.
   * Can include resized copies of the query image.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public int getFullMatchingImagesCount() { return fullMatchingImages_.size(); } /** * * *
   * Fully matching images from the Internet.
   * Can include resized copies of the query image.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages(int index) { return fullMatchingImages_.get(index); } /** * * *
   * Fully matching images from the Internet.
   * Can include resized copies of the query image.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(int index) { return fullMatchingImages_.get(index); } public static final int PARTIAL_MATCHING_IMAGES_FIELD_NUMBER = 3; private java.util.List partialMatchingImages_; /** * * *
   * Partial matching images from the Internet.
   * Those images are similar enough to share some key-point features. For
   * example an original image will likely have partial matching for its crops.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public java.util.List getPartialMatchingImagesList() { return partialMatchingImages_; } /** * * *
   * Partial matching images from the Internet.
   * Those images are similar enough to share some key-point features. For
   * example an original image will likely have partial matching for its crops.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public java.util.List getPartialMatchingImagesOrBuilderList() { return partialMatchingImages_; } /** * * *
   * Partial matching images from the Internet.
   * Those images are similar enough to share some key-point features. For
   * example an original image will likely have partial matching for its crops.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public int getPartialMatchingImagesCount() { return partialMatchingImages_.size(); } /** * * *
   * Partial matching images from the Internet.
   * Those images are similar enough to share some key-point features. For
   * example an original image will likely have partial matching for its crops.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages( int index) { return partialMatchingImages_.get(index); } /** * * *
   * Partial matching images from the Internet.
   * Those images are similar enough to share some key-point features. For
   * example an original image will likely have partial matching for its crops.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder(int index) { return partialMatchingImages_.get(index); } public static final int PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER = 4; private java.util.List pagesWithMatchingImages_; /** * * *
   * Web pages containing the matching images from the Internet.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public java.util.List getPagesWithMatchingImagesList() { return pagesWithMatchingImages_; } /** * * *
   * Web pages containing the matching images from the Internet.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public java.util.List getPagesWithMatchingImagesOrBuilderList() { return pagesWithMatchingImages_; } /** * * *
   * Web pages containing the matching images from the Internet.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public int getPagesWithMatchingImagesCount() { return pagesWithMatchingImages_.size(); } /** * * *
   * Web pages containing the matching images from the Internet.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages( int index) { return pagesWithMatchingImages_.get(index); } /** * * *
   * Web pages containing the matching images from the Internet.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder(int index) { return pagesWithMatchingImages_.get(index); } public static final int VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER = 6; private java.util.List visuallySimilarImages_; /** * * *
   * The visually similar image results.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public java.util.List getVisuallySimilarImagesList() { return visuallySimilarImages_; } /** * * *
   * The visually similar image results.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public java.util.List getVisuallySimilarImagesOrBuilderList() { return visuallySimilarImages_; } /** * * *
   * The visually similar image results.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public int getVisuallySimilarImagesCount() { return visuallySimilarImages_.size(); } /** * * *
   * The visually similar image results.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages( int index) { return visuallySimilarImages_.get(index); } /** * * *
   * The visually similar image results.
   * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder(int index) { return visuallySimilarImages_.get(index); } public static final int BEST_GUESS_LABELS_FIELD_NUMBER = 8; private java.util.List bestGuessLabels_; /** * * *
   * The service's best guess as to the topic of the request image.
   * Inferred from similar images on the open web.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public java.util.List getBestGuessLabelsList() { return bestGuessLabels_; } /** * * *
   * The service's best guess as to the topic of the request image.
   * Inferred from similar images on the open web.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public java.util.List getBestGuessLabelsOrBuilderList() { return bestGuessLabels_; } /** * * *
   * The service's best guess as to the topic of the request image.
   * Inferred from similar images on the open web.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public int getBestGuessLabelsCount() { return bestGuessLabels_.size(); } /** * * *
   * The service's best guess as to the topic of the request image.
   * Inferred from similar images on the open web.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index) { return bestGuessLabels_.get(index); } /** * * *
   * The service's best guess as to the topic of the request image.
   * Inferred from similar images on the open web.
   * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder(int index) { return bestGuessLabels_.get(index); } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { for (int i = 0; i < webEntities_.size(); i++) { output.writeMessage(1, webEntities_.get(i)); } for (int i = 0; i < fullMatchingImages_.size(); i++) { output.writeMessage(2, fullMatchingImages_.get(i)); } for (int i = 0; i < partialMatchingImages_.size(); i++) { output.writeMessage(3, partialMatchingImages_.get(i)); } for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { output.writeMessage(4, pagesWithMatchingImages_.get(i)); } for (int i = 0; i < visuallySimilarImages_.size(); i++) { output.writeMessage(6, visuallySimilarImages_.get(i)); } for (int i = 0; i < bestGuessLabels_.size(); i++) { output.writeMessage(8, bestGuessLabels_.get(i)); } unknownFields.writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < webEntities_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, webEntities_.get(i)); } for (int i = 0; i < fullMatchingImages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fullMatchingImages_.get(i)); } for (int i = 0; i < partialMatchingImages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 3, partialMatchingImages_.get(i)); } for (int i = 0; i < pagesWithMatchingImages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 4, pagesWithMatchingImages_.get(i)); } for (int i = 0; i < visuallySimilarImages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 6, visuallySimilarImages_.get(i)); } for (int i = 0; i < bestGuessLabels_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, bestGuessLabels_.get(i)); } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; } @java.lang.Override public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } if (!(obj instanceof com.google.cloud.vision.v1p4beta1.WebDetection)) { return super.equals(obj); } com.google.cloud.vision.v1p4beta1.WebDetection other = (com.google.cloud.vision.v1p4beta1.WebDetection) obj; 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 public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getWebEntitiesCount() > 0) { hash = (37 * hash) + WEB_ENTITIES_FIELD_NUMBER; hash = (53 * hash) + getWebEntitiesList().hashCode(); } if (getFullMatchingImagesCount() > 0) { hash = (37 * hash) + FULL_MATCHING_IMAGES_FIELD_NUMBER; hash = (53 * hash) + getFullMatchingImagesList().hashCode(); } if (getPartialMatchingImagesCount() > 0) { hash = (37 * hash) + PARTIAL_MATCHING_IMAGES_FIELD_NUMBER; hash = (53 * hash) + getPartialMatchingImagesList().hashCode(); } if (getPagesWithMatchingImagesCount() > 0) { hash = (37 * hash) + PAGES_WITH_MATCHING_IMAGES_FIELD_NUMBER; hash = (53 * hash) + getPagesWithMatchingImagesList().hashCode(); } if (getVisuallySimilarImagesCount() > 0) { hash = (37 * hash) + VISUALLY_SIMILAR_IMAGES_FIELD_NUMBER; hash = (53 * hash) + getVisuallySimilarImagesList().hashCode(); } if (getBestGuessLabelsCount() > 0) { hash = (37 * hash) + BEST_GUESS_LABELS_FIELD_NUMBER; hash = (53 * hash) + getBestGuessLabelsList().hashCode(); } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( PARSER, input, extensionRegistry); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p4beta1.WebDetection parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException( PARSER, input, extensionRegistry); } @java.lang.Override public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder() { return DEFAULT_INSTANCE.toBuilder(); } public static Builder newBuilder(com.google.cloud.vision.v1p4beta1.WebDetection prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @java.lang.Override public Builder toBuilder() { return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); } @java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /** * * *
   * Relevant information for the image from the Internet.
   * 
* * Protobuf type {@code google.cloud.vision.v1p4beta1.WebDetection} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p4beta1.WebDetection) com.google.cloud.vision.v1p4beta1.WebDetectionOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p4beta1.WebDetection.class, com.google.cloud.vision.v1p4beta1.WebDetection.Builder.class); } // Construct using com.google.cloud.vision.v1p4beta1.WebDetection.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getWebEntitiesFieldBuilder(); getFullMatchingImagesFieldBuilder(); getPartialMatchingImagesFieldBuilder(); getPagesWithMatchingImagesFieldBuilder(); getVisuallySimilarImagesFieldBuilder(); getBestGuessLabelsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); if (webEntitiesBuilder_ == null) { webEntities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); } else { webEntitiesBuilder_.clear(); } if (fullMatchingImagesBuilder_ == null) { fullMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); } else { fullMatchingImagesBuilder_.clear(); } if (partialMatchingImagesBuilder_ == null) { partialMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); } else { partialMatchingImagesBuilder_.clear(); } if (pagesWithMatchingImagesBuilder_ == null) { pagesWithMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); } else { pagesWithMatchingImagesBuilder_.clear(); } if (visuallySimilarImagesBuilder_ == null) { visuallySimilarImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); } else { visuallySimilarImagesBuilder_.clear(); } if (bestGuessLabelsBuilder_ == null) { bestGuessLabels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); } else { bestGuessLabelsBuilder_.clear(); } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p4beta1.WebDetectionProto .internal_static_google_cloud_vision_v1p4beta1_WebDetection_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstanceForType() { return com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection build() { com.google.cloud.vision.v1p4beta1.WebDetection result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection buildPartial() { com.google.cloud.vision.v1p4beta1.WebDetection result = new com.google.cloud.vision.v1p4beta1.WebDetection(this); int from_bitField0_ = bitField0_; if (webEntitiesBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { webEntities_ = java.util.Collections.unmodifiableList(webEntities_); bitField0_ = (bitField0_ & ~0x00000001); } result.webEntities_ = webEntities_; } else { result.webEntities_ = webEntitiesBuilder_.build(); } if (fullMatchingImagesBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = java.util.Collections.unmodifiableList(fullMatchingImages_); bitField0_ = (bitField0_ & ~0x00000002); } result.fullMatchingImages_ = fullMatchingImages_; } else { result.fullMatchingImages_ = fullMatchingImagesBuilder_.build(); } if (partialMatchingImagesBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = java.util.Collections.unmodifiableList(partialMatchingImages_); bitField0_ = (bitField0_ & ~0x00000004); } result.partialMatchingImages_ = partialMatchingImages_; } else { result.partialMatchingImages_ = partialMatchingImagesBuilder_.build(); } if (pagesWithMatchingImagesBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = java.util.Collections.unmodifiableList(pagesWithMatchingImages_); bitField0_ = (bitField0_ & ~0x00000008); } result.pagesWithMatchingImages_ = pagesWithMatchingImages_; } else { result.pagesWithMatchingImages_ = pagesWithMatchingImagesBuilder_.build(); } if (visuallySimilarImagesBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = java.util.Collections.unmodifiableList(visuallySimilarImages_); bitField0_ = (bitField0_ & ~0x00000010); } result.visuallySimilarImages_ = visuallySimilarImages_; } else { result.visuallySimilarImages_ = visuallySimilarImagesBuilder_.build(); } if (bestGuessLabelsBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = java.util.Collections.unmodifiableList(bestGuessLabels_); bitField0_ = (bitField0_ & ~0x00000020); } result.bestGuessLabels_ = bestGuessLabels_; } else { result.bestGuessLabels_ = bestGuessLabelsBuilder_.build(); } onBuilt(); return result; } @java.lang.Override public Builder clone() { return super.clone(); } @java.lang.Override public Builder setField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.setField(field, value); } @java.lang.Override public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { return super.clearField(field); } @java.lang.Override public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { return super.clearOneof(oneof); } @java.lang.Override public Builder setRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { return super.setRepeatedField(field, index, value); } @java.lang.Override public Builder addRepeatedField( com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { return super.addRepeatedField(field, value); } @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.cloud.vision.v1p4beta1.WebDetection) { return mergeFrom((com.google.cloud.vision.v1p4beta1.WebDetection) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p4beta1.WebDetection other) { if (other == com.google.cloud.vision.v1p4beta1.WebDetection.getDefaultInstance()) return this; if (webEntitiesBuilder_ == null) { if (!other.webEntities_.isEmpty()) { if (webEntities_.isEmpty()) { webEntities_ = other.webEntities_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureWebEntitiesIsMutable(); webEntities_.addAll(other.webEntities_); } onChanged(); } } else { if (!other.webEntities_.isEmpty()) { if (webEntitiesBuilder_.isEmpty()) { webEntitiesBuilder_.dispose(); webEntitiesBuilder_ = null; webEntities_ = other.webEntities_; bitField0_ = (bitField0_ & ~0x00000001); webEntitiesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getWebEntitiesFieldBuilder() : null; } else { webEntitiesBuilder_.addAllMessages(other.webEntities_); } } } if (fullMatchingImagesBuilder_ == null) { if (!other.fullMatchingImages_.isEmpty()) { if (fullMatchingImages_.isEmpty()) { fullMatchingImages_ = other.fullMatchingImages_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.addAll(other.fullMatchingImages_); } onChanged(); } } else { if (!other.fullMatchingImages_.isEmpty()) { if (fullMatchingImagesBuilder_.isEmpty()) { fullMatchingImagesBuilder_.dispose(); fullMatchingImagesBuilder_ = null; fullMatchingImages_ = other.fullMatchingImages_; bitField0_ = (bitField0_ & ~0x00000002); fullMatchingImagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFullMatchingImagesFieldBuilder() : null; } else { fullMatchingImagesBuilder_.addAllMessages(other.fullMatchingImages_); } } } if (partialMatchingImagesBuilder_ == null) { if (!other.partialMatchingImages_.isEmpty()) { if (partialMatchingImages_.isEmpty()) { partialMatchingImages_ = other.partialMatchingImages_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.addAll(other.partialMatchingImages_); } onChanged(); } } else { if (!other.partialMatchingImages_.isEmpty()) { if (partialMatchingImagesBuilder_.isEmpty()) { partialMatchingImagesBuilder_.dispose(); partialMatchingImagesBuilder_ = null; partialMatchingImages_ = other.partialMatchingImages_; bitField0_ = (bitField0_ & ~0x00000004); partialMatchingImagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPartialMatchingImagesFieldBuilder() : null; } else { partialMatchingImagesBuilder_.addAllMessages(other.partialMatchingImages_); } } } if (pagesWithMatchingImagesBuilder_ == null) { if (!other.pagesWithMatchingImages_.isEmpty()) { if (pagesWithMatchingImages_.isEmpty()) { pagesWithMatchingImages_ = other.pagesWithMatchingImages_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.addAll(other.pagesWithMatchingImages_); } onChanged(); } } else { if (!other.pagesWithMatchingImages_.isEmpty()) { if (pagesWithMatchingImagesBuilder_.isEmpty()) { pagesWithMatchingImagesBuilder_.dispose(); pagesWithMatchingImagesBuilder_ = null; pagesWithMatchingImages_ = other.pagesWithMatchingImages_; bitField0_ = (bitField0_ & ~0x00000008); pagesWithMatchingImagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getPagesWithMatchingImagesFieldBuilder() : null; } else { pagesWithMatchingImagesBuilder_.addAllMessages(other.pagesWithMatchingImages_); } } } if (visuallySimilarImagesBuilder_ == null) { if (!other.visuallySimilarImages_.isEmpty()) { if (visuallySimilarImages_.isEmpty()) { visuallySimilarImages_ = other.visuallySimilarImages_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.addAll(other.visuallySimilarImages_); } onChanged(); } } else { if (!other.visuallySimilarImages_.isEmpty()) { if (visuallySimilarImagesBuilder_.isEmpty()) { visuallySimilarImagesBuilder_.dispose(); visuallySimilarImagesBuilder_ = null; visuallySimilarImages_ = other.visuallySimilarImages_; bitField0_ = (bitField0_ & ~0x00000010); visuallySimilarImagesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getVisuallySimilarImagesFieldBuilder() : null; } else { visuallySimilarImagesBuilder_.addAllMessages(other.visuallySimilarImages_); } } } if (bestGuessLabelsBuilder_ == null) { if (!other.bestGuessLabels_.isEmpty()) { if (bestGuessLabels_.isEmpty()) { bestGuessLabels_ = other.bestGuessLabels_; bitField0_ = (bitField0_ & ~0x00000020); } else { ensureBestGuessLabelsIsMutable(); bestGuessLabels_.addAll(other.bestGuessLabels_); } onChanged(); } } else { if (!other.bestGuessLabels_.isEmpty()) { if (bestGuessLabelsBuilder_.isEmpty()) { bestGuessLabelsBuilder_.dispose(); bestGuessLabelsBuilder_ = null; bestGuessLabels_ = other.bestGuessLabels_; bitField0_ = (bitField0_ & ~0x00000020); bestGuessLabelsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getBestGuessLabelsFieldBuilder() : null; } else { bestGuessLabelsBuilder_.addAllMessages(other.bestGuessLabels_); } } } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; } @java.lang.Override public final boolean isInitialized() { return true; } @java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.cloud.vision.v1p4beta1.WebDetection parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.cloud.vision.v1p4beta1.WebDetection) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; } private int bitField0_; private java.util.List webEntities_ = java.util.Collections.emptyList(); private void ensureWebEntitiesIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { webEntities_ = new java.util.ArrayList( webEntities_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> webEntitiesBuilder_; /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public java.util.List getWebEntitiesList() { if (webEntitiesBuilder_ == null) { return java.util.Collections.unmodifiableList(webEntities_); } else { return webEntitiesBuilder_.getMessageList(); } } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public int getWebEntitiesCount() { if (webEntitiesBuilder_ == null) { return webEntities_.size(); } else { return webEntitiesBuilder_.getCount(); } } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity getWebEntities(int index) { if (webEntitiesBuilder_ == null) { return webEntities_.get(index); } else { return webEntitiesBuilder_.getMessage(index); } } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder setWebEntities( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { if (webEntitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWebEntitiesIsMutable(); webEntities_.set(index, value); onChanged(); } else { webEntitiesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder setWebEntities( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { if (webEntitiesBuilder_ == null) { ensureWebEntitiesIsMutable(); webEntities_.set(index, builderForValue.build()); onChanged(); } else { webEntitiesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder addWebEntities(com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { if (webEntitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWebEntitiesIsMutable(); webEntities_.add(value); onChanged(); } else { webEntitiesBuilder_.addMessage(value); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder addWebEntities( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity value) { if (webEntitiesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureWebEntitiesIsMutable(); webEntities_.add(index, value); onChanged(); } else { webEntitiesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder addWebEntities( com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { if (webEntitiesBuilder_ == null) { ensureWebEntitiesIsMutable(); webEntities_.add(builderForValue.build()); onChanged(); } else { webEntitiesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder addWebEntities( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder builderForValue) { if (webEntitiesBuilder_ == null) { ensureWebEntitiesIsMutable(); webEntities_.add(index, builderForValue.build()); onChanged(); } else { webEntitiesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder addAllWebEntities( java.lang.Iterable values) { if (webEntitiesBuilder_ == null) { ensureWebEntitiesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, webEntities_); onChanged(); } else { webEntitiesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder clearWebEntities() { if (webEntitiesBuilder_ == null) { webEntities_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { webEntitiesBuilder_.clear(); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public Builder removeWebEntities(int index) { if (webEntitiesBuilder_ == null) { ensureWebEntitiesIsMutable(); webEntities_.remove(index); onChanged(); } else { webEntitiesBuilder_.remove(index); } return this; } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder getWebEntitiesBuilder( int index) { return getWebEntitiesFieldBuilder().getBuilder(index); } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder getWebEntitiesOrBuilder(int index) { if (webEntitiesBuilder_ == null) { return webEntities_.get(index); } else { return webEntitiesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> getWebEntitiesOrBuilderList() { if (webEntitiesBuilder_ != null) { return webEntitiesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(webEntities_); } } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder() { return getWebEntitiesFieldBuilder() .addBuilder( com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()); } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder addWebEntitiesBuilder( int index) { return getWebEntitiesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.getDefaultInstance()); } /** * * *
     * Deduced entities from similar images on the Internet.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebEntity web_entities = 1; */ public java.util.List getWebEntitiesBuilderList() { return getWebEntitiesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntity.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebEntityOrBuilder> getWebEntitiesFieldBuilder() { if (webEntitiesBuilder_ == null) { webEntitiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< 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) != 0), getParentForChildren(), isClean()); webEntities_ = null; } return webEntitiesBuilder_; } private java.util.List fullMatchingImages_ = java.util.Collections.emptyList(); private void ensureFullMatchingImagesIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { fullMatchingImages_ = new java.util.ArrayList( fullMatchingImages_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> fullMatchingImagesBuilder_; /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public java.util.List getFullMatchingImagesList() { if (fullMatchingImagesBuilder_ == null) { return java.util.Collections.unmodifiableList(fullMatchingImages_); } else { return fullMatchingImagesBuilder_.getMessageList(); } } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public int getFullMatchingImagesCount() { if (fullMatchingImagesBuilder_ == null) { return fullMatchingImages_.size(); } else { return fullMatchingImagesBuilder_.getCount(); } } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getFullMatchingImages( int index) { if (fullMatchingImagesBuilder_ == null) { return fullMatchingImages_.get(index); } else { return fullMatchingImagesBuilder_.getMessage(index); } } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder setFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (fullMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFullMatchingImagesIsMutable(); fullMatchingImages_.set(index, value); onChanged(); } else { fullMatchingImagesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder setFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.set(index, builderForValue.build()); onChanged(); } else { fullMatchingImagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder addFullMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (fullMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(value); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(value); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder addFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (fullMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(index, value); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder addFullMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(builderForValue.build()); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder addFullMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.add(index, builderForValue.build()); onChanged(); } else { fullMatchingImagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder addAllFullMatchingImages( java.lang.Iterable values) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fullMatchingImages_); onChanged(); } else { fullMatchingImagesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder clearFullMatchingImages() { if (fullMatchingImagesBuilder_ == null) { fullMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { fullMatchingImagesBuilder_.clear(); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public Builder removeFullMatchingImages(int index) { if (fullMatchingImagesBuilder_ == null) { ensureFullMatchingImagesIsMutable(); fullMatchingImages_.remove(index); onChanged(); } else { fullMatchingImagesBuilder_.remove(index); } return this; } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getFullMatchingImagesBuilder(int index) { return getFullMatchingImagesFieldBuilder().getBuilder(index); } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getFullMatchingImagesOrBuilder(int index) { if (fullMatchingImagesBuilder_ == null) { return fullMatchingImages_.get(index); } else { return fullMatchingImagesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getFullMatchingImagesOrBuilderList() { if (fullMatchingImagesBuilder_ != null) { return fullMatchingImagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(fullMatchingImages_); } } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder() { return getFullMatchingImagesFieldBuilder() .addBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addFullMatchingImagesBuilder(int index) { return getFullMatchingImagesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
     * Fully matching images from the Internet.
     * Can include resized copies of the query image.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage full_matching_images = 2; * */ public java.util.List getFullMatchingImagesBuilderList() { return getFullMatchingImagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getFullMatchingImagesFieldBuilder() { if (fullMatchingImagesBuilder_ == null) { fullMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( fullMatchingImages_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); fullMatchingImages_ = null; } return fullMatchingImagesBuilder_; } private java.util.List partialMatchingImages_ = java.util.Collections.emptyList(); private void ensurePartialMatchingImagesIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { partialMatchingImages_ = new java.util.ArrayList( partialMatchingImages_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> partialMatchingImagesBuilder_; /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public java.util.List getPartialMatchingImagesList() { if (partialMatchingImagesBuilder_ == null) { return java.util.Collections.unmodifiableList(partialMatchingImages_); } else { return partialMatchingImagesBuilder_.getMessageList(); } } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public int getPartialMatchingImagesCount() { if (partialMatchingImagesBuilder_ == null) { return partialMatchingImages_.size(); } else { return partialMatchingImagesBuilder_.getCount(); } } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getPartialMatchingImages( int index) { if (partialMatchingImagesBuilder_ == null) { return partialMatchingImages_.get(index); } else { return partialMatchingImagesBuilder_.getMessage(index); } } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder setPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (partialMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.set(index, value); onChanged(); } else { partialMatchingImagesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder setPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.set(index, builderForValue.build()); onChanged(); } else { partialMatchingImagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder addPartialMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (partialMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(value); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(value); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder addPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (partialMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(index, value); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder addPartialMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(builderForValue.build()); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder addPartialMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.add(index, builderForValue.build()); onChanged(); } else { partialMatchingImagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder addAllPartialMatchingImages( java.lang.Iterable values) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, partialMatchingImages_); onChanged(); } else { partialMatchingImagesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder clearPartialMatchingImages() { if (partialMatchingImagesBuilder_ == null) { partialMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { partialMatchingImagesBuilder_.clear(); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public Builder removePartialMatchingImages(int index) { if (partialMatchingImagesBuilder_ == null) { ensurePartialMatchingImagesIsMutable(); partialMatchingImages_.remove(index); onChanged(); } else { partialMatchingImagesBuilder_.remove(index); } return this; } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getPartialMatchingImagesBuilder(int index) { return getPartialMatchingImagesFieldBuilder().getBuilder(index); } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getPartialMatchingImagesOrBuilder(int index) { if (partialMatchingImagesBuilder_ == null) { return partialMatchingImages_.get(index); } else { return partialMatchingImagesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getPartialMatchingImagesOrBuilderList() { if (partialMatchingImagesBuilder_ != null) { return partialMatchingImagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(partialMatchingImages_); } } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder() { return getPartialMatchingImagesFieldBuilder() .addBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addPartialMatchingImagesBuilder(int index) { return getPartialMatchingImagesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
     * Partial matching images from the Internet.
     * Those images are similar enough to share some key-point features. For
     * example an original image will likely have partial matching for its crops.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage partial_matching_images = 3; * */ public java.util.List getPartialMatchingImagesBuilderList() { return getPartialMatchingImagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getPartialMatchingImagesFieldBuilder() { if (partialMatchingImagesBuilder_ == null) { partialMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( partialMatchingImages_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); partialMatchingImages_ = null; } return partialMatchingImagesBuilder_; } private java.util.List pagesWithMatchingImages_ = java.util.Collections.emptyList(); private void ensurePagesWithMatchingImagesIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { pagesWithMatchingImages_ = new java.util.ArrayList( pagesWithMatchingImages_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder> pagesWithMatchingImagesBuilder_; /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public java.util.List getPagesWithMatchingImagesList() { if (pagesWithMatchingImagesBuilder_ == null) { return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } else { return pagesWithMatchingImagesBuilder_.getMessageList(); } } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public int getPagesWithMatchingImagesCount() { if (pagesWithMatchingImagesBuilder_ == null) { return pagesWithMatchingImages_.size(); } else { return pagesWithMatchingImagesBuilder_.getCount(); } } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage getPagesWithMatchingImages( int index) { if (pagesWithMatchingImagesBuilder_ == null) { return pagesWithMatchingImages_.get(index); } else { return pagesWithMatchingImagesBuilder_.getMessage(index); } } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder setPagesWithMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { if (pagesWithMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.set(index, value); onChanged(); } else { pagesWithMatchingImagesBuilder_.setMessage(index, value); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder setPagesWithMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { if (pagesWithMatchingImagesBuilder_ == null) { ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.set(index, builderForValue.build()); onChanged(); } else { pagesWithMatchingImagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder addPagesWithMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { if (pagesWithMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.add(value); onChanged(); } else { pagesWithMatchingImagesBuilder_.addMessage(value); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder addPagesWithMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage value) { if (pagesWithMatchingImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.add(index, value); onChanged(); } else { pagesWithMatchingImagesBuilder_.addMessage(index, value); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder addPagesWithMatchingImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { if (pagesWithMatchingImagesBuilder_ == null) { ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.add(builderForValue.build()); onChanged(); } else { pagesWithMatchingImagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder addPagesWithMatchingImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder builderForValue) { if (pagesWithMatchingImagesBuilder_ == null) { ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.add(index, builderForValue.build()); onChanged(); } else { pagesWithMatchingImagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder addAllPagesWithMatchingImages( java.lang.Iterable values) { if (pagesWithMatchingImagesBuilder_ == null) { ensurePagesWithMatchingImagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pagesWithMatchingImages_); onChanged(); } else { pagesWithMatchingImagesBuilder_.addAllMessages(values); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder clearPagesWithMatchingImages() { if (pagesWithMatchingImagesBuilder_ == null) { pagesWithMatchingImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { pagesWithMatchingImagesBuilder_.clear(); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public Builder removePagesWithMatchingImages(int index) { if (pagesWithMatchingImagesBuilder_ == null) { ensurePagesWithMatchingImagesIsMutable(); pagesWithMatchingImages_.remove(index); onChanged(); } else { pagesWithMatchingImagesBuilder_.remove(index); } return this; } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder getPagesWithMatchingImagesBuilder(int index) { return getPagesWithMatchingImagesFieldBuilder().getBuilder(index); } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder getPagesWithMatchingImagesOrBuilder(int index) { if (pagesWithMatchingImagesBuilder_ == null) { return pagesWithMatchingImages_.get(index); } else { return pagesWithMatchingImagesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public java.util.List getPagesWithMatchingImagesOrBuilderList() { if (pagesWithMatchingImagesBuilder_ != null) { return pagesWithMatchingImagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(pagesWithMatchingImages_); } } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder() { return getPagesWithMatchingImagesFieldBuilder() .addBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()); } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder addPagesWithMatchingImagesBuilder(int index) { return getPagesWithMatchingImagesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.getDefaultInstance()); } /** * * *
     * Web pages containing the matching images from the Internet.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebPage pages_with_matching_images = 4; * */ public java.util.List getPagesWithMatchingImagesBuilderList() { return getPagesWithMatchingImagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder> getPagesWithMatchingImagesFieldBuilder() { if (pagesWithMatchingImagesBuilder_ == null) { pagesWithMatchingImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebPage, com.google.cloud.vision.v1p4beta1.WebDetection.WebPage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebPageOrBuilder>( pagesWithMatchingImages_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); pagesWithMatchingImages_ = null; } return pagesWithMatchingImagesBuilder_; } private java.util.List visuallySimilarImages_ = java.util.Collections.emptyList(); private void ensureVisuallySimilarImagesIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { visuallySimilarImages_ = new java.util.ArrayList( visuallySimilarImages_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> visuallySimilarImagesBuilder_; /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public java.util.List getVisuallySimilarImagesList() { if (visuallySimilarImagesBuilder_ == null) { return java.util.Collections.unmodifiableList(visuallySimilarImages_); } else { return visuallySimilarImagesBuilder_.getMessageList(); } } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public int getVisuallySimilarImagesCount() { if (visuallySimilarImagesBuilder_ == null) { return visuallySimilarImages_.size(); } else { return visuallySimilarImagesBuilder_.getCount(); } } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage getVisuallySimilarImages( int index) { if (visuallySimilarImagesBuilder_ == null) { return visuallySimilarImages_.get(index); } else { return visuallySimilarImagesBuilder_.getMessage(index); } } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder setVisuallySimilarImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (visuallySimilarImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.set(index, value); onChanged(); } else { visuallySimilarImagesBuilder_.setMessage(index, value); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder setVisuallySimilarImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (visuallySimilarImagesBuilder_ == null) { ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.set(index, builderForValue.build()); onChanged(); } else { visuallySimilarImagesBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder addVisuallySimilarImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (visuallySimilarImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.add(value); onChanged(); } else { visuallySimilarImagesBuilder_.addMessage(value); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder addVisuallySimilarImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage value) { if (visuallySimilarImagesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.add(index, value); onChanged(); } else { visuallySimilarImagesBuilder_.addMessage(index, value); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder addVisuallySimilarImages( com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (visuallySimilarImagesBuilder_ == null) { ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.add(builderForValue.build()); onChanged(); } else { visuallySimilarImagesBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder addVisuallySimilarImages( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder builderForValue) { if (visuallySimilarImagesBuilder_ == null) { ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.add(index, builderForValue.build()); onChanged(); } else { visuallySimilarImagesBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder addAllVisuallySimilarImages( java.lang.Iterable values) { if (visuallySimilarImagesBuilder_ == null) { ensureVisuallySimilarImagesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, visuallySimilarImages_); onChanged(); } else { visuallySimilarImagesBuilder_.addAllMessages(values); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder clearVisuallySimilarImages() { if (visuallySimilarImagesBuilder_ == null) { visuallySimilarImages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { visuallySimilarImagesBuilder_.clear(); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public Builder removeVisuallySimilarImages(int index) { if (visuallySimilarImagesBuilder_ == null) { ensureVisuallySimilarImagesIsMutable(); visuallySimilarImages_.remove(index); onChanged(); } else { visuallySimilarImagesBuilder_.remove(index); } return this; } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder getVisuallySimilarImagesBuilder(int index) { return getVisuallySimilarImagesFieldBuilder().getBuilder(index); } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder getVisuallySimilarImagesOrBuilder(int index) { if (visuallySimilarImagesBuilder_ == null) { return visuallySimilarImages_.get(index); } else { return visuallySimilarImagesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getVisuallySimilarImagesOrBuilderList() { if (visuallySimilarImagesBuilder_ != null) { return visuallySimilarImagesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(visuallySimilarImages_); } } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder() { return getVisuallySimilarImagesFieldBuilder() .addBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder addVisuallySimilarImagesBuilder(int index) { return getVisuallySimilarImagesFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.getDefaultInstance()); } /** * * *
     * The visually similar image results.
     * 
* * * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebImage visually_similar_images = 6; * */ public java.util.List getVisuallySimilarImagesBuilderList() { return getVisuallySimilarImagesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder> getVisuallySimilarImagesFieldBuilder() { if (visuallySimilarImagesBuilder_ == null) { visuallySimilarImagesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebImage, com.google.cloud.vision.v1p4beta1.WebDetection.WebImage.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebImageOrBuilder>( visuallySimilarImages_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); visuallySimilarImages_ = null; } return visuallySimilarImagesBuilder_; } private java.util.List bestGuessLabels_ = java.util.Collections.emptyList(); private void ensureBestGuessLabelsIsMutable() { if (!((bitField0_ & 0x00000020) != 0)) { bestGuessLabels_ = new java.util.ArrayList( bestGuessLabels_); bitField0_ |= 0x00000020; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> bestGuessLabelsBuilder_; /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public java.util.List getBestGuessLabelsList() { if (bestGuessLabelsBuilder_ == null) { return java.util.Collections.unmodifiableList(bestGuessLabels_); } else { return bestGuessLabelsBuilder_.getMessageList(); } } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public int getBestGuessLabelsCount() { if (bestGuessLabelsBuilder_ == null) { return bestGuessLabels_.size(); } else { return bestGuessLabelsBuilder_.getCount(); } } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel getBestGuessLabels(int index) { if (bestGuessLabelsBuilder_ == null) { return bestGuessLabels_.get(index); } else { return bestGuessLabelsBuilder_.getMessage(index); } } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder setBestGuessLabels( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { if (bestGuessLabelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBestGuessLabelsIsMutable(); bestGuessLabels_.set(index, value); onChanged(); } else { bestGuessLabelsBuilder_.setMessage(index, value); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder setBestGuessLabels( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { if (bestGuessLabelsBuilder_ == null) { ensureBestGuessLabelsIsMutable(); bestGuessLabels_.set(index, builderForValue.build()); onChanged(); } else { bestGuessLabelsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder addBestGuessLabels( com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { if (bestGuessLabelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBestGuessLabelsIsMutable(); bestGuessLabels_.add(value); onChanged(); } else { bestGuessLabelsBuilder_.addMessage(value); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder addBestGuessLabels( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel value) { if (bestGuessLabelsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureBestGuessLabelsIsMutable(); bestGuessLabels_.add(index, value); onChanged(); } else { bestGuessLabelsBuilder_.addMessage(index, value); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder addBestGuessLabels( com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { if (bestGuessLabelsBuilder_ == null) { ensureBestGuessLabelsIsMutable(); bestGuessLabels_.add(builderForValue.build()); onChanged(); } else { bestGuessLabelsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder addBestGuessLabels( int index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder builderForValue) { if (bestGuessLabelsBuilder_ == null) { ensureBestGuessLabelsIsMutable(); bestGuessLabels_.add(index, builderForValue.build()); onChanged(); } else { bestGuessLabelsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder addAllBestGuessLabels( java.lang.Iterable values) { if (bestGuessLabelsBuilder_ == null) { ensureBestGuessLabelsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, bestGuessLabels_); onChanged(); } else { bestGuessLabelsBuilder_.addAllMessages(values); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder clearBestGuessLabels() { if (bestGuessLabelsBuilder_ == null) { bestGuessLabels_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000020); onChanged(); } else { bestGuessLabelsBuilder_.clear(); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public Builder removeBestGuessLabels(int index) { if (bestGuessLabelsBuilder_ == null) { ensureBestGuessLabelsIsMutable(); bestGuessLabels_.remove(index); onChanged(); } else { bestGuessLabelsBuilder_.remove(index); } return this; } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder getBestGuessLabelsBuilder(int index) { return getBestGuessLabelsFieldBuilder().getBuilder(index); } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder getBestGuessLabelsOrBuilder(int index) { if (bestGuessLabelsBuilder_ == null) { return bestGuessLabels_.get(index); } else { return bestGuessLabelsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public java.util.List< ? extends com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> getBestGuessLabelsOrBuilderList() { if (bestGuessLabelsBuilder_ != null) { return bestGuessLabelsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(bestGuessLabels_); } } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder() { return getBestGuessLabelsFieldBuilder() .addBuilder(com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()); } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder addBestGuessLabelsBuilder(int index) { return getBestGuessLabelsFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.getDefaultInstance()); } /** * * *
     * The service's best guess as to the topic of the request image.
     * Inferred from similar images on the open web.
     * 
* * repeated .google.cloud.vision.v1p4beta1.WebDetection.WebLabel best_guess_labels = 8; * */ public java.util.List getBestGuessLabelsBuilderList() { return getBestGuessLabelsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder> getBestGuessLabelsFieldBuilder() { if (bestGuessLabelsBuilder_ == null) { bestGuessLabelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabel.Builder, com.google.cloud.vision.v1p4beta1.WebDetection.WebLabelOrBuilder>( bestGuessLabels_, ((bitField0_ & 0x00000020) != 0), getParentForChildren(), isClean()); bestGuessLabels_ = null; } return bestGuessLabelsBuilder_; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p4beta1.WebDetection) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p4beta1.WebDetection) private static final com.google.cloud.vision.v1p4beta1.WebDetection DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p4beta1.WebDetection(); } public static com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public WebDetection parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return new WebDetection(input, extensionRegistry); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.vision.v1p4beta1.WebDetection getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy