     """
 
     @type t :: %Union{name: String.t, fields: %{String.t => %Field{}}}
+
+    @enforce_keys [:name, :fields]
     defstruct name: nil, fields: %{}
 
     import Thrift.Parser.Conversions

    @type printable :: String.t | atom
    @type t :: %Field{id: integer, name: String.t, type: Types.t,
                      required: boolean, default: Literals.t}
    defstruct id: nil, name: nil, type: nil, required: :default, default: nil

    import Thrift.Parser.Conversions

    @type return :: :void | Types.t
    @type t :: %Function{oneway: boolean, return_type: return, name: String.t,
                         params: [%Field{}], exceptions: [%Exception{}]}

    @enforce_keys [:name]
    defstruct oneway: false, return_type: :void, name: nil, params: [], exceptions: []

    alias Thrift.Parser.Models.Field
    import Thrift.Parser.Conversions

