-- | A model for Avro schemas. Based on the Avro 1.11.1 specification:
-- |   https://avro.apache.org/docs/1.11.1/specification)

module Hydra.Ext.Avro.Schema where

import qualified Hydra.Core as Core
import qualified Hydra.Ext.Json.Model as Model
import Data.List
import Data.Map
import Data.Set

data Array = 
  Array {
    Array -> Schema
arrayItems :: Schema}
  deriving (Array -> Array -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Array -> Array -> Bool
$c/= :: Array -> Array -> Bool
== :: Array -> Array -> Bool
$c== :: Array -> Array -> Bool
Eq, Eq Array
Array -> Array -> Bool
Array -> Array -> Ordering
Array -> Array -> Array
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Array -> Array -> Array
$cmin :: Array -> Array -> Array
max :: Array -> Array -> Array
$cmax :: Array -> Array -> Array
>= :: Array -> Array -> Bool
$c>= :: Array -> Array -> Bool
> :: Array -> Array -> Bool
$c> :: Array -> Array -> Bool
<= :: Array -> Array -> Bool
$c<= :: Array -> Array -> Bool
< :: Array -> Array -> Bool
$c< :: Array -> Array -> Bool
compare :: Array -> Array -> Ordering
$ccompare :: Array -> Array -> Ordering
Ord, ReadPrec [Array]
ReadPrec Array
Int -> ReadS Array
ReadS [Array]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Array]
$creadListPrec :: ReadPrec [Array]
readPrec :: ReadPrec Array
$creadPrec :: ReadPrec Array
readList :: ReadS [Array]
$creadList :: ReadS [Array]
readsPrec :: Int -> ReadS Array
$creadsPrec :: Int -> ReadS Array
Read, Int -> Array -> ShowS
[Array] -> ShowS
Array -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Array] -> ShowS
$cshowList :: [Array] -> ShowS
show :: Array -> String
$cshow :: Array -> String
showsPrec :: Int -> Array -> ShowS
$cshowsPrec :: Int -> Array -> ShowS
Show)

_Array :: Name
_Array = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Array")

_Array_items :: FieldName
_Array_items = (String -> FieldName
Core.FieldName String
"items")

data Enum_ = 
  Enum_ {
    -- | a JSON array, listing symbols, as JSON strings. All symbols in an enum must be unique; duplicates are prohibited. Every symbol must match the regular expression [A-Za-z_][A-Za-z0-9_]* (the same requirement as for names)
    Enum_ -> [String]
enumSymbols :: [String],
    -- | A default value for this enumeration, used during resolution when the reader encounters a symbol from the writer that isn’t defined in the reader’s schema. The value provided here must be a JSON string that’s a member of the symbols array
    Enum_ -> Maybe String
enumDefault :: (Maybe String)}
  deriving (Enum_ -> Enum_ -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Enum_ -> Enum_ -> Bool
$c/= :: Enum_ -> Enum_ -> Bool
== :: Enum_ -> Enum_ -> Bool
$c== :: Enum_ -> Enum_ -> Bool
Eq, Eq Enum_
Enum_ -> Enum_ -> Bool
Enum_ -> Enum_ -> Ordering
Enum_ -> Enum_ -> Enum_
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Enum_ -> Enum_ -> Enum_
$cmin :: Enum_ -> Enum_ -> Enum_
max :: Enum_ -> Enum_ -> Enum_
$cmax :: Enum_ -> Enum_ -> Enum_
>= :: Enum_ -> Enum_ -> Bool
$c>= :: Enum_ -> Enum_ -> Bool
> :: Enum_ -> Enum_ -> Bool
$c> :: Enum_ -> Enum_ -> Bool
<= :: Enum_ -> Enum_ -> Bool
$c<= :: Enum_ -> Enum_ -> Bool
< :: Enum_ -> Enum_ -> Bool
$c< :: Enum_ -> Enum_ -> Bool
compare :: Enum_ -> Enum_ -> Ordering
$ccompare :: Enum_ -> Enum_ -> Ordering
Ord, ReadPrec [Enum_]
ReadPrec Enum_
Int -> ReadS Enum_
ReadS [Enum_]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Enum_]
$creadListPrec :: ReadPrec [Enum_]
readPrec :: ReadPrec Enum_
$creadPrec :: ReadPrec Enum_
readList :: ReadS [Enum_]
$creadList :: ReadS [Enum_]
readsPrec :: Int -> ReadS Enum_
$creadsPrec :: Int -> ReadS Enum_
Read, Int -> Enum_ -> ShowS
[Enum_] -> ShowS
Enum_ -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Enum_] -> ShowS
$cshowList :: [Enum_] -> ShowS
show :: Enum_ -> String
$cshow :: Enum_ -> String
showsPrec :: Int -> Enum_ -> ShowS
$cshowsPrec :: Int -> Enum_ -> ShowS
Show)

_Enum :: Name
_Enum = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Enum")

_Enum_symbols :: FieldName
_Enum_symbols = (String -> FieldName
Core.FieldName String
"symbols")

_Enum_default :: FieldName
_Enum_default = (String -> FieldName
Core.FieldName String
"default")

data Field = 
  Field {
    -- | a JSON string providing the name of the field
    Field -> String
fieldName :: String,
    -- | a JSON string describing this field for users
    Field -> Maybe String
fieldDoc :: (Maybe String),
    -- | a schema
    Field -> Schema
fieldType :: Schema,
    -- | default value for this field, only used when reading instances that lack the field for schema evolution purposes
    Field -> Maybe Value
fieldDefault :: (Maybe Model.Value),
    -- | specifies how this field impacts sort ordering of this record
    Field -> Maybe Order
fieldOrder :: (Maybe Order),
    -- | a JSON array of strings, providing alternate names for this field
    Field -> Maybe [String]
fieldAliases :: (Maybe [String]),
    -- | Any additional key/value pairs attached to the field
    Field -> Map String Value
fieldAnnotations :: (Map String Model.Value)}
  deriving (Field -> Field -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Field -> Field -> Bool
$c/= :: Field -> Field -> Bool
== :: Field -> Field -> Bool
$c== :: Field -> Field -> Bool
Eq, Eq Field
Field -> Field -> Bool
Field -> Field -> Ordering
Field -> Field -> Field
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Field -> Field -> Field
$cmin :: Field -> Field -> Field
max :: Field -> Field -> Field
$cmax :: Field -> Field -> Field
>= :: Field -> Field -> Bool
$c>= :: Field -> Field -> Bool
> :: Field -> Field -> Bool
$c> :: Field -> Field -> Bool
<= :: Field -> Field -> Bool
$c<= :: Field -> Field -> Bool
< :: Field -> Field -> Bool
$c< :: Field -> Field -> Bool
compare :: Field -> Field -> Ordering
$ccompare :: Field -> Field -> Ordering
Ord, ReadPrec [Field]
ReadPrec Field
Int -> ReadS Field
ReadS [Field]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Field]
$creadListPrec :: ReadPrec [Field]
readPrec :: ReadPrec Field
$creadPrec :: ReadPrec Field
readList :: ReadS [Field]
$creadList :: ReadS [Field]
readsPrec :: Int -> ReadS Field
$creadsPrec :: Int -> ReadS Field
Read, Int -> Field -> ShowS
[Field] -> ShowS
Field -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Field] -> ShowS
$cshowList :: [Field] -> ShowS
show :: Field -> String
$cshow :: Field -> String
showsPrec :: Int -> Field -> ShowS
$cshowsPrec :: Int -> Field -> ShowS
Show)

_Field :: Name
_Field = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Field")

_Field_name :: FieldName
_Field_name = (String -> FieldName
Core.FieldName String
"name")

_Field_doc :: FieldName
_Field_doc = (String -> FieldName
Core.FieldName String
"doc")

_Field_type :: FieldName
_Field_type = (String -> FieldName
Core.FieldName String
"type")

_Field_default :: FieldName
_Field_default = (String -> FieldName
Core.FieldName String
"default")

_Field_order :: FieldName
_Field_order = (String -> FieldName
Core.FieldName String
"order")

_Field_aliases :: FieldName
_Field_aliases = (String -> FieldName
Core.FieldName String
"aliases")

_Field_annotations :: FieldName
_Field_annotations = (String -> FieldName
Core.FieldName String
"annotations")

data Fixed = 
  Fixed {
    -- | an integer, specifying the number of bytes per value
    Fixed -> Int
fixedSize :: Int}
  deriving (Fixed -> Fixed -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Fixed -> Fixed -> Bool
$c/= :: Fixed -> Fixed -> Bool
== :: Fixed -> Fixed -> Bool
$c== :: Fixed -> Fixed -> Bool
Eq, Eq Fixed
Fixed -> Fixed -> Bool
Fixed -> Fixed -> Ordering
Fixed -> Fixed -> Fixed
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Fixed -> Fixed -> Fixed
$cmin :: Fixed -> Fixed -> Fixed
max :: Fixed -> Fixed -> Fixed
$cmax :: Fixed -> Fixed -> Fixed
>= :: Fixed -> Fixed -> Bool
$c>= :: Fixed -> Fixed -> Bool
> :: Fixed -> Fixed -> Bool
$c> :: Fixed -> Fixed -> Bool
<= :: Fixed -> Fixed -> Bool
$c<= :: Fixed -> Fixed -> Bool
< :: Fixed -> Fixed -> Bool
$c< :: Fixed -> Fixed -> Bool
compare :: Fixed -> Fixed -> Ordering
$ccompare :: Fixed -> Fixed -> Ordering
Ord, ReadPrec [Fixed]
ReadPrec Fixed
Int -> ReadS Fixed
ReadS [Fixed]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Fixed]
$creadListPrec :: ReadPrec [Fixed]
readPrec :: ReadPrec Fixed
$creadPrec :: ReadPrec Fixed
readList :: ReadS [Fixed]
$creadList :: ReadS [Fixed]
readsPrec :: Int -> ReadS Fixed
$creadsPrec :: Int -> ReadS Fixed
Read, Int -> Fixed -> ShowS
[Fixed] -> ShowS
Fixed -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Fixed] -> ShowS
$cshowList :: [Fixed] -> ShowS
show :: Fixed -> String
$cshow :: Fixed -> String
showsPrec :: Int -> Fixed -> ShowS
$cshowsPrec :: Int -> Fixed -> ShowS
Show)

_Fixed :: Name
_Fixed = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Fixed")

_Fixed_size :: FieldName
_Fixed_size = (String -> FieldName
Core.FieldName String
"size")

data Map_ = 
  Map_ {
    Map_ -> Schema
mapValues :: Schema}
  deriving (Map_ -> Map_ -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Map_ -> Map_ -> Bool
$c/= :: Map_ -> Map_ -> Bool
== :: Map_ -> Map_ -> Bool
$c== :: Map_ -> Map_ -> Bool
Eq, Eq Map_
Map_ -> Map_ -> Bool
Map_ -> Map_ -> Ordering
Map_ -> Map_ -> Map_
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Map_ -> Map_ -> Map_
$cmin :: Map_ -> Map_ -> Map_
max :: Map_ -> Map_ -> Map_
$cmax :: Map_ -> Map_ -> Map_
>= :: Map_ -> Map_ -> Bool
$c>= :: Map_ -> Map_ -> Bool
> :: Map_ -> Map_ -> Bool
$c> :: Map_ -> Map_ -> Bool
<= :: Map_ -> Map_ -> Bool
$c<= :: Map_ -> Map_ -> Bool
< :: Map_ -> Map_ -> Bool
$c< :: Map_ -> Map_ -> Bool
compare :: Map_ -> Map_ -> Ordering
$ccompare :: Map_ -> Map_ -> Ordering
Ord, ReadPrec [Map_]
ReadPrec Map_
Int -> ReadS Map_
ReadS [Map_]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Map_]
$creadListPrec :: ReadPrec [Map_]
readPrec :: ReadPrec Map_
$creadPrec :: ReadPrec Map_
readList :: ReadS [Map_]
$creadList :: ReadS [Map_]
readsPrec :: Int -> ReadS Map_
$creadsPrec :: Int -> ReadS Map_
Read, Int -> Map_ -> ShowS
[Map_] -> ShowS
Map_ -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Map_] -> ShowS
$cshowList :: [Map_] -> ShowS
show :: Map_ -> String
$cshow :: Map_ -> String
showsPrec :: Int -> Map_ -> ShowS
$cshowsPrec :: Int -> Map_ -> ShowS
Show)

_Map :: Name
_Map = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Map")

_Map_values :: FieldName
_Map_values = (String -> FieldName
Core.FieldName String
"values")

data Named = 
  Named {
    -- | a string naming this schema
    Named -> String
namedName :: String,
    -- | a string that qualifies the name
    Named -> Maybe String
namedNamespace :: (Maybe String),
    -- | a JSON array of strings, providing alternate names for this schema
    Named -> Maybe [String]
namedAliases :: (Maybe [String]),
    -- | a JSON string providing documentation to the user of this schema
    Named -> Maybe String
namedDoc :: (Maybe String),
    Named -> NamedType
namedType :: NamedType,
    -- | Any additional key/value pairs attached to the type
    Named -> Map String Value
namedAnnotations :: (Map String Model.Value)}
  deriving (Named -> Named -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Named -> Named -> Bool
$c/= :: Named -> Named -> Bool
== :: Named -> Named -> Bool
$c== :: Named -> Named -> Bool
Eq, Eq Named
Named -> Named -> Bool
Named -> Named -> Ordering
Named -> Named -> Named
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Named -> Named -> Named
$cmin :: Named -> Named -> Named
max :: Named -> Named -> Named
$cmax :: Named -> Named -> Named
>= :: Named -> Named -> Bool
$c>= :: Named -> Named -> Bool
> :: Named -> Named -> Bool
$c> :: Named -> Named -> Bool
<= :: Named -> Named -> Bool
$c<= :: Named -> Named -> Bool
< :: Named -> Named -> Bool
$c< :: Named -> Named -> Bool
compare :: Named -> Named -> Ordering
$ccompare :: Named -> Named -> Ordering
Ord, ReadPrec [Named]
ReadPrec Named
Int -> ReadS Named
ReadS [Named]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Named]
$creadListPrec :: ReadPrec [Named]
readPrec :: ReadPrec Named
$creadPrec :: ReadPrec Named
readList :: ReadS [Named]
$creadList :: ReadS [Named]
readsPrec :: Int -> ReadS Named
$creadsPrec :: Int -> ReadS Named
Read, Int -> Named -> ShowS
[Named] -> ShowS
Named -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Named] -> ShowS
$cshowList :: [Named] -> ShowS
show :: Named -> String
$cshow :: Named -> String
showsPrec :: Int -> Named -> ShowS
$cshowsPrec :: Int -> Named -> ShowS
Show)

_Named :: Name
_Named = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Named")

_Named_name :: FieldName
_Named_name = (String -> FieldName
Core.FieldName String
"name")

_Named_namespace :: FieldName
_Named_namespace = (String -> FieldName
Core.FieldName String
"namespace")

_Named_aliases :: FieldName
_Named_aliases = (String -> FieldName
Core.FieldName String
"aliases")

_Named_doc :: FieldName
_Named_doc = (String -> FieldName
Core.FieldName String
"doc")

_Named_type :: FieldName
_Named_type = (String -> FieldName
Core.FieldName String
"type")

_Named_annotations :: FieldName
_Named_annotations = (String -> FieldName
Core.FieldName String
"annotations")

data NamedType = 
  NamedTypeEnum Enum_ |
  NamedTypeFixed Fixed |
  NamedTypeRecord Record
  deriving (NamedType -> NamedType -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: NamedType -> NamedType -> Bool
$c/= :: NamedType -> NamedType -> Bool
== :: NamedType -> NamedType -> Bool
$c== :: NamedType -> NamedType -> Bool
Eq, Eq NamedType
NamedType -> NamedType -> Bool
NamedType -> NamedType -> Ordering
NamedType -> NamedType -> NamedType
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: NamedType -> NamedType -> NamedType
$cmin :: NamedType -> NamedType -> NamedType
max :: NamedType -> NamedType -> NamedType
$cmax :: NamedType -> NamedType -> NamedType
>= :: NamedType -> NamedType -> Bool
$c>= :: NamedType -> NamedType -> Bool
> :: NamedType -> NamedType -> Bool
$c> :: NamedType -> NamedType -> Bool
<= :: NamedType -> NamedType -> Bool
$c<= :: NamedType -> NamedType -> Bool
< :: NamedType -> NamedType -> Bool
$c< :: NamedType -> NamedType -> Bool
compare :: NamedType -> NamedType -> Ordering
$ccompare :: NamedType -> NamedType -> Ordering
Ord, ReadPrec [NamedType]
ReadPrec NamedType
Int -> ReadS NamedType
ReadS [NamedType]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [NamedType]
$creadListPrec :: ReadPrec [NamedType]
readPrec :: ReadPrec NamedType
$creadPrec :: ReadPrec NamedType
readList :: ReadS [NamedType]
$creadList :: ReadS [NamedType]
readsPrec :: Int -> ReadS NamedType
$creadsPrec :: Int -> ReadS NamedType
Read, Int -> NamedType -> ShowS
[NamedType] -> ShowS
NamedType -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [NamedType] -> ShowS
$cshowList :: [NamedType] -> ShowS
show :: NamedType -> String
$cshow :: NamedType -> String
showsPrec :: Int -> NamedType -> ShowS
$cshowsPrec :: Int -> NamedType -> ShowS
Show)

_NamedType :: Name
_NamedType = (String -> Name
Core.Name String
"hydra/ext/avro/schema.NamedType")

_NamedType_enum :: FieldName
_NamedType_enum = (String -> FieldName
Core.FieldName String
"enum")

_NamedType_fixed :: FieldName
_NamedType_fixed = (String -> FieldName
Core.FieldName String
"fixed")

_NamedType_record :: FieldName
_NamedType_record = (String -> FieldName
Core.FieldName String
"record")

data Order = 
  OrderAscending  |
  OrderDescending  |
  OrderIgnore 
  deriving (Order -> Order -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Order -> Order -> Bool
$c/= :: Order -> Order -> Bool
== :: Order -> Order -> Bool
$c== :: Order -> Order -> Bool
Eq, Eq Order
Order -> Order -> Bool
Order -> Order -> Ordering
Order -> Order -> Order
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Order -> Order -> Order
$cmin :: Order -> Order -> Order
max :: Order -> Order -> Order
$cmax :: Order -> Order -> Order
>= :: Order -> Order -> Bool
$c>= :: Order -> Order -> Bool
> :: Order -> Order -> Bool
$c> :: Order -> Order -> Bool
<= :: Order -> Order -> Bool
$c<= :: Order -> Order -> Bool
< :: Order -> Order -> Bool
$c< :: Order -> Order -> Bool
compare :: Order -> Order -> Ordering
$ccompare :: Order -> Order -> Ordering
Ord, ReadPrec [Order]
ReadPrec Order
Int -> ReadS Order
ReadS [Order]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Order]
$creadListPrec :: ReadPrec [Order]
readPrec :: ReadPrec Order
$creadPrec :: ReadPrec Order
readList :: ReadS [Order]
$creadList :: ReadS [Order]
readsPrec :: Int -> ReadS Order
$creadsPrec :: Int -> ReadS Order
Read, Int -> Order -> ShowS
[Order] -> ShowS
Order -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Order] -> ShowS
$cshowList :: [Order] -> ShowS
show :: Order -> String
$cshow :: Order -> String
showsPrec :: Int -> Order -> ShowS
$cshowsPrec :: Int -> Order -> ShowS
Show)

_Order :: Name
_Order = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Order")

_Order_ascending :: FieldName
_Order_ascending = (String -> FieldName
Core.FieldName String
"ascending")

_Order_descending :: FieldName
_Order_descending = (String -> FieldName
Core.FieldName String
"descending")

_Order_ignore :: FieldName
_Order_ignore = (String -> FieldName
Core.FieldName String
"ignore")

data Primitive = 
  -- | no value
  PrimitiveNull  |
  -- | A binary value
  PrimitiveBoolean  |
  -- | 32-bit signed integer
  PrimitiveInt  |
  -- | 64-bit signed integer
  PrimitiveLong  |
  -- | single precision (32-bit) IEEE 754 floating-point number
  PrimitiveFloat  |
  -- | double precision (64-bit) IEEE 754 floating-point number
  PrimitiveDouble  |
  -- | sequence of 8-bit unsigned bytes
  PrimitiveBytes  |
  -- | unicode character sequence
  PrimitiveString 
  deriving (Primitive -> Primitive -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Primitive -> Primitive -> Bool
$c/= :: Primitive -> Primitive -> Bool
== :: Primitive -> Primitive -> Bool
$c== :: Primitive -> Primitive -> Bool
Eq, Eq Primitive
Primitive -> Primitive -> Bool
Primitive -> Primitive -> Ordering
Primitive -> Primitive -> Primitive
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Primitive -> Primitive -> Primitive
$cmin :: Primitive -> Primitive -> Primitive
max :: Primitive -> Primitive -> Primitive
$cmax :: Primitive -> Primitive -> Primitive
>= :: Primitive -> Primitive -> Bool
$c>= :: Primitive -> Primitive -> Bool
> :: Primitive -> Primitive -> Bool
$c> :: Primitive -> Primitive -> Bool
<= :: Primitive -> Primitive -> Bool
$c<= :: Primitive -> Primitive -> Bool
< :: Primitive -> Primitive -> Bool
$c< :: Primitive -> Primitive -> Bool
compare :: Primitive -> Primitive -> Ordering
$ccompare :: Primitive -> Primitive -> Ordering
Ord, ReadPrec [Primitive]
ReadPrec Primitive
Int -> ReadS Primitive
ReadS [Primitive]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Primitive]
$creadListPrec :: ReadPrec [Primitive]
readPrec :: ReadPrec Primitive
$creadPrec :: ReadPrec Primitive
readList :: ReadS [Primitive]
$creadList :: ReadS [Primitive]
readsPrec :: Int -> ReadS Primitive
$creadsPrec :: Int -> ReadS Primitive
Read, Int -> Primitive -> ShowS
[Primitive] -> ShowS
Primitive -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Primitive] -> ShowS
$cshowList :: [Primitive] -> ShowS
show :: Primitive -> String
$cshow :: Primitive -> String
showsPrec :: Int -> Primitive -> ShowS
$cshowsPrec :: Int -> Primitive -> ShowS
Show)

_Primitive :: Name
_Primitive = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Primitive")

_Primitive_null :: FieldName
_Primitive_null = (String -> FieldName
Core.FieldName String
"null")

_Primitive_boolean :: FieldName
_Primitive_boolean = (String -> FieldName
Core.FieldName String
"boolean")

_Primitive_int :: FieldName
_Primitive_int = (String -> FieldName
Core.FieldName String
"int")

_Primitive_long :: FieldName
_Primitive_long = (String -> FieldName
Core.FieldName String
"long")

_Primitive_float :: FieldName
_Primitive_float = (String -> FieldName
Core.FieldName String
"float")

_Primitive_double :: FieldName
_Primitive_double = (String -> FieldName
Core.FieldName String
"double")

_Primitive_bytes :: FieldName
_Primitive_bytes = (String -> FieldName
Core.FieldName String
"bytes")

_Primitive_string :: FieldName
_Primitive_string = (String -> FieldName
Core.FieldName String
"string")

data Record = 
  Record {
    -- | a JSON array, listing fields
    Record -> [Field]
recordFields :: [Field]}
  deriving (Record -> Record -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Record -> Record -> Bool
$c/= :: Record -> Record -> Bool
== :: Record -> Record -> Bool
$c== :: Record -> Record -> Bool
Eq, Eq Record
Record -> Record -> Bool
Record -> Record -> Ordering
Record -> Record -> Record
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Record -> Record -> Record
$cmin :: Record -> Record -> Record
max :: Record -> Record -> Record
$cmax :: Record -> Record -> Record
>= :: Record -> Record -> Bool
$c>= :: Record -> Record -> Bool
> :: Record -> Record -> Bool
$c> :: Record -> Record -> Bool
<= :: Record -> Record -> Bool
$c<= :: Record -> Record -> Bool
< :: Record -> Record -> Bool
$c< :: Record -> Record -> Bool
compare :: Record -> Record -> Ordering
$ccompare :: Record -> Record -> Ordering
Ord, ReadPrec [Record]
ReadPrec Record
Int -> ReadS Record
ReadS [Record]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Record]
$creadListPrec :: ReadPrec [Record]
readPrec :: ReadPrec Record
$creadPrec :: ReadPrec Record
readList :: ReadS [Record]
$creadList :: ReadS [Record]
readsPrec :: Int -> ReadS Record
$creadsPrec :: Int -> ReadS Record
Read, Int -> Record -> ShowS
[Record] -> ShowS
Record -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Record] -> ShowS
$cshowList :: [Record] -> ShowS
show :: Record -> String
$cshow :: Record -> String
showsPrec :: Int -> Record -> ShowS
$cshowsPrec :: Int -> Record -> ShowS
Show)

_Record :: Name
_Record = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Record")

_Record_fields :: FieldName
_Record_fields = (String -> FieldName
Core.FieldName String
"fields")

data Schema = 
  SchemaArray Array |
  SchemaMap Map_ |
  SchemaNamed Named |
  SchemaPrimitive Primitive |
  -- | A reference by name to a previously defined type
  SchemaReference String |
  SchemaUnion Union
  deriving (Schema -> Schema -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Schema -> Schema -> Bool
$c/= :: Schema -> Schema -> Bool
== :: Schema -> Schema -> Bool
$c== :: Schema -> Schema -> Bool
Eq, Eq Schema
Schema -> Schema -> Bool
Schema -> Schema -> Ordering
Schema -> Schema -> Schema
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Schema -> Schema -> Schema
$cmin :: Schema -> Schema -> Schema
max :: Schema -> Schema -> Schema
$cmax :: Schema -> Schema -> Schema
>= :: Schema -> Schema -> Bool
$c>= :: Schema -> Schema -> Bool
> :: Schema -> Schema -> Bool
$c> :: Schema -> Schema -> Bool
<= :: Schema -> Schema -> Bool
$c<= :: Schema -> Schema -> Bool
< :: Schema -> Schema -> Bool
$c< :: Schema -> Schema -> Bool
compare :: Schema -> Schema -> Ordering
$ccompare :: Schema -> Schema -> Ordering
Ord, ReadPrec [Schema]
ReadPrec Schema
Int -> ReadS Schema
ReadS [Schema]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Schema]
$creadListPrec :: ReadPrec [Schema]
readPrec :: ReadPrec Schema
$creadPrec :: ReadPrec Schema
readList :: ReadS [Schema]
$creadList :: ReadS [Schema]
readsPrec :: Int -> ReadS Schema
$creadsPrec :: Int -> ReadS Schema
Read, Int -> Schema -> ShowS
[Schema] -> ShowS
Schema -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Schema] -> ShowS
$cshowList :: [Schema] -> ShowS
show :: Schema -> String
$cshow :: Schema -> String
showsPrec :: Int -> Schema -> ShowS
$cshowsPrec :: Int -> Schema -> ShowS
Show)

_Schema :: Name
_Schema = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Schema")

_Schema_array :: FieldName
_Schema_array = (String -> FieldName
Core.FieldName String
"array")

_Schema_map :: FieldName
_Schema_map = (String -> FieldName
Core.FieldName String
"map")

_Schema_named :: FieldName
_Schema_named = (String -> FieldName
Core.FieldName String
"named")

_Schema_primitive :: FieldName
_Schema_primitive = (String -> FieldName
Core.FieldName String
"primitive")

_Schema_reference :: FieldName
_Schema_reference = (String -> FieldName
Core.FieldName String
"reference")

_Schema_union :: FieldName
_Schema_union = (String -> FieldName
Core.FieldName String
"union")

newtype Union = 
  Union {
    Union -> [Schema]
unUnion :: [Schema]}
  deriving (Union -> Union -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Union -> Union -> Bool
$c/= :: Union -> Union -> Bool
== :: Union -> Union -> Bool
$c== :: Union -> Union -> Bool
Eq, Eq Union
Union -> Union -> Bool
Union -> Union -> Ordering
Union -> Union -> Union
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Union -> Union -> Union
$cmin :: Union -> Union -> Union
max :: Union -> Union -> Union
$cmax :: Union -> Union -> Union
>= :: Union -> Union -> Bool
$c>= :: Union -> Union -> Bool
> :: Union -> Union -> Bool
$c> :: Union -> Union -> Bool
<= :: Union -> Union -> Bool
$c<= :: Union -> Union -> Bool
< :: Union -> Union -> Bool
$c< :: Union -> Union -> Bool
compare :: Union -> Union -> Ordering
$ccompare :: Union -> Union -> Ordering
Ord, ReadPrec [Union]
ReadPrec Union
Int -> ReadS Union
ReadS [Union]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [Union]
$creadListPrec :: ReadPrec [Union]
readPrec :: ReadPrec Union
$creadPrec :: ReadPrec Union
readList :: ReadS [Union]
$creadList :: ReadS [Union]
readsPrec :: Int -> ReadS Union
$creadsPrec :: Int -> ReadS Union
Read, Int -> Union -> ShowS
[Union] -> ShowS
Union -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Union] -> ShowS
$cshowList :: [Union] -> ShowS
show :: Union -> String
$cshow :: Union -> String
showsPrec :: Int -> Union -> ShowS
$cshowsPrec :: Int -> Union -> ShowS
Show)

_Union :: Name
_Union = (String -> Name
Core.Name String
"hydra/ext/avro/schema.Union")