Package io.debezium.data
Interface Envelope.Builder
- Enclosing class:
- Envelope
public static interface Envelope.Builder
A builder of an envelope schema.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Create the message envelope descriptor.Define the documentation for the schema.Define the name for the schema.default Envelope.BuilderwithRecord(org.apache.kafka.connect.data.Schema schema) withSchema(org.apache.kafka.connect.data.Schema fieldSchema, String... fieldNames) Define theSchemaused for an arbitrary field in the envelope.default Envelope.BuilderwithSource(org.apache.kafka.connect.data.Schema sourceSchema) Define theSchemaused in theEnvelope.FieldName.SOURCEfield.
-
Method Details
-
withRecord
- Parameters:
schema- the schema of the records, used in theEnvelope.FieldName.BEFOREandEnvelope.FieldName.AFTERfields; may not be null- Returns:
- this builder so methods can be chained; never null
-
withSource
Define theSchemaused in theEnvelope.FieldName.SOURCEfield.- Parameters:
sourceSchema- the schema of theEnvelope.FieldName.SOURCEfield; may not be null- Returns:
- this builder so methods can be chained; never null
-
withSchema
Define theSchemaused 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
Define the name for the schema.- Parameters:
name- the name- Returns:
- this builder so methods can be chained; never null
-
withDoc
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
-