Interface RecordSchemaBuilder


@Public @Stable public interface RecordSchemaBuilder
Building the schema for a GenericRecord.
  • Method Details

    • property

      RecordSchemaBuilder property(String name, String val)
      Attach val-name property pair to the record schema.
      Parameters:
      name - property name
      val - property value
      Returns:
      record schema builder
    • field

      FieldSchemaBuilder field(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(String fieldName, GenericSchema genericSchema)
      Add a field with the given name and genericSchema to the record.
      Parameters:
      fieldName - name of the field
      genericSchema - schema of the field
      Returns:
      field schema builder to build the field.
    • 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.