View Source GoogleApi.Discovery.V1.Model.JsonSchemaVariant (google_api_discovery v0.16.0)

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 (type: String.t, default: nil) - The name of the type discriminant property.
  • map (type: list(GoogleApi.Discovery.V1.Model.JsonSchemaVariantMap.t), default: nil) - The map of discriminant value to schema to use for parsing..

Summary

Functions

Unwrap a decoded JSON object into its complex fields.

Types

@type t() :: %GoogleApi.Discovery.V1.Model.JsonSchemaVariant{
  discriminant: String.t() | nil,
  map: [GoogleApi.Discovery.V1.Model.JsonSchemaVariantMap.t()] | nil
}

Functions

@spec decode(struct(), keyword()) :: struct()

Unwrap a decoded JSON object into its complex fields.