Package org.apache.avro
Class SchemaBuilder.UnionFieldTypeBuilder<R>
java.lang.Object
org.apache.avro.SchemaBuilder.UnionFieldTypeBuilder<R>
- Enclosing class:
SchemaBuilder
Builder for a union field. The first type in the union corresponds to the
possible default value type.
-
Method Summary
Modifier and TypeMethodDescriptionarray()
Build an Avro array typeBuild a boolean type that can set custom properties.A plain boolean type without custom properties.Build a bytes type that can set custom properties.A plain bytes type without custom properties.Build a double type that can set custom properties.A plain double type without custom properties.enumeration
(String name) Build an Avro enum type.Build an Avro fixed type.Build a float type that can set custom properties.A plain float type without custom properties.Build an int type that can set custom properties.intType()
A plain int type without custom properties.Build a long type that can set custom properties.longType()
A plain long type without custom properties.map()
Build an Avro map typeBuild a null type that can set custom properties.nullType()
A plain null type without custom properties.Build an Avro record type.Build a string type that can set custom properties.A plain string type without custom properties.
-
Method Details
-
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 usebooleanType()
. -
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 useintType()
. -
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 uselongType()
. -
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 usefloatType()
. -
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 usedoubleType()
. -
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 usestringType()
. -
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 usebytesType()
. -
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 usenullType()
. -
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.
-