Package org.apache.avro
Class SchemaBuilder.FieldTypeBuilder<R>
java.lang.Object
org.apache.avro.SchemaBuilder.BaseFieldTypeBuilder<R>
org.apache.avro.SchemaBuilder.FieldTypeBuilder<R>
- Enclosing class:
SchemaBuilder
public static final class SchemaBuilder.FieldTypeBuilder<R>
extends SchemaBuilder.BaseFieldTypeBuilder<R>
-
Field Summary
Fields inherited from class org.apache.avro.SchemaBuilder.BaseFieldTypeBuilder
bldr, names
-
Method Summary
Methods inherited from class org.apache.avro.SchemaBuilder.BaseFieldTypeBuilder
array, booleanBuilder, booleanType, bytesBuilder, bytesType, doubleBuilder, doubleType, enumeration, fixed, floatBuilder, floatType, intBuilder, intType, longBuilder, longType, map, nullBuilder, nullType, record, stringBuilder, stringType
-
Method Details
-
unionOf
Build an Avro union schema type. -
nullable
A shortcut for building a union of a type and null, with an optional default value of the non-null type. For example, the two code snippets below are equivalent:nullable().booleanType().booleanDefault(true)
unionOf().booleanType().and().nullType().endUnion().booleanDefault(true)
-
optional
A shortcut for building a union of null and a type, with a null default. For example, the two code snippets below are equivalent:optional().booleanType()
unionOf().nullType().and().booleanType().endUnion().nullDefault()
-