class Google::Apis::DiscoveryV1::JsonSchema::Variant

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.

Attributes

discriminant[RW]

The name of the type discriminant property. Corresponds to the JSON property `discriminant` @return [String]

map[RW]

The map of discriminant value to schema to use for parsing.. Corresponds to the JSON property `map` @return [Array<Google::Apis::DiscoveryV1::JsonSchema::Variant::Map>]

Public Class Methods

new(**args) click to toggle source
# File generated/google/apis/discovery_v1/classes.rb, line 350
def initialize(**args)
   update!(**args)
end

Public Instance Methods

update!(**args) click to toggle source

Update properties of this object

# File generated/google/apis/discovery_v1/classes.rb, line 355
def update!(**args)
  @discriminant = args[:discriminant] if args.key?(:discriminant)
  @map = args[:map] if args.key?(:map)
end