Package org.apache.beam.sdk.schemas
Class Schema.Field
java.lang.Object
org.apache.beam.sdk.schemas.Schema.Field
- All Implemented Interfaces:
Serializable
- Enclosing class:
Schema
Field of a row. Contains the
Schema.FieldType
along with associated metadata.- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
abstract String
Returns the field's description.abstract String
getName()
Returns the field name.abstract Schema.Options
Returns the fieldsSchema.Options
.abstract Schema.FieldType
getType()
Returns the fieldsSchema.FieldType
.final int
hashCode()
static Schema.Field
nullable
(String name, Schema.FieldType fieldType) Return's a nullable field with the give name and type.static Schema.Field
of
(String name, Schema.FieldType fieldType) Return's a field with the give name and type.abstract Schema.Field.Builder
boolean
typesEqual
(Schema.Field other) Returns true if two fields are equal, ignoring name and description.withDescription
(String description) Returns a copy of the Field with the description set.Returns a copy of the Field with the name set.withNullable
(boolean isNullable) Returns a copy of the Field with isNullable set.withOptions
(Schema.Options options) Returns a copy of the Field with the options set.withOptions
(Schema.Options.Builder optionsBuilder) Returns a copy of the Field with the options set.withType
(Schema.FieldType fieldType) Returns a copy of the Field with theSchema.FieldType
set.
-
Constructor Details
-
Field
public Field()
-
-
Method Details
-
getName
Returns the field name. -
getDescription
Returns the field's description. -
getType
Returns the fieldsSchema.FieldType
. -
getOptions
Returns the fieldsSchema.Options
. -
toBuilder
-
of
Return's a field with the give name and type. -
nullable
Return's a nullable field with the give name and type. -
withName
Returns a copy of the Field with the name set. -
withDescription
Returns a copy of the Field with the description set. -
withType
Returns a copy of the Field with theSchema.FieldType
set. -
withNullable
Returns a copy of the Field with isNullable set. -
withOptions
Returns a copy of the Field with the options set. -
withOptions
Returns a copy of the Field with the options set. -
equals
-
typesEqual
Returns true if two fields are equal, ignoring name and description. -
hashCode
public final int hashCode()
-