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.
940 941 942 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 940 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
879 880 881 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 879 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
888 889 890 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 888 def cardinality @cardinality end |
#create_time ⇒ String
Output only. The time at which the attribute was created.
Corresponds to the JSON property createTime
893 894 895 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 893 def create_time @create_time end |
#data_type ⇒ String
Required. The type of the data of the attribute.
Corresponds to the JSON property dataType
898 899 900 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 898 def data_type @data_type end |
#definition_type ⇒ String
Output only. The definition type of the attribute.
Corresponds to the JSON property definitionType
903 904 905 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 903 def definition_type @definition_type end |
#description ⇒ String
Optional. The description of the attribute.
Corresponds to the JSON property description
908 909 910 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 908 def description @description end |
#display_name ⇒ String
Required. The display name of the attribute.
Corresponds to the JSON property displayName
913 914 915 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 913 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
920 921 922 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 920 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`
927 928 929 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 927 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
933 934 935 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 933 def scope @scope end |
#update_time ⇒ String
Output only. The time at which the attribute was last updated.
Corresponds to the JSON property updateTime
938 939 940 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 938 def update_time @update_time end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
945 946 947 948 949 950 951 952 953 954 955 956 957 |
# File 'lib/google/apis/apihub_v1/classes.rb', line 945 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 |