Class AnnotationSpec.Builder (0.129.0)
Version 0.129.0keyboard_arrow_down
public static final class AnnotationSpec . Builder extends GeneratedMessageV3 . Builder<AnnotationSpec . Builder > implements AnnotationSpecOrBuilder
Container of information related to one possible annotation that can be used
in a labeling task. For example, an image classification task where images
are labeled as dog or cat must reference an AnnotationSpec for dog and
an AnnotationSpec for cat.
Protobuf type google.cloud.datalabeling.v1beta1.AnnotationSpec
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors . Descriptor getDescriptor ()
Returns
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AnnotationSpec . Builder addRepeatedField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
build()
public AnnotationSpec build ()
Returns
buildPartial()
public AnnotationSpec buildPartial ()
Returns
clear()
public AnnotationSpec . Builder clear ()
Returns
Overrides
clearDescription()
public AnnotationSpec . Builder clearDescription ()
Optional. User-provided description of the annotation specification.
The description can be up to 10,000 characters long.
string description = 2;
Returns
clearDisplayName()
public AnnotationSpec . Builder clearDisplayName ()
Required. The display name of the AnnotationSpec. Maximum of 64 characters.
string display_name = 1;
Returns
clearField(Descriptors.FieldDescriptor field)
public AnnotationSpec . Builder clearField ( Descriptors . FieldDescriptor field )
Parameter
Returns
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public AnnotationSpec . Builder clearOneof ( Descriptors . OneofDescriptor oneof )
Parameter
Returns
Overrides
clone()
public AnnotationSpec . Builder clone ()
Returns
Overrides
getDefaultInstanceForType()
public AnnotationSpec getDefaultInstanceForType ()
Returns
getDescription()
public String getDescription ()
Optional. User-provided description of the annotation specification.
The description can be up to 10,000 characters long.
string description = 2;
Returns
Type
Description
String
The description.
getDescriptionBytes()
public ByteString getDescriptionBytes ()
Optional. User-provided description of the annotation specification.
The description can be up to 10,000 characters long.
string description = 2;
Returns
Type
Description
ByteString
The bytes for description.
getDescriptorForType()
public Descriptors . Descriptor getDescriptorForType ()
Returns
Overrides
getDisplayName()
public String getDisplayName ()
Required. The display name of the AnnotationSpec. Maximum of 64 characters.
string display_name = 1;
Returns
Type
Description
String
The displayName.
getDisplayNameBytes()
public ByteString getDisplayNameBytes ()
Required. The display name of the AnnotationSpec. Maximum of 64 characters.
string display_name = 1;
Returns
Type
Description
ByteString
The bytes for displayName.
internalGetFieldAccessorTable()
protected GeneratedMessageV3 . FieldAccessorTable internalGetFieldAccessorTable ()
Returns
Overrides
isInitialized()
public final boolean isInitialized ()
Returns
Overrides
mergeFrom(AnnotationSpec other)
public AnnotationSpec . Builder mergeFrom ( AnnotationSpec other )
Parameter
Returns
public AnnotationSpec . Builder mergeFrom ( CodedInputStream input , ExtensionRegistryLite extensionRegistry )
Parameters
Returns
Overrides
Exceptions
mergeFrom(Message other)
public AnnotationSpec . Builder mergeFrom ( Message other )
Parameter
Returns
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AnnotationSpec . Builder mergeUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
setDescription(String value)
public AnnotationSpec . Builder setDescription ( String value )
Optional. User-provided description of the annotation specification.
The description can be up to 10,000 characters long.
string description = 2;
Parameter
Name
Description
value
String The description to set.
Returns
setDescriptionBytes(ByteString value)
public AnnotationSpec . Builder setDescriptionBytes ( ByteString value )
Optional. User-provided description of the annotation specification.
The description can be up to 10,000 characters long.
string description = 2;
Parameter
Name
Description
value
ByteString The bytes for description to set.
Returns
setDisplayName(String value)
public AnnotationSpec . Builder setDisplayName ( String value )
Required. The display name of the AnnotationSpec. Maximum of 64 characters.
string display_name = 1;
Parameter
Name
Description
value
String The displayName to set.
Returns
setDisplayNameBytes(ByteString value)
public AnnotationSpec . Builder setDisplayNameBytes ( ByteString value )
Required. The display name of the AnnotationSpec. Maximum of 64 characters.
string display_name = 1;
Parameter
Name
Description
value
ByteString The bytes for displayName to set.
Returns
setField(Descriptors.FieldDescriptor field, Object value)
public AnnotationSpec . Builder setField ( Descriptors . FieldDescriptor field , Object value )
Parameters
Returns
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AnnotationSpec . Builder setRepeatedField ( Descriptors . FieldDescriptor field , int index , Object value )
Parameters
Returns
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final AnnotationSpec . Builder setUnknownFields ( UnknownFieldSet unknownFields )
Parameter
Returns
Overrides
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-10-11 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-11 UTC."],[],[]]