tencentcloud-sdk-nodejs-intl-en
Version:
1,786 lines (1,509 loc) • 159 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");
/**
* MQTT subscription relationship.
* @class
*/
class MQTTClientSubscription extends AbstractModel {
constructor(){
super();
/**
* Subscribed topic.
* @type {string || null}
*/
this.TopicFilter = null;
/**
* Service quality grade.
Up to once.
At least once.
Exactly once.
* @type {number || null}
*/
this.Qos = null;
/**
* Indicates the heaped messages.
* @type {number || null}
*/
this.Lag = null;
/**
* Unconfirmed delivery count.
* @type {number || null}
*/
this.Inflight = null;
/**
* Describes the user attribute.
* @type {Array.<SubscriptionUserProperty> || null}
*/
this.UserProperties = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TopicFilter = 'TopicFilter' in params ? params.TopicFilter : null;
this.Qos = 'Qos' in params ? params.Qos : null;
this.Lag = 'Lag' in params ? params.Lag : null;
this.Inflight = 'Inflight' in params ? params.Inflight : null;
if (params.UserProperties) {
this.UserProperties = new Array();
for (let z in params.UserProperties) {
let obj = new SubscriptionUserProperty();
obj.deserialize(params.UserProperties[z]);
this.UserProperties.push(obj);
}
}
}
}
/**
* ModifyDeviceIdentity response structure.
* @class
*/
class ModifyDeviceIdentityResponse extends AbstractModel {
constructor(){
super();
/**
* 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;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DeleteUser request structure.
* @class
*/
class DeleteUserRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Username.
* @type {string || null}
*/
this.Username = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Username = 'Username' in params ? params.Username : null;
}
}
/**
* Message enrichment rule priority.
* @class
*/
class MessageEnrichmentRulePriority extends AbstractModel {
constructor(){
super();
/**
* Message enrichment rule id.
* @type {number || null}
*/
this.Id = null;
/**
* Priority
* @type {number || null}
*/
this.Priority = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Id = 'Id' in params ? params.Id : null;
this.Priority = 'Priority' in params ? params.Priority : null;
}
}
/**
* ModifyAuthorizationPolicy response structure.
* @class
*/
class ModifyAuthorizationPolicyResponse extends AbstractModel {
constructor(){
super();
/**
* 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;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Shared subscription group client
* @class
*/
class SharedSubscriptionClient extends AbstractModel {
constructor(){
super();
/**
* Client ID
* @type {string || null}
*/
this.ClientId = null;
/**
* Shared subscription group name
* @type {string || null}
*/
this.SharedName = null;
/**
* Expression list of subscriptions under the shared group
* @type {string || null}
*/
this.TopicFilter = null;
/**
* Online status
* @type {boolean || null}
*/
this.Online = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.ClientId = 'ClientId' in params ? params.ClientId : null;
this.SharedName = 'SharedName' in params ? params.SharedName : null;
this.TopicFilter = 'TopicFilter' in params ? params.TopicFilter : null;
this.Online = 'Online' in params ? params.Online : null;
}
}
/**
* CreateInstance response structure.
* @class
*/
class CreateInstanceResponse extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = 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;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeInstance response structure.
* @class
*/
class DescribeInstanceResponse extends AbstractModel {
constructor(){
super();
/**
* <p>Instance type<br>BASIC Basic version<br>PRO Professional Edition<br>PLATINUM Platinum version</p>
* @type {string || null}
*/
this.InstanceType = null;
/**
* <p>Instance ID</p>
* @type {string || null}
*/
this.InstanceId = null;
/**
* <p>Instance name</p>
* @type {string || null}
*/
this.InstanceName = null;
/**
* <p>Number of topics</p>
* @type {number || null}
*/
this.TopicNum = null;
/**
* <p>Maximum number of topics per instance</p>
* @type {number || null}
*/
this.TopicNumLimit = null;
/**
* <p>TPS throttle value</p>
* @type {number || null}
*/
this.TpsLimit = null;
/**
* <p>createTime, in seconds</p>
* @type {number || null}
*/
this.CreatedTime = null;
/**
* <p>Remarks</p>
* @type {string || null}
*/
this.Remark = null;
/**
* <p>Instance status, RUNNING, running MAINTAINING, maintaining ABNORMAL, abnormal OVERDUE, arrears DESTROYED, deleted CREATING, creating MODIFYING, modifying CREATE_FAILURE, creation failure MODIFY_FAILURE, configuration change failed DELETING, deleting</p>
* @type {string || null}
*/
this.InstanceStatus = null;
/**
* <p>Instance specification</p>
* @type {string || null}
*/
this.SkuCode = null;
/**
* <p>Maximum number of subscriptions for a single client</p>
* @type {number || null}
*/
this.MaxSubscriptionPerClient = null;
/**
* <p>Number of authorization rule entries</p>
* @type {number || null}
*/
this.AuthorizationPolicyLimit = null;
/**
* <p>Number of clients cap</p>
* @type {number || null}
*/
this.ClientNumLimit = null;
/**
* <p>Client certificate registration method:<br>JITP: Automatic sign-up<br>API: Manually register through API</p>
* @type {string || null}
*/
this.DeviceCertificateProvisionType = null;
/**
* <p>Whether to automatically activate when automatically registering a device certificate</p>
* @type {boolean || null}
*/
this.AutomaticActivation = null;
/**
* <p>Whether it is automatically renewed. Only applicable to monthly subscription clusters. 1: Automatic renewal 0: Non-automatic renewal</p>
* @type {number || null}
*/
this.RenewFlag = null;
/**
* <p>Billing mode, POSTPAID, pay-as-you-go PREPAID, annual/monthly subscription</p>
* @type {string || null}
*/
this.PayMode = null;
/**
* <p>Expiry time, millisecond-level timestamp</p>
* @type {number || null}
*/
this.ExpiryTime = null;
/**
* <p>Predestruction time, millisecond-level timestamp</p>
* @type {number || null}
*/
this.DestroyTime = null;
/**
* <p>TLS, one-way authentication mTLS, mutual authentication BYOC; one certificate per device</p>
* @type {string || null}
*/
this.X509Mode = null;
/**
* <p>Maximum Ca quota</p>
* @type {number || null}
*/
this.MaxCaNum = null;
/**
* <p>FPS Cert Registration Code</p>
* @type {string || null}
*/
this.RegistrationCode = null;
/**
* <p>Maximum number of subscriptions for a cluster</p>
* @type {number || null}
*/
this.MaxSubscription = null;
/**
* <p>Authorization policy switch</p>
* @type {boolean || null}
*/
this.AuthorizationPolicy = null;
/**
* <p>Maximum limit of shared subscription groups</p>
* @type {number || null}
*/
this.SharedSubscriptionGroupLimit = null;
/**
* <p>Number limit of TopicFilter in one shared subscription group</p>
* @type {number || null}
*/
this.MaxTopicFilterPerSharedSubscriptionGroup = null;
/**
* <p>Limit on number of auto subscription rules</p>
* @type {number || null}
*/
this.AutoSubscriptionPolicyLimit = null;
/**
* <p>Number limit of TopicFilter in a single auto subscription rule</p>
* @type {number || null}
*/
this.MaxTopicFilterPerAutoSubscriptionPolicy = null;
/**
* <p>Whether to use the default server certificate</p>
* @type {boolean || null}
*/
this.UseDefaultServerCert = null;
/**
* <p>Maximum number of server CAs</p>
* @type {number || null}
*/
this.TrustedCaLimit = null;
/**
* <p>Maximum number of server certificates</p>
* @type {number || null}
*/
this.ServerCertLimit = null;
/**
* <p>Max level of topic prefix</p>
* @type {number || null}
*/
this.TopicPrefixSlashLimit = null;
/**
* <p>Single client send message rate limiting, unit messages/second</p>
* @type {number || null}
*/
this.MessageRate = null;
/**
* <p>Server-side tls supported protocols, separated by ",". Example: TLSv1.3,TLSv1.2,TLSv1.1,TLSv1</p>
* @type {string || null}
*/
this.TransportLayerSecurity = null;
/**
* <p>Message property enhancement rule quota</p>
* @type {number || null}
*/
this.MessageEnrichmentRuleLimit = null;
/**
* <p>Maximum allowed number of blocking rules</p>
* @type {number || null}
*/
this.BlockRuleLimit = 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;
}
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.TopicNum = 'TopicNum' in params ? params.TopicNum : null;
this.TopicNumLimit = 'TopicNumLimit' in params ? params.TopicNumLimit : null;
this.TpsLimit = 'TpsLimit' in params ? params.TpsLimit : null;
this.CreatedTime = 'CreatedTime' in params ? params.CreatedTime : null;
this.Remark = 'Remark' in params ? params.Remark : null;
this.InstanceStatus = 'InstanceStatus' in params ? params.InstanceStatus : null;
this.SkuCode = 'SkuCode' in params ? params.SkuCode : null;
this.MaxSubscriptionPerClient = 'MaxSubscriptionPerClient' in params ? params.MaxSubscriptionPerClient : null;
this.AuthorizationPolicyLimit = 'AuthorizationPolicyLimit' in params ? params.AuthorizationPolicyLimit : null;
this.ClientNumLimit = 'ClientNumLimit' in params ? params.ClientNumLimit : null;
this.DeviceCertificateProvisionType = 'DeviceCertificateProvisionType' in params ? params.DeviceCertificateProvisionType : null;
this.AutomaticActivation = 'AutomaticActivation' in params ? params.AutomaticActivation : null;
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
this.PayMode = 'PayMode' in params ? params.PayMode : null;
this.ExpiryTime = 'ExpiryTime' in params ? params.ExpiryTime : null;
this.DestroyTime = 'DestroyTime' in params ? params.DestroyTime : null;
this.X509Mode = 'X509Mode' in params ? params.X509Mode : null;
this.MaxCaNum = 'MaxCaNum' in params ? params.MaxCaNum : null;
this.RegistrationCode = 'RegistrationCode' in params ? params.RegistrationCode : null;
this.MaxSubscription = 'MaxSubscription' in params ? params.MaxSubscription : null;
this.AuthorizationPolicy = 'AuthorizationPolicy' in params ? params.AuthorizationPolicy : null;
this.SharedSubscriptionGroupLimit = 'SharedSubscriptionGroupLimit' in params ? params.SharedSubscriptionGroupLimit : null;
this.MaxTopicFilterPerSharedSubscriptionGroup = 'MaxTopicFilterPerSharedSubscriptionGroup' in params ? params.MaxTopicFilterPerSharedSubscriptionGroup : null;
this.AutoSubscriptionPolicyLimit = 'AutoSubscriptionPolicyLimit' in params ? params.AutoSubscriptionPolicyLimit : null;
this.MaxTopicFilterPerAutoSubscriptionPolicy = 'MaxTopicFilterPerAutoSubscriptionPolicy' in params ? params.MaxTopicFilterPerAutoSubscriptionPolicy : null;
this.UseDefaultServerCert = 'UseDefaultServerCert' in params ? params.UseDefaultServerCert : null;
this.TrustedCaLimit = 'TrustedCaLimit' in params ? params.TrustedCaLimit : null;
this.ServerCertLimit = 'ServerCertLimit' in params ? params.ServerCertLimit : null;
this.TopicPrefixSlashLimit = 'TopicPrefixSlashLimit' in params ? params.TopicPrefixSlashLimit : null;
this.MessageRate = 'MessageRate' in params ? params.MessageRate : null;
this.TransportLayerSecurity = 'TransportLayerSecurity' in params ? params.TransportLayerSecurity : null;
this.MessageEnrichmentRuleLimit = 'MessageEnrichmentRuleLimit' in params ? params.MessageEnrichmentRuleLimit : null;
this.BlockRuleLimit = 'BlockRuleLimit' in params ? params.BlockRuleLimit : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* MessageEnrichmentRuleItem
* @class
*/
class MessageEnrichmentRuleItem extends AbstractModel {
constructor(){
super();
/**
* Rule ID.
* @type {number || null}
*/
this.Id = null;
/**
* MQTT cluster ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Specifies the rule name.
* @type {string || null}
*/
this.RuleName = null;
/**
* Rule matching conditions, in JSON format, must be Base64-encoded.
Specifies the client id, username, and topic. example: {"clientId":"client-1","username":"client-1","topic":"home/room1"}.
Specifies the Base64-encoded string "eyJjbGllbnRJZCI6ImNsaWVudC0xIiwidXNlcm5hbWUiOiJjbGllbnQtMSIsInRvcGljIjoiaG9tZS9yb29tMSJ9".
* @type {string || null}
*/
this.Condition = null;
/**
* Specifies the action of rule execution in JSON format, which must be Base64 encoded.
Creating a Billing Resource Order
{"messageExpiryInterval":360,"response Topic":"replies/devices/${clientid}","correlationData":"${traceid}","userProperty":[{"key":"trace-id","value":"${traceid}"},{"key":"data-source","value":"rule-engine"}]}
Specifies the BASE64-encoded string "eyJtZXNzYWdlRXhwaXJ5SW50ZXJ2YWwiOjM2MCwicmVzcG9uc2UgVG9waWMiOiJyZXBsaWVzL2RldmljZXMvJHtjbGllbnRpZH0iLCJjb3JyZWxhdGlvbkRhdGEiOiIke3RyYWNlaWR9IiwidXNlclByb3BlcnR5IjpbeyJrZXkiOiJ0cmFjZS1pZCIsInZhbHVlIjoiJHt0cmFjZWlkfSJ9LHsia2V5IjoiZGF0YS1zb3VyY2UiLCJ2YWx1ZSI6InJ1bGUtZW5naW5lIn1dfQ==".
* @type {string || null}
*/
this.Actions = null;
/**
* Rule priority. a smaller number indicates a higher priority. high priority overrides low priority. the UserProperty field will be merged.
* @type {number || null}
*/
this.Priority = null;
/**
* Rule status. valid values: 0 (undefined), 1 (activate), 2 (deactivate). default: deactivate.
* @type {number || null}
*/
this.Status = null;
/**
* Remarks
* @type {string || null}
*/
this.Remark = null;
/**
* Creation time. millisecond-level timestamp.
* @type {number || null}
*/
this.CreatedTime = null;
/**
* Update time. millisecond-level timestamp.
* @type {number || null}
*/
this.UpdateTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Id = 'Id' in params ? params.Id : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.RuleName = 'RuleName' in params ? params.RuleName : null;
this.Condition = 'Condition' in params ? params.Condition : null;
this.Actions = 'Actions' in params ? params.Actions : null;
this.Priority = 'Priority' in params ? params.Priority : null;
this.Status = 'Status' in params ? params.Status : null;
this.Remark = 'Remark' in params ? params.Remark : null;
this.CreatedTime = 'CreatedTime' in params ? params.CreatedTime : null;
this.UpdateTime = 'UpdateTime' in params ? params.UpdateTime : null;
}
}
/**
* DeleteDeviceIdentity request structure.
* @class
*/
class DeleteDeviceIdentityRequest extends AbstractModel {
constructor(){
super();
/**
* Cluster ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Device ID
* @type {string || null}
*/
this.DeviceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.DeviceId = 'DeviceId' in params ? params.DeviceId : null;
}
}
/**
* Rule priority.
* @class
*/
class AuthorizationPolicyPriority extends AbstractModel {
constructor(){
super();
/**
* Specifies the authorization policy rule id, which can be obtained from the DescribeAuthorizationPolicies api (https://www.tencentcloud.com/document/api/1778/111074?from_cn_redirect=1).
* @type {number || null}
*/
this.Id = null;
/**
* Priority
* @type {number || null}
*/
this.Priority = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Id = 'Id' in params ? params.Id : null;
this.Priority = 'Priority' in params ? params.Priority : null;
}
}
/**
* ModifyInstance request structure.
* @class
*/
class ModifyInstanceRequest extends AbstractModel {
constructor(){
super();
/**
* tencent cloud MQTT instance ID, obtained from the [DescribeInstanceList](https://www.tencentcloud.com/document/api/1778/111029?from_cn_redirect=1) api or console.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Specifies the instance name to be modified, cannot be empty, 3-64 characters, only comprised of digits, letters, "-", and "_".
* @type {string || null}
*/
this.Name = null;
/**
* Specifies the remark information to be modified, with a maximum of 128 characters.
* @type {string || null}
*/
this.Remark = null;
/**
* Specifies the configuration specification to be changed.
Basic version and professional edition clusters cannot be upgraded to platinum version specifications. platinum edition clusters cannot be downgraded to basic version and enhanced specifications.
* @type {string || null}
*/
this.SkuCode = null;
/**
* Specifies the registration method for the client certificate.
JITP: automatically register.
API: register manually through api.
* @type {string || null}
*/
this.DeviceCertificateProvisionType = null;
/**
* Specifies whether to automatically activate the cert after automatic registration.
* @type {boolean || null}
*/
this.AutomaticActivation = null;
/**
* Authorization policy switch.
* @type {boolean || null}
*/
this.AuthorizationPolicy = null;
/**
* Specifies whether to use the default server certificate.
* @type {boolean || null}
*/
this.UseDefaultServerCert = null;
/**
* TLS: one-way authentication.
mTLS. specifies mutual authentication.
BYOC: one device, one certificate.
* @type {string || null}
*/
this.X509Mode = null;
/**
* Specifies the speed limit unit for client message send and receive in messages per second.
* @type {number || null}
*/
this.MessageRate = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Name = 'Name' in params ? params.Name : null;
this.Remark = 'Remark' in params ? params.Remark : null;
this.SkuCode = 'SkuCode' in params ? params.SkuCode : null;
this.DeviceCertificateProvisionType = 'DeviceCertificateProvisionType' in params ? params.DeviceCertificateProvisionType : null;
this.AutomaticActivation = 'AutomaticActivation' in params ? params.AutomaticActivation : null;
this.AuthorizationPolicy = 'AuthorizationPolicy' in params ? params.AuthorizationPolicy : null;
this.UseDefaultServerCert = 'UseDefaultServerCert' in params ? params.UseDefaultServerCert : null;
this.X509Mode = 'X509Mode' in params ? params.X509Mode : null;
this.MessageRate = 'MessageRate' in params ? params.MessageRate : null;
}
}
/**
* DeleteTopic request structure.
* @class
*/
class DeleteTopicRequest extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Topic.
* @type {string || null}
*/
this.Topic = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Topic = 'Topic' in params ? params.Topic : null;
}
}
/**
* ModifyUser response structure.
* @class
*/
class ModifyUserResponse extends AbstractModel {
constructor(){
super();
/**
* 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;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeDeviceCertificates request structure.
* @class
*/
class DescribeDeviceCertificatesRequest extends AbstractModel {
constructor(){
super();
/**
* Tencent Cloud MQTT instance ID can be obtained from the console.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Support search parameter
Client id: Client id, obtained based on actual business operations.
CaSn: The SN serial number of the CA certificate belonging to it can be obtained by querying the cluster CA certificate list (https://www.tencentcloud.com/document/api/1778/116206?from_cn_redirect=1) or through business operations.
DeviceCertificateSn: SN serial number of the device certificate. Can be obtained from [Query Device Certificate Detail](https://www.tencentcloud.com/document/api/1778/113748?from_cn_redirect=1).
DeviceCertificateCn: The device certificate CN.
OrganizationalUnit: Cert OU
NotAfterEnd: Certificates with expiration time less than or equal to the specified time
NotAfterStart: Cert with expiration time equal to or greater than the specified time
Status: Device certificate status. ACTIVE (activated); INACTIVE (inactive); REVOKED (revoked); PENDING_ACTIVATION (to be activated).
* @type {Array.<Filter> || null}
*/
this.Filters = null;
/**
* Pagination limit. Default 20. Maximum 100.
* @type {number || null}
*/
this.Limit = null;
/**
* Pagination offset, default 0
* @type {number || null}
*/
this.Offset = null;
/**
* Sorting rule
CREATE_TIME_DESC, descending order by creation time
CREATE_TIME_ASC, sort by creation time in ascending order
UPDATE_TIME_DESC, descending order by update time
UPDATE_TIME_ASC, update time in ascending order
* @type {string || null}
*/
this.OrderBy = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
if (params.Filters) {
this.Filters = new Array();
for (let z in params.Filters) {
let obj = new Filter();
obj.deserialize(params.Filters[z]);
this.Filters.push(obj);
}
}
this.Limit = 'Limit' in params ? params.Limit : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.OrderBy = 'OrderBy' in params ? params.OrderBy : null;
}
}
/**
* DescribeSharedSubscriptionGroups request structure.
* @class
*/
class DescribeSharedSubscriptionGroupsRequest extends AbstractModel {
constructor(){
super();
/**
* Tencent Cloud MQTT instance ID can be obtained from the DescribeInstanceList api or the console.
* @type {string || null}
*/
this.InstanceId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
}
}
/**
* DeleteMessageEnrichmentRule request structure.
* @class
*/
class DeleteMessageEnrichmentRuleRequest extends AbstractModel {
constructor(){
super();
/**
* tencent cloud MQTT instance ID, obtained from the [DescribeInstanceList](https://www.tencentcloud.com/document/api/1778/111029?from_cn_redirect=1) api or console.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Message enrichment rule id.
* @type {number || null}
*/
this.Id = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Id = 'Id' in params ? params.Id : null;
}
}
/**
* VPC information.
* @class
*/
class VpcInfo extends AbstractModel {
constructor(){
super();
/**
* VPC ID
* @type {string || null}
*/
this.VpcId = null;
/**
* Subnet ID.
* @type {string || null}
*/
this.SubnetId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
}
}
/**
* DeleteAuthorizationPolicy response structure.
* @class
*/
class DeleteAuthorizationPolicyResponse extends AbstractModel {
constructor(){
super();
/**
* 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;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* MQTT ProductSkuItem
* @class
*/
class ProductSkuItem extends AbstractModel {
constructor(){
super();
/**
* Specification type
BASIC: Basic Edition.
PRO: Professional Edition
PLATINUM: Platinum version
* @type {string || null}
*/
this.InstanceType = null;
/**
* Specification code
* @type {string || null}
*/
this.SkuCode = null;
/**
* whether required or not
1: available for sale
0: unsellable
* @type {boolean || null}
*/
this.OnSale = null;
/**
* Limit on the number of topics.
* @type {number || null}
*/
this.TopicNumLimit = null;
/**
* Sum of the quantity of messages produced and consumed per second in an MQTT cluster.
* @type {number || null}
*/
this.TpsLimit = null;
/**
* Number of client connections
* @type {number || null}
*/
this.ClientNumLimit = null;
/**
* Maximum number of subscriptions for a single client
* @type {number || null}
*/
this.MaxSubscriptionPerClient = null;
/**
* Number of authorization rules
* @type {number || null}
*/
this.AuthorizationPolicyLimit = null;
/**
* Billing item information
* @type {Array.<PriceTag> || null}
*/
this.PriceTags = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.SkuCode = 'SkuCode' in params ? params.SkuCode : null;
this.OnSale = 'OnSale' in params ? params.OnSale : null;
this.TopicNumLimit = 'TopicNumLimit' in params ? params.TopicNumLimit : null;
this.TpsLimit = 'TpsLimit' in params ? params.TpsLimit : null;
this.ClientNumLimit = 'ClientNumLimit' in params ? params.ClientNumLimit : null;
this.MaxSubscriptionPerClient = 'MaxSubscriptionPerClient' in params ? params.MaxSubscriptionPerClient : null;
this.AuthorizationPolicyLimit = 'AuthorizationPolicyLimit' in params ? params.AuthorizationPolicyLimit : null;
if (params.PriceTags) {
this.PriceTags = new Array();
for (let z in params.PriceTags) {
let obj = new PriceTag();
obj.deserialize(params.PriceTags[z]);
this.PriceTags.push(obj);
}
}
}
}
/**
* DescribeDeviceIdentities request structure.
* @class
*/
class DescribeDeviceIdentitiesRequest extends AbstractModel {
constructor(){
super();
/**
* Cluster ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Query start position
* @type {number || null}
*/
this.Offset = null;
/**
* Query result limit count
* @type {number || null}
*/
this.Limit = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Offset = 'Offset' in params ? params.Offset : null;
this.Limit = 'Limit' in params ? params.Limit : null;
}
}
/**
* Returned mapping structure.
* @class
*/
class UserProperty extends AbstractModel {
constructor(){
super();
/**
* key
* @type {string || null}
*/
this.Key = null;
/**
* value
* @type {string || null}
*/
this.Value = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Key = 'Key' in params ? params.Key : null;
this.Value = 'Value' in params ? params.Value : null;
}
}
/**
* KickOutClient response structure.
* @class
*/
class KickOutClientResponse extends AbstractModel {
constructor(){
super();
/**
* 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;
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeMessageDetails request structure.
* @class
*/
class DescribeMessageDetailsRequest extends AbstractModel {
constructor(){
super();
/**
* tencent cloud MQTT instance ID, obtained from the [DescribeInstanceList](https://www.tencentcloud.com/document/api/1778/111029?from_cn_redirect=1) api or console.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Message ID.
* @type {string || null}
*/
this.MessageId = null;
/**
* Subscription expression.
* @type {string || null}
*/
this.Subscription = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.MessageId = 'MessageId' in params ? params.MessageId : null;
this.Subscription = 'Subscription' in params ? params.Subscription : null;
}
}
/**
* CreateDeviceIdentity request structure.
* @class
*/
class CreateDeviceIdentityRequest extends AbstractModel {
constructor(){
super();
/**
* Tencent Cloud MQTT instance ID can be obtained from the [DescribeInstanceList](https://www.tencentcloud.com/document/api/1778/111029?from_cn_redirect=1) api or the console.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Device ID
* @type {string || null}
*/
this.DeviceId = null;
/**
* 1:ENABLED - Available (default)
2: DISABLED - Unavailable
* @type {string || null}
*/
this.Status = null;
/**
* Primary signature key. Automatically generated by the system if not provided. base64 encode is required.
* @type {string || null}
*/
this.PrimaryKey = null;
/**
* Secondary signature key. Automatically generated by the system if not passed. base64 encoding is required.
* @type {string || null}
*/
this.SecondaryKey = null;
/**
* Device id propagating properties setting
* @type {Array.<PropagatingProperty> || null}
*/
this.PropagatingProperties = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.DeviceId = 'DeviceId' in params ? params.DeviceId : null;
this.Status = 'Status' in params ? params.Status : null;
this.PrimaryKey = 'PrimaryKey' in params ? params.PrimaryKey : null;
this.SecondaryKey = 'SecondaryKey' in params ? params.SecondaryKey : null;
if (params.PropagatingProperties) {
this.PropagatingProperties = new Array();
for (let z in params.PropagatingProperties) {
let obj = new PropagatingProperty();
obj.deserialize(params.PropagatingProperties[z]);
this.PropagatingProperties.push(obj);
}
}
}
}
/**
* DescribeClientList response structure.
* @class
*/
class DescribeClientListResponse extends AbstractModel {
constructor(){
super();
/**
* Specifies the client list.
* @type {Array.<MQTTClientInfo> || null}
*/
this.Clients = 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.Clients) {
this.Clients = new Array();
for (let z in params.Clients) {
let obj = new MQTTClientInfo();
obj.deserialize(params.Clients[z]);
this.Clients.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Tag data
* @class
*/
class Tag extends AbstractModel {
constructor(){
super();
/**
* Tag name.
* @type {string || null}
*/
this.TagKey = null;
/**
* Tag value
* @type {string || null}
*/
this.TagValue = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.TagKey = 'TagKey' in params ? params.TagKey : null;
this.TagValue = 'TagValue' in params ? params.TagValue : null;
}
}
/**
* MQTT instance information.
* @class
*/
class MQTTInstanceItem extends AbstractModel {
constructor(){
super();
/**
* Instance ID.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Instance name.
* @type {string || null}
*/
this.InstanceName = null;
/**
* Instance version
* @type {string || null}
*/
this.Version = null;
/**
* Instance type
BASIC, basic version
PRO, Professional Edition
PLATINUM, platinum version
* @type {string || null}
*/
this.InstanceType = null;
/**
* Instance status
RUNNING: running.
MAINTAINING
ABNORMAL
OVERDUE, arrears
CREATING
MODIFYING, Modifying configuration in progress
Creation failed
MODIFY_FAILURE, configuration change failed
DELETING: Deleting
* @type {string || null}
*/
this.InstanceStatus = null;
/**
* Maximum number of instance topics
* @type {number || null}
*/
this.TopicNumLimit = null;
/**
* Remarks
* @type {string || null}
*/
this.Remark = null;
/**
* Number of topics
* @type {number || null}
*/
this.TopicNum = null;
/**
* Product specification
* @type {string || null}
*/
this.SkuCode = null;
/**
* Elastic TPS throttle value
* @type {number || null}
*/
this.TpsLimit = null;
/**
* Creation time, with a millisecond-level timestamp.
* @type {number || null}
*/
this.CreateTime = null;
/**
* Maximum number of subscriptions for a single client
* @type {number || null}
*/
this.MaxSubscriptionPerClient = null;
/**
* Maximum number of client connections.
* @type {number || null}
*/
this.ClientNumLimit = null;
/**
* Whether it is automatically renewed. Only applicable to monthly subscription clusters.
1: Automatic renewal
Non-automatic renewal
* @type {number || null}
*/
this.RenewFlag = null;
/**
* Billing mode, POSTPAID, pay-as-you-go PREPAID, annual/monthly subscription
* @type {string || null}
*/
this.PayMode = null;
/**
* Expiry time, millisecond-level timestamp
* @type {number || null}
*/
this.ExpiryTime = null;
/**
* Predestruction time, millisecond-level timestamp
* @type {number || null}
*/
this.DestroyTime = null;
/**
* Number of authorization rule entries limit
* @type {number || null}
*/
this.AuthorizationPolicyLimit = null;
/**
* Maximum ca quota
* @type {number || null}
*/
this.MaxCaNum = null;
/**
* Maximum number of subscriptions
* @type {number || null}
*/
this.MaxSubscription = null;
/**
* Maximum limit of shared subscription groups
* @type {number || null}
*/
this.SharedSubscriptionGroupLimit = null;
/**
* Number limit of TopicFilter in one shared subscription group
* @type {number || null}
*/
this.MaxTopicFilterPerSharedSubscriptionGroup = null;
/**
* Limit on number of auto subscription rules
* @type {number || null}
*/
this.AutoSubscriptionPolicyLimit = null;
/**
* Number limit of TopicFilter in a single auto subscription rule
* @type {number || null}
*/
this.MaxTopicFilterPerAutoSubscriptionPolicy = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.InstanceName = 'InstanceName' in params ? params.InstanceName : null;
this.Version = 'Version' in params ? params.Version : null;
this.InstanceType = 'InstanceType' in params ? params.InstanceType : null;
this.InstanceStatus = 'InstanceStatus' in params ? params.InstanceStatus : null;
this.TopicNumLimit = 'TopicNumLimit' in params ? params.TopicNumLimit : null;
this.Remark = 'Remark' in params ? params.Remark : null;
this.TopicNum = 'TopicNum' in params ? params.TopicNum : null;
this.SkuCode = 'SkuCode' in params ? params.SkuCode : null;
this.TpsLimit = 'TpsLimit' in params ? params.TpsLimit : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.MaxSubscriptionPerClient = 'MaxSubscriptionPerClient' in params ? params.MaxSubscriptionPerClient : null;
this.ClientNumLimit = 'ClientNumLimit' in params ? params.ClientNumLimit : null;
this.RenewFlag = 'RenewFlag' in params ? params.RenewFlag : null;
this.PayMode = 'PayMode' in params ? params.PayMode : null;
this.ExpiryTime = 'ExpiryTime' in params ? params.ExpiryTime : null;
this.DestroyTime = 'DestroyTime' in params ? params.DestroyTime : null;
this.AuthorizationPolicyLimit = 'AuthorizationPolicyLimit' in params ? params.AuthorizationPolicyLimit : null;
this.MaxCaNum = 'MaxCaNum' in params ? params.MaxCaNum : null;
this.MaxSubscription = 'MaxSubscription' in params ? params.MaxSubscription : null;
this.SharedSubscriptionGroupLimit = 'SharedSubscriptionGroupLimit' in params ? params.SharedSubscriptionGroupLimit : null;
this.MaxTopicFilterPerSharedSubscriptionGroup = 'MaxTopicFilterPerSharedSubscriptionGroup' in params ? params.MaxTopicFilterPerSharedSubscriptionGroup : null;
this.AutoSubscriptionPolicyLimit = 'AutoSubscriptionPolicyLimit' in params ? params.AutoSubscriptionPolicyLimit : null;
this.MaxTopicFilterPerAutoSubscriptionPolicy = 'MaxTopicFilterPerAutoSubscriptionPolicy' in params ? params.MaxTopicFilterPerAutoSubscriptionPolicy : null;
}
}
/**
* DescribeInstanceList response structure.
* @class
*/
class DescribeInstanceListResponse extends AbstractModel {
constructor(){
super();
/**
* Total query count
* @type {number || null}
*/
this.TotalCount = null;
/**
* Instance list
* @type {Array.<MQTTInstanceItem> || null}
*/
this.Data = 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;
}
this.TotalCount = 'TotalCount' in params ? params.TotalCount : null;
if (params.Data) {
this.Data = new Array();
for (let z in params.Data) {
let obj = new MQTTInstanceItem();
obj.deserialize(params.Data[z]);
this.Data.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifyMessageEnrichmentRule request structure.
* @class
*/
class ModifyMessageEnrichmentRuleRequest extends AbstractModel {
constructor(){
super();
/**
* Message enrichment rule ID.
* @type {number || null}
*/
this.Id = null;
/**
* Tencent cloud MQTT instance ID, obtained from the [DescribeInstanceList](https://www.tencentcloud.com/document/api/1778/111029?from_cn_redirect=1) api or console.
* @type {string || null}
*/
this.InstanceId = null;
/**
* Rule name, which cannot be empty, contains 3 to 64 characters, and supports chinese, letters, digits, "-", and "_".
* @type {string || null}
*/
this.RuleName = null;
/**
* Rule matching conditions in JSON format, Base64 encoding is required.
Creating a Billing Resource Order
{"clientId":"client-1","username":"client-1","topic":"home/room1"}
Specifies the Base64-encoded content.
eyJjbGllbnRJZCI6ImNsaWVudC0xIiwidXNlcm5hbWUiOiJjbGllbnQtMSIsInRvcGljIjoiaG9tZS9yb29tMSJ9
* @type {string || null}
*/