Class: Google::Apis::DiscoveryV1::JsonSchema::Variant
- Inherits:
-
Object
- Object
- Google::Apis::DiscoveryV1::JsonSchema::Variant
- Includes:
- Core::Hashable, Core::JsonObjectSupport
- Defined in:
- lib/google/apis/discovery_v1/classes.rb,
lib/google/apis/discovery_v1/representations.rb,
lib/google/apis/discovery_v1/representations.rb
Overview
In a variant data type, the value of one property is used to determine how to interpret the entire entity. Its value must exist in a map of descriminant values to schema names.
Defined Under Namespace
Classes: Map
Instance Attribute Summary collapse
-
#discriminant ⇒ String
The name of the type discriminant property.
-
#map ⇒ Array<Google::Apis::DiscoveryV1::JsonSchema::Variant::Map>
The map of discriminant value to schema to use for parsing..
Instance Method Summary collapse
-
#initialize(**args) ⇒ Variant
constructor
A new instance of Variant.
-
#update!(**args) ⇒ Object
Update properties of this object.
Constructor Details
#initialize(**args) ⇒ Variant
Returns a new instance of Variant.
364 365 366 |
# File 'lib/google/apis/discovery_v1/classes.rb', line 364 def initialize(**args) update!(**args) end |
Instance Attribute Details
#discriminant ⇒ String
The name of the type discriminant property.
Corresponds to the JSON property discriminant
357 358 359 |
# File 'lib/google/apis/discovery_v1/classes.rb', line 357 def discriminant @discriminant end |
#map ⇒ Array<Google::Apis::DiscoveryV1::JsonSchema::Variant::Map>
The map of discriminant value to schema to use for parsing..
Corresponds to the JSON property map
362 363 364 |
# File 'lib/google/apis/discovery_v1/classes.rb', line 362 def map @map end |
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
369 370 371 372 |
# File 'lib/google/apis/discovery_v1/classes.rb', line 369 def update!(**args) @discriminant = args[:discriminant] if args.key?(:discriminant) @map = args[:map] if args.key?(:map) end |