tencentcloud-sdk-nodejs-intl-en
Version:
1,847 lines (1,545 loc) • 364 kB
JavaScript
/*
* Copyright (c) 2018 Tencent. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/
const AbstractModel = require("../../common/abstract_model");
/**
* DescribeCkafkaVersion response structure.
* @class
*/
class DescribeCkafkaVersionResponse extends AbstractModel {
constructor(){
super();
/**
* Instance version information.
* @type {InstanceVersion || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
let obj = new InstanceVersion();
obj.deserialize(params.Result)
this.Result = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Topic details
* @class
*/
class TopicDetail extends AbstractModel {
constructor(){
super();
/**
* Topic name
* @type {string || null}
*/
this.TopicName = null;
/**
* Topic Id.
* @type {string || null}
*/
this.TopicId = null;
/**
* Number of partitions
* @type {number || null}
*/
this.PartitionNum = null;
/**
* Number of topic replicas. valid values: 1, 3.
* @type {number || null}
*/
this.ReplicaNum = null;
/**
* Remarks.
* @type {string || null}
*/
this.Note = null;
/**
* Creation time
* @type {number || null}
*/
this.CreateTime = null;
/**
* Whether to enable IP authentication allowlist. true: yes, false: no
* @type {boolean || null}
*/
this.EnableWhiteList = null;
/**
* Number of IPs in IP allowlist
* @type {number || null}
*/
this.IpWhiteListCount = null;
/**
* Data backup cos bucket. specifies the bucket address for archiving to cos.
* @type {string || null}
*/
this.ForwardCosBucket = null;
/**
* Status of data backup to COS. 1: not enabled, 0: enabled
* @type {number || null}
*/
this.ForwardStatus = null;
/**
* Frequency of data backup to COS
* @type {number || null}
*/
this.ForwardInterval = null;
/**
* Advanced configuration.
* @type {Config || null}
*/
this.Config = null;
/**
* Message retention period configuration (used for dynamic configuration change records).
* @type {TopicRetentionTimeConfigRsp || null}
*/
this.RetentionTimeConfig = null;
/**
* 0: normal. 1: deleted. 2: deleting.
* @type {number || null}
*/
this.Status = null;
/**
* Tag list
Note: This field may return null, indicating that no valid values can be obtained.
* @type {Array.<Tag> || null}
*/
this.Tags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TopicName = 'TopicName' in params ? params.TopicName : null;
this.TopicId = 'TopicId' in params ? params.TopicId : null;
this.PartitionNum = 'PartitionNum' in params ? params.PartitionNum : null;
this.ReplicaNum = 'ReplicaNum' in params ? params.ReplicaNum : null;
this.Note = 'Note' in params ? params.Note : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.EnableWhiteList = 'EnableWhiteList' in params ? params.EnableWhiteList : null;
this.IpWhiteListCount = 'IpWhiteListCount' in params ? params.IpWhiteListCount : null;
this.ForwardCosBucket = 'ForwardCosBucket' in params ? params.ForwardCosBucket : null;
this.ForwardStatus = 'ForwardStatus' in params ? params.ForwardStatus : null;
this.ForwardInterval = 'ForwardInterval' in params ? params.ForwardInterval : null;
if (params.Config) {
let obj = new Config();
obj.deserialize(params.Config)
this.Config = obj;
}
if (params.RetentionTimeConfig) {
let obj = new TopicRetentionTimeConfigRsp();
obj.deserialize(params.RetentionTimeConfig)
this.RetentionTimeConfig = obj;
}
this.Status = 'Status' in params ? params.Status : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new Tag();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
}
}
/**
* DeleteAcl request structure.
* @class
*/
class DeleteAclRequest extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id, which can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* ACL resource type (`2`: TOPIC, `3`: GROUP, `4`: CLUSTER).
* @type {number || null}
*/
this.ResourceType = null;
/**
* Resource name, which is related to `resourceType`. For example, if `resourceType` is `TOPIC`, this field indicates the topic name; if `resourceType` is `GROUP`, this field indicates the group name; if `resourceType` is `CLUSTER`, this field can be left empty.
* @type {string || null}
*/
this.ResourceName = null;
/**
* ACL operation type (`2`: ALL, `3`: READ, `4`: WRITE, `5`: CREATE, `6`: DELETE, `7`: ALTER, `8`: DESCRIBE, `9`: CLUSTER_ACTION, `10`: DESCRIBE_CONFIGS, `11`: ALTER_CONFIGS, `12`: IDEMPOTENT_WRITE).
* @type {number || null}
*/
this.Operation = null;
/**
* Permission type (2:DENY, 3:ALLOW). currently ckafka supports ALLOW (equivalent to allowlist), others used when compatible with open-source kafka acl.
* @type {number || null}
*/
this.PermissionType = null;
/**
* The default value is `*`, which means that any host can access. Currently, CKafka does not support the host as `*`, but the future product based on the open-source Kafka will directly support this
* @type {string || null}
*/
this.Host = null;
/**
* List of users, defaults to User:*, means any User is accessible in the entire region. the current User can only be the User in the list of users.
* @type {string || null}
*/
this.Principal = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ResourceType = 'ResourceType' in params ? params.ResourceType : null;
this.ResourceName = 'ResourceName' in params ? params.ResourceName : null;
this.Operation = 'Operation' in params ? params.Operation : null;
this.PermissionType = 'PermissionType' in params ? params.PermissionType : null;
this.Host = 'Host' in params ? params.Host : null;
this.Principal = 'Principal' in params ? params.Principal : null;
}
}
/**
* Consumer information
* @class
*/
class GroupInfoMember extends AbstractModel {
constructor(){
super();
/**
* Unique ID generated for consumer in consumer group by coordinator
* @type {string || null}
*/
this.MemberId = null;
/**
* `client.id` information by the client consumer SDK
* @type {string || null}
*/
this.ClientId = null;
/**
* Generally stores client IP address
* @type {string || null}
*/
this.ClientHost = null;
/**
* Stores the information of partition assigned to this consumer
* @type {Assignment || null}
*/
this.Assignment = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.MemberId = 'MemberId' in params ? params.MemberId : null;
this.ClientId = 'ClientId' in params ? params.ClientId : null;
this.ClientHost = 'ClientHost' in params ? params.ClientHost : null;
if (params.Assignment) {
let obj = new Assignment();
obj.deserialize(params.Assignment)
this.Assignment = obj;
}
}
}
/**
* Four pieces of information of ACL rules: source IP address, destination IP address, source port, and destination port
* @class
*/
class AclRuleInfo extends AbstractModel {
constructor(){
super();
/**
* ACL operation types. Enumerated values: `All` (all operations), `Read` (read), `Write` (write).
* @type {string || null}
*/
this.Operation = null;
/**
* Permission type. Deny: Deny. Allow: permission.
* @type {string || null}
*/
this.PermissionType = null;
/**
* Indicates any host is accessible in the entire region.
* @type {string || null}
*/
this.Host = null;
/**
* The User. User:* means any User is accessible in the entire region. the current User can only be the User in the list of users. the input format requires the [User:] prefix. for example, for User A, input User:A.
* @type {string || null}
*/
this.Principal = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Operation = 'Operation' in params ? params.Operation : null;
this.PermissionType = 'PermissionType' in params ? params.PermissionType : null;
this.Host = 'Host' in params ? params.Host : null;
this.Principal = 'Principal' in params ? params.Principal : null;
}
}
/**
* BatchCreateAcl request structure.
* @class
*/
class BatchCreateAclRequest extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id, which can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* ACL resource type. Default value: `2` (topic).
* @type {number || null}
*/
this.ResourceType = null;
/**
* Resource list array, obtainable through the DescribeTopic API (https://www.tencentcloud.com/document/product/597/40847?from_cn_redirect=1).
* @type {Array.<string> || null}
*/
this.ResourceNames = null;
/**
* Specifies the set ACL rule list, which can be obtained through the DescribeAclRule API (https://www.tencentcloud.com/document/product/597/89217?from_cn_redirect=1).
* @type {Array.<AclRuleInfo> || null}
*/
this.RuleList = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ResourceType = 'ResourceType' in params ? params.ResourceType : null;
this.ResourceNames = 'ResourceNames' in params ? params.ResourceNames : null;
if (params.RuleList) {
this.RuleList = new Array();
for (let z in params.RuleList) {
let obj = new AclRuleInfo();
obj.deserialize(params.RuleList[z]);
this.RuleList.push(obj);
}
}
}
}
/**
* DeleteUser request structure.
* @class
*/
class DeleteUserRequest extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id, which can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Specifies the username, which can be obtained through the [DescribeUser](https://www.tencentcloud.com/document/product/597/40855?from_cn_redirect=1) api.
* @type {string || null}
*/
this.Name = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Name = 'Name' in params ? params.Name : null;
}
}
/**
* Partition and offset
* @class
*/
class PartitionOffset extends AbstractModel {
constructor(){
super();
/**
* Partition
* @type {string || null}
*/
this.Partition = null;
/**
* Specifies the offset.
* @type {number || null}
*/
this.Offset = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Partition = 'Partition' in params ? params.Partition : null;
this.Offset = 'Offset' in params ? params.Offset : null;
}
}
/**
* DescribeACL request structure.
* @class
*/
class DescribeACLRequest extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id, which can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* ACL resource type (`2`: TOPIC, `3`: GROUP, `4`: CLUSTER).
* @type {number || null}
*/
this.ResourceType = null;
/**
* Resource name, which is related to `resourceType`. For example, if `resourceType` is `TOPIC`, this field indicates the topic name; if `resourceType` is `GROUP`, this field indicates the group name; if `resourceType` is `CLUSTER`, this field can be left empty.
* @type {string || null}
*/
this.ResourceName = null;
/**
* Offset position
* @type {number || null}
*/
this.Offset = null;
/**
* Number limit. default value is 50. maximum value is 50.
* @type {number || null}
*/
this.Limit = null;
/**
* Keyword match
* @type {string || null}
*/
this.SearchWord = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ResourceType = 'ResourceType' in params ? params.ResourceType : null;
this.ResourceName = 'ResourceName' in params ? params.ResourceName : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
this.SearchWord = 'SearchWord' in params ? params.SearchWord : null;
}
}
/**
* Deletion of instances returns a task.
* @class
*/
class InstanceDeleteResponse extends AbstractModel {
constructor(){
super();
/**
* Specifies the task Id returned after deleting an instance.
* @type {number || null}
*/
this.FlowId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.FlowId = 'FlowId' in params ? params.FlowId : null;
}
}
/**
* Results of the batch modified topic attributes
* @class
*/
class BatchModifyTopicResultDTO extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Topic name
* @type {string || null}
*/
this.TopicName = null;
/**
* Operation return code.
* @type {string || null}
*/
this.ReturnCode = null;
/**
* Returned information.
* @type {string || null}
*/
this.Message = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.TopicName = 'TopicName' in params ? params.TopicName : null;
this.ReturnCode = 'ReturnCode' in params ? params.ReturnCode : null;
this.Message = 'Message' in params ? params.Message : null;
}
}
/**
* DescribeTopicAttributes request structure.
* @class
*/
class DescribeTopicAttributesRequest extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id, which can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Specifies the topic name, which can be obtained through the [DescribeTopic](https://www.tencentcloud.com/document/product/597/40847?from_cn_redirect=1) api.
* @type {string || null}
*/
this.TopicName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.TopicName = 'TopicName' in params ? params.TopicName : null;
}
}
/**
* DescribeInstanceAttributes request structure.
* @class
*/
class DescribeInstanceAttributesRequest extends AbstractModel {
constructor(){
super();
/**
* ckafka cluster instance Id. obtain through the API [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1).
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* User group entity
* @class
*/
class ConsumerGroup extends AbstractModel {
constructor(){
super();
/**
* User group name
* @type {string || null}
*/
this.ConsumerGroupName = null;
/**
* Subscribed message entity
* @type {Array.<SubscribedInfo> || null}
*/
this.SubscribedInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ConsumerGroupName = 'ConsumerGroupName' in params ? params.ConsumerGroupName : null;
if (params.SubscribedInfo) {
this.SubscribedInfo = new Array();
for (let z in params.SubscribedInfo) {
let obj = new SubscribedInfo();
obj.deserialize(params.SubscribedInfo[z]);
this.SubscribedInfo.push(obj);
}
}
}
}
/**
* Stores the information of partition assigned to this consumer
* @class
*/
class Assignment extends AbstractModel {
constructor(){
super();
/**
* Assignment version information
* @type {number || null}
*/
this.Version = null;
/**
* topic information list.
* @type {Array.<GroupInfoTopics> || null}
*/
this.Topics = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Version = 'Version' in params ? params.Version : null;
if (params.Topics) {
this.Topics = new Array();
for (let z in params.Topics) {
let obj = new GroupInfoTopics();
obj.deserialize(params.Topics[z]);
this.Topics.push(obj);
}
}
}
}
/**
* ModifyAclRule request structure.
* @class
*/
class ModifyAclRuleRequest extends AbstractModel {
constructor(){
super();
/**
* <p>ckafka cluster instance Id</p><p>For reference: <a href="https://www.tencentcloud.com/document/api/597/40835?from_cn_redirect=1">DescribeInstances</a></p>
* @type {string || null}
*/
this.InstanceId = null;
/**
* <p>ACL rule name</p>
* @type {string || null}
*/
this.RuleName = null;
/**
* <p>Input when modifying the preset rule, whether to apply to newly-added topics</p><p>Enumeration value:</p><ul><li>0: Not allowed to apply to newly-added topics</li><li>1: Allowed to apply to newly-added topics</li></ul><p>Default value: 0</p>
* @type {number || null}
*/
this.IsApplied = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.RuleName = 'RuleName' in params ? params.RuleName : null;
this.IsApplied = 'IsApplied' in params ? params.IsApplied : null;
}
}
/**
* DescribeAclRule response structure.
* @class
*/
class DescribeAclRuleResponse extends AbstractModel {
constructor(){
super();
/**
* The set of returned ACL rules
* @type {AclRuleResp || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
let obj = new AclRuleResp();
obj.deserialize(params.Result)
this.Result = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Group offset partition object
* @class
*/
class GroupOffsetPartition extends AbstractModel {
constructor(){
super();
/**
* Topic `partitionId`
* @type {number || null}
*/
this.Partition = null;
/**
* Offset position submitted by consumer
* @type {number || null}
*/
this.Offset = null;
/**
* Supports consumers to submit messages with imported metadata for other purposes, currently an empty string.
* @type {string || null}
*/
this.Metadata = null;
/**
* Error code
* @type {number || null}
*/
this.ErrorCode = null;
/**
* Latest offset of current partition
* @type {number || null}
*/
this.LogEndOffset = null;
/**
* Number of unconsumed messages
* @type {number || null}
*/
this.Lag = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Partition = 'Partition' in params ? params.Partition : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Metadata = 'Metadata' in params ? params.Metadata : null;
this.ErrorCode = 'ErrorCode' in params ? params.ErrorCode : null;
this.LogEndOffset = 'LogEndOffset' in params ? params.LogEndOffset : null;
this.Lag = 'Lag' in params ? params.Lag : null;
}
}
/**
* DescribeConsumerGroup response structure.
* @class
*/
class DescribeConsumerGroupResponse extends AbstractModel {
constructor(){
super();
/**
* Returned consumer group information
* @type {ConsumerGroupResponse || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
let obj = new ConsumerGroupResponse();
obj.deserialize(params.Result)
this.Result = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Prices of different purchased items
* @class
*/
class InquiryDetailPrice extends AbstractModel {
constructor(){
super();
/**
* Price of additional private network bandwidth
Note: This field may return null, indicating that no valid values can be obtained.
* @type {InquiryBasePrice || null}
*/
this.BandwidthPrice = null;
/**
* Disk price
Note: This field may return null, indicating that no valid values can be obtained.
* @type {InquiryBasePrice || null}
*/
this.DiskPrice = null;
/**
* Price of additional partitions
Note: This field may return null, indicating that no valid values can be obtained.
* @type {InquiryBasePrice || null}
*/
this.PartitionPrice = null;
/**
* Price of additional topics
Note: This field may return null, indicating that no valid values can be obtained.
* @type {InquiryBasePrice || null}
*/
this.TopicPrice = null;
/**
* Instance package price.
* @type {InquiryBasePrice || null}
*/
this.InstanceTypePrice = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.BandwidthPrice) {
let obj = new InquiryBasePrice();
obj.deserialize(params.BandwidthPrice)
this.BandwidthPrice = obj;
}
if (params.DiskPrice) {
let obj = new InquiryBasePrice();
obj.deserialize(params.DiskPrice)
this.DiskPrice = obj;
}
if (params.PartitionPrice) {
let obj = new InquiryBasePrice();
obj.deserialize(params.PartitionPrice)
this.PartitionPrice = obj;
}
if (params.TopicPrice) {
let obj = new InquiryBasePrice();
obj.deserialize(params.TopicPrice)
this.TopicPrice = obj;
}
if (params.InstanceTypePrice) {
let obj = new InquiryBasePrice();
obj.deserialize(params.InstanceTypePrice)
this.InstanceTypePrice = obj;
}
}
}
/**
* FetchMessageListByOffset response structure.
* @class
*/
class FetchMessageListByOffsetResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Return result. Note that the list does not return specific message content (key, value). If necessary, query specific message content using the FetchMessageByOffset API.</p>
* @type {Array.<ConsumerRecord> || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
this.Result = new Array();
for (let z in params.Result) {
let obj = new ConsumerRecord();
obj.deserialize(params.Result[z]);
this.Result.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Values returned by the `InquireCkafkaPrice` API
* @class
*/
class InquireCkafkaPriceResp extends AbstractModel {
constructor(){
super();
/**
* Specifies the instance price.
* @type {InquiryPrice || null}
*/
this.InstancePrice = null;
/**
* Public network bandwidth price
Note: This field may return null, indicating that no valid values can be obtained.
* @type {InquiryPrice || null}
*/
this.PublicNetworkBandwidthPrice = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.InstancePrice) {
let obj = new InquiryPrice();
obj.deserialize(params.InstancePrice)
this.InstancePrice = obj;
}
if (params.PublicNetworkBandwidthPrice) {
let obj = new InquiryPrice();
obj.deserialize(params.PublicNetworkBandwidthPrice)
this.PublicNetworkBandwidthPrice = obj;
}
}
}
/**
* CreateRoute request structure.
* @class
*/
class CreateRouteRequest extends AbstractModel {
constructor(){
super();
/**
* <p>Specifies the ckafka cluster instance id. obtain through the API <a href="https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1">DescribeInstances</a>.</p>.
* @type {string || null}
*/
this.InstanceId = null;
/**
* <P>Specifies the network type of the route (3: vpc routing; 7: internal support route; 1: public network route).</p>.
* @type {number || null}
*/
this.VipType = null;
/**
* <p>vpc network Id. required when vipType is 3.</p>.
* @type {string || null}
*/
this.VpcId = null;
/**
* <p>Specifies the vpc subnet id. required when vipType is 3.</p>.
* @type {string || null}
*/
this.SubnetId = null;
/**
* <p>Access type: 0-plaintext; 1-sasl_plaintext; 3-sasl_ssl; 4-sasl_scram_sha_256; 5-sasl_scram_sha_512. Default is 0.<br>vipType=3, supports 0,1,3,4,5<br>vipType=7, supports 0,1,3<br>vipType=1, supports 1,3</p>
* @type {number || null}
*/
this.AccessType = null;
/**
* <P>Specifies whether access management is required. this field has been deprecated.</p>.
* @type {number || null}
*/
this.AuthFlag = null;
/**
* <p>Specifies the caller appId.</p>.
* @type {number || null}
*/
this.CallerAppid = null;
/**
* <P>Public network bandwidth. required for public network route. must be a multiple of 3. no default value.</p>.
* @type {number || null}
*/
this.PublicNetwork = null;
/**
* <p>vip address.</p>.
* @type {string || null}
*/
this.Ip = null;
/**
* <P>Specifies the remark information.</p>.
* @type {string || null}
*/
this.Note = null;
/**
* <P>Specifies the ordered list of security group associations.</p>.
* @type {Array.<string> || null}
*/
this.SecurityGroupIds = null;
/**
* <p>Preset configuration of public network route IP allowlist</p><p>Input parameter limit: vipType=1</p>
* @type {Array.<IpWhitelistDTO> || null}
*/
this.IpWhitelist = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.VipType = 'VipType' in params ? params.VipType : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.AccessType = 'AccessType' in params ? params.AccessType : null;
this.AuthFlag = 'AuthFlag' in params ? params.AuthFlag : null;
this.CallerAppid = 'CallerAppid' in params ? params.CallerAppid : null;
this.PublicNetwork = 'PublicNetwork' in params ? params.PublicNetwork : null;
this.Ip = 'Ip' in params ? params.Ip : null;
this.Note = 'Note' in params ? params.Note : null;
this.SecurityGroupIds = 'SecurityGroupIds' in params ? params.SecurityGroupIds : null;
if (params.IpWhitelist) {
this.IpWhitelist = new Array();
for (let z in params.IpWhitelist) {
let obj = new IpWhitelistDTO();
obj.deserialize(params.IpWhitelist[z]);
this.IpWhitelist.push(obj);
}
}
}
}
/**
* DeleteTopic request structure.
* @class
*/
class DeleteTopicRequest extends AbstractModel {
constructor(){
super();
/**
* CKafka instance ID
* @type {string || null}
*/
this.InstanceId = null;
/**
* CKafka topic name
* @type {string || null}
*/
this.TopicName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.TopicName = 'TopicName' in params ? params.TopicName : null;
}
}
/**
* DescribeInstances response structure.
* @class
*/
class DescribeInstancesResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Returned result</p>
* @type {InstanceResponse || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
let obj = new InstanceResponse();
obj.deserialize(params.Result)
this.Result = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* FetchMessageByOffset response structure.
* @class
*/
class FetchMessageByOffsetResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Returned result</p>
* @type {ConsumerRecord || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
let obj = new ConsumerRecord();
obj.deserialize(params.Result)
this.Result = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* BatchModifyTopicAttributes response structure.
* @class
*/
class BatchModifyTopicAttributesResponse extends AbstractModel {
constructor(){
super();
/**
* Returned result.
* @type {Array.<BatchModifyTopicResultDTO> || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
this.Result = new Array();
for (let z in params.Result) {
let obj = new BatchModifyTopicResultDTO();
obj.deserialize(params.Result[z]);
this.Result.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Data structure returned by yearly/monthly subscribed instance APIs
* @class
*/
class CreateInstancePreResp extends AbstractModel {
constructor(){
super();
/**
* Returned code. 0: Normal; other values: Error.
* @type {string || null}
*/
this.ReturnCode = null;
/**
* The message indicating whether the operation is successful.
* @type {string || null}
*/
this.ReturnMessage = null;
/**
* Specifies the Data returned by the operation.
* @type {CreateInstancePreData || null}
*/
this.Data = null;
/**
* Deletion time. This parameter has been deprecated and will be deleted. Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.DeleteRouteTimestamp = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ReturnCode = 'ReturnCode' in params ? params.ReturnCode : null;
this.ReturnMessage = 'ReturnMessage' in params ? params.ReturnMessage : null;
if (params.Data) {
let obj = new CreateInstancePreData();
obj.deserialize(params.Data)
this.Data = obj;
}
this.DeleteRouteTimestamp = 'DeleteRouteTimestamp' in params ? params.DeleteRouteTimestamp : null;
}
}
/**
* Internal topic object of `GroupInfo`
* @class
*/
class GroupInfoTopics extends AbstractModel {
constructor(){
super();
/**
* Name of assigned topics
* @type {string || null}
*/
this.Topic = null;
/**
* Allocates partition info.
* @type {Array.<number> || null}
*/
this.Partitions = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Topic = 'Topic' in params ? params.Topic : null;
this.Partitions = 'Partitions' in params ? params.Partitions : null;
}
}
/**
* InstanceScalingDown request structure.
* @class
*/
class InstanceScalingDownRequest extends AbstractModel {
constructor(){
super();
/**
* ckafka cluster instance Id. can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Shrink mode. 1: stable mode.
2. specifies high-speed configuration change.
* @type {number || null}
*/
this.UpgradeStrategy = null;
/**
* Specifies the disk capacity in GB. value range: maximum value 500000, step length 100.
The specifications and limitations can be viewed through the following link: https://www.tencentcloud.com/document/product/597/122562.?from_cn_redirect=1
* @type {number || null}
*/
this.DiskSize = null;
/**
* Peak bandwidth in MB/s.
Specifies the url (https://www.tencentcloud.com/document/product/597/11745?from_cn_redirect=1) to view specification limits and corresponding step length.
* @type {number || null}
*/
this.BandWidth = null;
/**
* Partition upper limit maximum value of 40000, step length 100.
Specification limits can be viewed through the following link: https://www.tencentcloud.com/document/product/597/122563.?from_cn_redirect=1
* @type {number || null}
*/
this.Partition = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.UpgradeStrategy = 'UpgradeStrategy' in params ? params.UpgradeStrategy : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.BandWidth = 'BandWidth' in params ? params.BandWidth : null;
this.Partition = 'Partition' in params ? params.Partition : null;
}
}
/**
* FetchMessageListByOffset request structure.
* @class
*/
class FetchMessageListByOffsetRequest extends AbstractModel {
constructor(){
super();
/**
* <p>ckafka cluster instance Id</p><p>For reference: <a href="https://www.tencentcloud.com/document/api/597/40835?from_cn_redirect=1">DescribeInstances</a></p>
* @type {string || null}
*/
this.InstanceId = null;
/**
* <p>Topic name</p>
* @type {string || null}
*/
this.Topic = null;
/**
* <p>Partition id</p>
* @type {number || null}
*/
this.Partition = null;
/**
* <p>Location info</p>
* @type {number || null}
*/
this.Offset = null;
/**
* <p>Maximum number of query results. Default value: 20. Maximum value: 20.</p>
* @type {number || null}
*/
this.SinglePartitionRecordNumber = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Topic = 'Topic' in params ? params.Topic : null;
this.Partition = 'Partition' in params ? params.Partition : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.SinglePartitionRecordNumber = 'SinglePartitionRecordNumber' in params ? params.SinglePartitionRecordNumber : null;
}
}
/**
* DescribeSecurityGroupRoutes response structure.
* @class
*/
class DescribeSecurityGroupRoutesResponse extends AbstractModel {
constructor(){
super();
/**
* Returns the security group routing information result object.
* @type {SecurityGroupRouteResp || null}
*/
this.Result = null;
/**
* The unique request ID, generated by the server, will be returned for every request (if the request fails to reach the server for other reasons, the request will not obtain a RequestId). RequestId is required for locating a problem.
* @type {string || null}
*/
this.RequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
if (params.Result) {
let obj = new SecurityGroupRouteResp();
obj.deserialize(params.Result)
this.Result = obj;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* UpgradeBrokerVersion request structure.
* @class
*/
class UpgradeBrokerVersionRequest extends AbstractModel {
constructor(){
super();
/**
* <p>ckafka cluster instance Id</p>
* @type {string || null}
*/
this.InstanceId = null;
/**
* <p>Upgrade type</p><p>Enumeration value:</p><ul><li>1: Minor version migration (recommended)</li></ul>
* @type {number || null}
*/
this.Type = null;
/**
* <p>Version number.</p>
* @type {string || null}
*/
this.SourceVersion = null;
/**
* <p>Version number.</p>
* @type {string || null}
*/
this.TargetVersion = null;
/**
* <p>Delay time</p>
* @type {string || null}
*/
this.DelayTimeStamp = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Type = 'Type' in params ? params.Type : null;
this.SourceVersion = 'SourceVersion' in params ? params.SourceVersion : null;
this.TargetVersion = 'TargetVersion' in params ? params.TargetVersion : null;
this.DelayTimeStamp = 'DelayTimeStamp' in params ? params.DelayTimeStamp : null;
}
}
/**
* ModifyInstancePre request structure.
* @class
*/
class ModifyInstancePreRequest extends AbstractModel {
constructor(){
super();
/**
* <p>ckafka cluster instance Id, which can be obtained through the <a href="https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1">DescribeInstances</a> API</p>
* @type {string || null}
*/
this.InstanceId = null;
/**
* <p>Disk size in GB. Maximum value is 500000 with a step length of 100. View specification limits through the following url: https://www.tencentcloud.com/document/product/597/122562?from_cn_redirect=1</p>
* @type {number || null}
*/
this.DiskSize = null;
/**
* <p>Peak bandwidth in MB/s can be accessed through the following link to view specifications limit and corresponding step length: https://www.tencentcloud.com/document/product/597/11745?from_cn_redirect=1</p>
* @type {number || null}
*/
this.BandWidth = null;
/**
* <p>Partition upper limit maximum value: 40000, step length: 100. View specification limits through the following URL: https://www.tencentcloud.com/document/product/597/122563?from_cn_redirect=1</p>
* @type {number || null}
*/
this.Partition = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.DiskSize = 'DiskSize' in params ? params.DiskSize : null;
this.BandWidth = 'BandWidth' in params ? params.BandWidth : null;
this.Partition = 'Partition' in params ? params.Partition : null;
}
}
/**
* CreateAclRule request structure.
* @class
*/
class CreateAclRuleRequest extends AbstractModel {
constructor(){
super();
/**
* The ckafka cluster instance Id, which can be obtained through the [DescribeInstances](https://www.tencentcloud.com/document/product/597/40835?from_cn_redirect=1) api.
* @type {string || null}
*/
this.InstanceId = null;
/**
* ACL resource type. Currently, the only valid value is `Topic`.
* @type {string || null}
*/
this.ResourceType = null;
/**
* ACL rule-based matching type. currently supports prefix match and PRESET policy. valid values: PREFIXED/PRESET.
* @type {string || null}
*/
this.PatternType = null;
/**
* Rule name
* @type {string || null}
*/
this.RuleName = null;
/**
* ACL rule list
* @type {Array.<AclRuleInfo> || null}
*/
this.RuleList = null;
/**
* Indicates the prefix for prefix match. this parameter is required when PatternType value is PREFIXED.
* @type {string || null}
*/
this.Pattern = null;
/**
* Specifies whether to apply the preset ACL rule to newly-added topics. defaults to 0, which means no. a value of 1 means yes.
* @type {number || null}
*/
this.IsApplied = null;
/**
* Remarks for ACL rules
* @type {string || null}
*/
this.Comment = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.ResourceType = 'ResourceType' in params ? params.ResourceType : null;
this.PatternType = 'PatternType' in params ? params.PatternType : null;
this.RuleName = 'RuleName' in params ? params.RuleName : null;
if (params.RuleList) {
this.RuleList = new Array();