Package io.debezium.data
Interface Envelope.Builder
-
- Enclosing class:
- Envelope
public static interface Envelope.Builder
A builder of an envelope schema.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Envelope
build()
Create the message envelope descriptor.Envelope.Builder
withDoc(String doc)
Define the documentation for the schema.Envelope.Builder
withName(String name)
Define the name for the schema.default Envelope.Builder
withRecord(org.apache.kafka.connect.data.Schema schema)
Envelope.Builder
withSchema(org.apache.kafka.connect.data.Schema fieldSchema, String... fieldNames)
Define theSchema
used for an arbitrary field in the envelope.default Envelope.Builder
withSource(org.apache.kafka.connect.data.Schema sourceSchema)
Define theSchema
used in theEnvelope.FieldName.SOURCE
field.
-
-
-
Method Detail
-
withRecord
default Envelope.Builder withRecord(org.apache.kafka.connect.data.Schema schema)
- Parameters:
schema
- the schema of the records, used in theEnvelope.FieldName.BEFORE
andEnvelope.FieldName.AFTER
fields; may not be null- Returns:
- this builder so methods can be chained; never null
-
withSource
default Envelope.Builder withSource(org.apache.kafka.connect.data.Schema sourceSchema)
Define theSchema
used in theEnvelope.FieldName.SOURCE
field.- Parameters:
sourceSchema
- the schema of theEnvelope.FieldName.SOURCE
field; may not be null- Returns:
- this builder so methods can be chained; never null
-
withSchema
Envelope.Builder withSchema(org.apache.kafka.connect.data.Schema fieldSchema, String... fieldNames)
Define theSchema
used for an arbitrary field in the envelope.- Parameters:
fieldNames
- the names of the fields that this schema should be used with; may not be nullfieldSchema
- the schema of the new optional field; may not be null- Returns:
- this builder so methods can be chained; never null
-
withName
Envelope.Builder withName(String name)
Define the name for the schema.- Parameters:
name
- the name- Returns:
- this builder so methods can be chained; never null
-
withDoc
Envelope.Builder withDoc(String doc)
Define the documentation for the schema.- Parameters:
doc
- the documentation- Returns:
- this builder so methods can be chained; never null
-
build
Envelope build()
Create the message envelope descriptor.- Returns:
- the envelope schema; never null
-
-