![JAR search and dependency download from the Maven repository](/logo.png)
com.tencentcloudapi.postgres.v20170312.models.CloneDBInstanceRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Show all versions of tencentcloud-sdk-java-intl-en Show documentation
Tencent Cloud API SDK for Java
/*
* Copyright (c) 2017-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.
*/
package com.tencentcloudapi.postgres.v20170312.models;
import com.tencentcloudapi.common.AbstractModel;
import com.tencentcloudapi.common.SSEResponseModel;
import com.google.gson.annotations.SerializedName;
import com.google.gson.annotations.Expose;
import java.util.HashMap;
public class CloneDBInstanceRequest extends AbstractModel {
/**
* ID of the original instance to be cloned.
*/
@SerializedName("DBInstanceId")
@Expose
private String DBInstanceId;
/**
* Purchasable code, which can be obtained from the `SpecCode` field in the return value of the [DescribeClasses](https://intl.cloud.tencent.com/document/api/409/89019?from_cn_redirect=1) API.
*/
@SerializedName("SpecCode")
@Expose
private String SpecCode;
/**
* Instance storage capacity in GB.
*/
@SerializedName("Storage")
@Expose
private Long Storage;
/**
* Purchase duration, in months.
- Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.
- Pay-as-you-go: Only supports `1`.
*/
@SerializedName("Period")
@Expose
private Long Period;
/**
* Renewal Flag:
- `0`: manual renewal
`1`: auto-renewal
Default value: 0
*/
@SerializedName("AutoRenewFlag")
@Expose
private Long AutoRenewFlag;
/**
* VPC ID in the format of `vpc-xxxxxxx`, which can be obtained in the console or from the `unVpcId` field in the return value of the [DescribeVpcEx](https://intl.cloud.tencent.com/document/api/215/1372?from_cn_redirect=1) API.
*/
@SerializedName("VpcId")
@Expose
private String VpcId;
/**
* VPC subnet ID in the format of `subnet-xxxxxxxx`, which can be obtained in the console or from the `unSubnetId` field in the return value of the [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) API.
*/
@SerializedName("SubnetId")
@Expose
private String SubnetId;
/**
* Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
*/
@SerializedName("Name")
@Expose
private String Name;
/**
* Instance billing type, which currently supports:
- PREPAID: Prepaid, i.e., monthly subscription
- POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption
Default value: PREPAID
*/
@SerializedName("InstanceChargeType")
@Expose
private String InstanceChargeType;
/**
* Security group of the instance, which can be obtained from the `sgld` field in the return value of the [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API. If this parameter is not specified, the default security group will be bound.
*/
@SerializedName("SecurityGroupIds")
@Expose
private String [] SecurityGroupIds;
/**
* Project ID.
*/
@SerializedName("ProjectId")
@Expose
private Long ProjectId;
/**
* The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the `Tags` field in the return value of the [DescribeTags](https://intl.cloud.tencent.com/document/api/651/35316?from_cn_redirect=1) API.
*/
@SerializedName("TagList")
@Expose
private Tag [] TagList;
/**
* Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
*/
@SerializedName("DBNodeSet")
@Expose
private DBNode [] DBNodeSet;
/**
* Whether to automatically use coupons:
- 0: No
- 1: Yes
Default value: 0
*/
@SerializedName("AutoVoucher")
@Expose
private Long AutoVoucher;
/**
* Voucher ID list.
*/
@SerializedName("VoucherIds")
@Expose
private String VoucherIds;
/**
* Campaign ID.
*/
@SerializedName("ActivityId")
@Expose
private Long ActivityId;
/**
* Basic backup set ID.
*/
@SerializedName("BackupSetId")
@Expose
private String BackupSetId;
/**
* Restoration point in time.
*/
@SerializedName("RecoveryTargetTime")
@Expose
private String RecoveryTargetTime;
/**
* Primary-standby sync mode, which supports:
Semi-sync: Semi-sync
Async: Asynchronous
Default value for the primary instance: Semi-sync
Default value for the read-only instance: Async
*/
@SerializedName("SyncMode")
@Expose
private String SyncMode;
/**
* Get ID of the original instance to be cloned.
* @return DBInstanceId ID of the original instance to be cloned.
*/
public String getDBInstanceId() {
return this.DBInstanceId;
}
/**
* Set ID of the original instance to be cloned.
* @param DBInstanceId ID of the original instance to be cloned.
*/
public void setDBInstanceId(String DBInstanceId) {
this.DBInstanceId = DBInstanceId;
}
/**
* Get Purchasable code, which can be obtained from the `SpecCode` field in the return value of the [DescribeClasses](https://intl.cloud.tencent.com/document/api/409/89019?from_cn_redirect=1) API.
* @return SpecCode Purchasable code, which can be obtained from the `SpecCode` field in the return value of the [DescribeClasses](https://intl.cloud.tencent.com/document/api/409/89019?from_cn_redirect=1) API.
*/
public String getSpecCode() {
return this.SpecCode;
}
/**
* Set Purchasable code, which can be obtained from the `SpecCode` field in the return value of the [DescribeClasses](https://intl.cloud.tencent.com/document/api/409/89019?from_cn_redirect=1) API.
* @param SpecCode Purchasable code, which can be obtained from the `SpecCode` field in the return value of the [DescribeClasses](https://intl.cloud.tencent.com/document/api/409/89019?from_cn_redirect=1) API.
*/
public void setSpecCode(String SpecCode) {
this.SpecCode = SpecCode;
}
/**
* Get Instance storage capacity in GB.
* @return Storage Instance storage capacity in GB.
*/
public Long getStorage() {
return this.Storage;
}
/**
* Set Instance storage capacity in GB.
* @param Storage Instance storage capacity in GB.
*/
public void setStorage(Long Storage) {
this.Storage = Storage;
}
/**
* Get Purchase duration, in months.
- Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.
- Pay-as-you-go: Only supports `1`.
* @return Period Purchase duration, in months.
- Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.
- Pay-as-you-go: Only supports `1`.
*/
public Long getPeriod() {
return this.Period;
}
/**
* Set Purchase duration, in months.
- Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.
- Pay-as-you-go: Only supports `1`.
* @param Period Purchase duration, in months.
- Prepaid: Supports `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10`, `11`, `12`, `24`, and `36`.
- Pay-as-you-go: Only supports `1`.
*/
public void setPeriod(Long Period) {
this.Period = Period;
}
/**
* Get Renewal Flag:
- `0`: manual renewal
`1`: auto-renewal
Default value: 0
* @return AutoRenewFlag Renewal Flag:
- `0`: manual renewal
`1`: auto-renewal
Default value: 0
*/
public Long getAutoRenewFlag() {
return this.AutoRenewFlag;
}
/**
* Set Renewal Flag:
- `0`: manual renewal
`1`: auto-renewal
Default value: 0
* @param AutoRenewFlag Renewal Flag:
- `0`: manual renewal
`1`: auto-renewal
Default value: 0
*/
public void setAutoRenewFlag(Long AutoRenewFlag) {
this.AutoRenewFlag = AutoRenewFlag;
}
/**
* Get VPC ID in the format of `vpc-xxxxxxx`, which can be obtained in the console or from the `unVpcId` field in the return value of the [DescribeVpcEx](https://intl.cloud.tencent.com/document/api/215/1372?from_cn_redirect=1) API.
* @return VpcId VPC ID in the format of `vpc-xxxxxxx`, which can be obtained in the console or from the `unVpcId` field in the return value of the [DescribeVpcEx](https://intl.cloud.tencent.com/document/api/215/1372?from_cn_redirect=1) API.
*/
public String getVpcId() {
return this.VpcId;
}
/**
* Set VPC ID in the format of `vpc-xxxxxxx`, which can be obtained in the console or from the `unVpcId` field in the return value of the [DescribeVpcEx](https://intl.cloud.tencent.com/document/api/215/1372?from_cn_redirect=1) API.
* @param VpcId VPC ID in the format of `vpc-xxxxxxx`, which can be obtained in the console or from the `unVpcId` field in the return value of the [DescribeVpcEx](https://intl.cloud.tencent.com/document/api/215/1372?from_cn_redirect=1) API.
*/
public void setVpcId(String VpcId) {
this.VpcId = VpcId;
}
/**
* Get VPC subnet ID in the format of `subnet-xxxxxxxx`, which can be obtained in the console or from the `unSubnetId` field in the return value of the [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) API.
* @return SubnetId VPC subnet ID in the format of `subnet-xxxxxxxx`, which can be obtained in the console or from the `unSubnetId` field in the return value of the [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) API.
*/
public String getSubnetId() {
return this.SubnetId;
}
/**
* Set VPC subnet ID in the format of `subnet-xxxxxxxx`, which can be obtained in the console or from the `unSubnetId` field in the return value of the [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) API.
* @param SubnetId VPC subnet ID in the format of `subnet-xxxxxxxx`, which can be obtained in the console or from the `unSubnetId` field in the return value of the [DescribeSubnets](https://intl.cloud.tencent.com/document/api/215/15784?from_cn_redirect=1) API.
*/
public void setSubnetId(String SubnetId) {
this.SubnetId = SubnetId;
}
/**
* Get Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
* @return Name Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
*/
public String getName() {
return this.Name;
}
/**
* Set Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
* @param Name Name of the newly purchased instance, which can contain up to 60 letters, digits, or symbols (-_). If this parameter is not specified, "Unnamed" will be displayed by default.
*/
public void setName(String Name) {
this.Name = Name;
}
/**
* Get Instance billing type, which currently supports:
- PREPAID: Prepaid, i.e., monthly subscription
- POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption
Default value: PREPAID
* @return InstanceChargeType Instance billing type, which currently supports:
- PREPAID: Prepaid, i.e., monthly subscription
- POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption
Default value: PREPAID
*/
public String getInstanceChargeType() {
return this.InstanceChargeType;
}
/**
* Set Instance billing type, which currently supports:
- PREPAID: Prepaid, i.e., monthly subscription
- POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption
Default value: PREPAID
* @param InstanceChargeType Instance billing type, which currently supports:
- PREPAID: Prepaid, i.e., monthly subscription
- POSTPAID_BY_HOUR: Pay-as-you-go, i.e., pay by consumption
Default value: PREPAID
*/
public void setInstanceChargeType(String InstanceChargeType) {
this.InstanceChargeType = InstanceChargeType;
}
/**
* Get Security group of the instance, which can be obtained from the `sgld` field in the return value of the [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API. If this parameter is not specified, the default security group will be bound.
* @return SecurityGroupIds Security group of the instance, which can be obtained from the `sgld` field in the return value of the [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API. If this parameter is not specified, the default security group will be bound.
*/
public String [] getSecurityGroupIds() {
return this.SecurityGroupIds;
}
/**
* Set Security group of the instance, which can be obtained from the `sgld` field in the return value of the [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API. If this parameter is not specified, the default security group will be bound.
* @param SecurityGroupIds Security group of the instance, which can be obtained from the `sgld` field in the return value of the [DescribeSecurityGroups](https://intl.cloud.tencent.com/document/api/215/15808?from_cn_redirect=1) API. If this parameter is not specified, the default security group will be bound.
*/
public void setSecurityGroupIds(String [] SecurityGroupIds) {
this.SecurityGroupIds = SecurityGroupIds;
}
/**
* Get Project ID.
* @return ProjectId Project ID.
*/
public Long getProjectId() {
return this.ProjectId;
}
/**
* Set Project ID.
* @param ProjectId Project ID.
*/
public void setProjectId(Long ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the `Tags` field in the return value of the [DescribeTags](https://intl.cloud.tencent.com/document/api/651/35316?from_cn_redirect=1) API.
* @return TagList The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the `Tags` field in the return value of the [DescribeTags](https://intl.cloud.tencent.com/document/api/651/35316?from_cn_redirect=1) API.
*/
public Tag [] getTagList() {
return this.TagList;
}
/**
* Set The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the `Tags` field in the return value of the [DescribeTags](https://intl.cloud.tencent.com/document/api/651/35316?from_cn_redirect=1) API.
* @param TagList The information of tags to be bound with the instance, which is left empty by default. This parameter can be obtained from the `Tags` field in the return value of the [DescribeTags](https://intl.cloud.tencent.com/document/api/651/35316?from_cn_redirect=1) API.
*/
public void setTagList(Tag [] TagList) {
this.TagList = TagList;
}
/**
* Get Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
* @return DBNodeSet Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
*/
public DBNode [] getDBNodeSet() {
return this.DBNodeSet;
}
/**
* Set Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
* @param DBNodeSet Deployment information of the instance node, which will display the information of each AZ when the instance node is deployed across multiple AZs.
The information of AZ can be obtained from the `Zone` field in the return value of the [DescribeZones](https://intl.cloud.tencent.com/document/api/409/16769?from_cn_redirect=1) API.
*/
public void setDBNodeSet(DBNode [] DBNodeSet) {
this.DBNodeSet = DBNodeSet;
}
/**
* Get Whether to automatically use coupons:
- 0: No
- 1: Yes
Default value: 0
* @return AutoVoucher Whether to automatically use coupons:
- 0: No
- 1: Yes
Default value: 0
*/
public Long getAutoVoucher() {
return this.AutoVoucher;
}
/**
* Set Whether to automatically use coupons:
- 0: No
- 1: Yes
Default value: 0
* @param AutoVoucher Whether to automatically use coupons:
- 0: No
- 1: Yes
Default value: 0
*/
public void setAutoVoucher(Long AutoVoucher) {
this.AutoVoucher = AutoVoucher;
}
/**
* Get Voucher ID list.
* @return VoucherIds Voucher ID list.
*/
public String getVoucherIds() {
return this.VoucherIds;
}
/**
* Set Voucher ID list.
* @param VoucherIds Voucher ID list.
*/
public void setVoucherIds(String VoucherIds) {
this.VoucherIds = VoucherIds;
}
/**
* Get Campaign ID.
* @return ActivityId Campaign ID.
*/
public Long getActivityId() {
return this.ActivityId;
}
/**
* Set Campaign ID.
* @param ActivityId Campaign ID.
*/
public void setActivityId(Long ActivityId) {
this.ActivityId = ActivityId;
}
/**
* Get Basic backup set ID.
* @return BackupSetId Basic backup set ID.
*/
public String getBackupSetId() {
return this.BackupSetId;
}
/**
* Set Basic backup set ID.
* @param BackupSetId Basic backup set ID.
*/
public void setBackupSetId(String BackupSetId) {
this.BackupSetId = BackupSetId;
}
/**
* Get Restoration point in time.
* @return RecoveryTargetTime Restoration point in time.
*/
public String getRecoveryTargetTime() {
return this.RecoveryTargetTime;
}
/**
* Set Restoration point in time.
* @param RecoveryTargetTime Restoration point in time.
*/
public void setRecoveryTargetTime(String RecoveryTargetTime) {
this.RecoveryTargetTime = RecoveryTargetTime;
}
/**
* Get Primary-standby sync mode, which supports:
Semi-sync: Semi-sync
Async: Asynchronous
Default value for the primary instance: Semi-sync
Default value for the read-only instance: Async
* @return SyncMode Primary-standby sync mode, which supports:
Semi-sync: Semi-sync
Async: Asynchronous
Default value for the primary instance: Semi-sync
Default value for the read-only instance: Async
*/
public String getSyncMode() {
return this.SyncMode;
}
/**
* Set Primary-standby sync mode, which supports:
Semi-sync: Semi-sync
Async: Asynchronous
Default value for the primary instance: Semi-sync
Default value for the read-only instance: Async
* @param SyncMode Primary-standby sync mode, which supports:
Semi-sync: Semi-sync
Async: Asynchronous
Default value for the primary instance: Semi-sync
Default value for the read-only instance: Async
*/
public void setSyncMode(String SyncMode) {
this.SyncMode = SyncMode;
}
public CloneDBInstanceRequest() {
}
/**
* NOTE: Any ambiguous key set via .set("AnyKey", "value") will be a shallow copy,
* and any explicit key, i.e Foo, set via .setFoo("value") will be a deep copy.
*/
public CloneDBInstanceRequest(CloneDBInstanceRequest source) {
if (source.DBInstanceId != null) {
this.DBInstanceId = new String(source.DBInstanceId);
}
if (source.SpecCode != null) {
this.SpecCode = new String(source.SpecCode);
}
if (source.Storage != null) {
this.Storage = new Long(source.Storage);
}
if (source.Period != null) {
this.Period = new Long(source.Period);
}
if (source.AutoRenewFlag != null) {
this.AutoRenewFlag = new Long(source.AutoRenewFlag);
}
if (source.VpcId != null) {
this.VpcId = new String(source.VpcId);
}
if (source.SubnetId != null) {
this.SubnetId = new String(source.SubnetId);
}
if (source.Name != null) {
this.Name = new String(source.Name);
}
if (source.InstanceChargeType != null) {
this.InstanceChargeType = new String(source.InstanceChargeType);
}
if (source.SecurityGroupIds != null) {
this.SecurityGroupIds = new String[source.SecurityGroupIds.length];
for (int i = 0; i < source.SecurityGroupIds.length; i++) {
this.SecurityGroupIds[i] = new String(source.SecurityGroupIds[i]);
}
}
if (source.ProjectId != null) {
this.ProjectId = new Long(source.ProjectId);
}
if (source.TagList != null) {
this.TagList = new Tag[source.TagList.length];
for (int i = 0; i < source.TagList.length; i++) {
this.TagList[i] = new Tag(source.TagList[i]);
}
}
if (source.DBNodeSet != null) {
this.DBNodeSet = new DBNode[source.DBNodeSet.length];
for (int i = 0; i < source.DBNodeSet.length; i++) {
this.DBNodeSet[i] = new DBNode(source.DBNodeSet[i]);
}
}
if (source.AutoVoucher != null) {
this.AutoVoucher = new Long(source.AutoVoucher);
}
if (source.VoucherIds != null) {
this.VoucherIds = new String(source.VoucherIds);
}
if (source.ActivityId != null) {
this.ActivityId = new Long(source.ActivityId);
}
if (source.BackupSetId != null) {
this.BackupSetId = new String(source.BackupSetId);
}
if (source.RecoveryTargetTime != null) {
this.RecoveryTargetTime = new String(source.RecoveryTargetTime);
}
if (source.SyncMode != null) {
this.SyncMode = new String(source.SyncMode);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamSimple(map, prefix + "DBInstanceId", this.DBInstanceId);
this.setParamSimple(map, prefix + "SpecCode", this.SpecCode);
this.setParamSimple(map, prefix + "Storage", this.Storage);
this.setParamSimple(map, prefix + "Period", this.Period);
this.setParamSimple(map, prefix + "AutoRenewFlag", this.AutoRenewFlag);
this.setParamSimple(map, prefix + "VpcId", this.VpcId);
this.setParamSimple(map, prefix + "SubnetId", this.SubnetId);
this.setParamSimple(map, prefix + "Name", this.Name);
this.setParamSimple(map, prefix + "InstanceChargeType", this.InstanceChargeType);
this.setParamArraySimple(map, prefix + "SecurityGroupIds.", this.SecurityGroupIds);
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamArrayObj(map, prefix + "TagList.", this.TagList);
this.setParamArrayObj(map, prefix + "DBNodeSet.", this.DBNodeSet);
this.setParamSimple(map, prefix + "AutoVoucher", this.AutoVoucher);
this.setParamSimple(map, prefix + "VoucherIds", this.VoucherIds);
this.setParamSimple(map, prefix + "ActivityId", this.ActivityId);
this.setParamSimple(map, prefix + "BackupSetId", this.BackupSetId);
this.setParamSimple(map, prefix + "RecoveryTargetTime", this.RecoveryTargetTime);
this.setParamSimple(map, prefix + "SyncMode", this.SyncMode);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy