Class AnnotationPayload.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnnotationPayload.Builder>
com.google.cloud.automl.v1.AnnotationPayload.Builder
All Implemented Interfaces:
AnnotationPayloadOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
AnnotationPayload

public static final class AnnotationPayload.Builder extends com.google.protobuf.GeneratedMessage.Builder<AnnotationPayload.Builder> implements AnnotationPayloadOrBuilder
 Contains annotation information that is relevant to AutoML.
 
Protobuf type google.cloud.automl.v1.AnnotationPayload
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<AnnotationPayload.Builder>
    • clear

      public AnnotationPayload.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<AnnotationPayload.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<AnnotationPayload.Builder>
    • getDefaultInstanceForType

      public AnnotationPayload getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public AnnotationPayload build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public AnnotationPayload buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public AnnotationPayload.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnnotationPayload.Builder>
    • mergeFrom

      public AnnotationPayload.Builder mergeFrom(AnnotationPayload other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<AnnotationPayload.Builder>
    • mergeFrom

      public AnnotationPayload.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<AnnotationPayload.Builder>
      Throws:
      IOException
    • getDetailCase

      public AnnotationPayload.DetailCase getDetailCase()
      Specified by:
      getDetailCase in interface AnnotationPayloadOrBuilder
    • clearDetail

      public AnnotationPayload.Builder clearDetail()
    • hasTranslation

      public boolean hasTranslation()
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
      Specified by:
      hasTranslation in interface AnnotationPayloadOrBuilder
      Returns:
      Whether the translation field is set.
    • getTranslation

      public TranslationAnnotation getTranslation()
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
      Specified by:
      getTranslation in interface AnnotationPayloadOrBuilder
      Returns:
      The translation.
    • setTranslation

      public AnnotationPayload.Builder setTranslation(TranslationAnnotation value)
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
    • setTranslation

      public AnnotationPayload.Builder setTranslation(TranslationAnnotation.Builder builderForValue)
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
    • mergeTranslation

      public AnnotationPayload.Builder mergeTranslation(TranslationAnnotation value)
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
    • clearTranslation

      public AnnotationPayload.Builder clearTranslation()
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
    • getTranslationBuilder

      public TranslationAnnotation.Builder getTranslationBuilder()
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
    • getTranslationOrBuilder

      public TranslationAnnotationOrBuilder getTranslationOrBuilder()
       Annotation details for translation.
       
      .google.cloud.automl.v1.TranslationAnnotation translation = 2;
      Specified by:
      getTranslationOrBuilder in interface AnnotationPayloadOrBuilder
    • hasClassification

      public boolean hasClassification()
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
      Specified by:
      hasClassification in interface AnnotationPayloadOrBuilder
      Returns:
      Whether the classification field is set.
    • getClassification

      public ClassificationAnnotation getClassification()
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
      Specified by:
      getClassification in interface AnnotationPayloadOrBuilder
      Returns:
      The classification.
    • setClassification

      public AnnotationPayload.Builder setClassification(ClassificationAnnotation value)
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
    • setClassification

      public AnnotationPayload.Builder setClassification(ClassificationAnnotation.Builder builderForValue)
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
    • mergeClassification

      public AnnotationPayload.Builder mergeClassification(ClassificationAnnotation value)
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
    • clearClassification

      public AnnotationPayload.Builder clearClassification()
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
    • getClassificationBuilder

      public ClassificationAnnotation.Builder getClassificationBuilder()
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
    • getClassificationOrBuilder

      public ClassificationAnnotationOrBuilder getClassificationOrBuilder()
       Annotation details for content or image classification.
       
      .google.cloud.automl.v1.ClassificationAnnotation classification = 3;
      Specified by:
      getClassificationOrBuilder in interface AnnotationPayloadOrBuilder
    • hasImageObjectDetection

      public boolean hasImageObjectDetection()
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
      Specified by:
      hasImageObjectDetection in interface AnnotationPayloadOrBuilder
      Returns:
      Whether the imageObjectDetection field is set.
    • getImageObjectDetection

      public ImageObjectDetectionAnnotation getImageObjectDetection()
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
      Specified by:
      getImageObjectDetection in interface AnnotationPayloadOrBuilder
      Returns:
      The imageObjectDetection.
    • setImageObjectDetection

      public AnnotationPayload.Builder setImageObjectDetection(ImageObjectDetectionAnnotation value)
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
    • setImageObjectDetection

      public AnnotationPayload.Builder setImageObjectDetection(ImageObjectDetectionAnnotation.Builder builderForValue)
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
    • mergeImageObjectDetection

      public AnnotationPayload.Builder mergeImageObjectDetection(ImageObjectDetectionAnnotation value)
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
    • clearImageObjectDetection

      public AnnotationPayload.Builder clearImageObjectDetection()
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
    • getImageObjectDetectionBuilder

      public ImageObjectDetectionAnnotation.Builder getImageObjectDetectionBuilder()
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
    • getImageObjectDetectionOrBuilder

      public ImageObjectDetectionAnnotationOrBuilder getImageObjectDetectionOrBuilder()
       Annotation details for image object detection.
       
      .google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;
      Specified by:
      getImageObjectDetectionOrBuilder in interface AnnotationPayloadOrBuilder
    • hasTextExtraction

      public boolean hasTextExtraction()
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
      Specified by:
      hasTextExtraction in interface AnnotationPayloadOrBuilder
      Returns:
      Whether the textExtraction field is set.
    • getTextExtraction

      public TextExtractionAnnotation getTextExtraction()
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
      Specified by:
      getTextExtraction in interface AnnotationPayloadOrBuilder
      Returns:
      The textExtraction.
    • setTextExtraction

      public AnnotationPayload.Builder setTextExtraction(TextExtractionAnnotation value)
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
    • setTextExtraction

      public AnnotationPayload.Builder setTextExtraction(TextExtractionAnnotation.Builder builderForValue)
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
    • mergeTextExtraction

      public AnnotationPayload.Builder mergeTextExtraction(TextExtractionAnnotation value)
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
    • clearTextExtraction

      public AnnotationPayload.Builder clearTextExtraction()
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
    • getTextExtractionBuilder

      public TextExtractionAnnotation.Builder getTextExtractionBuilder()
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
    • getTextExtractionOrBuilder

      public TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder()
       Annotation details for text extraction.
       
      .google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;
      Specified by:
      getTextExtractionOrBuilder in interface AnnotationPayloadOrBuilder
    • hasTextSentiment

      public boolean hasTextSentiment()
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
      Specified by:
      hasTextSentiment in interface AnnotationPayloadOrBuilder
      Returns:
      Whether the textSentiment field is set.
    • getTextSentiment

      public TextSentimentAnnotation getTextSentiment()
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
      Specified by:
      getTextSentiment in interface AnnotationPayloadOrBuilder
      Returns:
      The textSentiment.
    • setTextSentiment

      public AnnotationPayload.Builder setTextSentiment(TextSentimentAnnotation value)
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
    • setTextSentiment

      public AnnotationPayload.Builder setTextSentiment(TextSentimentAnnotation.Builder builderForValue)
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
    • mergeTextSentiment

      public AnnotationPayload.Builder mergeTextSentiment(TextSentimentAnnotation value)
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
    • clearTextSentiment

      public AnnotationPayload.Builder clearTextSentiment()
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
    • getTextSentimentBuilder

      public TextSentimentAnnotation.Builder getTextSentimentBuilder()
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
    • getTextSentimentOrBuilder

      public TextSentimentAnnotationOrBuilder getTextSentimentOrBuilder()
       Annotation details for text sentiment.
       
      .google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;
      Specified by:
      getTextSentimentOrBuilder in interface AnnotationPayloadOrBuilder
    • getAnnotationSpecId

      public String getAnnotationSpecId()
       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;
      Specified by:
      getAnnotationSpecId in interface AnnotationPayloadOrBuilder
      Returns:
      The annotationSpecId.
    • getAnnotationSpecIdBytes

      public com.google.protobuf.ByteString getAnnotationSpecIdBytes()
       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;
      Specified by:
      getAnnotationSpecIdBytes in interface AnnotationPayloadOrBuilder
      Returns:
      The bytes for annotationSpecId.
    • setAnnotationSpecId

      public AnnotationPayload.Builder setAnnotationSpecId(String value)
       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;
      Parameters:
      value - The annotationSpecId to set.
      Returns:
      This builder for chaining.
    • clearAnnotationSpecId

      public AnnotationPayload.Builder clearAnnotationSpecId()
       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;
      Returns:
      This builder for chaining.
    • setAnnotationSpecIdBytes

      public AnnotationPayload.Builder setAnnotationSpecIdBytes(com.google.protobuf.ByteString value)
       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;
      Parameters:
      value - The bytes for annotationSpecId to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Output only. The value of
       [display_name][google.cloud.automl.v1.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;
      Specified by:
      getDisplayName in interface AnnotationPayloadOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Output only. The value of
       [display_name][google.cloud.automl.v1.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;
      Specified by:
      getDisplayNameBytes in interface AnnotationPayloadOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public AnnotationPayload.Builder setDisplayName(String value)
       Output only. The value of
       [display_name][google.cloud.automl.v1.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;
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public AnnotationPayload.Builder clearDisplayName()
       Output only. The value of
       [display_name][google.cloud.automl.v1.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;
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public AnnotationPayload.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Output only. The value of
       [display_name][google.cloud.automl.v1.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;
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.