接口 RecordSchemaBuilder


@Public @Stable public interface RecordSchemaBuilder
Building the schema for a GenericRecord.
  • 方法详细资料

    • property

      RecordSchemaBuilder property(String name, String val)
      Attach val-name property pair to the record schema.
      参数:
      name - property name
      val - property value
      返回:
      record schema builder
    • field

      FieldSchemaBuilder field(String fieldName)
      Add a field with the given name to the record.
      参数:
      fieldName - name of the field
      返回:
      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.
      参数:
      fieldName - name of the field
      genericSchema - schema of the field
      返回:
      field schema builder to build the field.
    • doc

      Add doc to the record schema.
      参数:
      doc - documentation
      返回:
      field schema builder
    • build

      SchemaInfo build(SchemaType schemaType)
      Build the schema info.
      返回:
      the schema info.