Package org.apache.avro
Class SchemaBuilder.TypeBuilder<R>
java.lang.Object
org.apache.avro.SchemaBuilder.BaseTypeBuilder<R>
org.apache.avro.SchemaBuilder.TypeBuilder<R>
- Enclosing class:
SchemaBuilder
A Builder for creating any Avro schema type.
-
Method Summary
Methods inherited from class org.apache.avro.SchemaBuilder.BaseTypeBuilder
array, booleanBuilder, booleanType, bytesBuilder, bytesType, doubleBuilder, doubleType, enumeration, fixed, floatBuilder, floatType, intBuilder, intType, longBuilder, longType, map, nullBuilder, nullType, record, stringBuilder, stringType, type, type, type
-
Method Details
-
unionOf
Description copied from class:SchemaBuilder.BaseTypeBuilder
Build an Avro union schema type. Example usage:unionOf().stringType().and().bytesType().endUnion()
- Overrides:
unionOf
in classSchemaBuilder.BaseTypeBuilder<R>
-
nullable
Description copied from class:SchemaBuilder.BaseTypeBuilder
A shortcut for building a union of a type and null. For example, the code snippets below are equivalent:nullable().booleanType()
unionOf().booleanType().and().nullType().endUnion()
- Overrides:
nullable
in classSchemaBuilder.BaseTypeBuilder<R>
-