tencentcloud-sdk-nodejs-intl-en
Version:
1,777 lines (1,495 loc) • 88 kB
JavaScript
/*
* Copyright (c) 2018 THL A29 Limited, a Tencent company. 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");
/**
* DescribeMigrateJobs response structure.
* @class
*/
class DescribeMigrateJobsResponse extends AbstractModel {
constructor(){
super();
/**
* Number of tasks
* @type {number || null}
*/
this.TotalCount = null;
/**
* Array of task details
* @type {Array.<MigrateJobInfo> || null}
*/
this.JobList = 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.JobList) {
this.JobList = new Array();
for (let z in params.JobList) {
let obj = new MigrateJobInfo();
obj.deserialize(params.JobList[z]);
this.JobList.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* Information of steps in migration
* @class
*/
class MigrateStepDetailInfo extends AbstractModel {
constructor(){
super();
/**
* Step number
* @type {number || null}
*/
this.StepNo = null;
/**
* Step name
* @type {string || null}
*/
this.StepName = null;
/**
* Step ID
* @type {string || null}
*/
this.StepId = null;
/**
* Step status. Value range: 0 (default), 1 (succeeded), 2 (failed), 3 (in progress), 4 (not started)
* @type {number || null}
*/
this.Status = null;
/**
* Start time of current step in the format of `yyyy-mm-dd hh:mm:ss`. This field is meaningless if it does not exist or is empty
Note: this field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.StartTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.StepNo = 'StepNo' in params ? params.StepNo : null;
this.StepName = 'StepName' in params ? params.StepName : null;
this.StepId = 'StepId' in params ? params.StepId : null;
this.Status = 'Status' in params ? params.Status : null;
this.StartTime = 'StartTime' in params ? params.StartTime : null;
}
}
/**
* DeleteMigrateJob response structure.
* @class
*/
class DeleteMigrateJobResponse 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;
}
}
/**
* CreateMigrateCheckJob request structure.
* @class
*/
class CreateMigrateCheckJobRequest extends AbstractModel {
constructor(){
super();
/**
* Data migration task ID
* @type {string || null}
*/
this.JobId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobId = 'JobId' in params ? params.JobId : null;
}
}
/**
* ModifySubscribeVipVport request structure.
* @class
*/
class ModifySubscribeVipVportRequest extends AbstractModel {
constructor(){
super();
/**
* Data subscription instance ID
* @type {string || null}
*/
this.SubscribeId = null;
/**
* Specified destination subnet. If this parameter is passed in, `DstIp` must be in the destination subnet
* @type {string || null}
*/
this.DstUniqSubnetId = null;
/**
* Target IP. Either this field or `DstPort` must be passed in
* @type {string || null}
*/
this.DstIp = null;
/**
* Target port. Value range: [1025-65535]
* @type {number || null}
*/
this.DstPort = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
this.DstUniqSubnetId = 'DstUniqSubnetId' in params ? params.DstUniqSubnetId : null;
this.DstIp = 'DstIp' in params ? params.DstIp : null;
this.DstPort = 'DstPort' in params ? params.DstPort : null;
}
}
/**
* ModifySubscribeName response structure.
* @class
*/
class ModifySubscribeNameResponse 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;
}
}
/**
* DescribeMigrateCheckJob request structure.
* @class
*/
class DescribeMigrateCheckJobRequest extends AbstractModel {
constructor(){
super();
/**
* Data migration task ID
* @type {string || null}
*/
this.JobId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobId = 'JobId' in params ? params.JobId : null;
}
}
/**
* IsolateSubscribe response structure.
* @class
*/
class IsolateSubscribeResponse 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;
}
}
/**
* ModifySubscribeObjects response structure.
* @class
*/
class ModifySubscribeObjectsResponse extends AbstractModel {
constructor(){
super();
/**
* Async task ID
* @type {string || null}
*/
this.AsyncRequestId = 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.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* CreateMigrateJob request structure.
* @class
*/
class CreateMigrateJobRequest extends AbstractModel {
constructor(){
super();
/**
* Data migration task name
* @type {string || null}
*/
this.JobName = null;
/**
* Migration task configuration options
* @type {MigrateOption || null}
*/
this.MigrateOption = null;
/**
* Source instance database type, which currently supports MySQL, Redis, MongoDB, PostgreSQL, MariaDB, Percona, and SQL Server. For more information on the supported types in a specific region, see the migration task creation page in the console.
* @type {string || null}
*/
this.SrcDatabaseType = null;
/**
* Source instance access type. Valid values: extranet (public network), cvm (CVM-based self-created instance), dcg (Direct Connect-enabled instance), vpncloud (Tencent Cloud VPN-enabled instance), cdb (TencentDB instance), ccn (CCN instance)
* @type {string || null}
*/
this.SrcAccessType = null;
/**
* Source instance information, which is correlated with the migration task type
* @type {SrcInfo || null}
*/
this.SrcInfo = null;
/**
* Target instance access type, which currently supports MySQL, Redis, MongoDB, PostgreSQL, MariaDB, and Percona, SQL Server, and TDSQL-C for MySQL. For more information on the supported types in a specific region, see the migration task creation page in the console.
* @type {string || null}
*/
this.DstDatabaseType = null;
/**
* Target instance access type, which currently only supports cdb (TencentDB instance)
* @type {string || null}
*/
this.DstAccessType = null;
/**
* Destination instance information
* @type {DstInfo || null}
*/
this.DstInfo = null;
/**
* Information of the source table to be migrated, which is described in JSON string format. It is required if MigrateOption.MigrateObject is 2 (migrating the specified table).
For databases with a database-table structure:
[{"Database":"db1","Table":["table1","table2"]},{"Database":"db2"}]
For databases with a database-schema-table structure:
[{"Database":"db1","Schema":"s1","Table":["table1","table2"]},{"Database":"db1","Schema":"s2","Table":["table1","table2"]},{"Database":"db2","Schema":"s1","Table":["table1","table2"]},{"Database":"db3"},{"Database":"db4","Schema":"s1"}]
* @type {string || null}
*/
this.DatabaseInfo = null;
/**
* Tag of the instance to be migrated.
* @type {Array.<TagItem> || null}
*/
this.Tags = null;
/**
* Source instance type. `simple`: Primary/Secondary node; `cluster`: Cluster node. If this field is left empty, the value defaults to primary/secondary node.
* @type {string || null}
*/
this.SrcNodeType = null;
/**
* Source instance information, which is correlated with the migration task type.
* @type {Array.<SrcInfo> || null}
*/
this.SrcInfoMulti = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobName = 'JobName' in params ? params.JobName : null;
if (params.MigrateOption) {
let obj = new MigrateOption();
obj.deserialize(params.MigrateOption)
this.MigrateOption = obj;
}
this.SrcDatabaseType = 'SrcDatabaseType' in params ? params.SrcDatabaseType : null;
this.SrcAccessType = 'SrcAccessType' in params ? params.SrcAccessType : null;
if (params.SrcInfo) {
let obj = new SrcInfo();
obj.deserialize(params.SrcInfo)
this.SrcInfo = obj;
}
this.DstDatabaseType = 'DstDatabaseType' in params ? params.DstDatabaseType : null;
this.DstAccessType = 'DstAccessType' in params ? params.DstAccessType : null;
if (params.DstInfo) {
let obj = new DstInfo();
obj.deserialize(params.DstInfo)
this.DstInfo = obj;
}
this.DatabaseInfo = 'DatabaseInfo' in params ? params.DatabaseInfo : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new TagItem();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
this.SrcNodeType = 'SrcNodeType' in params ? params.SrcNodeType : null;
if (params.SrcInfoMulti) {
this.SrcInfoMulti = new Array();
for (let z in params.SrcInfoMulti) {
let obj = new SrcInfo();
obj.deserialize(params.SrcInfoMulti[z]);
this.SrcInfoMulti.push(obj);
}
}
}
}
/**
* ModifySubscribeName request structure.
* @class
*/
class ModifySubscribeNameRequest extends AbstractModel {
constructor(){
super();
/**
* Data subscription instance ID
* @type {string || null}
*/
this.SubscribeId = null;
/**
* Data subscription instance name. Length limit: [1,60]
* @type {string || null}
*/
this.SubscribeName = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
this.SubscribeName = 'SubscribeName' in params ? params.SubscribeName : null;
}
}
/**
* ModifySubscribeConsumeTime response structure.
* @class
*/
class ModifySubscribeConsumeTimeResponse 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;
}
}
/**
* Target instance information, which is correlated with the migration task type
* @class
*/
class DstInfo extends AbstractModel {
constructor(){
super();
/**
* Target instance region, such as ap-guangzhou
* @type {string || null}
*/
this.Region = null;
/**
* Target instance ID, such as cdb-jd92ijd8
* @type {string || null}
*/
this.InstanceId = null;
/**
* Target instance VIP, which has been disused and does not need to be entered
* @type {string || null}
*/
this.Ip = null;
/**
* Target instance Vport, which has been disused and does not need to be entered
* @type {number || null}
*/
this.Port = null;
/**
* Only valid for MySQL currently. For instance-level migration, the value range is: 1 (read-only), 0 (read/write)
* @type {number || null}
*/
this.ReadOnly = null;
/**
* Target database account
* @type {string || null}
*/
this.User = null;
/**
* Target database password
* @type {string || null}
*/
this.Password = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Region = 'Region' in params ? params.Region : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Ip = 'Ip' in params ? params.Ip : null;
this.Port = 'Port' in params ? params.Port : null;
this.ReadOnly = 'ReadOnly' in params ? params.ReadOnly : null;
this.User = 'User' in params ? params.User : null;
this.Password = 'Password' in params ? params.Password : null;
}
}
/**
* DescribeSubscribeConf response structure.
* @class
*/
class DescribeSubscribeConfResponse extends AbstractModel {
constructor(){
super();
/**
* Subscription instance ID
* @type {string || null}
*/
this.SubscribeId = null;
/**
* Subscription instance name
* @type {string || null}
*/
this.SubscribeName = null;
/**
* Subscription channel
* @type {string || null}
*/
this.ChannelId = null;
/**
* Subscribed database type
* @type {string || null}
*/
this.Product = null;
/**
* Subscribed instance
* @type {string || null}
*/
this.InstanceId = null;
/**
* Subscribed instance status. Valid values: running, offline, isolate
* @type {string || null}
*/
this.InstanceStatus = null;
/**
* Subscription instance status. Valid values: unconfigure, configuring, configured
* @type {string || null}
*/
this.SubsStatus = null;
/**
* Subscription instance lifecycle status. Valid values: normal, isolating, isolated, offlining
* @type {string || null}
*/
this.Status = null;
/**
* Subscription instance creation time
* @type {string || null}
*/
this.CreateTime = null;
/**
* Subscription instance isolation time
* @type {string || null}
*/
this.IsolateTime = null;
/**
* Subscription instance expiration time
* @type {string || null}
*/
this.ExpireTime = null;
/**
* Subscription instance deactivation time
* @type {string || null}
*/
this.OfflineTime = null;
/**
* Consumption starting time point of subscription instance
* @type {string || null}
*/
this.ConsumeStartTime = null;
/**
* Subscription instance billing mode. 1: hourly billing
* @type {number || null}
*/
this.PayType = null;
/**
* Subscription channel VIP
* @type {string || null}
*/
this.Vip = null;
/**
* Subscription channel port
* @type {number || null}
*/
this.Vport = null;
/**
* Subscription channel `VpcId`
* @type {string || null}
*/
this.UniqVpcId = null;
/**
* Subscription channel `SubnetId`
* @type {string || null}
*/
this.UniqSubnetId = null;
/**
* Current SDK consumption time point
* @type {string || null}
*/
this.SdkConsumedTime = null;
/**
* Subscription SDK IP address
* @type {string || null}
*/
this.SdkHost = null;
/**
* Subscription object type. 0: full instance subscription, 1: DDL data subscription, 2: DML structure subscription, 3: DDL data subscription + DML structure subscription
* @type {number || null}
*/
this.SubscribeObjectType = null;
/**
* Subscription object, which is an empty array if `SubscribeObjectType` is 0
* @type {Array.<SubscribeObject> || null}
*/
this.SubscribeObjects = null;
/**
* Modification time
* @type {string || null}
*/
this.ModifyTime = null;
/**
* Region
* @type {string || null}
*/
this.Region = null;
/**
* Tags of the subscription
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<TagItem> || null}
*/
this.Tags = null;
/**
* Whether auto-renewal is enabled. 0: do not enable, 1: enable
Note: this field may return `null`, indicating that no valid values can be obtained.
* @type {number || null}
*/
this.AutoRenewFlag = null;
/**
* Data subscription edition. `txdts`: Legacy edition; `kafka`: Kafka edition.
* @type {string || null}
*/
this.SubscribeVersion = null;
/**
* Error message.
Note: This field may return `null`, indicating that no valid values can be obtained.
* @type {Array.<SubsErr> || null}
*/
this.Errors = 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.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
this.SubscribeName = 'SubscribeName' in params ? params.SubscribeName : null;
this.ChannelId = 'ChannelId' in params ? params.ChannelId : null;
this.Product = 'Product' in params ? params.Product : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.InstanceStatus = 'InstanceStatus' in params ? params.InstanceStatus : null;
this.SubsStatus = 'SubsStatus' in params ? params.SubsStatus : null;
this.Status = 'Status' in params ? params.Status : null;
this.CreateTime = 'CreateTime' in params ? params.CreateTime : null;
this.IsolateTime = 'IsolateTime' in params ? params.IsolateTime : null;
this.ExpireTime = 'ExpireTime' in params ? params.ExpireTime : null;
this.OfflineTime = 'OfflineTime' in params ? params.OfflineTime : null;
this.ConsumeStartTime = 'ConsumeStartTime' in params ? params.ConsumeStartTime : null;
this.PayType = 'PayType' in params ? params.PayType : null;
this.Vip = 'Vip' in params ? params.Vip : null;
this.Vport = 'Vport' in params ? params.Vport : null;
this.UniqVpcId = 'UniqVpcId' in params ? params.UniqVpcId : null;
this.UniqSubnetId = 'UniqSubnetId' in params ? params.UniqSubnetId : null;
this.SdkConsumedTime = 'SdkConsumedTime' in params ? params.SdkConsumedTime : null;
this.SdkHost = 'SdkHost' in params ? params.SdkHost : null;
this.SubscribeObjectType = 'SubscribeObjectType' in params ? params.SubscribeObjectType : null;
if (params.SubscribeObjects) {
this.SubscribeObjects = new Array();
for (let z in params.SubscribeObjects) {
let obj = new SubscribeObject();
obj.deserialize(params.SubscribeObjects[z]);
this.SubscribeObjects.push(obj);
}
}
this.ModifyTime = 'ModifyTime' in params ? params.ModifyTime : null;
this.Region = 'Region' in params ? params.Region : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new TagItem();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
this.AutoRenewFlag = 'AutoRenewFlag' in params ? params.AutoRenewFlag : null;
this.SubscribeVersion = 'SubscribeVersion' in params ? params.SubscribeVersion : null;
if (params.Errors) {
this.Errors = new Array();
for (let z in params.Errors) {
let obj = new SubsErr();
obj.deserialize(params.Errors[z]);
this.Errors.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* DescribeAsyncRequestInfo request structure.
* @class
*/
class DescribeAsyncRequestInfoRequest extends AbstractModel {
constructor(){
super();
/**
* Task ID
* @type {string || null}
*/
this.AsyncRequestId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AsyncRequestId = 'AsyncRequestId' in params ? params.AsyncRequestId : null;
}
}
/**
* Source instance information
* @class
*/
class SrcInfo extends AbstractModel {
constructor(){
super();
/**
* Alibaba Cloud AccessKey, which is applicable if the source database is an Alibaba Cloud ApsaraDB for RDS 5.6 instance
* @type {string || null}
*/
this.AccessKey = null;
/**
* Instance IP address
* @type {string || null}
*/
this.Ip = null;
/**
* Instance port
* @type {number || null}
*/
this.Port = null;
/**
* Instance username
* @type {string || null}
*/
this.User = null;
/**
* Instance password
* @type {string || null}
*/
this.Password = null;
/**
* Alibaba Cloud ApsaraDB for RDS instance ID, which is applicable if the source database is an Alibaba Cloud ApsaraDB for RDS 5.6/5.7 instance
* @type {string || null}
*/
this.RdsInstanceId = null;
/**
* Short CVM instance ID in the format of `ins-olgl39y8`. It is the same as the instance ID displayed on the CVM Console page. For CVM-based self-created instances, this field needs to be passed in
* @type {string || null}
*/
this.CvmInstanceId = null;
/**
* Direct Connect gateway ID in the format of dcg-0rxtqqxb
* @type {string || null}
*/
this.UniqDcgId = null;
/**
* VPC ID in the format of vpc-92jblxto
* @type {string || null}
*/
this.VpcId = null;
/**
* VPC Subnet ID in the format of subnet-3paxmkdz
* @type {string || null}
*/
this.SubnetId = null;
/**
* VPN gateway ID in the format of vpngw-9ghexg7q
* @type {string || null}
*/
this.UniqVpnGwId = null;
/**
* Database instance ID in the format of cdb-powiqx8q
* @type {string || null}
*/
this.InstanceId = null;
/**
* Region name, such as ap-guangzhou
* @type {string || null}
*/
this.Region = null;
/**
* For Alibaba Cloud ApsaraDB for RDS instances, enter "aliyun"; otherwise, enter "others"
* @type {string || null}
*/
this.Supplier = null;
/**
* CCN instance ID, such as ccn-afp6kltc
Note: This field may return null, indicating that no valid values can be obtained.
* @type {string || null}
*/
this.CcnId = null;
/**
* Database version. This parameter is valid only when the instance is an RDS instance. Value: 5.6 or 5.7. Default value: 5.6
* @type {string || null}
*/
this.EngineVersion = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.AccessKey = 'AccessKey' in params ? params.AccessKey : null;
this.Ip = 'Ip' in params ? params.Ip : null;
this.Port = 'Port' in params ? params.Port : null;
this.User = 'User' in params ? params.User : null;
this.Password = 'Password' in params ? params.Password : null;
this.RdsInstanceId = 'RdsInstanceId' in params ? params.RdsInstanceId : null;
this.CvmInstanceId = 'CvmInstanceId' in params ? params.CvmInstanceId : null;
this.UniqDcgId = 'UniqDcgId' in params ? params.UniqDcgId : null;
this.VpcId = 'VpcId' in params ? params.VpcId : null;
this.SubnetId = 'SubnetId' in params ? params.SubnetId : null;
this.UniqVpnGwId = 'UniqVpnGwId' in params ? params.UniqVpnGwId : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.Region = 'Region' in params ? params.Region : null;
this.Supplier = 'Supplier' in params ? params.Supplier : null;
this.CcnId = 'CcnId' in params ? params.CcnId : null;
this.EngineVersion = 'EngineVersion' in params ? params.EngineVersion : null;
}
}
/**
* Sampling parameter for spot check
* @class
*/
class ConsistencyParams extends AbstractModel {
constructor(){
super();
/**
* Data content check parameter, which refers to the proportion of the rows selected for data comparison in all the rows of the table. Value: an integer between 1 and 100.
* @type {number || null}
*/
this.SelectRowsPerTable = null;
/**
* Data content check parameter, which refers to the proportion of the tables selected for data detection in all the tables. Value: an integer between 1 and 100.
* @type {number || null}
*/
this.TablesSelectAll = null;
/**
* Data quantity check parameter, which checks whether the numbers of rows are identical. It refers to the proportion of the tables selected for quantity check in all the tables. Value: an integer between 1 and 100.
* @type {number || null}
*/
this.TablesSelectCount = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SelectRowsPerTable = 'SelectRowsPerTable' in params ? params.SelectRowsPerTable : null;
this.TablesSelectAll = 'TablesSelectAll' in params ? params.TablesSelectAll : null;
this.TablesSelectCount = 'TablesSelectCount' in params ? params.TablesSelectCount : null;
}
}
/**
* ModifyMigrateJob request structure.
* @class
*/
class ModifyMigrateJobRequest extends AbstractModel {
constructor(){
super();
/**
* ID of the data migration task to be modified
* @type {string || null}
*/
this.JobId = null;
/**
* Data migration task name
* @type {string || null}
*/
this.JobName = null;
/**
* Migration task configuration options
* @type {MigrateOption || null}
*/
this.MigrateOption = null;
/**
* Source instance access type. Valid values: extranet (public network), cvm (CVM-based self-created instance), dcg (Direct Connect-enabled instance), vpncloud (Tencent Cloud VPN-enabled instance), cdb (TencentDB instance)
* @type {string || null}
*/
this.SrcAccessType = null;
/**
* Source instance information, which is correlated with the migration task type
* @type {SrcInfo || null}
*/
this.SrcInfo = null;
/**
* Target instance access type. Valid values: extranet (public network), cvm (CVM-based self-created instance), dcg (Direct Connect-enabled instance), vpncloud (Tencent Cloud VPN-enabled instance), cdb (TencentDB instance). Currently, only `cdb` is supported
* @type {string || null}
*/
this.DstAccessType = null;
/**
* Target instance information. The region where the target instance is located cannot be modified.
* @type {DstInfo || null}
*/
this.DstInfo = null;
/**
* When migrating the specified table, you need to set the information of the source database table to be migrated, which should be described in JSON string format. Below are examples.
For databases with a database-table structure:
[{"Database":"db1","Table":["table1","table2"]},{"Database":"db2"}]
For databases with a database-schema-table structure:
[{"Database":"db1","Schema":"s1","Table":["table1","table2"]},{"Database":"db1","Schema":"s2","Table":["table1","table2"]},{"Database":"db2","Schema":"s1","Table":["table1","table2"]},{"Database":"db3"},{"Database":"db4","Schema":"s1"}]
This field does not need to be set when the entire instance is to be migrated
* @type {string || null}
*/
this.DatabaseInfo = null;
/**
* Source instance type. `simple`: Primary/Secondary node; `cluster`: Cluster node. If this field is left empty, the value defaults to primary/secondary node.
* @type {string || null}
*/
this.SrcNodeType = null;
/**
* Source instance information, which is correlated with the migration task type.
* @type {Array.<SrcInfo> || null}
*/
this.SrcInfoMulti = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobId = 'JobId' in params ? params.JobId : null;
this.JobName = 'JobName' in params ? params.JobName : null;
if (params.MigrateOption) {
let obj = new MigrateOption();
obj.deserialize(params.MigrateOption)
this.MigrateOption = obj;
}
this.SrcAccessType = 'SrcAccessType' in params ? params.SrcAccessType : null;
if (params.SrcInfo) {
let obj = new SrcInfo();
obj.deserialize(params.SrcInfo)
this.SrcInfo = obj;
}
this.DstAccessType = 'DstAccessType' in params ? params.DstAccessType : null;
if (params.DstInfo) {
let obj = new DstInfo();
obj.deserialize(params.DstInfo)
this.DstInfo = obj;
}
this.DatabaseInfo = 'DatabaseInfo' in params ? params.DatabaseInfo : null;
this.SrcNodeType = 'SrcNodeType' in params ? params.SrcNodeType : null;
if (params.SrcInfoMulti) {
this.SrcInfoMulti = new Array();
for (let z in params.SrcInfoMulti) {
let obj = new SrcInfo();
obj.deserialize(params.SrcInfoMulti[z]);
this.SrcInfoMulti.push(obj);
}
}
}
}
/**
* CreateSubscribe request structure.
* @class
*/
class CreateSubscribeRequest extends AbstractModel {
constructor(){
super();
/**
* Subscribed database type. Currently, MySQL is supported
* @type {string || null}
*/
this.Product = null;
/**
* Instance billing mode, which is always 1 (hourly billing),
* @type {number || null}
*/
this.PayType = null;
/**
* Purchase duration in months, which is required if `PayType` is 0. Maximum value: 120 (this field is not required of global site users and is better to be hidden)
* @type {number || null}
*/
this.Duration = null;
/**
* Quantity. Default value: 1. Maximum value: 10
* @type {number || null}
*/
this.Count = null;
/**
* Whether to auto-renew. Default value: 0. This flag does not take effect for hourly billed instances (this field should be hidden from global site users)
* @type {number || null}
*/
this.AutoRenew = null;
/**
* Instance resource tags
* @type {Array.<TagItem> || null}
*/
this.Tags = null;
/**
* A custom instance name.
* @type {string || null}
*/
this.Name = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.Product = 'Product' in params ? params.Product : null;
this.PayType = 'PayType' in params ? params.PayType : null;
this.Duration = 'Duration' in params ? params.Duration : null;
this.Count = 'Count' in params ? params.Count : null;
this.AutoRenew = 'AutoRenew' in params ? params.AutoRenew : null;
if (params.Tags) {
this.Tags = new Array();
for (let z in params.Tags) {
let obj = new TagItem();
obj.deserialize(params.Tags[z]);
this.Tags.push(obj);
}
}
this.Name = 'Name' in params ? params.Name : null;
}
}
/**
* CreateMigrateCheckJob response structure.
* @class
*/
class CreateMigrateCheckJobResponse 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;
}
}
/**
* ModifySubscribeObjects request structure.
* @class
*/
class ModifySubscribeObjectsRequest extends AbstractModel {
constructor(){
super();
/**
* Data subscription instance ID
* @type {string || null}
*/
this.SubscribeId = null;
/**
* Data subscription type. Valid values: 0 (full instance subscription), 1 (data subscription), 2 (structure subscription), 3 (data subscription + structure subscription)
* @type {number || null}
*/
this.SubscribeObjectType = null;
/**
* Information of subscribed table
* @type {Array.<SubscribeObject> || null}
*/
this.Objects = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
this.SubscribeObjectType = 'SubscribeObjectType' in params ? params.SubscribeObjectType : null;
if (params.Objects) {
this.Objects = new Array();
for (let z in params.Objects) {
let obj = new SubscribeObject();
obj.deserialize(params.Objects[z]);
this.Objects.push(obj);
}
}
}
}
/**
* DescribeMigrateCheckJob response structure.
* @class
*/
class DescribeMigrateCheckJobResponse extends AbstractModel {
constructor(){
super();
/**
* Check task status: unavailable, starting, running, finished
* @type {string || null}
*/
this.Status = null;
/**
* Task error code
* @type {number || null}
*/
this.ErrorCode = null;
/**
* Task error message
* @type {string || null}
*/
this.ErrorMessage = null;
/**
* Check task progress. For example, "30" means 30% completed
* @type {string || null}
*/
this.Progress = null;
/**
* Whether the check succeeds. 0: no; 1: yes; 3: not checked
* @type {number || null}
*/
this.CheckFlag = 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.Status = 'Status' in params ? params.Status : null;
this.ErrorCode = 'ErrorCode' in params ? params.ErrorCode : null;
this.ErrorMessage = 'ErrorMessage' in params ? params.ErrorMessage : null;
this.Progress = 'Progress' in params ? params.Progress : null;
this.CheckFlag = 'CheckFlag' in params ? params.CheckFlag : null;
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ActivateSubscribe request structure.
* @class
*/
class ActivateSubscribeRequest extends AbstractModel {
constructor(){
super();
/**
* Subscription instance ID.
* @type {string || null}
*/
this.SubscribeId = null;
/**
* Database Instance ID
* @type {string || null}
*/
this.InstanceId = null;
/**
* Data subscription type. 0: full instance subscription, 1: data subscription, 2: structure subscription, 3: data subscription and structure subscription
* @type {number || null}
*/
this.SubscribeObjectType = null;
/**
* Subscription object
* @type {SubscribeObject || null}
*/
this.Objects = null;
/**
* Subnet of data subscription service, which is the subnet of the database instance by default.
* @type {string || null}
*/
this.UniqSubnetId = null;
/**
* Subscription service port. Default value: 7507
* @type {number || null}
*/
this.Vport = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
this.InstanceId = 'InstanceId' in params ? params.InstanceId : null;
this.SubscribeObjectType = 'SubscribeObjectType' in params ? params.SubscribeObjectType : null;
if (params.Objects) {
let obj = new SubscribeObject();
obj.deserialize(params.Objects)
this.Objects = obj;
}
this.UniqSubnetId = 'UniqSubnetId' in params ? params.UniqSubnetId : null;
this.Vport = 'Vport' in params ? params.Vport : null;
}
}
/**
* OfflineIsolatedSubscribe request structure.
* @class
*/
class OfflineIsolatedSubscribeRequest extends AbstractModel {
constructor(){
super();
/**
* Data subscription instance ID
* @type {string || null}
*/
this.SubscribeId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
}
}
/**
* OfflineIsolatedSubscribe response structure.
* @class
*/
class OfflineIsolatedSubscribeResponse 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;
}
}
/**
* ResetSubscribe response structure.
* @class
*/
class ResetSubscribeResponse 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;
}
}
/**
* DescribeSubscribes response structure.
* @class
*/
class DescribeSubscribesResponse extends AbstractModel {
constructor(){
super();
/**
* Number of eligible instances.
* @type {number || null}
*/
this.TotalCount = null;
/**
* Information list of data subscription instances
* @type {Array.<SubscribeInfo> || null}
*/
this.Items = 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.Items) {
this.Items = new Array();
for (let z in params.Items) {
let obj = new SubscribeInfo();
obj.deserialize(params.Items[z]);
this.Items.push(obj);
}
}
this.RequestId = 'RequestId' in params ? params.RequestId : null;
}
}
/**
* ModifySubscribeConsumeTime request structure.
* @class
*/
class ModifySubscribeConsumeTimeRequest extends AbstractModel {
constructor(){
super();
/**
* Data subscription instance ID
* @type {string || null}
*/
this.SubscribeId = null;
/**
* Consumption starting time point in the format of `Y-m-d h:m:s`, i.e., the starting time point for data subscription. Value range: within the last 24 hours
* @type {string || null}
*/
this.ConsumeStartTime = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.SubscribeId = 'SubscribeId' in params ? params.SubscribeId : null;
this.ConsumeStartTime = 'ConsumeStartTime' in params ? params.ConsumeStartTime : null;
}
}
/**
* Describes the specific migration process
* @class
*/
class MigrateDetailInfo extends AbstractModel {
constructor(){
super();
/**
* Total number of steps
* @type {number || null}
*/
this.StepAll = null;
/**
* Current step
* @type {number || null}
*/
this.StepNow = null;
/**
* Overall progress, such as "10"
* @type {string || null}
*/
this.Progress = null;
/**
* Progress of current step, such as "1"
* @type {string || null}
*/
this.CurrentStepProgress = null;
/**
* Master/slave lag in MB, which is valid during incremental sync and currently supported by TencentDB for Redis and MySQL
* @type {number || null}
*/
this.MasterSlaveDistance = null;
/**
* Master/slave lag in seconds, which is valid during incremental sync and currently supported by TencentDB for MySQL
* @type {number || null}
*/
this.SecondsBehindMaster = null;
/**
* Step information
* @type {Array.<MigrateStepDetailInfo> || null}
*/
this.StepInfo = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.StepAll = 'StepAll' in params ? params.StepAll : null;
this.StepNow = 'StepNow' in params ? params.StepNow : null;
this.Progress = 'Progress' in params ? params.Progress : null;
this.CurrentStepProgress = 'CurrentStepProgress' in params ? params.CurrentStepProgress : null;
this.MasterSlaveDistance = 'MasterSlaveDistance' in params ? params.MasterSlaveDistance : null;
this.SecondsBehindMaster = 'SecondsBehindMaster' in params ? params.SecondsBehindMaster : null;
if (params.StepInfo) {
this.StepInfo = new Array();
for (let z in params.StepInfo) {
let obj = new MigrateStepDetailInfo();
obj.deserialize(params.StepInfo[z]);
this.StepInfo.push(obj);
}
}
}
}
/**
* StopMigrateJob request structure.
* @class
*/
class StopMigrateJobRequest extends AbstractModel {
constructor(){
super();
/**
* Data migration task ID
* @type {string || null}
*/
this.JobId = null;
}
/**
* @private
*/
deserialize(params) {
if (!params) {
return;
}
this.JobId = 'JobId' in params ? params.JobId : null;
}
}
/**
* DescribeAsyncRequestInfo response structure.
* @class
*/
class DescribeAsyncRequestInfoResponse extends AbstractModel {
constructor(){
super();
/**
* Task execution result information
* @type {string || null}
*/
this.Info = null;
/**
* Task execution status. Valid values: success, failed, running
* @type {string ||