Class: Icss::Meta::UnionSchema

Inherits:
NamedSchema show all
Defined in:
lib/icss/type/union_schema.rb,
lib/icss/type.rb

Overview

Describes an Avro Union type.

Unions are represented using JSON arrays. For example, [“string”, “null”] declares a schema which may be either a string or null.

Unions may not contain more than one schema with the same type, except for the named types record, fixed and enum. For example, unions containing two array types or two map types are not permitted, but two types with different names are permitted. (Names permit efficient resolution when reading and writing unions.)

Unions may not immediately contain other unions.

Instance Attribute Summary

Attributes inherited from NamedSchema

#is_core

Method Summary

Methods inherited from NamedSchema

#attrs_to_inscribe, #is_core?, #model_klass, receive, #to_hash

Methods included from ReceiverModel::ActsAsHash

#[], #[]=, #attributes, #delete, included, #keys, #to_hash

Methods included from RecordModel

#attr_set?, included, #receive!, #to_zaml