Class: Google::Apis::ApihubV1::GoogleCloudApihubV1AllowedValue

Inherits:
Object
  • Object
show all
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

The value that can be assigned to the attribute when the data type is enum.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudApihubV1AllowedValue

Returns a new instance of GoogleCloudApihubV1AllowedValue.



312
313
314
# File 'lib/google/apis/apihub_v1/classes.rb', line 312

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#descriptionString

Optional. The detailed description of the allowed value. Corresponds to the JSON property description

Returns:

  • (String)


287
288
289
# File 'lib/google/apis/apihub_v1/classes.rb', line 287

def description
  @description
end

#display_nameString

Required. The display name of the allowed value. Corresponds to the JSON property displayName

Returns:

  • (String)


292
293
294
# File 'lib/google/apis/apihub_v1/classes.rb', line 292

def display_name
  @display_name
end

#idString

Required. The ID of the allowed value. * If provided, the same will be used. The service will throw an error if the specified id is already used by another allowed value in the same attribute resource. * If not provided, a system generated id derived from the display name will be used. In this case, the service will handle conflict resolution by adding a system generated suffix in case of duplicates. This value should be 4-63 characters, and valid characters are /a-z-/. Corresponds to the JSON property id

Returns:

  • (String)


303
304
305
# File 'lib/google/apis/apihub_v1/classes.rb', line 303

def id
  @id
end

#immutableBoolean Also known as: immutable?

Optional. When set to true, the allowed value cannot be updated or deleted by the user. It can only be true for System defined attributes. Corresponds to the JSON property immutable

Returns:

  • (Boolean)


309
310
311
# File 'lib/google/apis/apihub_v1/classes.rb', line 309

def immutable
  @immutable
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



317
318
319
320
321
322
# File 'lib/google/apis/apihub_v1/classes.rb', line 317

def update!(**args)
  @description = args[:description] if args.key?(:description)
  @display_name = args[:display_name] if args.key?(:display_name)
  @id = args[:id] if args.key?(:id)
  @immutable = args[:immutable] if args.key?(:immutable)
end