API hub v1 API - Class Attribute (1.0.0)

public sealed class Attribute : IMessage<Attribute>, IEquatable<Attribute>, IDeepCloneable<Attribute>, IBufferMessage, IMessage

Reference documentation and code samples for the API hub v1 API 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.

Inheritance

object > Attribute

Namespace

Google.Cloud.ApiHub.V1

Assembly

Google.Cloud.ApiHub.V1.dll

Constructors

Attribute()

public Attribute()

Attribute(Attribute)

public Attribute(Attribute other)
Parameter
Name Description
other Attribute

Properties

AllowedValues

public RepeatedField<Attribute.Types.AllowedValue> AllowedValues { get; }

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.

Property Value
Type Description
RepeatedFieldAttributeTypesAllowedValue

AttributeName

public AttributeName AttributeName { get; set; }

AttributeName-typed view over the Name resource name property.

Property Value
Type Description
AttributeName

Cardinality

public int Cardinality { get; set; }

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.

Property Value
Type Description
int

CreateTime

public Timestamp CreateTime { get; set; }

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

Property Value
Type Description
Timestamp

DataType

public Attribute.Types.DataType DataType { get; set; }

Required. The type of the data of the attribute.

Property Value
Type Description
AttributeTypesDataType

DefinitionType

public Attribute.Types.DefinitionType DefinitionType { get; set; }

Output only. The definition type of the attribute.

Property Value
Type Description
AttributeTypesDefinitionType

Description

public string Description { get; set; }

Optional. The description of the attribute.

Property Value
Type Description
string

DisplayName

public string DisplayName { get; set; }

Required. The display name of the attribute.

Property Value
Type Description
string

Mandatory

public bool Mandatory { get; set; }

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

Property Value
Type Description
bool

Name

public string Name { get; set; }

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

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

Property Value
Type Description
string

Scope

public Attribute.Types.Scope Scope { get; set; }

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

Property Value
Type Description
AttributeTypesScope

UpdateTime

public Timestamp UpdateTime { get; set; }

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

Property Value
Type Description
Timestamp