Class Tag.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Tag.Builder>
com.google.cloud.databasecenter.v1beta.Tag.Builder
All Implemented Interfaces:
TagOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Tag

public static final class Tag.Builder extends com.google.protobuf.GeneratedMessage.Builder<Tag.Builder> implements TagOrBuilder
 Tag is a key value pair attached to a resource.
 
Protobuf type google.cloud.databasecenter.v1beta.Tag
  • Method Summary

    Modifier and Type
    Method
    Description
     
     
     
    Indicates the inheritance status of a tag value attached to the given resource.
    string key = 1;
    The source of the tag.
    The value part of the tag.
     
    static final com.google.protobuf.Descriptors.Descriptor
     
    com.google.protobuf.Descriptors.Descriptor
     
    boolean
    Indicates the inheritance status of a tag value attached to the given resource.
    string key = 1;
    com.google.protobuf.ByteString
    string key = 1;
    The source of the tag.
    com.google.protobuf.ByteString
    The source of the tag.
    The value part of the tag.
    com.google.protobuf.ByteString
    The value part of the tag.
    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
     
    final boolean
     
    mergeFrom(Tag other)
     
    mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
     
    mergeFrom(com.google.protobuf.Message other)
     
    setInherited(boolean value)
    Indicates the inheritance status of a tag value attached to the given resource.
    setKey(String value)
    string key = 1;
    setKeyBytes(com.google.protobuf.ByteString value)
    string key = 1;
    The source of the tag.
    setSourceBytes(com.google.protobuf.ByteString value)
    The source of the tag.
    The value part of the tag.
    setValueBytes(com.google.protobuf.ByteString value)
    The value part of the tag.

    Methods inherited from class com.google.protobuf.GeneratedMessage.Builder

    addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, 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

    Methods inherited from interface com.google.protobuf.Message.Builder

    mergeDelimitedFrom, mergeDelimitedFrom

    Methods inherited from interface com.google.protobuf.MessageLite.Builder

    mergeFrom

    Methods inherited from interface com.google.protobuf.MessageOrBuilder

    findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<Tag.Builder>
    • clear

      public Tag.Builder clear()
      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<Tag.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<Tag.Builder>
    • getDefaultInstanceForType

      public Tag getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public Tag build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public Tag buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public Tag.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Tag.Builder>
    • mergeFrom

      public Tag.Builder mergeFrom(Tag other)
    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<Tag.Builder>
    • mergeFrom

      public Tag.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Tag.Builder>
      Throws:
      IOException
    • getKey

      public String getKey()
      string key = 1;
      Specified by:
      getKey in interface TagOrBuilder
      Returns:
      The key.
    • getKeyBytes

      public com.google.protobuf.ByteString getKeyBytes()
      string key = 1;
      Specified by:
      getKeyBytes in interface TagOrBuilder
      Returns:
      The bytes for key.
    • setKey

      public Tag.Builder setKey(String value)
      string key = 1;
      Parameters:
      value - The key to set.
      Returns:
      This builder for chaining.
    • clearKey

      public Tag.Builder clearKey()
      string key = 1;
      Returns:
      This builder for chaining.
    • setKeyBytes

      public Tag.Builder setKeyBytes(com.google.protobuf.ByteString value)
      string key = 1;
      Parameters:
      value - The bytes for key to set.
      Returns:
      This builder for chaining.
    • getValue

      public String getValue()
       The value part of the tag.
       
      string value = 2;
      Specified by:
      getValue in interface TagOrBuilder
      Returns:
      The value.
    • getValueBytes

      public com.google.protobuf.ByteString getValueBytes()
       The value part of the tag.
       
      string value = 2;
      Specified by:
      getValueBytes in interface TagOrBuilder
      Returns:
      The bytes for value.
    • setValue

      public Tag.Builder setValue(String value)
       The value part of the tag.
       
      string value = 2;
      Parameters:
      value - The value to set.
      Returns:
      This builder for chaining.
    • clearValue

      public Tag.Builder clearValue()
       The value part of the tag.
       
      string value = 2;
      Returns:
      This builder for chaining.
    • setValueBytes

      public Tag.Builder setValueBytes(com.google.protobuf.ByteString value)
       The value part of the tag.
       
      string value = 2;
      Parameters:
      value - The bytes for value to set.
      Returns:
      This builder for chaining.
    • getSource

      public String getSource()
       The source of the tag. According to
       https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels,
       tags can be created only at the project or organization level. Tags can be
       inherited from different project as well not just the current project where
       the database resource is present.
       Format:
       "projects/{PROJECT_ID}",
       "projects/{PROJECT_NUMBER}",
       "organizations/{ORGANIZATION_ID}"
       
      string source = 3;
      Specified by:
      getSource in interface TagOrBuilder
      Returns:
      The source.
    • getSourceBytes

      public com.google.protobuf.ByteString getSourceBytes()
       The source of the tag. According to
       https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels,
       tags can be created only at the project or organization level. Tags can be
       inherited from different project as well not just the current project where
       the database resource is present.
       Format:
       "projects/{PROJECT_ID}",
       "projects/{PROJECT_NUMBER}",
       "organizations/{ORGANIZATION_ID}"
       
      string source = 3;
      Specified by:
      getSourceBytes in interface TagOrBuilder
      Returns:
      The bytes for source.
    • setSource

      public Tag.Builder setSource(String value)
       The source of the tag. According to
       https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels,
       tags can be created only at the project or organization level. Tags can be
       inherited from different project as well not just the current project where
       the database resource is present.
       Format:
       "projects/{PROJECT_ID}",
       "projects/{PROJECT_NUMBER}",
       "organizations/{ORGANIZATION_ID}"
       
      string source = 3;
      Parameters:
      value - The source to set.
      Returns:
      This builder for chaining.
    • clearSource

      public Tag.Builder clearSource()
       The source of the tag. According to
       https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels,
       tags can be created only at the project or organization level. Tags can be
       inherited from different project as well not just the current project where
       the database resource is present.
       Format:
       "projects/{PROJECT_ID}",
       "projects/{PROJECT_NUMBER}",
       "organizations/{ORGANIZATION_ID}"
       
      string source = 3;
      Returns:
      This builder for chaining.
    • setSourceBytes

      public Tag.Builder setSourceBytes(com.google.protobuf.ByteString value)
       The source of the tag. According to
       https://cloud.google.com/resource-manager/docs/tags/tags-overview#tags_and_labels,
       tags can be created only at the project or organization level. Tags can be
       inherited from different project as well not just the current project where
       the database resource is present.
       Format:
       "projects/{PROJECT_ID}",
       "projects/{PROJECT_NUMBER}",
       "organizations/{ORGANIZATION_ID}"
       
      string source = 3;
      Parameters:
      value - The bytes for source to set.
      Returns:
      This builder for chaining.
    • getInherited

      public boolean getInherited()
       Indicates the inheritance status of a tag value
       attached to the given resource. If the tag value is inherited from one of
       the resource's ancestors, inherited will be true. If false, then the tag
       value is directly attached to the resource.
       
      bool inherited = 4;
      Specified by:
      getInherited in interface TagOrBuilder
      Returns:
      The inherited.
    • setInherited

      public Tag.Builder setInherited(boolean value)
       Indicates the inheritance status of a tag value
       attached to the given resource. If the tag value is inherited from one of
       the resource's ancestors, inherited will be true. If false, then the tag
       value is directly attached to the resource.
       
      bool inherited = 4;
      Parameters:
      value - The inherited to set.
      Returns:
      This builder for chaining.
    • clearInherited

      public Tag.Builder clearInherited()
       Indicates the inheritance status of a tag value
       attached to the given resource. If the tag value is inherited from one of
       the resource's ancestors, inherited will be true. If false, then the tag
       value is directly attached to the resource.
       
      bool inherited = 4;
      Returns:
      This builder for chaining.