Class AnnotationSpec.Builder (0.166.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 0.166.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.internalGetMapFieldReflection(int) 
    
    
    
      com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int) 
    
    
    
    
    
    
      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 ()  
  
  Methods
   
  addRepeatedField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   AnnotationSpec . Builder   addRepeatedField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  build() 
  
    
public   AnnotationSpec   build ()  
  
  buildPartial() 
  
    
public   AnnotationSpec   buildPartial ()  
  
  clear() 
  
    
public   AnnotationSpec . Builder   clear ()  
  
  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;
clearDisplayName() 
  
    
public   AnnotationSpec . Builder   clearDisplayName ()  
   Required. The display name of the AnnotationSpec. Maximum of 64 characters.
 string display_name = 1;
clearField(Descriptors.FieldDescriptor field) 
  
    
public   AnnotationSpec . Builder   clearField ( Descriptors . FieldDescriptor   field )  
  
  
  Overrides 
  
  clearOneof(Descriptors.OneofDescriptor oneof) 
  
    
public   AnnotationSpec . Builder   clearOneof ( Descriptors . OneofDescriptor   oneof )  
  
  
  Overrides 
  
  clone() 
  
    
public   AnnotationSpec . Builder   clone ()  
  
  Overrides 
  
  getDefaultInstanceForType() 
  
    
public   AnnotationSpec   getDefaultInstanceForType ()  
  
  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 ()  
  
  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 ()  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  mergeFrom(AnnotationSpec other) 
  
    
public   AnnotationSpec . Builder   mergeFrom ( AnnotationSpec   other )  
  
  
  
    
public   AnnotationSpec . Builder   mergeFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
  Overrides 
  
  
  mergeFrom(Message other) 
  
    
public   AnnotationSpec . Builder   mergeFrom ( Message   other )  
  
    
      
        Parameter  
      
        Name Description  
      
        otherMessage  
     
  
  
  Overrides 
  
  mergeUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   AnnotationSpec . Builder   mergeUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  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  
      
        valueString The description to set.
 
     
  
  
  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  
      
        valueByteString The bytes for description to set.
 
     
  
  
  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  
      
        valueString The displayName to set.
 
     
  
  
  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  
      
        valueByteString The bytes for displayName to set.
 
     
  
  
  setField(Descriptors.FieldDescriptor field, Object value) 
  
    
public   AnnotationSpec . Builder   setField ( Descriptors . FieldDescriptor   field ,   Object   value )  
  
  
  Overrides 
  
  setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value) 
  
    
public   AnnotationSpec . Builder   setRepeatedField ( Descriptors . FieldDescriptor   field ,   int   index ,   Object   value )  
  
  
  Overrides 
  
  setUnknownFields(UnknownFieldSet unknownFields) 
  
    
public   final   AnnotationSpec . Builder   setUnknownFields ( UnknownFieldSet   unknownFields )  
  
  
  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."],[],[]]