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`

public static final class SchemaBuilder.TypeBuilder<R> extends SchemaBuilder.BaseTypeBuilder<R>
A Builder for creating any Avro schema type.

## Method Summary

Modifier and Type
Method
Description
`SchemaBuilder.BaseTypeBuilder<R>`
`nullable()`
A shortcut for building a union of a type and null.
`SchemaBuilder.BaseTypeBuilder<SchemaBuilder.UnionAccumulator<R>>`
`unionOf()`
Build an Avro union schema type.

### 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`

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

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

## Method Details

### unionOf

public SchemaBuilder.BaseTypeBuilder<SchemaBuilder.UnionAccumulator<R>> unionOf()
Description copied from class: `SchemaBuilder.BaseTypeBuilder`
Build an Avro union schema type. Example usage:

     unionOf().stringType().and().bytesType().endUnion()

Overrides:
  `unionOf` in class `SchemaBuilder.BaseTypeBuilder<R>`

### nullable

public SchemaBuilder.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 class `SchemaBuilder.BaseTypeBuilder<R>`