schemaFormat: application/vnd.apache.avro;version=1.11.1
schema:
  type: record
  name: recordAll
  fields:
    - name: requiredBoolean
      type: boolean
    - name: requiredBooleanWithDefault
      type: boolean
      default: true
    - name: optionalBoolean
      type:
        - 'null'
        - boolean
      default: null
    - name: optionalBooleanWithDefault
      type:
        - boolean
        - 'null'
      default: true
    - name: requiredInt
      type: int
    - name: optionalInt
      type:
        - 'null'
        - int
      default: null
    - name: optionalIntWithDefault
      type:
        - int
        - 'null'
      default: 1
    - name: requiredLong
      type: long
    - name: optionalLong
      type:
        - 'null'
        - long
      default: null
    - name: optionalLongWithDefault
      type:
        - long
        - 'null'
      default: 1
    - name: requiredFloat
      type: float
    - name: optionalFloat
      type:
        - 'null'
        - float
      default: null
    - name: optionalFloatWithDefault
      type:
        - float
        - 'null'
      default: 1.0
    - name: requiredDouble
      type: double
    - name: optionalDouble
      type:
        - 'null'
        - double
      default: null
    - name: optionalDoubleWithDefault
      type:
        - double
        - 'null'
      default: 1.0
    - name: requiredBytes
      type: bytes
    - name: optionalBytes
      type:
        - 'null'
        - bytes
      default: null
    - name: optionalBytesWithDefault
      type:
        - bytes
        - 'null'
      default: A
    - name: requiredString
      type: string
    - name: optionalString
      type:
        - 'null'
        - string
      default: null
    - name: optionalStringWithDefault
      type:
        - string
        - 'null'
      default: a
    - name: requiredRecord
      type:
        type: record
        name: nestedRequiredRecord
        fields:
          - name: nestedRequiredBoolean
            type: boolean
    - name: optionalRecord
      type:
        - 'null'
        - type: record
          name: nestedOptionalRecord
          fields:
            - name: nestedRequiredBoolean
              type: boolean
      default: null
    - name: optionalRecordWithDefault
      type:
        - type: record
          name: nestedOptionalRecordWithDefault
          fields:
            - name: nestedRequiredBoolean
              type: boolean
        - 'null'
      default:
        nestedRequiredBoolean: true
    - name: requiredEnum
      type:
        type: enum
        name: requiredEnum
        symbols:
          - a
          - b
    - name: optionalEnum
      type:
        - 'null'
        - type: enum
          name: optionalEnum
          symbols:
            - a
            - b
      default: null
    - name: optionalEnumWithDefault
      type:
        - type: enum
          name: optionalEnumWithDefault
          symbols:
            - a
            - b
        - 'null'
      default: b
    - name: requiredArray
      type:
        type: array
        items: string
    - name: optionalArray
      type:
        - 'null'
        - type: array
          items: string
      default: null
    - name: optionalArrayWithDefault
      type:
        - type: array
          items: string
        - 'null'
      default:
        - a
    - name: requiredMap
      type:
        type: map
        values: string
    - name: optionalMap
      type:
        - 'null'
        - type: map
          values: string
      default: null
    - name: optionalMapWithDefault
      type:
        - type: map
          values: string
        - 'null'
      default:
        a: b
    - name: requiredFixed
      type:
        type: fixed
        name: requiredFixed
        size: 1
    - name: optionalFixed
      type:
        - 'null'
        - type: fixed
          name: optionalFixed
          size: 1
      default: null
    - name: optionalFixedWithDefault
      type:
        - type: fixed
          name: optionalFixedWithDefault
          size: 1
        - 'null'
      default: A
    - name: unionType
      type:
        - long
        - 'null'
    - name: unionBooleanWithDefault
      type:
        - boolean
        - int
      default: true
    - name: unionIntWithDefault
      type:
        - int
        - 'null'
      default: 1
    - name: unionLongWithDefault
      type:
        - long
        - int
      default: 1
    - name: unionFloatWithDefault
      type:
        - float
        - int
      default: 1.0
    - name: unionDoubleWithDefault
      type:
        - double
        - int
      default: 1.0
    - name: unionBytesWithDefault
      type:
        - bytes
        - int
      default: A
    - name: unionStringWithDefault
      type:
        - string
        - int
      default: a
    - name: unionRecordWithDefault
      type:
        - type: record
          name: nestedUnionRecordWithDefault
          fields:
            - name: nestedRequiredBoolean
              type: boolean
        - int
      default:
        nestedRequiredBoolean: true
    - name: unionEnumWithDefault
      type:
        - type: enum
          name: nestedUnionEnumWithDefault
          symbols:
            - a
            - b
        - int
      default: b
    - name: unionArrayWithDefault
      type:
        - type: array
          items: string
        - int
      default:
        - a
    - name: unionMapWithDefault
      type:
        - type: map
          values: string
        - int
      default:
        a: b
    - name: unionFixedWithDefault
      type:
        - type: fixed
          name: nestedUnionFixedWithDefault
          size: 1
        - int
      default: A
