@NotThreadSafe public static final class ImmutableSchemaInput.Builder extends Object
ImmutableSchemaInput.
Initialize attributes and then invoke the build() method to create an
immutable instance.
Builder is not thread-safe and generally should not be stored in a field or collection,
but instead used immediately to create instances.
| Modifier and Type | Method and Description |
|---|---|
ImmutableSchemaInput.Builder |
addAllFields(Iterable<? extends Plugin.SchemaInput> elements)
Adds elements to
fields list. |
ImmutableSchemaInput.Builder |
addFields(Plugin.SchemaInput... elements)
Adds elements to
fields list. |
ImmutableSchemaInput.Builder |
addFields(Plugin.SchemaInput element)
Adds one element to
fields list. |
ImmutableSchemaInput |
build()
Builds a new
ImmutableSchemaInput. |
ImmutableSchemaInput.Builder |
doc(String doc)
Initializes the value for the
doc attribute. |
ImmutableSchemaInput.Builder |
fieldName(String fieldName)
Initializes the value for the
fieldName attribute. |
ImmutableSchemaInput.Builder |
fields(Iterable<? extends Plugin.SchemaInput> elements)
Sets or replaces all elements for
fields list. |
ImmutableSchemaInput.Builder |
from(Plugin.SchemaInput instance)
Fill a builder with attribute values from the provided
SchemaInput instance. |
ImmutableSchemaInput.Builder |
isOptional(boolean isOptional)
Initializes the value for the
isOptional attribute. |
ImmutableSchemaInput.Builder |
key(Plugin.SchemaInput key)
Initializes the value for the
key attribute. |
ImmutableSchemaInput.Builder |
name(String name)
Initializes the value for the
name attribute. |
ImmutableSchemaInput.Builder |
type(org.apache.kafka.connect.data.Schema.Type type)
Initializes the value for the
type attribute. |
ImmutableSchemaInput.Builder |
value(Plugin.SchemaInput value)
Initializes the value for the
value attribute. |
@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder from(Plugin.SchemaInput instance)
SchemaInput instance.
Regular attribute values will be replaced with those from the given instance.
Absent optional values will not replace present values.
Collection elements and entries will be added, not replaced.instance - The instance from which to copy valuesthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder name(@Nullable String name)
name attribute.name - The value for name (can be null)this builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder doc(@Nullable String doc)
doc attribute.doc - The value for doc (can be null)this builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder isOptional(boolean isOptional)
isOptional attribute.isOptional - The value for isOptionalthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder type(org.apache.kafka.connect.data.Schema.Type type)
type attribute.type - The value for typethis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder fieldName(@Nullable String fieldName)
fieldName attribute.fieldName - The value for fieldName (can be null)this builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder addFields(Plugin.SchemaInput element)
fields list.element - A fields elementthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder addFields(Plugin.SchemaInput... elements)
fields list.elements - An array of fields elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder fields(@Nullable Iterable<? extends Plugin.SchemaInput> elements)
fields list.elements - An iterable of fields elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder addAllFields(Iterable<? extends Plugin.SchemaInput> elements)
fields list.elements - An iterable of fields elementsthis builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder key(@Nullable Plugin.SchemaInput key)
key attribute.key - The value for key (can be null)this builder for use in a chained invocation@CanIgnoreReturnValue public final ImmutableSchemaInput.Builder value(@Nullable Plugin.SchemaInput value)
value attribute.value - The value for value (can be null)this builder for use in a chained invocationpublic ImmutableSchemaInput build()
ImmutableSchemaInput.IllegalStateException - if any required attributes are missingCopyright © 2016–2025. All rights reserved.