org.apache.avro

## Class SchemaBuilder.UnionFieldTypeBuilder<R>

- java.lang.Object
- - org.apache.avro.SchemaBuilder.UnionFieldTypeBuilder<R>

- Enclosing class:
    SchemaBuilder

      public static final class SchemaBuilder.UnionFieldTypeBuilder<R>
      extends Object

  Builder for a union field. The first type in the union corresponds to the possible default value type.

- - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `SchemaBuilder.ArrayBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.ArrayDefault<R>>>` | `array()` Build an Avro array type
    `SchemaBuilder.BooleanBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.BooleanDefault<R>>>` | `booleanBuilder()` Build a boolean type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.BooleanDefault<R>>` | `booleanType()` A plain boolean type without custom properties.
    `SchemaBuilder.BytesBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.BytesDefault<R>>>` | `bytesBuilder()` Build a bytes type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.BytesDefault<R>>` | `bytesType()` A plain bytes type without custom properties.
    `SchemaBuilder.DoubleBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.DoubleDefault<R>>>` | `doubleBuilder()` Build a double type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.DoubleDefault<R>>` | `doubleType()` A plain double type without custom properties.
    `SchemaBuilder.EnumBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.EnumDefault<R>>>` | `enumeration(String name)` Build an Avro enum type.
    `SchemaBuilder.FixedBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.FixedDefault<R>>>` | `fixed(String name)` Build an Avro fixed type.
    `SchemaBuilder.FloatBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.FloatDefault<R>>>` | `floatBuilder()` Build a float type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.FloatDefault<R>>` | `floatType()` A plain float type without custom properties.
    `SchemaBuilder.IntBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.IntDefault<R>>>` | `intBuilder()` Build an int type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.IntDefault<R>>` | `intType()` A plain int type without custom properties.
    `SchemaBuilder.LongBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.LongDefault<R>>>` | `longBuilder()` Build a long type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.LongDefault<R>>` | `longType()` A plain long type without custom properties.
    `SchemaBuilder.MapBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.MapDefault<R>>>` | `map()` Build an Avro map type
    `SchemaBuilder.NullBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.NullDefault<R>>>` | `nullBuilder()` Build a null type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.NullDefault<R>>` | `nullType()` A plain null type without custom properties.
    `SchemaBuilder.RecordBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.RecordDefault<R>>>` | `record(String name)` Build an Avro record type.
    `SchemaBuilder.StringBldr<SchemaBuilder.UnionAccumulator<SchemaBuilder.StringDefault<R>>>` | `stringBuilder()` Build a string type that can set custom properties.
    `SchemaBuilder.UnionAccumulator<SchemaBuilder.StringDefault<R>>` | `stringType()` A plain string type without custom properties.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### booleanType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.BooleanDefault<R>> booleanType()

      A plain boolean type without custom properties. This is equivalent to:

           booleanBuilder().endBoolean();

    - #### booleanBuilder

          public SchemaBuilder.BooleanBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.BooleanDefault<R>>> booleanBuilder()

      Build a boolean type that can set custom properties. If custom properties are not needed it is simpler to use `booleanType()`.

    - #### intType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.IntDefault<R>> intType()

      A plain int type without custom properties. This is equivalent to:

           intBuilder().endInt();

    - #### intBuilder

          public SchemaBuilder.IntBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.IntDefault<R>>> intBuilder()

      Build an int type that can set custom properties. If custom properties are not needed it is simpler to use `intType()`.

    - #### longType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.LongDefault<R>> longType()

      A plain long type without custom properties. This is equivalent to:

           longBuilder().endLong();

    - #### longBuilder

          public SchemaBuilder.LongBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.LongDefault<R>>> longBuilder()

      Build a long type that can set custom properties. If custom properties are not needed it is simpler to use `longType()`.

    - #### floatType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.FloatDefault<R>> floatType()

      A plain float type without custom properties. This is equivalent to:

           floatBuilder().endFloat();

    - #### floatBuilder

          public SchemaBuilder.FloatBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.FloatDefault<R>>> floatBuilder()

      Build a float type that can set custom properties. If custom properties are not needed it is simpler to use `floatType()`.

    - #### doubleType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.DoubleDefault<R>> doubleType()

      A plain double type without custom properties. This is equivalent to:

           doubleBuilder().endDouble();

    - #### doubleBuilder

          public SchemaBuilder.DoubleBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.DoubleDefault<R>>> doubleBuilder()

      Build a double type that can set custom properties. If custom properties are not needed it is simpler to use `doubleType()`.

    - #### stringType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.StringDefault<R>> stringType()

      A plain string type without custom properties. This is equivalent to:

           stringBuilder().endString();

    - #### stringBuilder

          public SchemaBuilder.StringBldr<SchemaBuilder.UnionAccumulator<SchemaBuilder.StringDefault<R>>> stringBuilder()

      Build a string type that can set custom properties. If custom properties are not needed it is simpler to use `stringType()`.

    - #### bytesType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.BytesDefault<R>> bytesType()

      A plain bytes type without custom properties. This is equivalent to:

           bytesBuilder().endBytes();

    - #### bytesBuilder

          public SchemaBuilder.BytesBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.BytesDefault<R>>> bytesBuilder()

      Build a bytes type that can set custom properties. If custom properties are not needed it is simpler to use `bytesType()`.

    - #### nullType

          public SchemaBuilder.UnionAccumulator<SchemaBuilder.NullDefault<R>> nullType()

      A plain null type without custom properties. This is equivalent to:

           nullBuilder().endNull();

    - #### nullBuilder

          public SchemaBuilder.NullBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.NullDefault<R>>> nullBuilder()

      Build a null type that can set custom properties. If custom properties are not needed it is simpler to use `nullType()`.

    - #### map

          public SchemaBuilder.MapBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.MapDefault<R>>> map()

      Build an Avro map type

    - #### array

          public SchemaBuilder.ArrayBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.ArrayDefault<R>>> array()

      Build an Avro array type

    - #### fixed

          public SchemaBuilder.FixedBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.FixedDefault<R>>> fixed(String name)

      Build an Avro fixed type.

    - #### enumeration

          public SchemaBuilder.EnumBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.EnumDefault<R>>> enumeration(String name)

      Build an Avro enum type.

    - #### record

          public SchemaBuilder.RecordBuilder<SchemaBuilder.UnionAccumulator<SchemaBuilder.RecordDefault<R>>> record(String name)

      Build an Avro record type.

Copyright © 2009–2024 The Apache Software Foundation. All rights reserved.