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

com.google.cloud.automl.v1beta1.AnnotationPayload 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/automl/v1beta1/annotation_payload.proto

// Protobuf Java Version: 3.25.3
package com.google.cloud.automl.v1beta1;

/**
 *
 *
 * 
 * Contains annotation information that is relevant to AutoML.
 * 
* * Protobuf type {@code google.cloud.automl.v1beta1.AnnotationPayload} */ public final class AnnotationPayload extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:google.cloud.automl.v1beta1.AnnotationPayload) AnnotationPayloadOrBuilder { private static final long serialVersionUID = 0L; // Use AnnotationPayload.newBuilder() to construct. private AnnotationPayload(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private AnnotationPayload() { annotationSpecId_ = ""; displayName_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new AnnotationPayload(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.automl.v1beta1.AnnotationPayload.class, com.google.cloud.automl.v1beta1.AnnotationPayload.Builder.class); } private int detailCase_ = 0; @SuppressWarnings("serial") private java.lang.Object detail_; public enum DetailCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { TRANSLATION(2), CLASSIFICATION(3), IMAGE_OBJECT_DETECTION(4), VIDEO_CLASSIFICATION(9), VIDEO_OBJECT_TRACKING(8), TEXT_EXTRACTION(6), TEXT_SENTIMENT(7), TABLES(10), DETAIL_NOT_SET(0); private final int value; private DetailCase(int value) { this.value = value; } /** * @param value The number of the enum to look for. * @return The enum associated with the given number. * @deprecated Use {@link #forNumber(int)} instead. */ @java.lang.Deprecated public static DetailCase valueOf(int value) { return forNumber(value); } public static DetailCase forNumber(int value) { switch (value) { case 2: return TRANSLATION; case 3: return CLASSIFICATION; case 4: return IMAGE_OBJECT_DETECTION; case 9: return VIDEO_CLASSIFICATION; case 8: return VIDEO_OBJECT_TRACKING; case 6: return TEXT_EXTRACTION; case 7: return TEXT_SENTIMENT; case 10: return TABLES; case 0: return DETAIL_NOT_SET; default: return null; } } public int getNumber() { return this.value; } }; public DetailCase getDetailCase() { return DetailCase.forNumber(detailCase_); } public static final int TRANSLATION_FIELD_NUMBER = 2; /** * * *
   * Annotation details for translation.
   * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; * * @return Whether the translation field is set. */ @java.lang.Override public boolean hasTranslation() { return detailCase_ == 2; } /** * * *
   * Annotation details for translation.
   * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; * * @return The translation. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TranslationAnnotation getTranslation() { if (detailCase_ == 2) { return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); } /** * * *
   * Annotation details for translation.
   * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { if (detailCase_ == 2) { return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); } public static final int CLASSIFICATION_FIELD_NUMBER = 3; /** * * *
   * Annotation details for content or image classification.
   * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; * * @return Whether the classification field is set. */ @java.lang.Override public boolean hasClassification() { return detailCase_ == 3; } /** * * *
   * Annotation details for content or image classification.
   * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; * * @return The classification. */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation getClassification() { if (detailCase_ == 3) { return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance(); } /** * * *
   * Annotation details for content or image classification.
   * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder getClassificationOrBuilder() { if (detailCase_ == 3) { return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance(); } public static final int IMAGE_OBJECT_DETECTION_FIELD_NUMBER = 4; /** * * *
   * Annotation details for image object detection.
   * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * * * @return Whether the imageObjectDetection field is set. */ @java.lang.Override public boolean hasImageObjectDetection() { return detailCase_ == 4; } /** * * *
   * Annotation details for image object detection.
   * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * * * @return The imageObjectDetection. */ @java.lang.Override public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation getImageObjectDetection() { if (detailCase_ == 4) { return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); } /** * * *
   * Annotation details for image object detection.
   * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ @java.lang.Override public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder getImageObjectDetectionOrBuilder() { if (detailCase_ == 4) { return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); } public static final int VIDEO_CLASSIFICATION_FIELD_NUMBER = 9; /** * * *
   * Annotation details for video classification.
   * Returned for Video Classification predictions.
   * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * * * @return Whether the videoClassification field is set. */ @java.lang.Override public boolean hasVideoClassification() { return detailCase_ == 9; } /** * * *
   * Annotation details for video classification.
   * Returned for Video Classification predictions.
   * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * * * @return The videoClassification. */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation getVideoClassification() { if (detailCase_ == 9) { return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance(); } /** * * *
   * Annotation details for video classification.
   * Returned for Video Classification predictions.
   * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotationOrBuilder getVideoClassificationOrBuilder() { if (detailCase_ == 9) { return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance(); } public static final int VIDEO_OBJECT_TRACKING_FIELD_NUMBER = 8; /** * * *
   * Annotation details for video object tracking.
   * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * * * @return Whether the videoObjectTracking field is set. */ @java.lang.Override public boolean hasVideoObjectTracking() { return detailCase_ == 8; } /** * * *
   * Annotation details for video object tracking.
   * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * * * @return The videoObjectTracking. */ @java.lang.Override public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getVideoObjectTracking() { if (detailCase_ == 8) { return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; } return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); } /** * * *
   * Annotation details for video object tracking.
   * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ @java.lang.Override public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder getVideoObjectTrackingOrBuilder() { if (detailCase_ == 8) { return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; } return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); } public static final int TEXT_EXTRACTION_FIELD_NUMBER = 6; /** * * *
   * Annotation details for text extraction.
   * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; * * @return Whether the textExtraction field is set. */ @java.lang.Override public boolean hasTextExtraction() { return detailCase_ == 6; } /** * * *
   * Annotation details for text extraction.
   * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; * * @return The textExtraction. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextExtractionAnnotation getTextExtraction() { if (detailCase_ == 6) { return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); } /** * * *
   * Annotation details for text extraction.
   * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder() { if (detailCase_ == 6) { return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); } public static final int TEXT_SENTIMENT_FIELD_NUMBER = 7; /** * * *
   * Annotation details for text sentiment.
   * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; * * @return Whether the textSentiment field is set. */ @java.lang.Override public boolean hasTextSentiment() { return detailCase_ == 7; } /** * * *
   * Annotation details for text sentiment.
   * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; * * @return The textSentiment. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation getTextSentiment() { if (detailCase_ == 7) { return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance(); } /** * * *
   * Annotation details for text sentiment.
   * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder getTextSentimentOrBuilder() { if (detailCase_ == 7) { return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance(); } public static final int TABLES_FIELD_NUMBER = 10; /** * * *
   * Annotation details for Tables.
   * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; * * @return Whether the tables field is set. */ @java.lang.Override public boolean hasTables() { return detailCase_ == 10; } /** * * *
   * Annotation details for Tables.
   * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; * * @return The tables. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TablesAnnotation getTables() { if (detailCase_ == 10) { return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); } /** * * *
   * Annotation details for Tables.
   * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder getTablesOrBuilder() { if (detailCase_ == 10) { return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); } public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object annotationSpecId_ = ""; /** * * *
   * Output only . The resource ID of the annotation spec that
   * this annotation pertains to. The annotation spec comes from either an
   * ancestor dataset, or the dataset that was used to train the model in use.
   * 
* * string annotation_spec_id = 1; * * @return The annotationSpecId. */ @java.lang.Override public java.lang.String getAnnotationSpecId() { java.lang.Object ref = annotationSpecId_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); annotationSpecId_ = s; return s; } } /** * * *
   * Output only . The resource ID of the annotation spec that
   * this annotation pertains to. The annotation spec comes from either an
   * ancestor dataset, or the dataset that was used to train the model in use.
   * 
* * string annotation_spec_id = 1; * * @return The bytes for annotationSpecId. */ @java.lang.Override public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { java.lang.Object ref = annotationSpecId_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); annotationSpecId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int DISPLAY_NAME_FIELD_NUMBER = 5; @SuppressWarnings("serial") private volatile java.lang.Object displayName_ = ""; /** * * *
   * Output only. The value of
   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
   * when the model was trained. Because this field returns a value at model
   * training time, for different models trained using the same dataset, the
   * returned value could be different as model owner could update the
   * `display_name` between any two model training.
   * 
* * string display_name = 5; * * @return The displayName. */ @java.lang.Override public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } } /** * * *
   * Output only. The value of
   * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
   * when the model was trained. Because this field returns a value at model
   * training time, for different models trained using the same dataset, the
   * returned value could be different as model owner could update the
   * `display_name` between any two model training.
   * 
* * string display_name = 5; * * @return The bytes for displayName. */ @java.lang.Override public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } private byte memoizedIsInitialized = -1; @java.lang.Override public final boolean isInitialized() { byte isInitialized = memoizedIsInitialized; if (isInitialized == 1) return true; if (isInitialized == 0) return false; memoizedIsInitialized = 1; return true; } @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(annotationSpecId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, annotationSpecId_); } if (detailCase_ == 2) { output.writeMessage(2, (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_); } if (detailCase_ == 3) { output.writeMessage( 3, (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_); } if (detailCase_ == 4) { output.writeMessage( 4, (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, displayName_); } if (detailCase_ == 6) { output.writeMessage(6, (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_); } if (detailCase_ == 7) { output.writeMessage( 7, (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_); } if (detailCase_ == 8) { output.writeMessage( 8, (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_); } if (detailCase_ == 9) { output.writeMessage( 9, (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_); } if (detailCase_ == 10) { output.writeMessage(10, (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_); } getUnknownFields().writeTo(output); } @java.lang.Override public int getSerializedSize() { int size = memoizedSize; if (size != -1) return size; size = 0; if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(annotationSpecId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, annotationSpecId_); } if (detailCase_ == 2) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_); } if (detailCase_ == 3) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_); } if (detailCase_ == 4) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 4, (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, displayName_); } if (detailCase_ == 6) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_); } if (detailCase_ == 7) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 7, (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_); } if (detailCase_ == 8) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 8, (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_); } if (detailCase_ == 9) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 9, (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_); } if (detailCase_ == 10) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( 10, (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_); } 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.automl.v1beta1.AnnotationPayload)) { return super.equals(obj); } com.google.cloud.automl.v1beta1.AnnotationPayload other = (com.google.cloud.automl.v1beta1.AnnotationPayload) obj; if (!getAnnotationSpecId().equals(other.getAnnotationSpecId())) return false; if (!getDisplayName().equals(other.getDisplayName())) return false; if (!getDetailCase().equals(other.getDetailCase())) return false; switch (detailCase_) { case 2: if (!getTranslation().equals(other.getTranslation())) return false; break; case 3: if (!getClassification().equals(other.getClassification())) return false; break; case 4: if (!getImageObjectDetection().equals(other.getImageObjectDetection())) return false; break; case 9: if (!getVideoClassification().equals(other.getVideoClassification())) return false; break; case 8: if (!getVideoObjectTracking().equals(other.getVideoObjectTracking())) return false; break; case 6: if (!getTextExtraction().equals(other.getTextExtraction())) return false; break; case 7: if (!getTextSentiment().equals(other.getTextSentiment())) return false; break; case 10: if (!getTables().equals(other.getTables())) return false; break; case 0: default: } 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(); hash = (37 * hash) + ANNOTATION_SPEC_ID_FIELD_NUMBER; hash = (53 * hash) + getAnnotationSpecId().hashCode(); hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; hash = (53 * hash) + getDisplayName().hashCode(); switch (detailCase_) { case 2: hash = (37 * hash) + TRANSLATION_FIELD_NUMBER; hash = (53 * hash) + getTranslation().hashCode(); break; case 3: hash = (37 * hash) + CLASSIFICATION_FIELD_NUMBER; hash = (53 * hash) + getClassification().hashCode(); break; case 4: hash = (37 * hash) + IMAGE_OBJECT_DETECTION_FIELD_NUMBER; hash = (53 * hash) + getImageObjectDetection().hashCode(); break; case 9: hash = (37 * hash) + VIDEO_CLASSIFICATION_FIELD_NUMBER; hash = (53 * hash) + getVideoClassification().hashCode(); break; case 8: hash = (37 * hash) + VIDEO_OBJECT_TRACKING_FIELD_NUMBER; hash = (53 * hash) + getVideoObjectTracking().hashCode(); break; case 6: hash = (37 * hash) + TEXT_EXTRACTION_FIELD_NUMBER; hash = (53 * hash) + getTextExtraction().hashCode(); break; case 7: hash = (37 * hash) + TEXT_SENTIMENT_FIELD_NUMBER; hash = (53 * hash) + getTextSentiment().hashCode(); break; case 10: hash = (37 * hash) + TABLES_FIELD_NUMBER; hash = (53 * hash) + getTables().hashCode(); break; case 0: default: } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.automl.v1beta1.AnnotationPayload 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.automl.v1beta1.AnnotationPayload parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.automl.v1beta1.AnnotationPayload 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.automl.v1beta1.AnnotationPayload parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } public static com.google.cloud.automl.v1beta1.AnnotationPayload parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.automl.v1beta1.AnnotationPayload 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.automl.v1beta1.AnnotationPayload parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } public static com.google.cloud.automl.v1beta1.AnnotationPayload 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.automl.v1beta1.AnnotationPayload parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } public static com.google.cloud.automl.v1beta1.AnnotationPayload 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.automl.v1beta1.AnnotationPayload 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; } /** * * *
   * Contains annotation information that is relevant to AutoML.
   * 
* * Protobuf type {@code google.cloud.automl.v1beta1.AnnotationPayload} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:google.cloud.automl.v1beta1.AnnotationPayload) com.google.cloud.automl.v1beta1.AnnotationPayloadOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_fieldAccessorTable .ensureFieldAccessorsInitialized( com.google.cloud.automl.v1beta1.AnnotationPayload.class, com.google.cloud.automl.v1beta1.AnnotationPayload.Builder.class); } // Construct using com.google.cloud.automl.v1beta1.AnnotationPayload.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; if (translationBuilder_ != null) { translationBuilder_.clear(); } if (classificationBuilder_ != null) { classificationBuilder_.clear(); } if (imageObjectDetectionBuilder_ != null) { imageObjectDetectionBuilder_.clear(); } if (videoClassificationBuilder_ != null) { videoClassificationBuilder_.clear(); } if (videoObjectTrackingBuilder_ != null) { videoObjectTrackingBuilder_.clear(); } if (textExtractionBuilder_ != null) { textExtractionBuilder_.clear(); } if (textSentimentBuilder_ != null) { textSentimentBuilder_.clear(); } if (tablesBuilder_ != null) { tablesBuilder_.clear(); } annotationSpecId_ = ""; displayName_ = ""; detailCase_ = 0; detail_ = null; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.automl.v1beta1.AnnotationPayloadOuterClass .internal_static_google_cloud_automl_v1beta1_AnnotationPayload_descriptor; } @java.lang.Override public com.google.cloud.automl.v1beta1.AnnotationPayload getDefaultInstanceForType() { return com.google.cloud.automl.v1beta1.AnnotationPayload.getDefaultInstance(); } @java.lang.Override public com.google.cloud.automl.v1beta1.AnnotationPayload build() { com.google.cloud.automl.v1beta1.AnnotationPayload result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.google.cloud.automl.v1beta1.AnnotationPayload buildPartial() { com.google.cloud.automl.v1beta1.AnnotationPayload result = new com.google.cloud.automl.v1beta1.AnnotationPayload(this); if (bitField0_ != 0) { buildPartial0(result); } buildPartialOneofs(result); onBuilt(); return result; } private void buildPartial0(com.google.cloud.automl.v1beta1.AnnotationPayload result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000100) != 0)) { result.annotationSpecId_ = annotationSpecId_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.displayName_ = displayName_; } } private void buildPartialOneofs(com.google.cloud.automl.v1beta1.AnnotationPayload result) { result.detailCase_ = detailCase_; result.detail_ = this.detail_; if (detailCase_ == 2 && translationBuilder_ != null) { result.detail_ = translationBuilder_.build(); } if (detailCase_ == 3 && classificationBuilder_ != null) { result.detail_ = classificationBuilder_.build(); } if (detailCase_ == 4 && imageObjectDetectionBuilder_ != null) { result.detail_ = imageObjectDetectionBuilder_.build(); } if (detailCase_ == 9 && videoClassificationBuilder_ != null) { result.detail_ = videoClassificationBuilder_.build(); } if (detailCase_ == 8 && videoObjectTrackingBuilder_ != null) { result.detail_ = videoObjectTrackingBuilder_.build(); } if (detailCase_ == 6 && textExtractionBuilder_ != null) { result.detail_ = textExtractionBuilder_.build(); } if (detailCase_ == 7 && textSentimentBuilder_ != null) { result.detail_ = textSentimentBuilder_.build(); } if (detailCase_ == 10 && tablesBuilder_ != null) { result.detail_ = tablesBuilder_.build(); } } @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.automl.v1beta1.AnnotationPayload) { return mergeFrom((com.google.cloud.automl.v1beta1.AnnotationPayload) other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.google.cloud.automl.v1beta1.AnnotationPayload other) { if (other == com.google.cloud.automl.v1beta1.AnnotationPayload.getDefaultInstance()) return this; if (!other.getAnnotationSpecId().isEmpty()) { annotationSpecId_ = other.annotationSpecId_; bitField0_ |= 0x00000100; onChanged(); } if (!other.getDisplayName().isEmpty()) { displayName_ = other.displayName_; bitField0_ |= 0x00000200; onChanged(); } switch (other.getDetailCase()) { case TRANSLATION: { mergeTranslation(other.getTranslation()); break; } case CLASSIFICATION: { mergeClassification(other.getClassification()); break; } case IMAGE_OBJECT_DETECTION: { mergeImageObjectDetection(other.getImageObjectDetection()); break; } case VIDEO_CLASSIFICATION: { mergeVideoClassification(other.getVideoClassification()); break; } case VIDEO_OBJECT_TRACKING: { mergeVideoObjectTracking(other.getVideoObjectTracking()); break; } case TEXT_EXTRACTION: { mergeTextExtraction(other.getTextExtraction()); break; } case TEXT_SENTIMENT: { mergeTextSentiment(other.getTextSentiment()); break; } case TABLES: { mergeTables(other.getTables()); break; } case DETAIL_NOT_SET: { break; } } 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: { annotationSpecId_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000100; break; } // case 10 case 18: { input.readMessage(getTranslationFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 2; break; } // case 18 case 26: { input.readMessage(getClassificationFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 3; break; } // case 26 case 34: { input.readMessage( getImageObjectDetectionFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 4; break; } // case 34 case 42: { displayName_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000200; break; } // case 42 case 50: { input.readMessage(getTextExtractionFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 6; break; } // case 50 case 58: { input.readMessage(getTextSentimentFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 7; break; } // case 58 case 66: { input.readMessage( getVideoObjectTrackingFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 8; break; } // case 66 case 74: { input.readMessage( getVideoClassificationFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 9; break; } // case 74 case 82: { input.readMessage(getTablesFieldBuilder().getBuilder(), extensionRegistry); detailCase_ = 10; break; } // case 82 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 detailCase_ = 0; private java.lang.Object detail_; public DetailCase getDetailCase() { return DetailCase.forNumber(detailCase_); } public Builder clearDetail() { detailCase_ = 0; detail_ = null; onChanged(); return this; } private int bitField0_; private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TranslationAnnotation, com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder, com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder> translationBuilder_; /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; * * @return Whether the translation field is set. */ @java.lang.Override public boolean hasTranslation() { return detailCase_ == 2; } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; * * @return The translation. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TranslationAnnotation getTranslation() { if (translationBuilder_ == null) { if (detailCase_ == 2) { return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); } else { if (detailCase_ == 2) { return translationBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ public Builder setTranslation(com.google.cloud.automl.v1beta1.TranslationAnnotation value) { if (translationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { translationBuilder_.setMessage(value); } detailCase_ = 2; return this; } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ public Builder setTranslation( com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder builderForValue) { if (translationBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { translationBuilder_.setMessage(builderForValue.build()); } detailCase_ = 2; return this; } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ public Builder mergeTranslation(com.google.cloud.automl.v1beta1.TranslationAnnotation value) { if (translationBuilder_ == null) { if (detailCase_ == 2 && detail_ != com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.TranslationAnnotation.newBuilder( (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 2) { translationBuilder_.mergeFrom(value); } else { translationBuilder_.setMessage(value); } } detailCase_ = 2; return this; } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ public Builder clearTranslation() { if (translationBuilder_ == null) { if (detailCase_ == 2) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 2) { detailCase_ = 0; detail_ = null; } translationBuilder_.clear(); } return this; } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ public com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder getTranslationBuilder() { return getTranslationFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder getTranslationOrBuilder() { if ((detailCase_ == 2) && (translationBuilder_ != null)) { return translationBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 2) { return (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for translation.
     * 
* * .google.cloud.automl.v1beta1.TranslationAnnotation translation = 2; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TranslationAnnotation, com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder, com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder> getTranslationFieldBuilder() { if (translationBuilder_ == null) { if (!(detailCase_ == 2)) { detail_ = com.google.cloud.automl.v1beta1.TranslationAnnotation.getDefaultInstance(); } translationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TranslationAnnotation, com.google.cloud.automl.v1beta1.TranslationAnnotation.Builder, com.google.cloud.automl.v1beta1.TranslationAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.TranslationAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 2; onChanged(); return translationBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder> classificationBuilder_; /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; * * @return Whether the classification field is set. */ @java.lang.Override public boolean hasClassification() { return detailCase_ == 3; } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; * * @return The classification. */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation getClassification() { if (classificationBuilder_ == null) { if (detailCase_ == 3) { return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance(); } else { if (detailCase_ == 3) { return classificationBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance(); } } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ public Builder setClassification( com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation value) { if (classificationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { classificationBuilder_.setMessage(value); } detailCase_ = 3; return this; } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ public Builder setClassification( com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder builderForValue) { if (classificationBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { classificationBuilder_.setMessage(builderForValue.build()); } detailCase_ = 3; return this; } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ public Builder mergeClassification( com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation value) { if (classificationBuilder_ == null) { if (detailCase_ == 3 && detail_ != com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .newBuilder( (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 3) { classificationBuilder_.mergeFrom(value); } else { classificationBuilder_.setMessage(value); } } detailCase_ = 3; return this; } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ public Builder clearClassification() { if (classificationBuilder_ == null) { if (detailCase_ == 3) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 3) { detailCase_ = 0; detail_ = null; } classificationBuilder_.clear(); } return this; } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder getClassificationBuilder() { return getClassificationFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder getClassificationOrBuilder() { if ((detailCase_ == 3) && (classificationBuilder_ != null)) { return classificationBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 3) { return (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance(); } } /** * * *
     * Annotation details for content or image classification.
     * 
* * .google.cloud.automl.v1beta1.ClassificationAnnotation classification = 3; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation.Builder, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotationOrBuilder> getClassificationFieldBuilder() { if (classificationBuilder_ == null) { if (!(detailCase_ == 3)) { detail_ = com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .getDefaultInstance(); } classificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation, com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation .Builder, com.google.cloud.automl.v1beta1.ClassificationProto .ClassificationAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.ClassificationProto.ClassificationAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 3; onChanged(); return classificationBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder, com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder> imageObjectDetectionBuilder_; /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * * * @return Whether the imageObjectDetection field is set. */ @java.lang.Override public boolean hasImageObjectDetection() { return detailCase_ == 4; } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * * * @return The imageObjectDetection. */ @java.lang.Override public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation getImageObjectDetection() { if (imageObjectDetectionBuilder_ == null) { if (detailCase_ == 4) { return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); } else { if (detailCase_ == 4) { return imageObjectDetectionBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ public Builder setImageObjectDetection( com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation value) { if (imageObjectDetectionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { imageObjectDetectionBuilder_.setMessage(value); } detailCase_ = 4; return this; } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ public Builder setImageObjectDetection( com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder builderForValue) { if (imageObjectDetectionBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { imageObjectDetectionBuilder_.setMessage(builderForValue.build()); } detailCase_ = 4; return this; } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ public Builder mergeImageObjectDetection( com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation value) { if (imageObjectDetectionBuilder_ == null) { if (detailCase_ == 4 && detail_ != com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation .getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.newBuilder( (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 4) { imageObjectDetectionBuilder_.mergeFrom(value); } else { imageObjectDetectionBuilder_.setMessage(value); } } detailCase_ = 4; return this; } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ public Builder clearImageObjectDetection() { if (imageObjectDetectionBuilder_ == null) { if (detailCase_ == 4) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 4) { detailCase_ = 0; detail_ = null; } imageObjectDetectionBuilder_.clear(); } return this; } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder getImageObjectDetectionBuilder() { return getImageObjectDetectionFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ @java.lang.Override public com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder getImageObjectDetectionOrBuilder() { if ((detailCase_ == 4) && (imageObjectDetectionBuilder_ != null)) { return imageObjectDetectionBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 4) { return (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for image object detection.
     * 
* * .google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation image_object_detection = 4; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder, com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder> getImageObjectDetectionFieldBuilder() { if (imageObjectDetectionBuilder_ == null) { if (!(detailCase_ == 4)) { detail_ = com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.getDefaultInstance(); } imageObjectDetectionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation, com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation.Builder, com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.ImageObjectDetectionAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 4; onChanged(); return imageObjectDetectionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation, com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .Builder, com.google.cloud.automl.v1beta1.ClassificationProto .VideoClassificationAnnotationOrBuilder> videoClassificationBuilder_; /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * * * @return Whether the videoClassification field is set. */ @java.lang.Override public boolean hasVideoClassification() { return detailCase_ == 9; } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * * * @return The videoClassification. */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation getVideoClassification() { if (videoClassificationBuilder_ == null) { if (detailCase_ == 9) { return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance(); } else { if (detailCase_ == 9) { return videoClassificationBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance(); } } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ public Builder setVideoClassification( com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation value) { if (videoClassificationBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { videoClassificationBuilder_.setMessage(value); } detailCase_ = 9; return this; } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ public Builder setVideoClassification( com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation.Builder builderForValue) { if (videoClassificationBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { videoClassificationBuilder_.setMessage(builderForValue.build()); } detailCase_ = 9; return this; } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ public Builder mergeVideoClassification( com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation value) { if (videoClassificationBuilder_ == null) { if (detailCase_ == 9 && detail_ != com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .newBuilder( (com.google.cloud.automl.v1beta1.ClassificationProto .VideoClassificationAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 9) { videoClassificationBuilder_.mergeFrom(value); } else { videoClassificationBuilder_.setMessage(value); } } detailCase_ = 9; return this; } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ public Builder clearVideoClassification() { if (videoClassificationBuilder_ == null) { if (detailCase_ == 9) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 9) { detailCase_ = 0; detail_ = null; } videoClassificationBuilder_.clear(); } return this; } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ public com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation.Builder getVideoClassificationBuilder() { return getVideoClassificationFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ @java.lang.Override public com.google.cloud.automl.v1beta1.ClassificationProto .VideoClassificationAnnotationOrBuilder getVideoClassificationOrBuilder() { if ((detailCase_ == 9) && (videoClassificationBuilder_ != null)) { return videoClassificationBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 9) { return (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_; } return com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance(); } } /** * * *
     * Annotation details for video classification.
     * Returned for Video Classification predictions.
     * 
* * .google.cloud.automl.v1beta1.VideoClassificationAnnotation video_classification = 9; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation, com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .Builder, com.google.cloud.automl.v1beta1.ClassificationProto .VideoClassificationAnnotationOrBuilder> getVideoClassificationFieldBuilder() { if (videoClassificationBuilder_ == null) { if (!(detailCase_ == 9)) { detail_ = com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .getDefaultInstance(); } videoClassificationBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation, com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation .Builder, com.google.cloud.automl.v1beta1.ClassificationProto .VideoClassificationAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.ClassificationProto.VideoClassificationAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 9; onChanged(); return videoClassificationBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder, com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder> videoObjectTrackingBuilder_; /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * * * @return Whether the videoObjectTracking field is set. */ @java.lang.Override public boolean hasVideoObjectTracking() { return detailCase_ == 8; } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * * * @return The videoObjectTracking. */ @java.lang.Override public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation getVideoObjectTracking() { if (videoObjectTrackingBuilder_ == null) { if (detailCase_ == 8) { return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; } return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); } else { if (detailCase_ == 8) { return videoObjectTrackingBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ public Builder setVideoObjectTracking( com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation value) { if (videoObjectTrackingBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { videoObjectTrackingBuilder_.setMessage(value); } detailCase_ = 8; return this; } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ public Builder setVideoObjectTracking( com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder builderForValue) { if (videoObjectTrackingBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { videoObjectTrackingBuilder_.setMessage(builderForValue.build()); } detailCase_ = 8; return this; } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ public Builder mergeVideoObjectTracking( com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation value) { if (videoObjectTrackingBuilder_ == null) { if (detailCase_ == 8 && detail_ != com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation .getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.newBuilder( (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 8) { videoObjectTrackingBuilder_.mergeFrom(value); } else { videoObjectTrackingBuilder_.setMessage(value); } } detailCase_ = 8; return this; } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ public Builder clearVideoObjectTracking() { if (videoObjectTrackingBuilder_ == null) { if (detailCase_ == 8) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 8) { detailCase_ = 0; detail_ = null; } videoObjectTrackingBuilder_.clear(); } return this; } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder getVideoObjectTrackingBuilder() { return getVideoObjectTrackingFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ @java.lang.Override public com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder getVideoObjectTrackingOrBuilder() { if ((detailCase_ == 8) && (videoObjectTrackingBuilder_ != null)) { return videoObjectTrackingBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 8) { return (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_; } return com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for video object tracking.
     * 
* * .google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation video_object_tracking = 8; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder, com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder> getVideoObjectTrackingFieldBuilder() { if (videoObjectTrackingBuilder_ == null) { if (!(detailCase_ == 8)) { detail_ = com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.getDefaultInstance(); } videoObjectTrackingBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation, com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation.Builder, com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.VideoObjectTrackingAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 8; onChanged(); return videoObjectTrackingBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TextExtractionAnnotation, com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder, com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder> textExtractionBuilder_; /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; * * @return Whether the textExtraction field is set. */ @java.lang.Override public boolean hasTextExtraction() { return detailCase_ == 6; } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; * * @return The textExtraction. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextExtractionAnnotation getTextExtraction() { if (textExtractionBuilder_ == null) { if (detailCase_ == 6) { return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); } else { if (detailCase_ == 6) { return textExtractionBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ public Builder setTextExtraction( com.google.cloud.automl.v1beta1.TextExtractionAnnotation value) { if (textExtractionBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { textExtractionBuilder_.setMessage(value); } detailCase_ = 6; return this; } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ public Builder setTextExtraction( com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder builderForValue) { if (textExtractionBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { textExtractionBuilder_.setMessage(builderForValue.build()); } detailCase_ = 6; return this; } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ public Builder mergeTextExtraction( com.google.cloud.automl.v1beta1.TextExtractionAnnotation value) { if (textExtractionBuilder_ == null) { if (detailCase_ == 6 && detail_ != com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.TextExtractionAnnotation.newBuilder( (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 6) { textExtractionBuilder_.mergeFrom(value); } else { textExtractionBuilder_.setMessage(value); } } detailCase_ = 6; return this; } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ public Builder clearTextExtraction() { if (textExtractionBuilder_ == null) { if (detailCase_ == 6) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 6) { detailCase_ = 0; detail_ = null; } textExtractionBuilder_.clear(); } return this; } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ public com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder getTextExtractionBuilder() { return getTextExtractionFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder() { if ((detailCase_ == 6) && (textExtractionBuilder_ != null)) { return textExtractionBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 6) { return (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for text extraction.
     * 
* * .google.cloud.automl.v1beta1.TextExtractionAnnotation text_extraction = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TextExtractionAnnotation, com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder, com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder> getTextExtractionFieldBuilder() { if (textExtractionBuilder_ == null) { if (!(detailCase_ == 6)) { detail_ = com.google.cloud.automl.v1beta1.TextExtractionAnnotation.getDefaultInstance(); } textExtractionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TextExtractionAnnotation, com.google.cloud.automl.v1beta1.TextExtractionAnnotation.Builder, com.google.cloud.automl.v1beta1.TextExtractionAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.TextExtractionAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 6; onChanged(); return textExtractionBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation, com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder, com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder> textSentimentBuilder_; /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; * * @return Whether the textSentiment field is set. */ @java.lang.Override public boolean hasTextSentiment() { return detailCase_ == 7; } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; * * @return The textSentiment. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation getTextSentiment() { if (textSentimentBuilder_ == null) { if (detailCase_ == 7) { return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance(); } else { if (detailCase_ == 7) { return textSentimentBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance(); } } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ public Builder setTextSentiment( com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation value) { if (textSentimentBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { textSentimentBuilder_.setMessage(value); } detailCase_ = 7; return this; } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ public Builder setTextSentiment( com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder builderForValue) { if (textSentimentBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { textSentimentBuilder_.setMessage(builderForValue.build()); } detailCase_ = 7; return this; } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ public Builder mergeTextSentiment( com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation value) { if (textSentimentBuilder_ == null) { if (detailCase_ == 7 && detail_ != com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.newBuilder( (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 7) { textSentimentBuilder_.mergeFrom(value); } else { textSentimentBuilder_.setMessage(value); } } detailCase_ = 7; return this; } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ public Builder clearTextSentiment() { if (textSentimentBuilder_ == null) { if (detailCase_ == 7) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 7) { detailCase_ = 0; detail_ = null; } textSentimentBuilder_.clear(); } return this; } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder getTextSentimentBuilder() { return getTextSentimentFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder getTextSentimentOrBuilder() { if ((detailCase_ == 7) && (textSentimentBuilder_ != null)) { return textSentimentBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 7) { return (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance(); } } /** * * *
     * Annotation details for text sentiment.
     * 
* * .google.cloud.automl.v1beta1.TextSentimentAnnotation text_sentiment = 7; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation, com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder, com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotationOrBuilder> getTextSentimentFieldBuilder() { if (textSentimentBuilder_ == null) { if (!(detailCase_ == 7)) { detail_ = com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation .getDefaultInstance(); } textSentimentBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation, com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation.Builder, com.google.cloud.automl.v1beta1.TextSentimentProto .TextSentimentAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.TextSentimentProto.TextSentimentAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 7; onChanged(); return textSentimentBuilder_; } private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TablesAnnotation, com.google.cloud.automl.v1beta1.TablesAnnotation.Builder, com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder> tablesBuilder_; /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; * * @return Whether the tables field is set. */ @java.lang.Override public boolean hasTables() { return detailCase_ == 10; } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; * * @return The tables. */ @java.lang.Override public com.google.cloud.automl.v1beta1.TablesAnnotation getTables() { if (tablesBuilder_ == null) { if (detailCase_ == 10) { return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); } else { if (detailCase_ == 10) { return tablesBuilder_.getMessage(); } return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ public Builder setTables(com.google.cloud.automl.v1beta1.TablesAnnotation value) { if (tablesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } detail_ = value; onChanged(); } else { tablesBuilder_.setMessage(value); } detailCase_ = 10; return this; } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ public Builder setTables( com.google.cloud.automl.v1beta1.TablesAnnotation.Builder builderForValue) { if (tablesBuilder_ == null) { detail_ = builderForValue.build(); onChanged(); } else { tablesBuilder_.setMessage(builderForValue.build()); } detailCase_ = 10; return this; } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ public Builder mergeTables(com.google.cloud.automl.v1beta1.TablesAnnotation value) { if (tablesBuilder_ == null) { if (detailCase_ == 10 && detail_ != com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance()) { detail_ = com.google.cloud.automl.v1beta1.TablesAnnotation.newBuilder( (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_) .mergeFrom(value) .buildPartial(); } else { detail_ = value; } onChanged(); } else { if (detailCase_ == 10) { tablesBuilder_.mergeFrom(value); } else { tablesBuilder_.setMessage(value); } } detailCase_ = 10; return this; } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ public Builder clearTables() { if (tablesBuilder_ == null) { if (detailCase_ == 10) { detailCase_ = 0; detail_ = null; onChanged(); } } else { if (detailCase_ == 10) { detailCase_ = 0; detail_ = null; } tablesBuilder_.clear(); } return this; } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ public com.google.cloud.automl.v1beta1.TablesAnnotation.Builder getTablesBuilder() { return getTablesFieldBuilder().getBuilder(); } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ @java.lang.Override public com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder getTablesOrBuilder() { if ((detailCase_ == 10) && (tablesBuilder_ != null)) { return tablesBuilder_.getMessageOrBuilder(); } else { if (detailCase_ == 10) { return (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_; } return com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); } } /** * * *
     * Annotation details for Tables.
     * 
* * .google.cloud.automl.v1beta1.TablesAnnotation tables = 10; */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TablesAnnotation, com.google.cloud.automl.v1beta1.TablesAnnotation.Builder, com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder> getTablesFieldBuilder() { if (tablesBuilder_ == null) { if (!(detailCase_ == 10)) { detail_ = com.google.cloud.automl.v1beta1.TablesAnnotation.getDefaultInstance(); } tablesBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.automl.v1beta1.TablesAnnotation, com.google.cloud.automl.v1beta1.TablesAnnotation.Builder, com.google.cloud.automl.v1beta1.TablesAnnotationOrBuilder>( (com.google.cloud.automl.v1beta1.TablesAnnotation) detail_, getParentForChildren(), isClean()); detail_ = null; } detailCase_ = 10; onChanged(); return tablesBuilder_; } private java.lang.Object annotationSpecId_ = ""; /** * * *
     * Output only . The resource ID of the annotation spec that
     * this annotation pertains to. The annotation spec comes from either an
     * ancestor dataset, or the dataset that was used to train the model in use.
     * 
* * string annotation_spec_id = 1; * * @return The annotationSpecId. */ public java.lang.String getAnnotationSpecId() { java.lang.Object ref = annotationSpecId_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); annotationSpecId_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only . The resource ID of the annotation spec that
     * this annotation pertains to. The annotation spec comes from either an
     * ancestor dataset, or the dataset that was used to train the model in use.
     * 
* * string annotation_spec_id = 1; * * @return The bytes for annotationSpecId. */ public com.google.protobuf.ByteString getAnnotationSpecIdBytes() { java.lang.Object ref = annotationSpecId_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); annotationSpecId_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only . The resource ID of the annotation spec that
     * this annotation pertains to. The annotation spec comes from either an
     * ancestor dataset, or the dataset that was used to train the model in use.
     * 
* * string annotation_spec_id = 1; * * @param value The annotationSpecId to set. * @return This builder for chaining. */ public Builder setAnnotationSpecId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } annotationSpecId_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** * * *
     * Output only . The resource ID of the annotation spec that
     * this annotation pertains to. The annotation spec comes from either an
     * ancestor dataset, or the dataset that was used to train the model in use.
     * 
* * string annotation_spec_id = 1; * * @return This builder for chaining. */ public Builder clearAnnotationSpecId() { annotationSpecId_ = getDefaultInstance().getAnnotationSpecId(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); return this; } /** * * *
     * Output only . The resource ID of the annotation spec that
     * this annotation pertains to. The annotation spec comes from either an
     * ancestor dataset, or the dataset that was used to train the model in use.
     * 
* * string annotation_spec_id = 1; * * @param value The bytes for annotationSpecId to set. * @return This builder for chaining. */ public Builder setAnnotationSpecIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); annotationSpecId_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } private java.lang.Object displayName_ = ""; /** * * *
     * Output only. The value of
     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
     * when the model was trained. Because this field returns a value at model
     * training time, for different models trained using the same dataset, the
     * returned value could be different as model owner could update the
     * `display_name` between any two model training.
     * 
* * string display_name = 5; * * @return The displayName. */ public java.lang.String getDisplayName() { java.lang.Object ref = displayName_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); displayName_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. The value of
     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
     * when the model was trained. Because this field returns a value at model
     * training time, for different models trained using the same dataset, the
     * returned value could be different as model owner could update the
     * `display_name` between any two model training.
     * 
* * string display_name = 5; * * @return The bytes for displayName. */ public com.google.protobuf.ByteString getDisplayNameBytes() { java.lang.Object ref = displayName_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); displayName_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * Output only. The value of
     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
     * when the model was trained. Because this field returns a value at model
     * training time, for different models trained using the same dataset, the
     * returned value could be different as model owner could update the
     * `display_name` between any two model training.
     * 
* * string display_name = 5; * * @param value The displayName to set. * @return This builder for chaining. */ public Builder setDisplayName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } displayName_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** * * *
     * Output only. The value of
     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
     * when the model was trained. Because this field returns a value at model
     * training time, for different models trained using the same dataset, the
     * returned value could be different as model owner could update the
     * `display_name` between any two model training.
     * 
* * string display_name = 5; * * @return This builder for chaining. */ public Builder clearDisplayName() { displayName_ = getDefaultInstance().getDisplayName(); bitField0_ = (bitField0_ & ~0x00000200); onChanged(); return this; } /** * * *
     * Output only. The value of
     * [display_name][google.cloud.automl.v1beta1.AnnotationSpec.display_name]
     * when the model was trained. Because this field returns a value at model
     * training time, for different models trained using the same dataset, the
     * returned value could be different as model owner could update the
     * `display_name` between any two model training.
     * 
* * string display_name = 5; * * @param value The bytes for displayName to set. * @return This builder for chaining. */ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); displayName_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); } @java.lang.Override public final Builder mergeUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { return super.mergeUnknownFields(unknownFields); } // @@protoc_insertion_point(builder_scope:google.cloud.automl.v1beta1.AnnotationPayload) } // @@protoc_insertion_point(class_scope:google.cloud.automl.v1beta1.AnnotationPayload) private static final com.google.cloud.automl.v1beta1.AnnotationPayload DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.automl.v1beta1.AnnotationPayload(); } public static com.google.cloud.automl.v1beta1.AnnotationPayload getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public AnnotationPayload 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.automl.v1beta1.AnnotationPayload getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy