Package org.apache.beam.sdk.schemas
Class Schema.Options
- java.lang.Object
-
- org.apache.beam.sdk.schemas.Schema.Options
-
- All Implemented Interfaces:
java.io.Serializable
- Enclosing class:
- Schema
public static class Schema.Options extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Schema.Options.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Schema.Options.Builder
builder()
boolean
equals(@Nullable java.lang.Object o)
java.util.Set<java.lang.String>
getOptionNames()
Schema.FieldType
getType(java.lang.String optionName)
Get the type of an option.<T> T
getValue(java.lang.String optionName)
Get the value of an option.<T> T
getValue(java.lang.String optionName, java.lang.Class<T> valueClass)
Get the value of an option.<T> T
getValueOrDefault(java.lang.String optionName, T defaultValue)
Get the value of an option.int
hashCode()
boolean
hasOption(java.lang.String name)
boolean
hasOptions()
static Schema.Options
none()
static Schema.Options.Builder
setOption(java.lang.String optionName, Schema.FieldType fieldType, java.lang.Object value)
static Schema.Options.Builder
setOption(java.lang.String optionName, Row value)
java.lang.String
toString()
-
-
-
Method Detail
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getOptionNames
public java.util.Set<java.lang.String> getOptionNames()
-
hasOptions
public boolean hasOptions()
-
hasOption
public boolean hasOption(java.lang.String name)
-
equals
public boolean equals(@Nullable java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
builder
public static Schema.Options.Builder builder()
-
none
public static Schema.Options none()
-
getValue
public <T> T getValue(java.lang.String optionName)
Get the value of an option. If the option is not found null is returned.
-
getValue
public <T> T getValue(java.lang.String optionName, java.lang.Class<T> valueClass)
Get the value of an option. If the option is not found null is returned.
-
getValueOrDefault
public <T> T getValueOrDefault(java.lang.String optionName, T defaultValue)
Get the value of an option. If the option is not found the default value is returned.
-
getType
public Schema.FieldType getType(java.lang.String optionName)
Get the type of an option.
-
setOption
public static Schema.Options.Builder setOption(java.lang.String optionName, Schema.FieldType fieldType, java.lang.Object value)
-
setOption
public static Schema.Options.Builder setOption(java.lang.String optionName, Row value)
-
-