Class: TencentCloud::Dts::V20211206::SubscribeKafkaConfig
- Inherits:
-
Common::AbstractModel
- Object
- Common::AbstractModel
- TencentCloud::Dts::V20211206::SubscribeKafkaConfig
- Defined in:
- lib/v20211206/models.rb
Overview
订阅的kafka分区数和分区规则。mariadb,percona,tdsqlmysql,tdpg不支持自定义分区,所以DistributeRules和DefaultRuleType可以不填,但是NumberOfPartitions是必填。
Instance Attribute Summary collapse
-
#DefaultRuleType ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。 该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。.
-
#DistributeRules ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。 该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。.
-
#NumberOfPartitions ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。 该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。.
Instance Method Summary collapse
- #deserialize(params) ⇒ Object
-
#initialize(numberofpartitions = nil, distributerules = nil, defaultruletype = nil) ⇒ SubscribeKafkaConfig
constructor
A new instance of SubscribeKafkaConfig.
Constructor Details
#initialize(numberofpartitions = nil, distributerules = nil, defaultruletype = nil) ⇒ SubscribeKafkaConfig
Returns a new instance of SubscribeKafkaConfig.
7404 7405 7406 7407 7408 |
# File 'lib/v20211206/models.rb', line 7404 def initialize(numberofpartitions=nil, distributerules=nil, defaultruletype=nil) @NumberOfPartitions = numberofpartitions @DistributeRules = distributerules @DefaultRuleType = defaultruletype end |
Instance Attribute Details
#DefaultRuleType ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。
7402 7403 7404 |
# File 'lib/v20211206/models.rb', line 7402 def DefaultRuleType @DefaultRuleType end |
#DistributeRules ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。
7402 7403 7404 |
# File 'lib/v20211206/models.rb', line 7402 def DistributeRules @DistributeRules end |
#NumberOfPartitions ⇒ Object
非mongo产品的枚举值为: table-按表名分区,pk-按表名+主键分区。mongo的枚举值为:collection-按集合名分区。该字段与DistributeRules搭配使用,如果配置了该字段,视为配置了一条DistributeRules。
7402 7403 7404 |
# File 'lib/v20211206/models.rb', line 7402 def NumberOfPartitions @NumberOfPartitions end |
Instance Method Details
#deserialize(params) ⇒ Object
7410 7411 7412 7413 7414 7415 7416 7417 7418 7419 7420 7421 |
# File 'lib/v20211206/models.rb', line 7410 def deserialize(params) @NumberOfPartitions = params['NumberOfPartitions'] unless params['DistributeRules'].nil? @DistributeRules = [] params['DistributeRules'].each do |i| distributerule_tmp = DistributeRule.new distributerule_tmp.deserialize(i) @DistributeRules << distributerule_tmp end end @DefaultRuleType = params['DefaultRuleType'] end |