Class AnnotationPayload

  • All Implemented Interfaces:
    AnnotationPayloadOrBuilder, com.google.protobuf.Message, com.google.protobuf.MessageLite, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Serializable

    public final class AnnotationPayload
    extends com.google.protobuf.GeneratedMessageV3
    implements AnnotationPayloadOrBuilder
     Contains annotation information that is relevant to AutoML.
     
    Protobuf type google.cloud.automl.v1.AnnotationPayload
    See Also:
    Serialized Form
    • Field Detail

      • TRANSLATION_FIELD_NUMBER

        public static final int TRANSLATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • CLASSIFICATION_FIELD_NUMBER

        public static final int CLASSIFICATION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • IMAGE_OBJECT_DETECTION_FIELD_NUMBER

        public static final int IMAGE_OBJECT_DETECTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TEXT_EXTRACTION_FIELD_NUMBER

        public static final int TEXT_EXTRACTION_FIELD_NUMBER
        See Also:
        Constant Field Values
      • TEXT_SENTIMENT_FIELD_NUMBER

        public static final int TEXT_SENTIMENT_FIELD_NUMBER
        See Also:
        Constant Field Values
      • ANNOTATION_SPEC_ID_FIELD_NUMBER

        public static final int ANNOTATION_SPEC_ID_FIELD_NUMBER
        See Also:
        Constant Field Values
      • DISPLAY_NAME_FIELD_NUMBER

        public static final int DISPLAY_NAME_FIELD_NUMBER
        See Also:
        Constant Field Values
    • Method Detail

      • newInstance

        protected Object newInstance​(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
        Overrides:
        newInstance in class com.google.protobuf.GeneratedMessageV3
      • getDescriptor

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

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • 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.
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3
      • writeTo

        public void writeTo​(com.google.protobuf.CodedOutputStream output)
                     throws IOException
        Specified by:
        writeTo in interface com.google.protobuf.MessageLite
        Overrides:
        writeTo in class com.google.protobuf.GeneratedMessageV3
        Throws:
        IOException
      • getSerializedSize

        public int getSerializedSize()
        Specified by:
        getSerializedSize in interface com.google.protobuf.MessageLite
        Overrides:
        getSerializedSize in class com.google.protobuf.GeneratedMessageV3
      • equals

        public boolean equals​(Object obj)
        Specified by:
        equals in interface com.google.protobuf.Message
        Overrides:
        equals in class com.google.protobuf.AbstractMessage
      • hashCode

        public int hashCode()
        Specified by:
        hashCode in interface com.google.protobuf.Message
        Overrides:
        hashCode in class com.google.protobuf.AbstractMessage
      • parseFrom

        public static AnnotationPayload parseFrom​(ByteBuffer data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotationPayload parseFrom​(ByteBuffer data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotationPayload parseFrom​(com.google.protobuf.ByteString data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotationPayload parseFrom​(com.google.protobuf.ByteString data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotationPayload parseFrom​(byte[] data)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotationPayload parseFrom​(byte[] data,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws com.google.protobuf.InvalidProtocolBufferException
        Throws:
        com.google.protobuf.InvalidProtocolBufferException
      • parseFrom

        public static AnnotationPayload parseFrom​(com.google.protobuf.CodedInputStream input,
                                                  com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                           throws IOException
        Throws:
        IOException
      • newBuilderForType

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

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

        protected AnnotationPayload.Builder newBuilderForType​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
        Specified by:
        newBuilderForType in class com.google.protobuf.GeneratedMessageV3
      • getParserForType

        public com.google.protobuf.Parser<AnnotationPayload> getParserForType()
        Specified by:
        getParserForType in interface com.google.protobuf.Message
        Specified by:
        getParserForType in interface com.google.protobuf.MessageLite
        Overrides:
        getParserForType in class com.google.protobuf.GeneratedMessageV3
      • getDefaultInstanceForType

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