Class Attribute.Builder (0.2.0)

public static final class Attribute.Builder extends GeneratedMessageV3.Builder<Attribute.Builder> implements AttributeOrBuilder

An attribute in the API Hub. An attribute is a name value pair which can be attached to different resources in the API hub based on the scope of the attribute. Attributes can either be pre-defined by the API Hub or created by users.

Protobuf type google.cloud.apihub.v1.Attribute

Implements

AttributeOrBuilder

Static Methods

getDescriptor()

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

Methods

addAllAllowedValues(Iterable<? extends Attribute.AllowedValue> values)

public Attribute.Builder addAllAllowedValues(Iterable<? extends Attribute.AllowedValue> values)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
values Iterable<? extends com.google.cloud.apihub.v1.Attribute.AllowedValue>
Returns
Type Description
Attribute.Builder

addAllowedValues(Attribute.AllowedValue value)

public Attribute.Builder addAllowedValues(Attribute.AllowedValue value)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value Attribute.AllowedValue
Returns
Type Description
Attribute.Builder

addAllowedValues(Attribute.AllowedValue.Builder builderForValue)

public Attribute.Builder addAllowedValues(Attribute.AllowedValue.Builder builderForValue)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
builderForValue Attribute.AllowedValue.Builder
Returns
Type Description
Attribute.Builder

addAllowedValues(int index, Attribute.AllowedValue value)

public Attribute.Builder addAllowedValues(int index, Attribute.AllowedValue value)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Attribute.AllowedValue
Returns
Type Description
Attribute.Builder

addAllowedValues(int index, Attribute.AllowedValue.Builder builderForValue)

public Attribute.Builder addAllowedValues(int index, Attribute.AllowedValue.Builder builderForValue)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Attribute.AllowedValue.Builder
Returns
Type Description
Attribute.Builder

addAllowedValuesBuilder()

public Attribute.AllowedValue.Builder addAllowedValuesBuilder()

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attribute.AllowedValue.Builder

addAllowedValuesBuilder(int index)

public Attribute.AllowedValue.Builder addAllowedValuesBuilder(int index)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Attribute.AllowedValue.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public Attribute build()
Returns
Type Description
Attribute

buildPartial()

public Attribute buildPartial()
Returns
Type Description
Attribute

clear()

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

clearAllowedValues()

public Attribute.Builder clearAllowedValues()

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attribute.Builder

clearCardinality()

public Attribute.Builder clearCardinality()

Optional. The maximum number of values that the attribute can have when associated with an API Hub resource. Cardinality 1 would represent a single-valued attribute. It must not be less than 1 or greater than 20. If not specified, the cardinality would be set to 1 by default and represent a single-valued attribute.

int32 cardinality = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearCreateTime()

public Attribute.Builder clearCreateTime()

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attribute.Builder

clearDataType()

public Attribute.Builder clearDataType()

Required. The type of the data of the attribute.

.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearDefinitionType()

public Attribute.Builder clearDefinitionType()

Output only. The definition type of the attribute.

.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearDescription()

public Attribute.Builder clearDescription()

Optional. The description of the attribute.

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

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearDisplayName()

public Attribute.Builder clearDisplayName()

Required. The display name of the attribute.

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

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearMandatory()

public Attribute.Builder clearMandatory()

Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.

bool mandatory = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearName()

public Attribute.Builder clearName()

Identifier. The name of the attribute in the API Hub.

Format: projects/{project}/locations/{location}/attributes/{attribute}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearScope()

public Attribute.Builder clearScope()

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute.Builder

This builder for chaining.

clearUpdateTime()

public Attribute.Builder clearUpdateTime()

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attribute.Builder

clone()

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

getAllowedValues(int index)

public Attribute.AllowedValue getAllowedValues(int index)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Attribute.AllowedValue

getAllowedValuesBuilder(int index)

public Attribute.AllowedValue.Builder getAllowedValuesBuilder(int index)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Attribute.AllowedValue.Builder

getAllowedValuesBuilderList()

public List<Attribute.AllowedValue.Builder> getAllowedValuesBuilderList()

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<Builder>

getAllowedValuesCount()

public int getAllowedValuesCount()

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

getAllowedValuesList()

public List<Attribute.AllowedValue> getAllowedValuesList()

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<AllowedValue>

getAllowedValuesOrBuilder(int index)

public Attribute.AllowedValueOrBuilder getAllowedValuesOrBuilder(int index)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Attribute.AllowedValueOrBuilder

getAllowedValuesOrBuilderList()

public List<? extends Attribute.AllowedValueOrBuilder> getAllowedValuesOrBuilderList()

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
List<? extends com.google.cloud.apihub.v1.Attribute.AllowedValueOrBuilder>

getCardinality()

public int getCardinality()

Optional. The maximum number of values that the attribute can have when associated with an API Hub resource. Cardinality 1 would represent a single-valued attribute. It must not be less than 1 or greater than 20. If not specified, the cardinality would be set to 1 by default and represent a single-valued attribute.

int32 cardinality = 8 [(.google.api.field_behavior) = OPTIONAL];

Returns
Type Description
int

The cardinality.

getCreateTime()

public Timestamp getCreateTime()

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The createTime.

getCreateTimeBuilder()

public Timestamp.Builder getCreateTimeBuilder()

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getCreateTimeOrBuilder()

public TimestampOrBuilder getCreateTimeOrBuilder()

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

getDataType()

public Attribute.DataType getDataType()

Required. The type of the data of the attribute.

.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute.DataType

The dataType.

getDataTypeValue()

public int getDataTypeValue()

Required. The type of the data of the attribute.

.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for dataType.

getDefaultInstanceForType()

public Attribute getDefaultInstanceForType()
Returns
Type Description
Attribute

getDefinitionType()

public Attribute.DefinitionType getDefinitionType()

Output only. The definition type of the attribute.

.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Attribute.DefinitionType

The definitionType.

getDefinitionTypeValue()

public int getDefinitionTypeValue()

Output only. The definition type of the attribute.

.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for definitionType.

getDescription()

public String getDescription()

Optional. The description of the attribute.

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

Returns
Type Description
String

The description.

getDescriptionBytes()

public ByteString getDescriptionBytes()

Optional. The description of the attribute.

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

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

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

Returns
Type Description
ByteString

The bytes for displayName.

getMandatory()

public boolean getMandatory()

Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.

bool mandatory = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

The mandatory.

getName()

public String getName()

Identifier. The name of the attribute in the API Hub.

Format: projects/{project}/locations/{location}/attributes/{attribute}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
String

The name.

getNameBytes()

public ByteString getNameBytes()

Identifier. The name of the attribute in the API Hub.

Format: projects/{project}/locations/{location}/attributes/{attribute}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Returns
Type Description
ByteString

The bytes for name.

getScope()

public Attribute.Scope getScope()

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
Attribute.Scope

The scope.

getScopeValue()

public int getScopeValue()

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The enum numeric value on the wire for scope.

getUpdateTime()

public Timestamp getUpdateTime()

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Timestamp

The updateTime.

getUpdateTimeBuilder()

public Timestamp.Builder getUpdateTimeBuilder()

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Builder

getUpdateTimeOrBuilder()

public TimestampOrBuilder getUpdateTimeOrBuilder()

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
TimestampOrBuilder

hasCreateTime()

public boolean hasCreateTime()

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the createTime field is set.

hasUpdateTime()

public boolean hasUpdateTime()

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the updateTime field is set.

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCreateTime(Timestamp value)

public Attribute.Builder mergeCreateTime(Timestamp value)

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Attribute.Builder

mergeFrom(Attribute other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

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

mergeUpdateTime(Timestamp value)

public Attribute.Builder mergeUpdateTime(Timestamp value)

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Attribute.Builder

removeAllowedValues(int index)

public Attribute.Builder removeAllowedValues(int index)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
index int
Returns
Type Description
Attribute.Builder

setAllowedValues(int index, Attribute.AllowedValue value)

public Attribute.Builder setAllowedValues(int index, Attribute.AllowedValue value)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
value Attribute.AllowedValue
Returns
Type Description
Attribute.Builder

setAllowedValues(int index, Attribute.AllowedValue.Builder builderForValue)

public Attribute.Builder setAllowedValues(int index, Attribute.AllowedValue.Builder builderForValue)

Optional. The list of allowed values when the attribute value is of type enum. This is required when the data_type of the attribute is ENUM. The maximum number of allowed values of an attribute will be 1000.

repeated .google.cloud.apihub.v1.Attribute.AllowedValue allowed_values = 7 [(.google.api.field_behavior) = OPTIONAL];

Parameters
Name Description
index int
builderForValue Attribute.AllowedValue.Builder
Returns
Type Description
Attribute.Builder

setCardinality(int value)

public Attribute.Builder setCardinality(int value)

Optional. The maximum number of values that the attribute can have when associated with an API Hub resource. Cardinality 1 would represent a single-valued attribute. It must not be less than 1 or greater than 20. If not specified, the cardinality would be set to 1 by default and represent a single-valued attribute.

int32 cardinality = 8 [(.google.api.field_behavior) = OPTIONAL];

Parameter
Name Description
value int

The cardinality to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setCreateTime(Timestamp value)

public Attribute.Builder setCreateTime(Timestamp value)

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Attribute.Builder

setCreateTime(Timestamp.Builder builderForValue)

public Attribute.Builder setCreateTime(Timestamp.Builder builderForValue)

Output only. The time at which the attribute was created.

.google.protobuf.Timestamp create_time = 10 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Attribute.Builder

setDataType(Attribute.DataType value)

public Attribute.Builder setDataType(Attribute.DataType value)

Required. The type of the data of the attribute.

.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Attribute.DataType

The dataType to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDataTypeValue(int value)

public Attribute.Builder setDataTypeValue(int value)

Required. The type of the data of the attribute.

.google.cloud.apihub.v1.Attribute.DataType data_type = 6 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for dataType to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDefinitionType(Attribute.DefinitionType value)

public Attribute.Builder setDefinitionType(Attribute.DefinitionType value)

Output only. The definition type of the attribute.

.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Attribute.DefinitionType

The definitionType to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDefinitionTypeValue(int value)

public Attribute.Builder setDefinitionTypeValue(int value)

Output only. The definition type of the attribute.

.google.cloud.apihub.v1.Attribute.DefinitionType definition_type = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The enum numeric value on the wire for definitionType to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDescription(String value)

public Attribute.Builder setDescription(String value)

Optional. The description of the attribute.

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

Parameter
Name Description
value String

The description to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDescriptionBytes(ByteString value)

public Attribute.Builder setDescriptionBytes(ByteString value)

Optional. The description of the attribute.

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

Parameter
Name Description
value ByteString

The bytes for description to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDisplayName(String value)

public Attribute.Builder setDisplayName(String value)

Required. The display name of the attribute.

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

Parameter
Name Description
value String

The displayName to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setDisplayNameBytes(ByteString value)

public Attribute.Builder setDisplayNameBytes(ByteString value)

Required. The display name of the attribute.

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

Parameter
Name Description
value ByteString

The bytes for displayName to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

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

setMandatory(boolean value)

public Attribute.Builder setMandatory(boolean value)

Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.

bool mandatory = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value boolean

The mandatory to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setName(String value)

public Attribute.Builder setName(String value)

Identifier. The name of the attribute in the API Hub.

Format: projects/{project}/locations/{location}/attributes/{attribute}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value String

The name to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setNameBytes(ByteString value)

public Attribute.Builder setNameBytes(ByteString value)

Identifier. The name of the attribute in the API Hub.

Format: projects/{project}/locations/{location}/attributes/{attribute}

string name = 1 [(.google.api.field_behavior) = IDENTIFIER];

Parameter
Name Description
value ByteString

The bytes for name to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

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

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

setScope(Attribute.Scope value)

public Attribute.Builder setScope(Attribute.Scope value)

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value Attribute.Scope

The scope to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setScopeValue(int value)

public Attribute.Builder setScopeValue(int value)

Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.

.google.cloud.apihub.v1.Attribute.Scope scope = 5 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for scope to set.

Returns
Type Description
Attribute.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

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

setUpdateTime(Timestamp value)

public Attribute.Builder setUpdateTime(Timestamp value)

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value Timestamp
Returns
Type Description
Attribute.Builder

setUpdateTime(Timestamp.Builder builderForValue)

public Attribute.Builder setUpdateTime(Timestamp.Builder builderForValue)

Output only. The time at which the attribute was last updated.

.google.protobuf.Timestamp update_time = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
builderForValue Builder
Returns
Type Description
Attribute.Builder