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

com.google.cloud.vision.v1p1beta1.AnnotateImageResponse Maven / Gradle / Ivy

There is a newer version: 0.141.0
Show newest version
/*
 * Copyright 2024 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/vision/v1p1beta1/image_annotator.proto

// Protobuf Java Version: 3.25.5
package com.google.cloud.vision.v1p1beta1;

/**
 *
 *
 * 
 * Response to an image annotation request.
 * 
* * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageResponse} */ public final class AnnotateImageResponse extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p1beta1.AnnotateImageResponse) AnnotateImageResponseOrBuilder { private static final long serialVersionUID = 0L; // Use AnnotateImageResponse.newBuilder() to construct. private AnnotateImageResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AnnotateImageResponse() { faceAnnotations_ = java.util.Collections.emptyList(); landmarkAnnotations_ = java.util.Collections.emptyList(); logoAnnotations_ = java.util.Collections.emptyList(); labelAnnotations_ = java.util.Collections.emptyList(); textAnnotations_ = java.util.Collections.emptyList(); } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AnnotateImageResponse(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder.class); } private int bitField0_; public static final int FACE_ANNOTATIONS_FIELD_NUMBER = 1; @SuppressWarnings("serial") private java.util.List faceAnnotations_; /** * * *
   * If present, face detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ @java.lang.Override public java.util.List getFaceAnnotationsList() { return faceAnnotations_; } /** * * *
   * If present, face detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ @java.lang.Override public java.util.List getFaceAnnotationsOrBuilderList() { return faceAnnotations_; } /** * * *
   * If present, face detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ @java.lang.Override public int getFaceAnnotationsCount() { return faceAnnotations_.size(); } /** * * *
   * If present, face detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index) { return faceAnnotations_.get(index); } /** * * *
   * If present, face detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( int index) { return faceAnnotations_.get(index); } public static final int LANDMARK_ANNOTATIONS_FIELD_NUMBER = 2; @SuppressWarnings("serial") private java.util.List landmarkAnnotations_; /** * * *
   * If present, landmark detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; */ @java.lang.Override public java.util.List getLandmarkAnnotationsList() { return landmarkAnnotations_; } /** * * *
   * If present, landmark detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; */ @java.lang.Override public java.util.List getLandmarkAnnotationsOrBuilderList() { return landmarkAnnotations_; } /** * * *
   * If present, landmark detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; */ @java.lang.Override public int getLandmarkAnnotationsCount() { return landmarkAnnotations_.size(); } /** * * *
   * If present, landmark detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index) { return landmarkAnnotations_.get(index); } /** * * *
   * If present, landmark detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(int index) { return landmarkAnnotations_.get(index); } public static final int LOGO_ANNOTATIONS_FIELD_NUMBER = 3; @SuppressWarnings("serial") private java.util.List logoAnnotations_; /** * * *
   * If present, logo detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ @java.lang.Override public java.util.List getLogoAnnotationsList() { return logoAnnotations_; } /** * * *
   * If present, logo detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ @java.lang.Override public java.util.List getLogoAnnotationsOrBuilderList() { return logoAnnotations_; } /** * * *
   * If present, logo detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ @java.lang.Override public int getLogoAnnotationsCount() { return logoAnnotations_.size(); } /** * * *
   * If present, logo detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index) { return logoAnnotations_.get(index); } /** * * *
   * If present, logo detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( int index) { return logoAnnotations_.get(index); } public static final int LABEL_ANNOTATIONS_FIELD_NUMBER = 4; @SuppressWarnings("serial") private java.util.List labelAnnotations_; /** * * *
   * If present, label detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ @java.lang.Override public java.util.List getLabelAnnotationsList() { return labelAnnotations_; } /** * * *
   * If present, label detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ @java.lang.Override public java.util.List getLabelAnnotationsOrBuilderList() { return labelAnnotations_; } /** * * *
   * If present, label detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ @java.lang.Override public int getLabelAnnotationsCount() { return labelAnnotations_.size(); } /** * * *
   * If present, label detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index) { return labelAnnotations_.get(index); } /** * * *
   * If present, label detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( int index) { return labelAnnotations_.get(index); } public static final int TEXT_ANNOTATIONS_FIELD_NUMBER = 5; @SuppressWarnings("serial") private java.util.List textAnnotations_; /** * * *
   * If present, text (OCR) detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ @java.lang.Override public java.util.List getTextAnnotationsList() { return textAnnotations_; } /** * * *
   * If present, text (OCR) detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ @java.lang.Override public java.util.List getTextAnnotationsOrBuilderList() { return textAnnotations_; } /** * * *
   * If present, text (OCR) detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ @java.lang.Override public int getTextAnnotationsCount() { return textAnnotations_.size(); } /** * * *
   * If present, text (OCR) detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index) { return textAnnotations_.get(index); } /** * * *
   * If present, text (OCR) detection has completed successfully.
   * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( int index) { return textAnnotations_.get(index); } public static final int FULL_TEXT_ANNOTATION_FIELD_NUMBER = 12; private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; /** * * *
   * If present, text (OCR) detection or document (OCR) text detection has
   * completed successfully.
   * This annotation provides the structural hierarchy for the OCR detected
   * text.
   * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; * * @return Whether the fullTextAnnotation field is set. */ @java.lang.Override public boolean hasFullTextAnnotation() { return ((bitField0_ & 0x00000001) != 0); } /** * * *
   * If present, text (OCR) detection or document (OCR) text detection has
   * completed successfully.
   * This annotation provides the structural hierarchy for the OCR detected
   * text.
   * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; * * @return The fullTextAnnotation. */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation() { return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; } /** * * *
   * If present, text (OCR) detection or document (OCR) text detection has
   * completed successfully.
   * This annotation provides the structural hierarchy for the OCR detected
   * text.
   * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; } public static final int SAFE_SEARCH_ANNOTATION_FIELD_NUMBER = 6; private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; /** * * *
   * If present, safe-search annotation has completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; * * @return Whether the safeSearchAnnotation field is set. */ @java.lang.Override public boolean hasSafeSearchAnnotation() { return ((bitField0_ & 0x00000002) != 0); } /** * * *
   * If present, safe-search annotation has completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; * * @return The safeSearchAnnotation. */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation() { return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; } /** * * *
   * If present, safe-search annotation has completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; } public static final int IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER = 8; private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; /** * * *
   * If present, image properties were extracted successfully.
   * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; * * @return Whether the imagePropertiesAnnotation field is set. */ @java.lang.Override public boolean hasImagePropertiesAnnotation() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
   * If present, image properties were extracted successfully.
   * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; * * @return The imagePropertiesAnnotation. */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation() { return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; } /** * * *
   * If present, image properties were extracted successfully.
   * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; } public static final int CROP_HINTS_ANNOTATION_FIELD_NUMBER = 11; private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; /** * * *
   * If present, crop hints have completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; * * @return Whether the cropHintsAnnotation field is set. */ @java.lang.Override public boolean hasCropHintsAnnotation() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
   * If present, crop hints have completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; * * @return The cropHintsAnnotation. */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation() { return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; } /** * * *
   * If present, crop hints have completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; } public static final int WEB_DETECTION_FIELD_NUMBER = 13; private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; /** * * *
   * If present, web detection has completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; * * @return Whether the webDetection field is set. */ @java.lang.Override public boolean hasWebDetection() { return ((bitField0_ & 0x00000010) != 0); } /** * * *
   * If present, web detection has completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; * * @return The webDetection. */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection() { return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; } /** * * *
   * If present, web detection has completed successfully.
   * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ @java.lang.Override public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; } public static final int ERROR_FIELD_NUMBER = 9; private com.google.rpc.Status error_; /** * * *
   * If set, represents the error message for the operation.
   * Note that filled-in image annotations are guaranteed to be
   * correct, even when `error` is set.
   * 
* * .google.rpc.Status error = 9; * * @return Whether the error field is set. */ @java.lang.Override public boolean hasError() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
   * If set, represents the error message for the operation.
   * Note that filled-in image annotations are guaranteed to be
   * correct, even when `error` is set.
   * 
* * .google.rpc.Status error = 9; * * @return The error. */ @java.lang.Override public com.google.rpc.Status getError() { return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; } /** * * *
   * If set, represents the error message for the operation.
   * Note that filled-in image annotations are guaranteed to be
   * correct, even when `error` is set.
   * 
* * .google.rpc.Status error = 9; */ @java.lang.Override public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; } 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 < faceAnnotations_.size(); i++) { output.writeMessage(1, faceAnnotations_.get(i)); } for (int i = 0; i < landmarkAnnotations_.size(); i++) { output.writeMessage(2, landmarkAnnotations_.get(i)); } for (int i = 0; i < logoAnnotations_.size(); i++) { output.writeMessage(3, logoAnnotations_.get(i)); } for (int i = 0; i < labelAnnotations_.size(); i++) { output.writeMessage(4, labelAnnotations_.get(i)); } for (int i = 0; i < textAnnotations_.size(); i++) { output.writeMessage(5, textAnnotations_.get(i)); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getSafeSearchAnnotation()); } if (((bitField0_ & 0x00000004) != 0)) { output.writeMessage(8, getImagePropertiesAnnotation()); } if (((bitField0_ & 0x00000020) != 0)) { output.writeMessage(9, getError()); } if (((bitField0_ & 0x00000008) != 0)) { output.writeMessage(11, getCropHintsAnnotation()); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(12, getFullTextAnnotation()); } if (((bitField0_ & 0x00000010) != 0)) { output.writeMessage(13, getWebDetection()); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; for (int i = 0; i < faceAnnotations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, faceAnnotations_.get(i)); } for (int i = 0; i < landmarkAnnotations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, landmarkAnnotations_.get(i)); } for (int i = 0; i < logoAnnotations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, logoAnnotations_.get(i)); } for (int i = 0; i < labelAnnotations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, labelAnnotations_.get(i)); } for (int i = 0; i < textAnnotations_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, textAnnotations_.get(i)); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getSafeSearchAnnotation()); } if (((bitField0_ & 0x00000004) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 8, getImagePropertiesAnnotation()); } if (((bitField0_ & 0x00000020) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getError()); } if (((bitField0_ & 0x00000008) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getCropHintsAnnotation()); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getFullTextAnnotation()); } if (((bitField0_ & 0x00000010) != 0)) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, getWebDetection()); } size += getUnknownFields().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.v1p1beta1.AnnotateImageResponse)) { return super.equals(obj); } com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other = (com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) obj; if (!getFaceAnnotationsList().equals(other.getFaceAnnotationsList())) return false; if (!getLandmarkAnnotationsList().equals(other.getLandmarkAnnotationsList())) return false; if (!getLogoAnnotationsList().equals(other.getLogoAnnotationsList())) return false; if (!getLabelAnnotationsList().equals(other.getLabelAnnotationsList())) return false; if (!getTextAnnotationsList().equals(other.getTextAnnotationsList())) return false; if (hasFullTextAnnotation() != other.hasFullTextAnnotation()) return false; if (hasFullTextAnnotation()) { if (!getFullTextAnnotation().equals(other.getFullTextAnnotation())) return false; } if (hasSafeSearchAnnotation() != other.hasSafeSearchAnnotation()) return false; if (hasSafeSearchAnnotation()) { if (!getSafeSearchAnnotation().equals(other.getSafeSearchAnnotation())) return false; } if (hasImagePropertiesAnnotation() != other.hasImagePropertiesAnnotation()) return false; if (hasImagePropertiesAnnotation()) { if (!getImagePropertiesAnnotation().equals(other.getImagePropertiesAnnotation())) return false; } if (hasCropHintsAnnotation() != other.hasCropHintsAnnotation()) return false; if (hasCropHintsAnnotation()) { if (!getCropHintsAnnotation().equals(other.getCropHintsAnnotation())) return false; } if (hasWebDetection() != other.hasWebDetection()) return false; if (hasWebDetection()) { if (!getWebDetection().equals(other.getWebDetection())) return false; } if (hasError() != other.hasError()) return false; if (hasError()) { if (!getError().equals(other.getError())) return false; } if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @java.lang.Override public int hashCode() { if (memoizedHashCode != 0) { return memoizedHashCode; } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); if (getFaceAnnotationsCount() > 0) { hash = (37 * hash) + FACE_ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + getFaceAnnotationsList().hashCode(); } if (getLandmarkAnnotationsCount() > 0) { hash = (37 * hash) + LANDMARK_ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + getLandmarkAnnotationsList().hashCode(); } if (getLogoAnnotationsCount() > 0) { hash = (37 * hash) + LOGO_ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + getLogoAnnotationsList().hashCode(); } if (getLabelAnnotationsCount() > 0) { hash = (37 * hash) + LABEL_ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + getLabelAnnotationsList().hashCode(); } if (getTextAnnotationsCount() > 0) { hash = (37 * hash) + TEXT_ANNOTATIONS_FIELD_NUMBER; hash = (53 * hash) + getTextAnnotationsList().hashCode(); } if (hasFullTextAnnotation()) { hash = (37 * hash) + FULL_TEXT_ANNOTATION_FIELD_NUMBER; hash = (53 * hash) + getFullTextAnnotation().hashCode(); } if (hasSafeSearchAnnotation()) { hash = (37 * hash) + SAFE_SEARCH_ANNOTATION_FIELD_NUMBER; hash = (53 * hash) + getSafeSearchAnnotation().hashCode(); } if (hasImagePropertiesAnnotation()) { hash = (37 * hash) + IMAGE_PROPERTIES_ANNOTATION_FIELD_NUMBER; hash = (53 * hash) + getImagePropertiesAnnotation().hashCode(); } if (hasCropHintsAnnotation()) { hash = (37 * hash) + CROP_HINTS_ANNOTATION_FIELD_NUMBER; hash = (53 * hash) + getCropHintsAnnotation().hashCode(); } if (hasWebDetection()) { hash = (37 * hash) + WEB_DETECTION_FIELD_NUMBER; hash = (53 * hash) + getWebDetection().hashCode(); } if (hasError()) { hash = (37 * hash) + ERROR_FIELD_NUMBER; hash = (53 * hash) + getError().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse 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.v1p1beta1.AnnotateImageResponse parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse 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.v1p1beta1.AnnotateImageResponse parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse 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.v1p1beta1.AnnotateImageResponse parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse 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.v1p1beta1.AnnotateImageResponse parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse 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.v1p1beta1.AnnotateImageResponse 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; } /** * * *
   * Response to an image annotation request.
   * 
* * Protobuf type {@code google.cloud.vision.v1p1beta1.AnnotateImageResponse} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p1beta1.AnnotateImageResponse) com.google.cloud.vision.v1p1beta1.AnnotateImageResponseOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.class, com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.Builder.class); } // Construct using com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { getFaceAnnotationsFieldBuilder(); getLandmarkAnnotationsFieldBuilder(); getLogoAnnotationsFieldBuilder(); getLabelAnnotationsFieldBuilder(); getTextAnnotationsFieldBuilder(); getFullTextAnnotationFieldBuilder(); getSafeSearchAnnotationFieldBuilder(); getImagePropertiesAnnotationFieldBuilder(); getCropHintsAnnotationFieldBuilder(); getWebDetectionFieldBuilder(); getErrorFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (faceAnnotationsBuilder_ == null) { faceAnnotations_ = java.util.Collections.emptyList(); } else { faceAnnotations_ = null; faceAnnotationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000001); if (landmarkAnnotationsBuilder_ == null) { landmarkAnnotations_ = java.util.Collections.emptyList(); } else { landmarkAnnotations_ = null; landmarkAnnotationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000002); if (logoAnnotationsBuilder_ == null) { logoAnnotations_ = java.util.Collections.emptyList(); } else { logoAnnotations_ = null; logoAnnotationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000004); if (labelAnnotationsBuilder_ == null) { labelAnnotations_ = java.util.Collections.emptyList(); } else { labelAnnotations_ = null; labelAnnotationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000008); if (textAnnotationsBuilder_ == null) { textAnnotations_ = java.util.Collections.emptyList(); } else { textAnnotations_ = null; textAnnotationsBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000010); fullTextAnnotation_ = null; if (fullTextAnnotationBuilder_ != null) { fullTextAnnotationBuilder_.dispose(); fullTextAnnotationBuilder_ = null; } safeSearchAnnotation_ = null; if (safeSearchAnnotationBuilder_ != null) { safeSearchAnnotationBuilder_.dispose(); safeSearchAnnotationBuilder_ = null; } imagePropertiesAnnotation_ = null; if (imagePropertiesAnnotationBuilder_ != null) { imagePropertiesAnnotationBuilder_.dispose(); imagePropertiesAnnotationBuilder_ = null; } cropHintsAnnotation_ = null; if (cropHintsAnnotationBuilder_ != null) { cropHintsAnnotationBuilder_.dispose(); cropHintsAnnotationBuilder_ = null; } webDetection_ = null; if (webDetectionBuilder_ != null) { webDetectionBuilder_.dispose(); webDetectionBuilder_ = null; } error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); errorBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.vision.v1p1beta1.ImageAnnotatorProto .internal_static_google_cloud_vision_v1p1beta1_AnnotateImageResponse_descriptor; } @java.lang.Override public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstanceForType() { return com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance(); } @java.lang.Override public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse build() { com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.vision.v1p1beta1.AnnotateImageResponse buildPartial() { com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result = new com.google.cloud.vision.v1p1beta1.AnnotateImageResponse(this); buildPartialRepeatedFields(result); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartialRepeatedFields( com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result) { if (faceAnnotationsBuilder_ == null) { if (((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = java.util.Collections.unmodifiableList(faceAnnotations_); bitField0_ = (bitField0_ & ~0x00000001); } result.faceAnnotations_ = faceAnnotations_; } else { result.faceAnnotations_ = faceAnnotationsBuilder_.build(); } if (landmarkAnnotationsBuilder_ == null) { if (((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = java.util.Collections.unmodifiableList(landmarkAnnotations_); bitField0_ = (bitField0_ & ~0x00000002); } result.landmarkAnnotations_ = landmarkAnnotations_; } else { result.landmarkAnnotations_ = landmarkAnnotationsBuilder_.build(); } if (logoAnnotationsBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = java.util.Collections.unmodifiableList(logoAnnotations_); bitField0_ = (bitField0_ & ~0x00000004); } result.logoAnnotations_ = logoAnnotations_; } else { result.logoAnnotations_ = logoAnnotationsBuilder_.build(); } if (labelAnnotationsBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = java.util.Collections.unmodifiableList(labelAnnotations_); bitField0_ = (bitField0_ & ~0x00000008); } result.labelAnnotations_ = labelAnnotations_; } else { result.labelAnnotations_ = labelAnnotationsBuilder_.build(); } if (textAnnotationsBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0)) { textAnnotations_ = java.util.Collections.unmodifiableList(textAnnotations_); bitField0_ = (bitField0_ & ~0x00000010); } result.textAnnotations_ = textAnnotations_; } else { result.textAnnotations_ = textAnnotationsBuilder_.build(); } } private void buildPartial0(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse result) { int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000020) != 0)) { result.fullTextAnnotation_ = fullTextAnnotationBuilder_ == null ? fullTextAnnotation_ : fullTextAnnotationBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000040) != 0)) { result.safeSearchAnnotation_ = safeSearchAnnotationBuilder_ == null ? safeSearchAnnotation_ : safeSearchAnnotationBuilder_.build(); to_bitField0_ |= 0x00000002; } if (((from_bitField0_ & 0x00000080) != 0)) { result.imagePropertiesAnnotation_ = imagePropertiesAnnotationBuilder_ == null ? imagePropertiesAnnotation_ : imagePropertiesAnnotationBuilder_.build(); to_bitField0_ |= 0x00000004; } if (((from_bitField0_ & 0x00000100) != 0)) { result.cropHintsAnnotation_ = cropHintsAnnotationBuilder_ == null ? cropHintsAnnotation_ : cropHintsAnnotationBuilder_.build(); to_bitField0_ |= 0x00000008; } if (((from_bitField0_ & 0x00000200) != 0)) { result.webDetection_ = webDetectionBuilder_ == null ? webDetection_ : webDetectionBuilder_.build(); to_bitField0_ |= 0x00000010; } if (((from_bitField0_ & 0x00000400) != 0)) { result.error_ = errorBuilder_ == null ? error_ : errorBuilder_.build(); to_bitField0_ |= 0x00000020; } result.bitField0_ |= to_bitField0_; } @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.v1p1beta1.AnnotateImageResponse) { return mergeFrom((com.google.cloud.vision.v1p1beta1.AnnotateImageResponse) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.vision.v1p1beta1.AnnotateImageResponse other) { if (other == com.google.cloud.vision.v1p1beta1.AnnotateImageResponse.getDefaultInstance()) return this; if (faceAnnotationsBuilder_ == null) { if (!other.faceAnnotations_.isEmpty()) { if (faceAnnotations_.isEmpty()) { faceAnnotations_ = other.faceAnnotations_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureFaceAnnotationsIsMutable(); faceAnnotations_.addAll(other.faceAnnotations_); } onChanged(); } } else { if (!other.faceAnnotations_.isEmpty()) { if (faceAnnotationsBuilder_.isEmpty()) { faceAnnotationsBuilder_.dispose(); faceAnnotationsBuilder_ = null; faceAnnotations_ = other.faceAnnotations_; bitField0_ = (bitField0_ & ~0x00000001); faceAnnotationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getFaceAnnotationsFieldBuilder() : null; } else { faceAnnotationsBuilder_.addAllMessages(other.faceAnnotations_); } } } if (landmarkAnnotationsBuilder_ == null) { if (!other.landmarkAnnotations_.isEmpty()) { if (landmarkAnnotations_.isEmpty()) { landmarkAnnotations_ = other.landmarkAnnotations_; bitField0_ = (bitField0_ & ~0x00000002); } else { ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.addAll(other.landmarkAnnotations_); } onChanged(); } } else { if (!other.landmarkAnnotations_.isEmpty()) { if (landmarkAnnotationsBuilder_.isEmpty()) { landmarkAnnotationsBuilder_.dispose(); landmarkAnnotationsBuilder_ = null; landmarkAnnotations_ = other.landmarkAnnotations_; bitField0_ = (bitField0_ & ~0x00000002); landmarkAnnotationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLandmarkAnnotationsFieldBuilder() : null; } else { landmarkAnnotationsBuilder_.addAllMessages(other.landmarkAnnotations_); } } } if (logoAnnotationsBuilder_ == null) { if (!other.logoAnnotations_.isEmpty()) { if (logoAnnotations_.isEmpty()) { logoAnnotations_ = other.logoAnnotations_; bitField0_ = (bitField0_ & ~0x00000004); } else { ensureLogoAnnotationsIsMutable(); logoAnnotations_.addAll(other.logoAnnotations_); } onChanged(); } } else { if (!other.logoAnnotations_.isEmpty()) { if (logoAnnotationsBuilder_.isEmpty()) { logoAnnotationsBuilder_.dispose(); logoAnnotationsBuilder_ = null; logoAnnotations_ = other.logoAnnotations_; bitField0_ = (bitField0_ & ~0x00000004); logoAnnotationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLogoAnnotationsFieldBuilder() : null; } else { logoAnnotationsBuilder_.addAllMessages(other.logoAnnotations_); } } } if (labelAnnotationsBuilder_ == null) { if (!other.labelAnnotations_.isEmpty()) { if (labelAnnotations_.isEmpty()) { labelAnnotations_ = other.labelAnnotations_; bitField0_ = (bitField0_ & ~0x00000008); } else { ensureLabelAnnotationsIsMutable(); labelAnnotations_.addAll(other.labelAnnotations_); } onChanged(); } } else { if (!other.labelAnnotations_.isEmpty()) { if (labelAnnotationsBuilder_.isEmpty()) { labelAnnotationsBuilder_.dispose(); labelAnnotationsBuilder_ = null; labelAnnotations_ = other.labelAnnotations_; bitField0_ = (bitField0_ & ~0x00000008); labelAnnotationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLabelAnnotationsFieldBuilder() : null; } else { labelAnnotationsBuilder_.addAllMessages(other.labelAnnotations_); } } } if (textAnnotationsBuilder_ == null) { if (!other.textAnnotations_.isEmpty()) { if (textAnnotations_.isEmpty()) { textAnnotations_ = other.textAnnotations_; bitField0_ = (bitField0_ & ~0x00000010); } else { ensureTextAnnotationsIsMutable(); textAnnotations_.addAll(other.textAnnotations_); } onChanged(); } } else { if (!other.textAnnotations_.isEmpty()) { if (textAnnotationsBuilder_.isEmpty()) { textAnnotationsBuilder_.dispose(); textAnnotationsBuilder_ = null; textAnnotations_ = other.textAnnotations_; bitField0_ = (bitField0_ & ~0x00000010); textAnnotationsBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getTextAnnotationsFieldBuilder() : null; } else { textAnnotationsBuilder_.addAllMessages(other.textAnnotations_); } } } if (other.hasFullTextAnnotation()) { mergeFullTextAnnotation(other.getFullTextAnnotation()); } if (other.hasSafeSearchAnnotation()) { mergeSafeSearchAnnotation(other.getSafeSearchAnnotation()); } if (other.hasImagePropertiesAnnotation()) { mergeImagePropertiesAnnotation(other.getImagePropertiesAnnotation()); } if (other.hasCropHintsAnnotation()) { mergeCropHintsAnnotation(other.getCropHintsAnnotation()); } if (other.hasWebDetection()) { mergeWebDetection(other.getWebDetection()); } if (other.hasError()) { mergeError(other.getError()); } this.mergeUnknownFields(other.getUnknownFields()); 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 { if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } try { boolean done = false; while (!done) { int tag = input.readTag(); switch (tag) { case 0: done = true; break; case 10: { com.google.cloud.vision.v1p1beta1.FaceAnnotation m = input.readMessage( com.google.cloud.vision.v1p1beta1.FaceAnnotation.parser(), extensionRegistry); if (faceAnnotationsBuilder_ == null) { ensureFaceAnnotationsIsMutable(); faceAnnotations_.add(m); } else { faceAnnotationsBuilder_.addMessage(m); } break; } // case 10 case 18: { com.google.cloud.vision.v1p1beta1.EntityAnnotation m = input.readMessage( com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry); if (landmarkAnnotationsBuilder_ == null) { ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.add(m); } else { landmarkAnnotationsBuilder_.addMessage(m); } break; } // case 18 case 26: { com.google.cloud.vision.v1p1beta1.EntityAnnotation m = input.readMessage( com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry); if (logoAnnotationsBuilder_ == null) { ensureLogoAnnotationsIsMutable(); logoAnnotations_.add(m); } else { logoAnnotationsBuilder_.addMessage(m); } break; } // case 26 case 34: { com.google.cloud.vision.v1p1beta1.EntityAnnotation m = input.readMessage( com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry); if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(m); } else { labelAnnotationsBuilder_.addMessage(m); } break; } // case 34 case 42: { com.google.cloud.vision.v1p1beta1.EntityAnnotation m = input.readMessage( com.google.cloud.vision.v1p1beta1.EntityAnnotation.parser(), extensionRegistry); if (textAnnotationsBuilder_ == null) { ensureTextAnnotationsIsMutable(); textAnnotations_.add(m); } else { textAnnotationsBuilder_.addMessage(m); } break; } // case 42 case 50: { input.readMessage( getSafeSearchAnnotationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000040; break; } // case 50 case 66: { input.readMessage( getImagePropertiesAnnotationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000080; break; } // case 66 case 74: { input.readMessage(getErrorFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000400; break; } // case 74 case 90: { input.readMessage( getCropHintsAnnotationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000100; break; } // case 90 case 98: { input.readMessage( getFullTextAnnotationFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 98 case 106: { input.readMessage(getWebDetectionFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000200; break; } // case 106 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { done = true; // was an endgroup tag } break; } // default: } // switch (tag) } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.unwrapIOException(); } finally { onChanged(); } // finally return this; } private int bitField0_; private java.util.List faceAnnotations_ = java.util.Collections.emptyList(); private void ensureFaceAnnotationsIsMutable() { if (!((bitField0_ & 0x00000001) != 0)) { faceAnnotations_ = new java.util.ArrayList( faceAnnotations_); bitField0_ |= 0x00000001; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder> faceAnnotationsBuilder_; /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public java.util.List getFaceAnnotationsList() { if (faceAnnotationsBuilder_ == null) { return java.util.Collections.unmodifiableList(faceAnnotations_); } else { return faceAnnotationsBuilder_.getMessageList(); } } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public int getFaceAnnotationsCount() { if (faceAnnotationsBuilder_ == null) { return faceAnnotations_.size(); } else { return faceAnnotationsBuilder_.getCount(); } } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public com.google.cloud.vision.v1p1beta1.FaceAnnotation getFaceAnnotations(int index) { if (faceAnnotationsBuilder_ == null) { return faceAnnotations_.get(index); } else { return faceAnnotationsBuilder_.getMessage(index); } } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder setFaceAnnotations( int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { if (faceAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFaceAnnotationsIsMutable(); faceAnnotations_.set(index, value); onChanged(); } else { faceAnnotationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder setFaceAnnotations( int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { if (faceAnnotationsBuilder_ == null) { ensureFaceAnnotationsIsMutable(); faceAnnotations_.set(index, builderForValue.build()); onChanged(); } else { faceAnnotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder addFaceAnnotations(com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { if (faceAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFaceAnnotationsIsMutable(); faceAnnotations_.add(value); onChanged(); } else { faceAnnotationsBuilder_.addMessage(value); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder addFaceAnnotations( int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation value) { if (faceAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureFaceAnnotationsIsMutable(); faceAnnotations_.add(index, value); onChanged(); } else { faceAnnotationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder addFaceAnnotations( com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { if (faceAnnotationsBuilder_ == null) { ensureFaceAnnotationsIsMutable(); faceAnnotations_.add(builderForValue.build()); onChanged(); } else { faceAnnotationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder addFaceAnnotations( int index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder builderForValue) { if (faceAnnotationsBuilder_ == null) { ensureFaceAnnotationsIsMutable(); faceAnnotations_.add(index, builderForValue.build()); onChanged(); } else { faceAnnotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder addAllFaceAnnotations( java.lang.Iterable values) { if (faceAnnotationsBuilder_ == null) { ensureFaceAnnotationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, faceAnnotations_); onChanged(); } else { faceAnnotationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder clearFaceAnnotations() { if (faceAnnotationsBuilder_ == null) { faceAnnotations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); } else { faceAnnotationsBuilder_.clear(); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public Builder removeFaceAnnotations(int index) { if (faceAnnotationsBuilder_ == null) { ensureFaceAnnotationsIsMutable(); faceAnnotations_.remove(index); onChanged(); } else { faceAnnotationsBuilder_.remove(index); } return this; } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder getFaceAnnotationsBuilder( int index) { return getFaceAnnotationsFieldBuilder().getBuilder(index); } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder getFaceAnnotationsOrBuilder( int index) { if (faceAnnotationsBuilder_ == null) { return faceAnnotations_.get(index); } else { return faceAnnotationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public java.util.List getFaceAnnotationsOrBuilderList() { if (faceAnnotationsBuilder_ != null) { return faceAnnotationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(faceAnnotations_); } } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder() { return getFaceAnnotationsFieldBuilder() .addBuilder(com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()); } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder addFaceAnnotationsBuilder( int index) { return getFaceAnnotationsFieldBuilder() .addBuilder(index, com.google.cloud.vision.v1p1beta1.FaceAnnotation.getDefaultInstance()); } /** * * *
     * If present, face detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.FaceAnnotation face_annotations = 1; */ public java.util.List getFaceAnnotationsBuilderList() { return getFaceAnnotationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder> getFaceAnnotationsFieldBuilder() { if (faceAnnotationsBuilder_ == null) { faceAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.FaceAnnotation, com.google.cloud.vision.v1p1beta1.FaceAnnotation.Builder, com.google.cloud.vision.v1p1beta1.FaceAnnotationOrBuilder>( faceAnnotations_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); faceAnnotations_ = null; } return faceAnnotationsBuilder_; } private java.util.List landmarkAnnotations_ = java.util.Collections.emptyList(); private void ensureLandmarkAnnotationsIsMutable() { if (!((bitField0_ & 0x00000002) != 0)) { landmarkAnnotations_ = new java.util.ArrayList( landmarkAnnotations_); bitField0_ |= 0x00000002; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> landmarkAnnotationsBuilder_; /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public java.util.List getLandmarkAnnotationsList() { if (landmarkAnnotationsBuilder_ == null) { return java.util.Collections.unmodifiableList(landmarkAnnotations_); } else { return landmarkAnnotationsBuilder_.getMessageList(); } } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public int getLandmarkAnnotationsCount() { if (landmarkAnnotationsBuilder_ == null) { return landmarkAnnotations_.size(); } else { return landmarkAnnotationsBuilder_.getCount(); } } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLandmarkAnnotations(int index) { if (landmarkAnnotationsBuilder_ == null) { return landmarkAnnotations_.get(index); } else { return landmarkAnnotationsBuilder_.getMessage(index); } } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder setLandmarkAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (landmarkAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.set(index, value); onChanged(); } else { landmarkAnnotationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder setLandmarkAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (landmarkAnnotationsBuilder_ == null) { ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.set(index, builderForValue.build()); onChanged(); } else { landmarkAnnotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder addLandmarkAnnotations( com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (landmarkAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.add(value); onChanged(); } else { landmarkAnnotationsBuilder_.addMessage(value); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder addLandmarkAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (landmarkAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.add(index, value); onChanged(); } else { landmarkAnnotationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder addLandmarkAnnotations( com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (landmarkAnnotationsBuilder_ == null) { ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.add(builderForValue.build()); onChanged(); } else { landmarkAnnotationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder addLandmarkAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (landmarkAnnotationsBuilder_ == null) { ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.add(index, builderForValue.build()); onChanged(); } else { landmarkAnnotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder addAllLandmarkAnnotations( java.lang.Iterable values) { if (landmarkAnnotationsBuilder_ == null) { ensureLandmarkAnnotationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, landmarkAnnotations_); onChanged(); } else { landmarkAnnotationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder clearLandmarkAnnotations() { if (landmarkAnnotationsBuilder_ == null) { landmarkAnnotations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); } else { landmarkAnnotationsBuilder_.clear(); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public Builder removeLandmarkAnnotations(int index) { if (landmarkAnnotationsBuilder_ == null) { ensureLandmarkAnnotationsIsMutable(); landmarkAnnotations_.remove(index); onChanged(); } else { landmarkAnnotationsBuilder_.remove(index); } return this; } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLandmarkAnnotationsBuilder( int index) { return getLandmarkAnnotationsFieldBuilder().getBuilder(index); } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLandmarkAnnotationsOrBuilder(int index) { if (landmarkAnnotationsBuilder_ == null) { return landmarkAnnotations_.get(index); } else { return landmarkAnnotationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public java.util.List getLandmarkAnnotationsOrBuilderList() { if (landmarkAnnotationsBuilder_ != null) { return landmarkAnnotationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(landmarkAnnotations_); } } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder() { return getLandmarkAnnotationsFieldBuilder() .addBuilder(com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLandmarkAnnotationsBuilder( int index) { return getLandmarkAnnotationsFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, landmark detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation landmark_annotations = 2; * */ public java.util.List getLandmarkAnnotationsBuilderList() { return getLandmarkAnnotationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> getLandmarkAnnotationsFieldBuilder() { if (landmarkAnnotationsBuilder_ == null) { landmarkAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( landmarkAnnotations_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); landmarkAnnotations_ = null; } return landmarkAnnotationsBuilder_; } private java.util.List logoAnnotations_ = java.util.Collections.emptyList(); private void ensureLogoAnnotationsIsMutable() { if (!((bitField0_ & 0x00000004) != 0)) { logoAnnotations_ = new java.util.ArrayList( logoAnnotations_); bitField0_ |= 0x00000004; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> logoAnnotationsBuilder_; /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public java.util.List getLogoAnnotationsList() { if (logoAnnotationsBuilder_ == null) { return java.util.Collections.unmodifiableList(logoAnnotations_); } else { return logoAnnotationsBuilder_.getMessageList(); } } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public int getLogoAnnotationsCount() { if (logoAnnotationsBuilder_ == null) { return logoAnnotations_.size(); } else { return logoAnnotationsBuilder_.getCount(); } } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLogoAnnotations(int index) { if (logoAnnotationsBuilder_ == null) { return logoAnnotations_.get(index); } else { return logoAnnotationsBuilder_.getMessage(index); } } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder setLogoAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (logoAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogoAnnotationsIsMutable(); logoAnnotations_.set(index, value); onChanged(); } else { logoAnnotationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder setLogoAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (logoAnnotationsBuilder_ == null) { ensureLogoAnnotationsIsMutable(); logoAnnotations_.set(index, builderForValue.build()); onChanged(); } else { logoAnnotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder addLogoAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (logoAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogoAnnotationsIsMutable(); logoAnnotations_.add(value); onChanged(); } else { logoAnnotationsBuilder_.addMessage(value); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder addLogoAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (logoAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogoAnnotationsIsMutable(); logoAnnotations_.add(index, value); onChanged(); } else { logoAnnotationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder addLogoAnnotations( com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (logoAnnotationsBuilder_ == null) { ensureLogoAnnotationsIsMutable(); logoAnnotations_.add(builderForValue.build()); onChanged(); } else { logoAnnotationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder addLogoAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (logoAnnotationsBuilder_ == null) { ensureLogoAnnotationsIsMutable(); logoAnnotations_.add(index, builderForValue.build()); onChanged(); } else { logoAnnotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder addAllLogoAnnotations( java.lang.Iterable values) { if (logoAnnotationsBuilder_ == null) { ensureLogoAnnotationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logoAnnotations_); onChanged(); } else { logoAnnotationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder clearLogoAnnotations() { if (logoAnnotationsBuilder_ == null) { logoAnnotations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000004); onChanged(); } else { logoAnnotationsBuilder_.clear(); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public Builder removeLogoAnnotations(int index) { if (logoAnnotationsBuilder_ == null) { ensureLogoAnnotationsIsMutable(); logoAnnotations_.remove(index); onChanged(); } else { logoAnnotationsBuilder_.remove(index); } return this; } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLogoAnnotationsBuilder( int index) { return getLogoAnnotationsFieldBuilder().getBuilder(index); } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLogoAnnotationsOrBuilder( int index) { if (logoAnnotationsBuilder_ == null) { return logoAnnotations_.get(index); } else { return logoAnnotationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public java.util.List getLogoAnnotationsOrBuilderList() { if (logoAnnotationsBuilder_ != null) { return logoAnnotationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(logoAnnotations_); } } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder() { return getLogoAnnotationsFieldBuilder() .addBuilder(com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLogoAnnotationsBuilder( int index) { return getLogoAnnotationsFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, logo detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation logo_annotations = 3; */ public java.util.List getLogoAnnotationsBuilderList() { return getLogoAnnotationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> getLogoAnnotationsFieldBuilder() { if (logoAnnotationsBuilder_ == null) { logoAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( logoAnnotations_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); logoAnnotations_ = null; } return logoAnnotationsBuilder_; } private java.util.List labelAnnotations_ = java.util.Collections.emptyList(); private void ensureLabelAnnotationsIsMutable() { if (!((bitField0_ & 0x00000008) != 0)) { labelAnnotations_ = new java.util.ArrayList( labelAnnotations_); bitField0_ |= 0x00000008; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> labelAnnotationsBuilder_; /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public java.util.List getLabelAnnotationsList() { if (labelAnnotationsBuilder_ == null) { return java.util.Collections.unmodifiableList(labelAnnotations_); } else { return labelAnnotationsBuilder_.getMessageList(); } } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public int getLabelAnnotationsCount() { if (labelAnnotationsBuilder_ == null) { return labelAnnotations_.size(); } else { return labelAnnotationsBuilder_.getCount(); } } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation getLabelAnnotations(int index) { if (labelAnnotationsBuilder_ == null) { return labelAnnotations_.get(index); } else { return labelAnnotationsBuilder_.getMessage(index); } } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder setLabelAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (labelAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelAnnotationsIsMutable(); labelAnnotations_.set(index, value); onChanged(); } else { labelAnnotationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder setLabelAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.set(index, builderForValue.build()); onChanged(); } else { labelAnnotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder addLabelAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (labelAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(value); onChanged(); } else { labelAnnotationsBuilder_.addMessage(value); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder addLabelAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (labelAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(index, value); onChanged(); } else { labelAnnotationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder addLabelAnnotations( com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(builderForValue.build()); onChanged(); } else { labelAnnotationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder addLabelAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.add(index, builderForValue.build()); onChanged(); } else { labelAnnotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder addAllLabelAnnotations( java.lang.Iterable values) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, labelAnnotations_); onChanged(); } else { labelAnnotationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder clearLabelAnnotations() { if (labelAnnotationsBuilder_ == null) { labelAnnotations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000008); onChanged(); } else { labelAnnotationsBuilder_.clear(); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public Builder removeLabelAnnotations(int index) { if (labelAnnotationsBuilder_ == null) { ensureLabelAnnotationsIsMutable(); labelAnnotations_.remove(index); onChanged(); } else { labelAnnotationsBuilder_.remove(index); } return this; } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getLabelAnnotationsBuilder( int index) { return getLabelAnnotationsFieldBuilder().getBuilder(index); } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getLabelAnnotationsOrBuilder( int index) { if (labelAnnotationsBuilder_ == null) { return labelAnnotations_.get(index); } else { return labelAnnotationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public java.util.List getLabelAnnotationsOrBuilderList() { if (labelAnnotationsBuilder_ != null) { return labelAnnotationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(labelAnnotations_); } } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder() { return getLabelAnnotationsFieldBuilder() .addBuilder(com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addLabelAnnotationsBuilder( int index) { return getLabelAnnotationsFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, label detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation label_annotations = 4; */ public java.util.List getLabelAnnotationsBuilderList() { return getLabelAnnotationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> getLabelAnnotationsFieldBuilder() { if (labelAnnotationsBuilder_ == null) { labelAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( labelAnnotations_, ((bitField0_ & 0x00000008) != 0), getParentForChildren(), isClean()); labelAnnotations_ = null; } return labelAnnotationsBuilder_; } private java.util.List textAnnotations_ = java.util.Collections.emptyList(); private void ensureTextAnnotationsIsMutable() { if (!((bitField0_ & 0x00000010) != 0)) { textAnnotations_ = new java.util.ArrayList( textAnnotations_); bitField0_ |= 0x00000010; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> textAnnotationsBuilder_; /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public java.util.List getTextAnnotationsList() { if (textAnnotationsBuilder_ == null) { return java.util.Collections.unmodifiableList(textAnnotations_); } else { return textAnnotationsBuilder_.getMessageList(); } } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public int getTextAnnotationsCount() { if (textAnnotationsBuilder_ == null) { return textAnnotations_.size(); } else { return textAnnotationsBuilder_.getCount(); } } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation getTextAnnotations(int index) { if (textAnnotationsBuilder_ == null) { return textAnnotations_.get(index); } else { return textAnnotationsBuilder_.getMessage(index); } } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder setTextAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (textAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTextAnnotationsIsMutable(); textAnnotations_.set(index, value); onChanged(); } else { textAnnotationsBuilder_.setMessage(index, value); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder setTextAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (textAnnotationsBuilder_ == null) { ensureTextAnnotationsIsMutable(); textAnnotations_.set(index, builderForValue.build()); onChanged(); } else { textAnnotationsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder addTextAnnotations(com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (textAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTextAnnotationsIsMutable(); textAnnotations_.add(value); onChanged(); } else { textAnnotationsBuilder_.addMessage(value); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder addTextAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation value) { if (textAnnotationsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureTextAnnotationsIsMutable(); textAnnotations_.add(index, value); onChanged(); } else { textAnnotationsBuilder_.addMessage(index, value); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder addTextAnnotations( com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (textAnnotationsBuilder_ == null) { ensureTextAnnotationsIsMutable(); textAnnotations_.add(builderForValue.build()); onChanged(); } else { textAnnotationsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder addTextAnnotations( int index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder builderForValue) { if (textAnnotationsBuilder_ == null) { ensureTextAnnotationsIsMutable(); textAnnotations_.add(index, builderForValue.build()); onChanged(); } else { textAnnotationsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder addAllTextAnnotations( java.lang.Iterable values) { if (textAnnotationsBuilder_ == null) { ensureTextAnnotationsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, textAnnotations_); onChanged(); } else { textAnnotationsBuilder_.addAllMessages(values); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder clearTextAnnotations() { if (textAnnotationsBuilder_ == null) { textAnnotations_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); } else { textAnnotationsBuilder_.clear(); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public Builder removeTextAnnotations(int index) { if (textAnnotationsBuilder_ == null) { ensureTextAnnotationsIsMutable(); textAnnotations_.remove(index); onChanged(); } else { textAnnotationsBuilder_.remove(index); } return this; } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder getTextAnnotationsBuilder( int index) { return getTextAnnotationsFieldBuilder().getBuilder(index); } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder getTextAnnotationsOrBuilder( int index) { if (textAnnotationsBuilder_ == null) { return textAnnotations_.get(index); } else { return textAnnotationsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public java.util.List getTextAnnotationsOrBuilderList() { if (textAnnotationsBuilder_ != null) { return textAnnotationsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(textAnnotations_); } } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotationsBuilder() { return getTextAnnotationsFieldBuilder() .addBuilder(com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder addTextAnnotationsBuilder( int index) { return getTextAnnotationsFieldBuilder() .addBuilder( index, com.google.cloud.vision.v1p1beta1.EntityAnnotation.getDefaultInstance()); } /** * * *
     * If present, text (OCR) detection has completed successfully.
     * 
* * repeated .google.cloud.vision.v1p1beta1.EntityAnnotation text_annotations = 5; */ public java.util.List getTextAnnotationsBuilderList() { return getTextAnnotationsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder> getTextAnnotationsFieldBuilder() { if (textAnnotationsBuilder_ == null) { textAnnotationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.vision.v1p1beta1.EntityAnnotation, com.google.cloud.vision.v1p1beta1.EntityAnnotation.Builder, com.google.cloud.vision.v1p1beta1.EntityAnnotationOrBuilder>( textAnnotations_, ((bitField0_ & 0x00000010) != 0), getParentForChildren(), isClean()); textAnnotations_ = null; } return textAnnotationsBuilder_; } private com.google.cloud.vision.v1p1beta1.TextAnnotation fullTextAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder> fullTextAnnotationBuilder_; /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; * * @return Whether the fullTextAnnotation field is set. */ public boolean hasFullTextAnnotation() { return ((bitField0_ & 0x00000020) != 0); } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; * * @return The fullTextAnnotation. */ public com.google.cloud.vision.v1p1beta1.TextAnnotation getFullTextAnnotation() { if (fullTextAnnotationBuilder_ == null) { return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; } else { return fullTextAnnotationBuilder_.getMessage(); } } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ public Builder setFullTextAnnotation(com.google.cloud.vision.v1p1beta1.TextAnnotation value) { if (fullTextAnnotationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fullTextAnnotation_ = value; } else { fullTextAnnotationBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ public Builder setFullTextAnnotation( com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder builderForValue) { if (fullTextAnnotationBuilder_ == null) { fullTextAnnotation_ = builderForValue.build(); } else { fullTextAnnotationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ public Builder mergeFullTextAnnotation(com.google.cloud.vision.v1p1beta1.TextAnnotation value) { if (fullTextAnnotationBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && fullTextAnnotation_ != null && fullTextAnnotation_ != com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance()) { getFullTextAnnotationBuilder().mergeFrom(value); } else { fullTextAnnotation_ = value; } } else { fullTextAnnotationBuilder_.mergeFrom(value); } if (fullTextAnnotation_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ public Builder clearFullTextAnnotation() { bitField0_ = (bitField0_ & ~0x00000020); fullTextAnnotation_ = null; if (fullTextAnnotationBuilder_ != null) { fullTextAnnotationBuilder_.dispose(); fullTextAnnotationBuilder_ = null; } onChanged(); return this; } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ public com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder getFullTextAnnotationBuilder() { bitField0_ |= 0x00000020; onChanged(); return getFullTextAnnotationFieldBuilder().getBuilder(); } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ public com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder getFullTextAnnotationOrBuilder() { if (fullTextAnnotationBuilder_ != null) { return fullTextAnnotationBuilder_.getMessageOrBuilder(); } else { return fullTextAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.TextAnnotation.getDefaultInstance() : fullTextAnnotation_; } } /** * * *
     * If present, text (OCR) detection or document (OCR) text detection has
     * completed successfully.
     * This annotation provides the structural hierarchy for the OCR detected
     * text.
     * 
* * .google.cloud.vision.v1p1beta1.TextAnnotation full_text_annotation = 12; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder> getFullTextAnnotationFieldBuilder() { if (fullTextAnnotationBuilder_ == null) { fullTextAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.TextAnnotation, com.google.cloud.vision.v1p1beta1.TextAnnotation.Builder, com.google.cloud.vision.v1p1beta1.TextAnnotationOrBuilder>( getFullTextAnnotation(), getParentForChildren(), isClean()); fullTextAnnotation_ = null; } return fullTextAnnotationBuilder_; } private com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation safeSearchAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder> safeSearchAnnotationBuilder_; /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; * * @return Whether the safeSearchAnnotation field is set. */ public boolean hasSafeSearchAnnotation() { return ((bitField0_ & 0x00000040) != 0); } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; * * @return The safeSearchAnnotation. */ public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation getSafeSearchAnnotation() { if (safeSearchAnnotationBuilder_ == null) { return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; } else { return safeSearchAnnotationBuilder_.getMessage(); } } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ public Builder setSafeSearchAnnotation( com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation value) { if (safeSearchAnnotationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } safeSearchAnnotation_ = value; } else { safeSearchAnnotationBuilder_.setMessage(value); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ public Builder setSafeSearchAnnotation( com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder builderForValue) { if (safeSearchAnnotationBuilder_ == null) { safeSearchAnnotation_ = builderForValue.build(); } else { safeSearchAnnotationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ public Builder mergeSafeSearchAnnotation( com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation value) { if (safeSearchAnnotationBuilder_ == null) { if (((bitField0_ & 0x00000040) != 0) && safeSearchAnnotation_ != null && safeSearchAnnotation_ != com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance()) { getSafeSearchAnnotationBuilder().mergeFrom(value); } else { safeSearchAnnotation_ = value; } } else { safeSearchAnnotationBuilder_.mergeFrom(value); } if (safeSearchAnnotation_ != null) { bitField0_ |= 0x00000040; onChanged(); } return this; } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ public Builder clearSafeSearchAnnotation() { bitField0_ = (bitField0_ & ~0x00000040); safeSearchAnnotation_ = null; if (safeSearchAnnotationBuilder_ != null) { safeSearchAnnotationBuilder_.dispose(); safeSearchAnnotationBuilder_ = null; } onChanged(); return this; } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder getSafeSearchAnnotationBuilder() { bitField0_ |= 0x00000040; onChanged(); return getSafeSearchAnnotationFieldBuilder().getBuilder(); } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ public com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder getSafeSearchAnnotationOrBuilder() { if (safeSearchAnnotationBuilder_ != null) { return safeSearchAnnotationBuilder_.getMessageOrBuilder(); } else { return safeSearchAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.getDefaultInstance() : safeSearchAnnotation_; } } /** * * *
     * If present, safe-search annotation has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.SafeSearchAnnotation safe_search_annotation = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder> getSafeSearchAnnotationFieldBuilder() { if (safeSearchAnnotationBuilder_ == null) { safeSearchAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotation.Builder, com.google.cloud.vision.v1p1beta1.SafeSearchAnnotationOrBuilder>( getSafeSearchAnnotation(), getParentForChildren(), isClean()); safeSearchAnnotation_ = null; } return safeSearchAnnotationBuilder_; } private com.google.cloud.vision.v1p1beta1.ImageProperties imagePropertiesAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder> imagePropertiesAnnotationBuilder_; /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; * * @return Whether the imagePropertiesAnnotation field is set. */ public boolean hasImagePropertiesAnnotation() { return ((bitField0_ & 0x00000080) != 0); } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; * * @return The imagePropertiesAnnotation. */ public com.google.cloud.vision.v1p1beta1.ImageProperties getImagePropertiesAnnotation() { if (imagePropertiesAnnotationBuilder_ == null) { return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; } else { return imagePropertiesAnnotationBuilder_.getMessage(); } } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ public Builder setImagePropertiesAnnotation( com.google.cloud.vision.v1p1beta1.ImageProperties value) { if (imagePropertiesAnnotationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } imagePropertiesAnnotation_ = value; } else { imagePropertiesAnnotationBuilder_.setMessage(value); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ public Builder setImagePropertiesAnnotation( com.google.cloud.vision.v1p1beta1.ImageProperties.Builder builderForValue) { if (imagePropertiesAnnotationBuilder_ == null) { imagePropertiesAnnotation_ = builderForValue.build(); } else { imagePropertiesAnnotationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000080; onChanged(); return this; } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ public Builder mergeImagePropertiesAnnotation( com.google.cloud.vision.v1p1beta1.ImageProperties value) { if (imagePropertiesAnnotationBuilder_ == null) { if (((bitField0_ & 0x00000080) != 0) && imagePropertiesAnnotation_ != null && imagePropertiesAnnotation_ != com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance()) { getImagePropertiesAnnotationBuilder().mergeFrom(value); } else { imagePropertiesAnnotation_ = value; } } else { imagePropertiesAnnotationBuilder_.mergeFrom(value); } if (imagePropertiesAnnotation_ != null) { bitField0_ |= 0x00000080; onChanged(); } return this; } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ public Builder clearImagePropertiesAnnotation() { bitField0_ = (bitField0_ & ~0x00000080); imagePropertiesAnnotation_ = null; if (imagePropertiesAnnotationBuilder_ != null) { imagePropertiesAnnotationBuilder_.dispose(); imagePropertiesAnnotationBuilder_ = null; } onChanged(); return this; } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ public com.google.cloud.vision.v1p1beta1.ImageProperties.Builder getImagePropertiesAnnotationBuilder() { bitField0_ |= 0x00000080; onChanged(); return getImagePropertiesAnnotationFieldBuilder().getBuilder(); } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ public com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder getImagePropertiesAnnotationOrBuilder() { if (imagePropertiesAnnotationBuilder_ != null) { return imagePropertiesAnnotationBuilder_.getMessageOrBuilder(); } else { return imagePropertiesAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.ImageProperties.getDefaultInstance() : imagePropertiesAnnotation_; } } /** * * *
     * If present, image properties were extracted successfully.
     * 
* * .google.cloud.vision.v1p1beta1.ImageProperties image_properties_annotation = 8; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder> getImagePropertiesAnnotationFieldBuilder() { if (imagePropertiesAnnotationBuilder_ == null) { imagePropertiesAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.ImageProperties, com.google.cloud.vision.v1p1beta1.ImageProperties.Builder, com.google.cloud.vision.v1p1beta1.ImagePropertiesOrBuilder>( getImagePropertiesAnnotation(), getParentForChildren(), isClean()); imagePropertiesAnnotation_ = null; } return imagePropertiesAnnotationBuilder_; } private com.google.cloud.vision.v1p1beta1.CropHintsAnnotation cropHintsAnnotation_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder> cropHintsAnnotationBuilder_; /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; * * @return Whether the cropHintsAnnotation field is set. */ public boolean hasCropHintsAnnotation() { return ((bitField0_ & 0x00000100) != 0); } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; * * @return The cropHintsAnnotation. */ public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation getCropHintsAnnotation() { if (cropHintsAnnotationBuilder_ == null) { return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; } else { return cropHintsAnnotationBuilder_.getMessage(); } } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ public Builder setCropHintsAnnotation( com.google.cloud.vision.v1p1beta1.CropHintsAnnotation value) { if (cropHintsAnnotationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } cropHintsAnnotation_ = value; } else { cropHintsAnnotationBuilder_.setMessage(value); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ public Builder setCropHintsAnnotation( com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder builderForValue) { if (cropHintsAnnotationBuilder_ == null) { cropHintsAnnotation_ = builderForValue.build(); } else { cropHintsAnnotationBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ public Builder mergeCropHintsAnnotation( com.google.cloud.vision.v1p1beta1.CropHintsAnnotation value) { if (cropHintsAnnotationBuilder_ == null) { if (((bitField0_ & 0x00000100) != 0) && cropHintsAnnotation_ != null && cropHintsAnnotation_ != com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance()) { getCropHintsAnnotationBuilder().mergeFrom(value); } else { cropHintsAnnotation_ = value; } } else { cropHintsAnnotationBuilder_.mergeFrom(value); } if (cropHintsAnnotation_ != null) { bitField0_ |= 0x00000100; onChanged(); } return this; } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ public Builder clearCropHintsAnnotation() { bitField0_ = (bitField0_ & ~0x00000100); cropHintsAnnotation_ = null; if (cropHintsAnnotationBuilder_ != null) { cropHintsAnnotationBuilder_.dispose(); cropHintsAnnotationBuilder_ = null; } onChanged(); return this; } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ public com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder getCropHintsAnnotationBuilder() { bitField0_ |= 0x00000100; onChanged(); return getCropHintsAnnotationFieldBuilder().getBuilder(); } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ public com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder getCropHintsAnnotationOrBuilder() { if (cropHintsAnnotationBuilder_ != null) { return cropHintsAnnotationBuilder_.getMessageOrBuilder(); } else { return cropHintsAnnotation_ == null ? com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.getDefaultInstance() : cropHintsAnnotation_; } } /** * * *
     * If present, crop hints have completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.CropHintsAnnotation crop_hints_annotation = 11; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder> getCropHintsAnnotationFieldBuilder() { if (cropHintsAnnotationBuilder_ == null) { cropHintsAnnotationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.CropHintsAnnotation, com.google.cloud.vision.v1p1beta1.CropHintsAnnotation.Builder, com.google.cloud.vision.v1p1beta1.CropHintsAnnotationOrBuilder>( getCropHintsAnnotation(), getParentForChildren(), isClean()); cropHintsAnnotation_ = null; } return cropHintsAnnotationBuilder_; } private com.google.cloud.vision.v1p1beta1.WebDetection webDetection_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder> webDetectionBuilder_; /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; * * @return Whether the webDetection field is set. */ public boolean hasWebDetection() { return ((bitField0_ & 0x00000200) != 0); } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; * * @return The webDetection. */ public com.google.cloud.vision.v1p1beta1.WebDetection getWebDetection() { if (webDetectionBuilder_ == null) { return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; } else { return webDetectionBuilder_.getMessage(); } } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ public Builder setWebDetection(com.google.cloud.vision.v1p1beta1.WebDetection value) { if (webDetectionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } webDetection_ = value; } else { webDetectionBuilder_.setMessage(value); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ public Builder setWebDetection( com.google.cloud.vision.v1p1beta1.WebDetection.Builder builderForValue) { if (webDetectionBuilder_ == null) { webDetection_ = builderForValue.build(); } else { webDetectionBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ public Builder mergeWebDetection(com.google.cloud.vision.v1p1beta1.WebDetection value) { if (webDetectionBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0) && webDetection_ != null && webDetection_ != com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance()) { getWebDetectionBuilder().mergeFrom(value); } else { webDetection_ = value; } } else { webDetectionBuilder_.mergeFrom(value); } if (webDetection_ != null) { bitField0_ |= 0x00000200; onChanged(); } return this; } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ public Builder clearWebDetection() { bitField0_ = (bitField0_ & ~0x00000200); webDetection_ = null; if (webDetectionBuilder_ != null) { webDetectionBuilder_.dispose(); webDetectionBuilder_ = null; } onChanged(); return this; } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ public com.google.cloud.vision.v1p1beta1.WebDetection.Builder getWebDetectionBuilder() { bitField0_ |= 0x00000200; onChanged(); return getWebDetectionFieldBuilder().getBuilder(); } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ public com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder getWebDetectionOrBuilder() { if (webDetectionBuilder_ != null) { return webDetectionBuilder_.getMessageOrBuilder(); } else { return webDetection_ == null ? com.google.cloud.vision.v1p1beta1.WebDetection.getDefaultInstance() : webDetection_; } } /** * * *
     * If present, web detection has completed successfully.
     * 
* * .google.cloud.vision.v1p1beta1.WebDetection web_detection = 13; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder> getWebDetectionFieldBuilder() { if (webDetectionBuilder_ == null) { webDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.vision.v1p1beta1.WebDetection, com.google.cloud.vision.v1p1beta1.WebDetection.Builder, com.google.cloud.vision.v1p1beta1.WebDetectionOrBuilder>( getWebDetection(), getParentForChildren(), isClean()); webDetection_ = null; } return webDetectionBuilder_; } private com.google.rpc.Status error_; private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> errorBuilder_; /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; * * @return Whether the error field is set. */ public boolean hasError() { return ((bitField0_ & 0x00000400) != 0); } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; * * @return The error. */ public com.google.rpc.Status getError() { if (errorBuilder_ == null) { return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; } else { return errorBuilder_.getMessage(); } } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ public Builder setError(com.google.rpc.Status value) { if (errorBuilder_ == null) { if (value == null) { throw new NullPointerException(); } error_ = value; } else { errorBuilder_.setMessage(value); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ public Builder setError(com.google.rpc.Status.Builder builderForValue) { if (errorBuilder_ == null) { error_ = builderForValue.build(); } else { errorBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ public Builder mergeError(com.google.rpc.Status value) { if (errorBuilder_ == null) { if (((bitField0_ & 0x00000400) != 0) && error_ != null && error_ != com.google.rpc.Status.getDefaultInstance()) { getErrorBuilder().mergeFrom(value); } else { error_ = value; } } else { errorBuilder_.mergeFrom(value); } if (error_ != null) { bitField0_ |= 0x00000400; onChanged(); } return this; } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ public Builder clearError() { bitField0_ = (bitField0_ & ~0x00000400); error_ = null; if (errorBuilder_ != null) { errorBuilder_.dispose(); errorBuilder_ = null; } onChanged(); return this; } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ public com.google.rpc.Status.Builder getErrorBuilder() { bitField0_ |= 0x00000400; onChanged(); return getErrorFieldBuilder().getBuilder(); } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ public com.google.rpc.StatusOrBuilder getErrorOrBuilder() { if (errorBuilder_ != null) { return errorBuilder_.getMessageOrBuilder(); } else { return error_ == null ? com.google.rpc.Status.getDefaultInstance() : error_; } } /** * * *
     * If set, represents the error message for the operation.
     * Note that filled-in image annotations are guaranteed to be
     * correct, even when `error` is set.
     * 
* * .google.rpc.Status error = 9; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> getErrorFieldBuilder() { if (errorBuilder_ == null) { errorBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder>(getError(), getParentForChildren(), isClean()); error_ = null; } return errorBuilder_; } @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.v1p1beta1.AnnotateImageResponse) } // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p1beta1.AnnotateImageResponse) private static final com.google.cloud.vision.v1p1beta1.AnnotateImageResponse DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.vision.v1p1beta1.AnnotateImageResponse(); } public static com.google.cloud.vision.v1p1beta1.AnnotateImageResponse getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AnnotateImageResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; 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.v1p1beta1.AnnotateImageResponse getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy