Package org.apache.avro
Class SchemaBuilder.EnumBuilder<R>
java.lang.Object
org.apache.avro.SchemaBuilder.PropBuilder<SchemaBuilder.EnumBuilder<R>>
org.apache.avro.SchemaBuilder.NamedBuilder<SchemaBuilder.EnumBuilder<R>>
org.apache.avro.SchemaBuilder.NamespacedBuilder<R,SchemaBuilder.EnumBuilder<R>>
org.apache.avro.SchemaBuilder.EnumBuilder<R>
- Enclosing class:
SchemaBuilder
public static final class SchemaBuilder.EnumBuilder<R>
extends SchemaBuilder.NamespacedBuilder<R,SchemaBuilder.EnumBuilder<R>>
Builds an Avro Enum type with optional properties, namespace, doc, and
aliases.
Set properties with
SchemaBuilder.PropBuilder.prop(String, String), namespace with
SchemaBuilder.NamespacedBuilder.namespace(String), doc with SchemaBuilder.NamedBuilder.doc(String), and aliases with
SchemaBuilder.NamedBuilder.aliases(String[]).
The Enum schema is finalized when its required symbols are set via
symbols(String[]).-
Method Summary
Modifier and TypeMethodDescriptiondefaultSymbol(String enumDefault) Set the default value of the enum.protected SchemaBuilder.EnumBuilder<R> self()a self-type for chaining builder subclasses.Configure this enum type's symbols, and end its configuration.Methods inherited from class org.apache.avro.SchemaBuilder.NamespacedBuilder
namespaceMethods inherited from class org.apache.avro.SchemaBuilder.NamedBuilder
aliases, docMethods inherited from class org.apache.avro.SchemaBuilder.PropBuilder
prop, prop
-
Method Details
-
self
Description copied from class:SchemaBuilder.PropBuildera self-type for chaining builder subclasses. Concrete subclasses must return 'this'- Specified by:
selfin classSchemaBuilder.PropBuilder<SchemaBuilder.EnumBuilder<R>>
-
symbols
Configure this enum type's symbols, and end its configuration. Populates the default if it was set. -
defaultSymbol
Set the default value of the enum.
-