Package io.debezium.data
Class Enum
- java.lang.Object
-
- io.debezium.data.Enum
-
public class Enum extends Object
A semantic type for an enumeration, where the string values are one of the enumeration's values.- Author:
- Randall Hauch
-
-
Field Summary
Fields Modifier and Type Field Description static String
LOGICAL_NAME
static String
VALUES_FIELD
-
Constructor Summary
Constructors Constructor Description Enum()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static org.apache.kafka.connect.data.SchemaBuilder
builder(String allowedValues)
Returns aSchemaBuilder
for an enumeration.static org.apache.kafka.connect.data.SchemaBuilder
builder(List<String> allowedValues)
Returns aSchemaBuilder
for an enumeration.static org.apache.kafka.connect.data.Schema
schema(String allowedValues)
Returns aSchemaBuilder
for an enumeration, with all other default Schema settings.static org.apache.kafka.connect.data.Schema
schema(List<String> allowedValues)
Returns aSchemaBuilder
for an enumeration, with all other default Schema settings.
-
-
-
Field Detail
-
LOGICAL_NAME
public static final String LOGICAL_NAME
- See Also:
- Constant Field Values
-
VALUES_FIELD
public static final String VALUES_FIELD
- See Also:
- Constant Field Values
-
-
Method Detail
-
builder
public static org.apache.kafka.connect.data.SchemaBuilder builder(String allowedValues)
Returns aSchemaBuilder
for an enumeration. You can use the resulting SchemaBuilder to set additional schema settings such as required/optional, default value, and documentation.- Parameters:
allowedValues
- the comma separated list of allowed values; may not be null- Returns:
- the schema builder
-
builder
public static org.apache.kafka.connect.data.SchemaBuilder builder(List<String> allowedValues)
Returns aSchemaBuilder
for an enumeration. You can use the resulting SchemaBuilder to set additional schema settings such as required/optional, default value, and documentation.- Parameters:
allowedValues
- the list of allowed values; may not be null- Returns:
- the schema builder
-
schema
public static org.apache.kafka.connect.data.Schema schema(String allowedValues)
Returns aSchemaBuilder
for an enumeration, with all other default Schema settings.- Parameters:
allowedValues
- the comma separated list of allowed values; may not be null- Returns:
- the schema
- See Also:
builder(String)
-
schema
public static org.apache.kafka.connect.data.Schema schema(List<String> allowedValues)
Returns aSchemaBuilder
for an enumeration, with all other default Schema settings.- Parameters:
allowedValues
- the list of allowed values; may not be null- Returns:
- the schema
- See Also:
builder(String)
-
-