lib/v20190819/models.rb in tencentcloud-sdk-ckafka-3.0.395 vs lib/v20190819/models.rb in tencentcloud-sdk-ckafka-3.0.396

- old
+ new

@@ -7260,14 +7260,16 @@ # @type IsTablePrefix: Boolean # @param IncludeContentChanges: 如果该值为all,则DDL数据以及DML数据也会写入到选中的topic;若该值为dml,则只有DML数据写入到选中的topic # @type IncludeContentChanges: String # @param IncludeQuery: 如果该值为true,且MySQL中"binlog_rows_query_log_events"配置项的值为"ON",则流入到topic的数据包含原SQL语句;若该值为false,流入到topic的数据不包含原SQL语句 # @type IncludeQuery: Boolean + # @param RecordWithSchema: 如果该值为 true,则消息中会携带消息结构体对应的schema,如果该值为false则不会携带 + # @type RecordWithSchema: Boolean - attr_accessor :Database, :Table, :Resource, :SnapshotMode, :DdlTopic, :DataSourceMonitorMode, :DataSourceMonitorResource, :DataSourceIncrementMode, :DataSourceIncrementColumn, :DataSourceStartFrom, :DataTargetInsertMode, :DataTargetPrimaryKeyField, :DataTargetRecordMapping, :TopicRegex, :TopicReplacement, :KeyColumns, :DropInvalidMessage, :DropCls, :OutputFormat, :IsTablePrefix, :IncludeContentChanges, :IncludeQuery + attr_accessor :Database, :Table, :Resource, :SnapshotMode, :DdlTopic, :DataSourceMonitorMode, :DataSourceMonitorResource, :DataSourceIncrementMode, :DataSourceIncrementColumn, :DataSourceStartFrom, :DataTargetInsertMode, :DataTargetPrimaryKeyField, :DataTargetRecordMapping, :TopicRegex, :TopicReplacement, :KeyColumns, :DropInvalidMessage, :DropCls, :OutputFormat, :IsTablePrefix, :IncludeContentChanges, :IncludeQuery, :RecordWithSchema - def initialize(database=nil, table=nil, resource=nil, snapshotmode=nil, ddltopic=nil, datasourcemonitormode=nil, datasourcemonitorresource=nil, datasourceincrementmode=nil, datasourceincrementcolumn=nil, datasourcestartfrom=nil, datatargetinsertmode=nil, datatargetprimarykeyfield=nil, datatargetrecordmapping=nil, topicregex=nil, topicreplacement=nil, keycolumns=nil, dropinvalidmessage=nil, dropcls=nil, outputformat=nil, istableprefix=nil, includecontentchanges=nil, includequery=nil) + def initialize(database=nil, table=nil, resource=nil, snapshotmode=nil, ddltopic=nil, datasourcemonitormode=nil, datasourcemonitorresource=nil, datasourceincrementmode=nil, datasourceincrementcolumn=nil, datasourcestartfrom=nil, datatargetinsertmode=nil, datatargetprimarykeyfield=nil, datatargetrecordmapping=nil, topicregex=nil, topicreplacement=nil, keycolumns=nil, dropinvalidmessage=nil, dropcls=nil, outputformat=nil, istableprefix=nil, includecontentchanges=nil, includequery=nil, recordwithschema=nil) @Database = database @Table = table @Resource = resource @SnapshotMode = snapshotmode @DdlTopic = ddltopic @@ -7286,10 +7288,11 @@ @DropCls = dropcls @OutputFormat = outputformat @IsTablePrefix = istableprefix @IncludeContentChanges = includecontentchanges @IncludeQuery = includequery + @RecordWithSchema = recordwithschema end def deserialize(params) @Database = params['Database'] @Table = params['Table'] @@ -7321,10 +7324,11 @@ end @OutputFormat = params['OutputFormat'] @IsTablePrefix = params['IsTablePrefix'] @IncludeContentChanges = params['IncludeContentChanges'] @IncludeQuery = params['IncludeQuery'] + @RecordWithSchema = params['RecordWithSchema'] end end # 操作类型返回的Data结构 class OperateResponseData < TencentCloud::Common::AbstractModel @@ -7525,26 +7529,53 @@ # @type Resource: String # @param PluginName: 插件名(decoderbufs/pgoutput),默认为decoderbufs # @type PluginName: String # @param SnapshotMode: 复制存量信息(never增量, initial全量),默认为initial # @type SnapshotMode: String + # @param DataFormat: 上游数据格式(JSON/Debezium), 当数据库同步模式为默认字段匹配时,必填 + # @type DataFormat: String + # @param DataTargetInsertMode: "INSERT" 表示使用 Insert 模式插入,"UPSERT" 表示使用 Upsert 模式插入 + # @type DataTargetInsertMode: String + # @param DataTargetPrimaryKeyField: 当 "DataInsertMode"="UPSERT" 时,传入当前 upsert 时依赖的主键 + # @type DataTargetPrimaryKeyField: String + # @param DataTargetRecordMapping: 表与消息间的映射关系 + # @type DataTargetRecordMapping: Array + # @param DropInvalidMessage: 是否抛弃解析失败的消息,默认为true + # @type DropInvalidMessage: Boolean - attr_accessor :Database, :Table, :Resource, :PluginName, :SnapshotMode + attr_accessor :Database, :Table, :Resource, :PluginName, :SnapshotMode, :DataFormat, :DataTargetInsertMode, :DataTargetPrimaryKeyField, :DataTargetRecordMapping, :DropInvalidMessage - def initialize(database=nil, table=nil, resource=nil, pluginname=nil, snapshotmode=nil) + def initialize(database=nil, table=nil, resource=nil, pluginname=nil, snapshotmode=nil, dataformat=nil, datatargetinsertmode=nil, datatargetprimarykeyfield=nil, datatargetrecordmapping=nil, dropinvalidmessage=nil) @Database = database @Table = table @Resource = resource @PluginName = pluginname @SnapshotMode = snapshotmode + @DataFormat = dataformat + @DataTargetInsertMode = datatargetinsertmode + @DataTargetPrimaryKeyField = datatargetprimarykeyfield + @DataTargetRecordMapping = datatargetrecordmapping + @DropInvalidMessage = dropinvalidmessage end def deserialize(params) @Database = params['Database'] @Table = params['Table'] @Resource = params['Resource'] @PluginName = params['PluginName'] @SnapshotMode = params['SnapshotMode'] + @DataFormat = params['DataFormat'] + @DataTargetInsertMode = params['DataTargetInsertMode'] + @DataTargetPrimaryKeyField = params['DataTargetPrimaryKeyField'] + unless params['DataTargetRecordMapping'].nil? + @DataTargetRecordMapping = [] + params['DataTargetRecordMapping'].each do |i| + recordmapping_tmp = RecordMapping.new + recordmapping_tmp.deserialize(i) + @DataTargetRecordMapping << recordmapping_tmp + end + end + @DropInvalidMessage = params['DropInvalidMessage'] end end # 消息价格实体 class Price < TencentCloud::Common::AbstractModel