Class Tag (1.34.0) 
  
  
  
   
  
    
  
  
    
    
    
    
  Version 1.34.0keyboard_arrow_down  
  
 
    
    
    
    
      
  
  
  
    
public   final   class  Tag   extends   GeneratedMessageV3   implements   TagOrBuilder  
   Tags are used to attach custom metadata to Data Catalog resources. Tags
 conform to the specifications within their tag template.
 See Data Catalog
 IAM  for information
 on the permissions needed to create or view tags.
 Protobuf type google.cloud.datacatalog.v1beta1.Tag
    Inherited Members 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT) 
    
    
      com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int) 
    
    
    
    
    
    
    
    
      com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>) 
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
   
  Static Fields
   
  COLUMN_FIELD_NUMBER 
  
    
public   static   final   int   COLUMN_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  FIELDS_FIELD_NUMBER 
  
    
public   static   final   int   FIELDS_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  NAME_FIELD_NUMBER 
  
    
public   static   final   int   NAME_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  TEMPLATE_DISPLAY_NAME_FIELD_NUMBER 
  
    
public   static   final   int   TEMPLATE_DISPLAY_NAME_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  TEMPLATE_FIELD_NUMBER 
  
    
public   static   final   int   TEMPLATE_FIELD_NUMBER  
  
    
      
        Field Value  
      
        Type Description  
      
        int  
     
  
  Static Methods
   
  getDefaultInstance() 
  
    
public   static   Tag   getDefaultInstance ()  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  getDescriptor() 
  
    
public   static   final   Descriptors . Descriptor   getDescriptor ()  
  
  newBuilder() 
  
    
public   static   Tag . Builder   newBuilder ()  
  
  newBuilder(Tag prototype) 
  
    
public   static   Tag . Builder   newBuilder ( Tag   prototype )  
  
    
      
        Parameter  
      
        Name Description  
      
        prototypeTag  
     
  
  
  
    
public   static   Tag   parseDelimitedFrom ( InputStream   input )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  
    
public   static   Tag   parseDelimitedFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parseFrom(byte[] data) 
  
    
public   static   Tag   parseFrom ( byte []   data )  
  
    
      
        Parameter  
      
        Name Description  
      
        databyte [] 
     
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Tag   parseFrom ( byte []   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parseFrom(ByteString data) 
  
    
public   static   Tag   parseFrom ( ByteString   data )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Tag   parseFrom ( ByteString   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  
    
public   static   Tag   parseFrom ( CodedInputStream   input )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  
    
public   static   Tag   parseFrom ( CodedInputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  
    
public   static   Tag   parseFrom ( InputStream   input )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  
    
public   static   Tag   parseFrom ( InputStream   input ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parseFrom(ByteBuffer data) 
  
    
public   static   Tag   parseFrom ( ByteBuffer   data )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry) 
  
    
public   static   Tag   parseFrom ( ByteBuffer   data ,   ExtensionRegistryLite   extensionRegistry )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  
  parser() 
  
    
public   static   Parser<Tag>   parser ()  
  
  Methods
   
  containsFields(String key) 
  
    
public   boolean   containsFields ( String   key )  
   Required. This maps the ID of a tag field to the value of and additional
 information about that field. Valid field IDs are defined by the tag's
 template. A tag must have at least 1 field and at most 500 fields.
 
 map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
 
    
      
        Parameter  
      
        Name Description  
      
        keyString  
     
  
  
  equals(Object obj) 
  
    
public   boolean   equals ( Object   obj )  
  
    
      
        Parameter  
      
        Name Description  
      
        objObject  
     
  
  
  Overrides 
  
  getColumn() 
  
    
public   String   getColumn ()  
   Resources like Entry can have schemas associated with them. This scope
 allows users to attach tags to an individual column based on that schema.
 For attaching a tag to a nested column, use . to separate the column
 names. Example:
outer_column.inner_column 
 string column = 4;
    
      
        Returns  
      
        Type Description  
      
        String The column.
 
     
  
  getColumnBytes() 
  
    
public   ByteString   getColumnBytes ()  
   Resources like Entry can have schemas associated with them. This scope
 allows users to attach tags to an individual column based on that schema.
 For attaching a tag to a nested column, use . to separate the column
 names. Example:
outer_column.inner_column 
 string column = 4;
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for column.
 
     
  
  getDefaultInstanceForType() 
  
    
public   Tag   getDefaultInstanceForType ()  
  
    
      
        Returns  
      
        Type Description  
      
        Tag  
     
  
  getFields() 
  
    
public   Map<String , TagField >  getFields ()  
  
  
  getFieldsCount() 
  
    
public   int   getFieldsCount ()  
   Required. This maps the ID of a tag field to the value of and additional
 information about that field. Valid field IDs are defined by the tag's
 template. A tag must have at least 1 field and at most 500 fields.
 
 map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
 
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  getFieldsMap() 
  
    
public   Map<String , TagField >  getFieldsMap ()  
   Required. This maps the ID of a tag field to the value of and additional
 information about that field. Valid field IDs are defined by the tag's
 template. A tag must have at least 1 field and at most 500 fields.
 
 map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
 
getFieldsOrDefault(String key, TagField defaultValue) 
  
    
public   TagField   getFieldsOrDefault ( String   key ,   TagField   defaultValue )  
   Required. This maps the ID of a tag field to the value of and additional
 information about that field. Valid field IDs are defined by the tag's
 template. A tag must have at least 1 field and at most 500 fields.
 
 map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
 
getFieldsOrThrow(String key) 
  
    
public   TagField   getFieldsOrThrow ( String   key )  
   Required. This maps the ID of a tag field to the value of and additional
 information about that field. Valid field IDs are defined by the tag's
 template. A tag must have at least 1 field and at most 500 fields.
 
 map<string, .google.cloud.datacatalog.v1beta1.TagField> fields = 3 [(.google.api.field_behavior) = REQUIRED];
 
    
      
        Parameter  
      
        Name Description  
      
        keyString  
     
  
  
  getName() 
  
   The resource name of the tag in URL format. Example:
projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
where tag_id is a system-generated identifier.
Note that this Tag may not actually be stored in the location in this name.
 
 string name = 1;
    
      
        Returns  
      
        Type Description  
      
        String The name.
 
     
  
  getNameBytes() 
  
    
public   ByteString   getNameBytes ()  
   The resource name of the tag in URL format. Example:
projects/{project_id}/locations/{location}/entrygroups/{entry_group_id}/entries/{entry_id}/tags/{tag_id}
where tag_id is a system-generated identifier.
Note that this Tag may not actually be stored in the location in this name.
 
 string name = 1;
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for name.
 
     
  
  getParserForType() 
  
    
public   Parser<Tag>   getParserForType ()  
  
  Overrides 
  
  getScopeCase() 
  
    
public   Tag . ScopeCase   getScopeCase ()  
  
  getSerializedSize() 
  
    
public   int   getSerializedSize ()  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  getTemplate() 
  
    
public   String   getTemplate ()  
   Required. The resource name of the tag template that this tag uses.
 Example:
 string template = 2 [(.google.api.field_behavior) = REQUIRED];
    
      
        Returns  
      
        Type Description  
      
        String The template.
 
     
  
  getTemplateBytes() 
  
    
public   ByteString   getTemplateBytes ()  
   Required. The resource name of the tag template that this tag uses.
 Example:
 string template = 2 [(.google.api.field_behavior) = REQUIRED];
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for template.
 
     
  
  getTemplateDisplayName() 
  
    
public   String   getTemplateDisplayName ()  
   Output only. The display name of the tag template.
 string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    
      
        Returns  
      
        Type Description  
      
        String The templateDisplayName.
 
     
  
  getTemplateDisplayNameBytes() 
  
    
public   ByteString   getTemplateDisplayNameBytes ()  
   Output only. The display name of the tag template.
 string template_display_name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
    
      
        Returns  
      
        Type Description  
      
        ByteString The bytes for templateDisplayName.
 
     
  
  hasColumn() 
  
    
public   boolean   hasColumn ()  
   Resources like Entry can have schemas associated with them. This scope
 allows users to attach tags to an individual column based on that schema.
 For attaching a tag to a nested column, use . to separate the column
 names. Example:
outer_column.inner_column 
 string column = 4;
    
      
        Returns  
      
        Type Description  
      
        boolean Whether the column field is set.
 
     
  
  hashCode() 
  
  
    
      
        Returns  
      
        Type Description  
      
        int  
     
  
  Overrides 
  
  internalGetFieldAccessorTable() 
  
    
protected   GeneratedMessageV3 . FieldAccessorTable   internalGetFieldAccessorTable ()  
  
  Overrides 
  
  internalGetMapField(int number) 
  
    
protected   MapField   internalGetMapField ( int   number )  
  
    
      
        Parameter  
      
        Name Description  
      
        numberint  
     
  
  
  Overrides 
  
  isInitialized() 
  
    
public   final   boolean   isInitialized ()  
  
  Overrides 
  
  newBuilderForType() 
  
    
public   Tag . Builder   newBuilderForType ()  
  
  newBuilderForType(GeneratedMessageV3.BuilderParent parent) 
  
    
protected   Tag . Builder   newBuilderForType ( GeneratedMessageV3 . BuilderParent   parent )  
  
  
  Overrides 
  
  newInstance(GeneratedMessageV3.UnusedPrivateParameter unused) 
  
    
protected   Object   newInstance ( GeneratedMessageV3 . UnusedPrivateParameter   unused )  
  
  
    
      
        Returns  
      
        Type Description  
      
        Object  
     
  
  Overrides 
  
  toBuilder() 
  
    
public   Tag . Builder   toBuilder ()  
  
  writeTo(CodedOutputStream output) 
  
    
public   void   writeTo ( CodedOutputStream   output )  
  
  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-28 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-28 UTC."],[],[]]