Reference documentation and code samples for the API hub V1 API class Google::Cloud::ApiHub::V1::Attribute.
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.
Inherits
- Object
Extended By
- Google::Protobuf::MessageExts::ClassMethods
Includes
- Google::Protobuf::MessageExts
Methods
#allowed_values
def allowed_values() -> ::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>
- (::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>) — 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.
#allowed_values=
def allowed_values=(value) -> ::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>
- value (::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>) — 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.
- (::Array<::Google::Cloud::ApiHub::V1::Attribute::AllowedValue>) — 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.
#cardinality
def cardinality() -> ::Integer
- (::Integer) — 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.
#cardinality=
def cardinality=(value) -> ::Integer
- value (::Integer) — 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.
- (::Integer) — 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.
#create_time
def create_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time at which the attribute was created.
#data_type
def data_type() -> ::Google::Cloud::ApiHub::V1::Attribute::DataType
- (::Google::Cloud::ApiHub::V1::Attribute::DataType) — Required. The type of the data of the attribute.
#data_type=
def data_type=(value) -> ::Google::Cloud::ApiHub::V1::Attribute::DataType
- value (::Google::Cloud::ApiHub::V1::Attribute::DataType) — Required. The type of the data of the attribute.
- (::Google::Cloud::ApiHub::V1::Attribute::DataType) — Required. The type of the data of the attribute.
#definition_type
def definition_type() -> ::Google::Cloud::ApiHub::V1::Attribute::DefinitionType
- (::Google::Cloud::ApiHub::V1::Attribute::DefinitionType) — Output only. The definition type of the attribute.
#description
def description() -> ::String
- (::String) — Optional. The description of the attribute.
#description=
def description=(value) -> ::String
- value (::String) — Optional. The description of the attribute.
- (::String) — Optional. The description of the attribute.
#display_name
def display_name() -> ::String
- (::String) — Required. The display name of the attribute.
#display_name=
def display_name=(value) -> ::String
- value (::String) — Required. The display name of the attribute.
- (::String) — Required. The display name of the attribute.
#mandatory
def mandatory() -> ::Boolean
- (::Boolean) — Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.
#name
def name() -> ::String
-
(::String) — Identifier. The name of the attribute in the API Hub.
Format:
projects/{project}/locations/{location}/attributes/{attribute}
#name=
def name=(value) -> ::String
-
value (::String) — Identifier. The name of the attribute in the API Hub.
Format:
projects/{project}/locations/{location}/attributes/{attribute}
-
(::String) — Identifier. The name of the attribute in the API Hub.
Format:
projects/{project}/locations/{location}/attributes/{attribute}
#scope
def scope() -> ::Google::Cloud::ApiHub::V1::Attribute::Scope
- (::Google::Cloud::ApiHub::V1::Attribute::Scope) — Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.
#scope=
def scope=(value) -> ::Google::Cloud::ApiHub::V1::Attribute::Scope
- value (::Google::Cloud::ApiHub::V1::Attribute::Scope) — 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) — Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.
#update_time
def update_time() -> ::Google::Protobuf::Timestamp
- (::Google::Protobuf::Timestamp) — Output only. The time at which the attribute was last updated.