Class Attribute.AllowedValue.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<Attribute.AllowedValue.Builder>
com.google.cloud.apihub.v1.Attribute.AllowedValue.Builder
All Implemented Interfaces:
Attribute.AllowedValueOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
Attribute.AllowedValue

public static final class Attribute.AllowedValue.Builder extends com.google.protobuf.GeneratedMessage.Builder<Attribute.AllowedValue.Builder> implements Attribute.AllowedValueOrBuilder
 The value that can be assigned to the attribute when the data type is
 enum.
 
Protobuf type google.cloud.apihub.v1.Attribute.AllowedValue
  • 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<Attribute.AllowedValue.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<Attribute.AllowedValue.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<Attribute.AllowedValue.Builder>
    • getDefaultInstanceForType

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

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

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

      public Attribute.AllowedValue.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<Attribute.AllowedValue.Builder>
    • mergeFrom

    • isInitialized

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

      public Attribute.AllowedValue.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<Attribute.AllowedValue.Builder>
      Throws:
      IOException
    • getId

      public String getId()
       Required. The ID of the allowed value.
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another allowed value in the same
       attribute resource.
       * If not provided, a system generated id derived from the display name
       will be used. In this case, the service will handle conflict resolution
       by adding a system generated suffix in case of duplicates.
      
       This value should be 4-63 characters, and valid characters
       are /[a-z][0-9]-/.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getId in interface Attribute.AllowedValueOrBuilder
      Returns:
      The id.
    • getIdBytes

      public com.google.protobuf.ByteString getIdBytes()
       Required. The ID of the allowed value.
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another allowed value in the same
       attribute resource.
       * If not provided, a system generated id derived from the display name
       will be used. In this case, the service will handle conflict resolution
       by adding a system generated suffix in case of duplicates.
      
       This value should be 4-63 characters, and valid characters
       are /[a-z][0-9]-/.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getIdBytes in interface Attribute.AllowedValueOrBuilder
      Returns:
      The bytes for id.
    • setId

      public Attribute.AllowedValue.Builder setId(String value)
       Required. The ID of the allowed value.
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another allowed value in the same
       attribute resource.
       * If not provided, a system generated id derived from the display name
       will be used. In this case, the service will handle conflict resolution
       by adding a system generated suffix in case of duplicates.
      
       This value should be 4-63 characters, and valid characters
       are /[a-z][0-9]-/.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The id to set.
      Returns:
      This builder for chaining.
    • clearId

       Required. The ID of the allowed value.
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another allowed value in the same
       attribute resource.
       * If not provided, a system generated id derived from the display name
       will be used. In this case, the service will handle conflict resolution
       by adding a system generated suffix in case of duplicates.
      
       This value should be 4-63 characters, and valid characters
       are /[a-z][0-9]-/.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setIdBytes

      public Attribute.AllowedValue.Builder setIdBytes(com.google.protobuf.ByteString value)
       Required. The ID of the allowed value.
       * If provided, the same will be used. The service will throw an error if
       the specified id is already used by another allowed value in the same
       attribute resource.
       * If not provided, a system generated id derived from the display name
       will be used. In this case, the service will handle conflict resolution
       by adding a system generated suffix in case of duplicates.
      
       This value should be 4-63 characters, and valid characters
       are /[a-z][0-9]-/.
       
      string id = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for id to set.
      Returns:
      This builder for chaining.
    • getDisplayName

      public String getDisplayName()
       Required. The display name of the allowed value.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayName in interface Attribute.AllowedValueOrBuilder
      Returns:
      The displayName.
    • getDisplayNameBytes

      public com.google.protobuf.ByteString getDisplayNameBytes()
       Required. The display name of the allowed value.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getDisplayNameBytes in interface Attribute.AllowedValueOrBuilder
      Returns:
      The bytes for displayName.
    • setDisplayName

      public Attribute.AllowedValue.Builder setDisplayName(String value)
       Required. The display name of the allowed value.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The displayName to set.
      Returns:
      This builder for chaining.
    • clearDisplayName

      public Attribute.AllowedValue.Builder clearDisplayName()
       Required. The display name of the allowed value.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setDisplayNameBytes

      public Attribute.AllowedValue.Builder setDisplayNameBytes(com.google.protobuf.ByteString value)
       Required. The display name of the allowed value.
       
      string display_name = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for displayName to set.
      Returns:
      This builder for chaining.
    • getDescription

      public String getDescription()
       Optional. The detailed description of the allowed value.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescription in interface Attribute.AllowedValueOrBuilder
      Returns:
      The description.
    • getDescriptionBytes

      public com.google.protobuf.ByteString getDescriptionBytes()
       Optional. The detailed description of the allowed value.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getDescriptionBytes in interface Attribute.AllowedValueOrBuilder
      Returns:
      The bytes for description.
    • setDescription

      public Attribute.AllowedValue.Builder setDescription(String value)
       Optional. The detailed description of the allowed value.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The description to set.
      Returns:
      This builder for chaining.
    • clearDescription

      public Attribute.AllowedValue.Builder clearDescription()
       Optional. The detailed description of the allowed value.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • setDescriptionBytes

      public Attribute.AllowedValue.Builder setDescriptionBytes(com.google.protobuf.ByteString value)
       Optional. The detailed description of the allowed value.
       
      string description = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The bytes for description to set.
      Returns:
      This builder for chaining.
    • getImmutable

      public boolean getImmutable()
       Optional. When set to true, the allowed value cannot be updated or
       deleted by the user. It can only be true for System defined attributes.
       
      bool immutable = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getImmutable in interface Attribute.AllowedValueOrBuilder
      Returns:
      The immutable.
    • setImmutable

      public Attribute.AllowedValue.Builder setImmutable(boolean value)
       Optional. When set to true, the allowed value cannot be updated or
       deleted by the user. It can only be true for System defined attributes.
       
      bool immutable = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The immutable to set.
      Returns:
      This builder for chaining.
    • clearImmutable

      public Attribute.AllowedValue.Builder clearImmutable()
       Optional. When set to true, the allowed value cannot be updated or
       deleted by the user. It can only be true for System defined attributes.
       
      bool immutable = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.