Reference documentation and code samples for the Google Cloud Api Hub V1 Client class 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.
Generated from protobuf message google.cloud.apihub.v1.Attribute
Namespace
Google \ Cloud \ ApiHub \ V1Methods
__construct
Constructor.
data
array
Optional. Data for populating the Message object.
↳ name
string
Identifier. The name of the attribute in the API Hub. Format: projects/{project}/locations/{location}/attributes/{attribute}
↳ display_name
string
Required. The display name of the attribute.
↳ description
string
Optional. The description of the attribute.
↳ definition_type
int
Output only. The definition type of the attribute.
↳ scope
int
Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.
↳ data_type
int
Required. The type of the data of the attribute.
↳ allowed_values
array< 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
int
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.
↳ mandatory
bool
Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.
↳ create_time
↳ update_time
getName
Identifier. The name of the attribute in the API Hub.
Format: projects/{project}/locations/{location}/attributes/{attribute}
string
setName
Identifier. The name of the attribute in the API Hub.
Format: projects/{project}/locations/{location}/attributes/{attribute}
var
string
$this
getDisplayName
Required. The display name of the attribute.
string
setDisplayName
Required. The display name of the attribute.
var
string
$this
getDescription
Optional. The description of the attribute.
string
setDescription
Optional. The description of the attribute.
var
string
$this
getDefinitionType
Output only. The definition type of the attribute.
int
setDefinitionType
Output only. The definition type of the attribute.
var
int
Enum of type DefinitionType .
$this
getScope
Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.
int
setScope
Required. The scope of the attribute. It represents the resource in the API Hub to which the attribute can be linked.
var
int
Enum of type Scope .
$this
getDataType
Required. The type of the data of the attribute.
int
setDataType
Required. The type of the data of the attribute.
var
int
Enum of type DataType .
$this
getAllowedValues
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.
setAllowedValues
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.
$this
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.
int
setCardinality
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.
var
int
$this
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
setMandatory
Output only. When mandatory is true, the attribute is mandatory for the resource specified in the scope. Only System defined attributes can be mandatory.
var
bool
$this
getCreateTime
Output only. The time at which the attribute was created.
hasCreateTime
clearCreateTime
setCreateTime
Output only. The time at which the attribute was created.
$this
getUpdateTime
Output only. The time at which the attribute was last updated.
hasUpdateTime
clearUpdateTime
setUpdateTime
Output only. The time at which the attribute was last updated.
$this

