Class Annotation.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
- com.google.cloud.datalabeling.v1beta1.Annotation.Builder
-
- All Implemented Interfaces:
AnnotationOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- Enclosing class:
- Annotation
public static final class Annotation.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder> implements AnnotationOrBuilder
Annotation for Example. Each example may have one or more annotations. For example in image classification problem, each image might have one or more labels. We call labels binded with this image an Annotation.
Protobuf typegoogle.cloud.datalabeling.v1beta1.Annotation
-
-
Method Summary
-
Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
-
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
-
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
-
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
clear
public Annotation.Builder clear()
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
getDefaultInstanceForType
public Annotation getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public Annotation build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public Annotation buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public Annotation.Builder clone()
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
setField
public Annotation.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
clearField
public Annotation.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
clearOneof
public Annotation.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
setRepeatedField
public Annotation.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
addRepeatedField
public Annotation.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
mergeFrom
public Annotation.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Annotation.Builder>
-
mergeFrom
public Annotation.Builder mergeFrom(Annotation other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
mergeFrom
public Annotation.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<Annotation.Builder>
- Throws:
IOException
-
getName
public String getName()
Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
string name = 1;
- Specified by:
getName
in interfaceAnnotationOrBuilder
- Returns:
- The name.
-
getNameBytes
public com.google.protobuf.ByteString getNameBytes()
Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
string name = 1;
- Specified by:
getNameBytes
in interfaceAnnotationOrBuilder
- Returns:
- The bytes for name.
-
setName
public Annotation.Builder setName(String value)
Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
string name = 1;
- Parameters:
value
- The name to set.- Returns:
- This builder for chaining.
-
clearName
public Annotation.Builder clearName()
Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
string name = 1;
- Returns:
- This builder for chaining.
-
setNameBytes
public Annotation.Builder setNameBytes(com.google.protobuf.ByteString value)
Output only. Unique name of this annotation, format is: projects/{project_id}/datasets/{dataset_id}/annotatedDatasets/{annotated_dataset}/examples/{example_id}/annotations/{annotation_id}
string name = 1;
- Parameters:
value
- The bytes for name to set.- Returns:
- This builder for chaining.
-
getAnnotationSourceValue
public int getAnnotationSourceValue()
Output only. The source of the annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
- Specified by:
getAnnotationSourceValue
in interfaceAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for annotationSource.
-
setAnnotationSourceValue
public Annotation.Builder setAnnotationSourceValue(int value)
Output only. The source of the annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
- Parameters:
value
- The enum numeric value on the wire for annotationSource to set.- Returns:
- This builder for chaining.
-
getAnnotationSource
public AnnotationSource getAnnotationSource()
Output only. The source of the annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
- Specified by:
getAnnotationSource
in interfaceAnnotationOrBuilder
- Returns:
- The annotationSource.
-
setAnnotationSource
public Annotation.Builder setAnnotationSource(AnnotationSource value)
Output only. The source of the annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
- Parameters:
value
- The annotationSource to set.- Returns:
- This builder for chaining.
-
clearAnnotationSource
public Annotation.Builder clearAnnotationSource()
Output only. The source of the annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSource annotation_source = 2;
- Returns:
- This builder for chaining.
-
hasAnnotationValue
public boolean hasAnnotationValue()
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
- Specified by:
hasAnnotationValue
in interfaceAnnotationOrBuilder
- Returns:
- Whether the annotationValue field is set.
-
getAnnotationValue
public AnnotationValue getAnnotationValue()
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
- Specified by:
getAnnotationValue
in interfaceAnnotationOrBuilder
- Returns:
- The annotationValue.
-
setAnnotationValue
public Annotation.Builder setAnnotationValue(AnnotationValue value)
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
-
setAnnotationValue
public Annotation.Builder setAnnotationValue(AnnotationValue.Builder builderForValue)
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
-
mergeAnnotationValue
public Annotation.Builder mergeAnnotationValue(AnnotationValue value)
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
-
clearAnnotationValue
public Annotation.Builder clearAnnotationValue()
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
-
getAnnotationValueBuilder
public AnnotationValue.Builder getAnnotationValueBuilder()
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
-
getAnnotationValueOrBuilder
public AnnotationValueOrBuilder getAnnotationValueOrBuilder()
Output only. This is the actual annotation value, e.g classification, bounding box values are stored here.
.google.cloud.datalabeling.v1beta1.AnnotationValue annotation_value = 3;
- Specified by:
getAnnotationValueOrBuilder
in interfaceAnnotationOrBuilder
-
hasAnnotationMetadata
public boolean hasAnnotationMetadata()
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
- Specified by:
hasAnnotationMetadata
in interfaceAnnotationOrBuilder
- Returns:
- Whether the annotationMetadata field is set.
-
getAnnotationMetadata
public AnnotationMetadata getAnnotationMetadata()
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
- Specified by:
getAnnotationMetadata
in interfaceAnnotationOrBuilder
- Returns:
- The annotationMetadata.
-
setAnnotationMetadata
public Annotation.Builder setAnnotationMetadata(AnnotationMetadata value)
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
-
setAnnotationMetadata
public Annotation.Builder setAnnotationMetadata(AnnotationMetadata.Builder builderForValue)
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
-
mergeAnnotationMetadata
public Annotation.Builder mergeAnnotationMetadata(AnnotationMetadata value)
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
-
clearAnnotationMetadata
public Annotation.Builder clearAnnotationMetadata()
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
-
getAnnotationMetadataBuilder
public AnnotationMetadata.Builder getAnnotationMetadataBuilder()
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
-
getAnnotationMetadataOrBuilder
public AnnotationMetadataOrBuilder getAnnotationMetadataOrBuilder()
Output only. Annotation metadata, including information like votes for labels.
.google.cloud.datalabeling.v1beta1.AnnotationMetadata annotation_metadata = 4;
- Specified by:
getAnnotationMetadataOrBuilder
in interfaceAnnotationOrBuilder
-
getAnnotationSentimentValue
public int getAnnotationSentimentValue()
Output only. Sentiment for this annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
- Specified by:
getAnnotationSentimentValue
in interfaceAnnotationOrBuilder
- Returns:
- The enum numeric value on the wire for annotationSentiment.
-
setAnnotationSentimentValue
public Annotation.Builder setAnnotationSentimentValue(int value)
Output only. Sentiment for this annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
- Parameters:
value
- The enum numeric value on the wire for annotationSentiment to set.- Returns:
- This builder for chaining.
-
getAnnotationSentiment
public AnnotationSentiment getAnnotationSentiment()
Output only. Sentiment for this annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
- Specified by:
getAnnotationSentiment
in interfaceAnnotationOrBuilder
- Returns:
- The annotationSentiment.
-
setAnnotationSentiment
public Annotation.Builder setAnnotationSentiment(AnnotationSentiment value)
Output only. Sentiment for this annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
- Parameters:
value
- The annotationSentiment to set.- Returns:
- This builder for chaining.
-
clearAnnotationSentiment
public Annotation.Builder clearAnnotationSentiment()
Output only. Sentiment for this annotation.
.google.cloud.datalabeling.v1beta1.AnnotationSentiment annotation_sentiment = 6;
- Returns:
- This builder for chaining.
-
setUnknownFields
public final Annotation.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
mergeUnknownFields
public final Annotation.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<Annotation.Builder>
-
-