Class: Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute
- Inherits:
-
Object
- Object
- Google::Apis::ApihubV1::GoogleCloudApihubV1Attribute
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/apihub_v1/classes.rb,
lib/google/apis/apihub_v1/representations.rb,
lib/google/apis/apihub_v1/representations.rb
Overview
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.
Instance Attribute Summary collapse
-
#allowed_values ⇒ Array<Google::Apis::ApihubV1::GoogleCloudApihubV1AllowedValue>
Optional.
-
#cardinality ⇒ Fixnum
Optional.
-
#create_time ⇒ String
Output only.
-
#data_type ⇒ String
Required.
-
#definition_type ⇒ String
Output only.
-
#description ⇒ String
Optional.
-
#display_name ⇒ String
Required.
-
#mandatory ⇒ Boolean
(also: #mandatory?)
Output only.
-
#name ⇒ String
Identifier.
-
#scope ⇒ String
Required.
-
#update_time ⇒ String
Output only.
Instance Method Summary collapse
-
#initialize(**args) ⇒ GoogleCloudApihubV1Attribute
constructor
A new instance of GoogleCloudApihubV1Attribute.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ GoogleCloudApihubV1Attribute
Returns a new instance of GoogleCloudApihubV1Attribute.
987 988 989 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 987 def initialize(**args) update!(**args) end |
Instance Attribute Details
#allowed_values ⇒ Array<Google::Apis::ApihubV1::GoogleCloudApihubV1AllowedValue>
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.
Corresponds to the JSON property allowedValues
926 927 928 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 926 def allowed_values @allowed_values end |
#cardinality ⇒ Fixnum
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.
Corresponds to the JSON property cardinality
935 936 937 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 935 def cardinality @cardinality end |
#create_time ⇒ String
Output only. The time at which the attribute was created.
Corresponds to the JSON property createTime
940 941 942 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 940 def create_time @create_time end |
#data_type ⇒ String
Required. The type of the data of the attribute.
Corresponds to the JSON property dataType
945 946 947 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 945 def data_type @data_type end |
#definition_type ⇒ String
Output only. The definition type of the attribute.
Corresponds to the JSON property definitionType
950 951 952 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 950 def definition_type @definition_type end |
#description ⇒ String
Optional. The description of the attribute.
Corresponds to the JSON property description
955 956 957 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 955 def description @description end |
#display_name ⇒ String
Required. The display name of the attribute.
Corresponds to the JSON property displayName
960 961 962 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 960 def display_name @display_name end |
#mandatory ⇒ Boolean Also known as: mandatory?
Output only. When mandatory is true, the attribute is mandatory for the
resource specified in the scope. Only System defined attributes can be
mandatory.
Corresponds to the JSON property mandatory
967 968 969 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 967 def mandatory @mandatory end |
#name ⇒ String
Identifier. The name of the attribute in the API Hub. Format: projects/
project/locations/location/attributes/attribute`
Corresponds to the JSON propertyname`
974 975 976 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 974 def name @name end |
#scope ⇒ String
Required. The scope of the attribute. It represents the resource in the API
Hub to which the attribute can be linked.
Corresponds to the JSON property scope
980 981 982 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 980 def scope @scope end |
#update_time ⇒ String
Output only. The time at which the attribute was last updated.
Corresponds to the JSON property updateTime
985 986 987 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 985 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 992 def update!(**args) @allowed_values = args[:allowed_values] if args.key?(:allowed_values) @cardinality = args[:cardinality] if args.key?(:cardinality) @create_time = args[:create_time] if args.key?(:create_time) @data_type = args[:data_type] if args.key?(:data_type) @definition_type = args[:definition_type] if args.key?(:definition_type) @description = args[:description] if args.key?(:description) @display_name = args[:display_name] if args.key?(:display_name) @mandatory = args[:mandatory] if args.key?(:mandatory) @name = args[:name] if args.key?(:name) @scope = args[:scope] if args.key?(:scope) @update_time = args[:update_time] if args.key?(:update_time) end |