Class AnnotationPayload.Builder (2.31.0)

public static final class AnnotationPayload.Builder extends GeneratedMessageV3.Builder<AnnotationPayload.Builder> implements AnnotationPayloadOrBuilder

Contains annotation information that is relevant to AutoML.

Protobuf type google.cloud.automl.v1.AnnotationPayload

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AnnotationPayload.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

build()

public AnnotationPayload build()
Returns
TypeDescription
AnnotationPayload

buildPartial()

public AnnotationPayload buildPartial()
Returns
TypeDescription
AnnotationPayload

clear()

public AnnotationPayload.Builder clear()
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

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
TypeDescription
AnnotationPayload.Builder

This builder for chaining.

clearClassification()

public AnnotationPayload.Builder clearClassification()

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Returns
TypeDescription
AnnotationPayload.Builder

clearDetail()

public AnnotationPayload.Builder clearDetail()
Returns
TypeDescription
AnnotationPayload.Builder

clearDisplayName()

public AnnotationPayload.Builder clearDisplayName()

Output only. The value of 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
TypeDescription
AnnotationPayload.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public AnnotationPayload.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

clearImageObjectDetection()

public AnnotationPayload.Builder clearImageObjectDetection()

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Returns
TypeDescription
AnnotationPayload.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AnnotationPayload.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

clearTextExtraction()

public AnnotationPayload.Builder clearTextExtraction()

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Returns
TypeDescription
AnnotationPayload.Builder

clearTextSentiment()

public AnnotationPayload.Builder clearTextSentiment()

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Returns
TypeDescription
AnnotationPayload.Builder

clearTranslation()

public AnnotationPayload.Builder clearTranslation()

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Returns
TypeDescription
AnnotationPayload.Builder

clone()

public AnnotationPayload.Builder clone()
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

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;

Returns
TypeDescription
String

The annotationSpecId.

getAnnotationSpecIdBytes()

public 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;

Returns
TypeDescription
ByteString

The bytes for annotationSpecId.

getClassification()

public ClassificationAnnotation getClassification()

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Returns
TypeDescription
ClassificationAnnotation

The classification.

getClassificationBuilder()

public ClassificationAnnotation.Builder getClassificationBuilder()

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Returns
TypeDescription
ClassificationAnnotation.Builder

getClassificationOrBuilder()

public ClassificationAnnotationOrBuilder getClassificationOrBuilder()

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Returns
TypeDescription
ClassificationAnnotationOrBuilder

getDefaultInstanceForType()

public AnnotationPayload getDefaultInstanceForType()
Returns
TypeDescription
AnnotationPayload

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getDetailCase()

public AnnotationPayload.DetailCase getDetailCase()
Returns
TypeDescription
AnnotationPayload.DetailCase

getDisplayName()

public String getDisplayName()

Output only. The value of 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
TypeDescription
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Output only. The value of 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
TypeDescription
ByteString

The bytes for displayName.

getImageObjectDetection()

public ImageObjectDetectionAnnotation getImageObjectDetection()

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Returns
TypeDescription
ImageObjectDetectionAnnotation

The imageObjectDetection.

getImageObjectDetectionBuilder()

public ImageObjectDetectionAnnotation.Builder getImageObjectDetectionBuilder()

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Returns
TypeDescription
ImageObjectDetectionAnnotation.Builder

getImageObjectDetectionOrBuilder()

public ImageObjectDetectionAnnotationOrBuilder getImageObjectDetectionOrBuilder()

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Returns
TypeDescription
ImageObjectDetectionAnnotationOrBuilder

getTextExtraction()

public TextExtractionAnnotation getTextExtraction()

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Returns
TypeDescription
TextExtractionAnnotation

The textExtraction.

getTextExtractionBuilder()

public TextExtractionAnnotation.Builder getTextExtractionBuilder()

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Returns
TypeDescription
TextExtractionAnnotation.Builder

getTextExtractionOrBuilder()

public TextExtractionAnnotationOrBuilder getTextExtractionOrBuilder()

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Returns
TypeDescription
TextExtractionAnnotationOrBuilder

getTextSentiment()

public TextSentimentAnnotation getTextSentiment()

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Returns
TypeDescription
TextSentimentAnnotation

The textSentiment.

getTextSentimentBuilder()

public TextSentimentAnnotation.Builder getTextSentimentBuilder()

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Returns
TypeDescription
TextSentimentAnnotation.Builder

getTextSentimentOrBuilder()

public TextSentimentAnnotationOrBuilder getTextSentimentOrBuilder()

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Returns
TypeDescription
TextSentimentAnnotationOrBuilder

getTranslation()

public TranslationAnnotation getTranslation()

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Returns
TypeDescription
TranslationAnnotation

The translation.

getTranslationBuilder()

public TranslationAnnotation.Builder getTranslationBuilder()

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Returns
TypeDescription
TranslationAnnotation.Builder

getTranslationOrBuilder()

public TranslationAnnotationOrBuilder getTranslationOrBuilder()

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Returns
TypeDescription
TranslationAnnotationOrBuilder

hasClassification()

public boolean hasClassification()

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Returns
TypeDescription
boolean

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;

Returns
TypeDescription
boolean

Whether the imageObjectDetection field is set.

hasTextExtraction()

public boolean hasTextExtraction()

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Returns
TypeDescription
boolean

Whether the textExtraction field is set.

hasTextSentiment()

public boolean hasTextSentiment()

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Returns
TypeDescription
boolean

Whether the textSentiment field is set.

hasTranslation()

public boolean hasTranslation()

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Returns
TypeDescription
boolean

Whether the translation field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeClassification(ClassificationAnnotation value)

public AnnotationPayload.Builder mergeClassification(ClassificationAnnotation value)

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Parameter
NameDescription
valueClassificationAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

mergeFrom(AnnotationPayload other)

public AnnotationPayload.Builder mergeFrom(AnnotationPayload other)
Parameter
NameDescription
otherAnnotationPayload
Returns
TypeDescription
AnnotationPayload.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AnnotationPayload.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AnnotationPayload.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AnnotationPayload.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

mergeImageObjectDetection(ImageObjectDetectionAnnotation value)

public AnnotationPayload.Builder mergeImageObjectDetection(ImageObjectDetectionAnnotation value)

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Parameter
NameDescription
valueImageObjectDetectionAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

mergeTextExtraction(TextExtractionAnnotation value)

public AnnotationPayload.Builder mergeTextExtraction(TextExtractionAnnotation value)

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Parameter
NameDescription
valueTextExtractionAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

mergeTextSentiment(TextSentimentAnnotation value)

public AnnotationPayload.Builder mergeTextSentiment(TextSentimentAnnotation value)

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Parameter
NameDescription
valueTextSentimentAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

mergeTranslation(TranslationAnnotation value)

public AnnotationPayload.Builder mergeTranslation(TranslationAnnotation value)

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Parameter
NameDescription
valueTranslationAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AnnotationPayload.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

setAnnotationSpecId(String value)

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;

Parameter
NameDescription
valueString

The annotationSpecId to set.

Returns
TypeDescription
AnnotationPayload.Builder

This builder for chaining.

setAnnotationSpecIdBytes(ByteString value)

public AnnotationPayload.Builder setAnnotationSpecIdBytes(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;

Parameter
NameDescription
valueByteString

The bytes for annotationSpecId to set.

Returns
TypeDescription
AnnotationPayload.Builder

This builder for chaining.

setClassification(ClassificationAnnotation value)

public AnnotationPayload.Builder setClassification(ClassificationAnnotation value)

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Parameter
NameDescription
valueClassificationAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

setClassification(ClassificationAnnotation.Builder builderForValue)

public AnnotationPayload.Builder setClassification(ClassificationAnnotation.Builder builderForValue)

Annotation details for content or image classification.

.google.cloud.automl.v1.ClassificationAnnotation classification = 3;

Parameter
NameDescription
builderForValueClassificationAnnotation.Builder
Returns
TypeDescription
AnnotationPayload.Builder

setDisplayName(String value)

public AnnotationPayload.Builder setDisplayName(String value)

Output only. The value of 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;

Parameter
NameDescription
valueString

The displayName to set.

Returns
TypeDescription
AnnotationPayload.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public AnnotationPayload.Builder setDisplayNameBytes(ByteString value)

Output only. The value of 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;

Parameter
NameDescription
valueByteString

The bytes for displayName to set.

Returns
TypeDescription
AnnotationPayload.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AnnotationPayload.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

setImageObjectDetection(ImageObjectDetectionAnnotation value)

public AnnotationPayload.Builder setImageObjectDetection(ImageObjectDetectionAnnotation value)

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Parameter
NameDescription
valueImageObjectDetectionAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

setImageObjectDetection(ImageObjectDetectionAnnotation.Builder builderForValue)

public AnnotationPayload.Builder setImageObjectDetection(ImageObjectDetectionAnnotation.Builder builderForValue)

Annotation details for image object detection.

.google.cloud.automl.v1.ImageObjectDetectionAnnotation image_object_detection = 4;

Parameter
NameDescription
builderForValueImageObjectDetectionAnnotation.Builder
Returns
TypeDescription
AnnotationPayload.Builder

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public AnnotationPayload.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AnnotationPayload.Builder
Overrides

setTextExtraction(TextExtractionAnnotation value)

public AnnotationPayload.Builder setTextExtraction(TextExtractionAnnotation value)

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Parameter
NameDescription
valueTextExtractionAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

setTextExtraction(TextExtractionAnnotation.Builder builderForValue)

public AnnotationPayload.Builder setTextExtraction(TextExtractionAnnotation.Builder builderForValue)

Annotation details for text extraction.

.google.cloud.automl.v1.TextExtractionAnnotation text_extraction = 6;

Parameter
NameDescription
builderForValueTextExtractionAnnotation.Builder
Returns
TypeDescription
AnnotationPayload.Builder

setTextSentiment(TextSentimentAnnotation value)

public AnnotationPayload.Builder setTextSentiment(TextSentimentAnnotation value)

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Parameter
NameDescription
valueTextSentimentAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

setTextSentiment(TextSentimentAnnotation.Builder builderForValue)

public AnnotationPayload.Builder setTextSentiment(TextSentimentAnnotation.Builder builderForValue)

Annotation details for text sentiment.

.google.cloud.automl.v1.TextSentimentAnnotation text_sentiment = 7;

Parameter
NameDescription
builderForValueTextSentimentAnnotation.Builder
Returns
TypeDescription
AnnotationPayload.Builder

setTranslation(TranslationAnnotation value)

public AnnotationPayload.Builder setTranslation(TranslationAnnotation value)

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Parameter
NameDescription
valueTranslationAnnotation
Returns
TypeDescription
AnnotationPayload.Builder

setTranslation(TranslationAnnotation.Builder builderForValue)

public AnnotationPayload.Builder setTranslation(TranslationAnnotation.Builder builderForValue)

Annotation details for translation.

.google.cloud.automl.v1.TranslationAnnotation translation = 2;

Parameter
NameDescription
builderForValueTranslationAnnotation.Builder
Returns
TypeDescription
AnnotationPayload.Builder

setUnknownFields(UnknownFieldSet unknownFields)

public final AnnotationPayload.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AnnotationPayload.Builder
Overrides