Interface RecordSchemaBuilder
-
@Public @Stable public interface RecordSchemaBuilder
Building the schema for aGenericRecord.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SchemaInfobuild(SchemaType schemaType)Build the schema info.RecordSchemaBuilderdoc(java.lang.String doc)Add doc to the record schema.FieldSchemaBuilderfield(java.lang.String fieldName)Add a field with the given name to the record.FieldSchemaBuilderfield(java.lang.String fieldName, GenericSchema genericSchema)Add a field with the given name and genericSchema to the record.RecordSchemaBuilderproperty(java.lang.String name, java.lang.String val)Attach val-name property pair to the record schema.
-
-
-
Method Detail
-
property
RecordSchemaBuilder property(java.lang.String name, java.lang.String val)
Attach val-name property pair to the record schema.- Parameters:
name- property nameval- property value- Returns:
- record schema builder
-
field
FieldSchemaBuilder field(java.lang.String fieldName)
Add a field with the given name to the record.- Parameters:
fieldName- name of the field- Returns:
- field schema builder to build the field.
-
field
FieldSchemaBuilder field(java.lang.String fieldName, GenericSchema genericSchema)
Add a field with the given name and genericSchema to the record.- Parameters:
fieldName- name of the fieldgenericSchema- schema of the field- Returns:
- field schema builder to build the field.
-
doc
RecordSchemaBuilder doc(java.lang.String doc)
Add doc to the record schema.- Parameters:
doc- documentation- Returns:
- field schema builder
-
build
SchemaInfo build(SchemaType schemaType)
Build the schema info.- Returns:
- the schema info.
-
-