Class Attribute.AllowedValue.Builder (0.1.0)

public static final class Attribute.AllowedValue.Builder extends GeneratedMessageV3.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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Attribute.AllowedValue.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

build()

public Attribute.AllowedValue build()
Returns
Type Description
Attribute.AllowedValue

buildPartial()

public Attribute.AllowedValue buildPartial()
Returns
Type Description
Attribute.AllowedValue

clear()

public Attribute.AllowedValue.Builder clear()
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

clearDescription()

public Attribute.AllowedValue.Builder clearDescription()

Optional. The detailed description of the allowed value.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attribute.AllowedValue.Builder

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
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public Attribute.AllowedValue.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

clearId()

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

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute.AllowedValue.Builder

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
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Attribute.AllowedValue.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

clone()

public Attribute.AllowedValue.Builder clone()
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

getDefaultInstanceForType()

public Attribute.AllowedValue getDefaultInstanceForType()
Returns
Type Description
Attribute.AllowedValue

getDescription()

public String getDescription()

Optional. The detailed description of the allowed value.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The detailed description of the allowed value.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
ByteString

The bytes for description.

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getDisplayName()

public String getDisplayName()

Required. The display name of the allowed value.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The displayName.

getDisplayNameBytes()

public ByteString getDisplayNameBytes()

Required. The display name of the allowed value.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for displayName.

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-/.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
String

The id.

getIdBytes()

public 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-/.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
ByteString

The bytes for id.

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];

Returns
Type Description
boolean

The immutable.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(Attribute.AllowedValue other)

public Attribute.AllowedValue.Builder mergeFrom(Attribute.AllowedValue other)
Parameter
Name Description
other Attribute.AllowedValue
Returns
Type Description
Attribute.AllowedValue.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Attribute.AllowedValue.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Attribute.AllowedValue.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Attribute.AllowedValue.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

setDescription(String value)

public Attribute.AllowedValue.Builder setDescription(String value)

Optional. The detailed description of the allowed value.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Attribute.AllowedValue.Builder setDescriptionBytes(ByteString value)

Optional. The detailed description of the allowed value.

string description = 3 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setDisplayName(String value)

public Attribute.AllowedValue.Builder setDisplayName(String value)

Required. The display name of the allowed value.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Attribute.AllowedValue.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the allowed value.

string display_name = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public Attribute.AllowedValue.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

setId(String value)

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-/.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value String

The id to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setIdBytes(ByteString value)

public Attribute.AllowedValue.Builder setIdBytes(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-/.

string id = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setImmutable(boolean value)

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];

Parameter
Name Description
value boolean

The immutable to set.

Returns
Type Description
Attribute.AllowedValue.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Attribute.AllowedValue.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final Attribute.AllowedValue.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Attribute.AllowedValue.Builder
Overrides