
com.tencentcloudapi.mariadb.v20170312.models.CreateDBInstanceRequest Maven / Gradle / Ivy
/*
* 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.mariadb.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 CreateDBInstanceRequest extends AbstractModel {
/**
* AZs to deploy instance nodes. You can specify up to two AZs (one as primary AZ and another as replica AZ). When the shard specification is 1-primary-2-replica, the primary and one of the replicas are deployed in the primary AZ.
*/
@SerializedName("Zones")
@Expose
private String [] Zones;
/**
* Number of nodes, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
*/
@SerializedName("NodeCount")
@Expose
private Long NodeCount;
/**
* Memory size in GB, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
*/
@SerializedName("Memory")
@Expose
private Long Memory;
/**
* Storage capacity in GB. The maximum and minimum storage space can be obtained
by querying instance specification through the `DescribeDBInstanceSpecs` API.
*/
@SerializedName("Storage")
@Expose
private Long Storage;
/**
* Validity period in months
*/
@SerializedName("Period")
@Expose
private Long Period;
/**
* The number of instances to be purchased. Only one instance is queried for price by default.
*/
@SerializedName("Count")
@Expose
private Long Count;
/**
* Whether to automatically use vouchers. This option is disabled by default.
*/
@SerializedName("AutoVoucher")
@Expose
private Boolean AutoVoucher;
/**
* Voucher ID list. Currently, you can specify only one voucher.
*/
@SerializedName("VoucherIds")
@Expose
private String [] VoucherIds;
/**
* VPC ID. If this parameter is not passed in, the instance will be created on the classic network.
*/
@SerializedName("VpcId")
@Expose
private String VpcId;
/**
* VPC subnet ID, which is required when `VpcId` is specified.
*/
@SerializedName("SubnetId")
@Expose
private String SubnetId;
/**
* Project ID, which can be obtained through the `DescribeProjects` API. If this parameter is not passed in, the instance will be associated with the default project.
*/
@SerializedName("ProjectId")
@Expose
private Long ProjectId;
/**
* Database engine version. Valid values: `5.7`, `8.0`, `10.0`, `10.1`.
*/
@SerializedName("DbVersionId")
@Expose
private String DbVersionId;
/**
* Name of the instance, which can be customized.
*/
@SerializedName("InstanceName")
@Expose
private String InstanceName;
/**
* List of security group IDs
*/
@SerializedName("SecurityGroupIds")
@Expose
private String [] SecurityGroupIds;
/**
* Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration).
*/
@SerializedName("AutoRenewFlag")
@Expose
private Long AutoRenewFlag;
/**
* Whether IPv6 is supported. Valid values: `0` (unsupported), `1` (supported).
*/
@SerializedName("Ipv6Flag")
@Expose
private Long Ipv6Flag;
/**
* Array of tag key-value pairs
*/
@SerializedName("ResourceTags")
@Expose
private ResourceTag [] ResourceTags;
/**
* List of parameters. Valid values: `character_set_server` (character set; required); `lower_case_table_names` (table name case sensitivity; required; `0`: case-sensitive; `1`: case-insensitive); `innodb_page_size` (InnoDB data page size; default size: 16 KB); `sync_mode` (sync mode; `0`: async; `1`: strong sync; `2`: downgradable strong sync; default value: `2`).
*/
@SerializedName("InitParams")
@Expose
private DBParamValue [] InitParams;
/**
* DCN source region
*/
@SerializedName("DcnRegion")
@Expose
private String DcnRegion;
/**
* DCN source instance ID
*/
@SerializedName("DcnInstanceId")
@Expose
private String DcnInstanceId;
/**
* Get AZs to deploy instance nodes. You can specify up to two AZs (one as primary AZ and another as replica AZ). When the shard specification is 1-primary-2-replica, the primary and one of the replicas are deployed in the primary AZ.
* @return Zones AZs to deploy instance nodes. You can specify up to two AZs (one as primary AZ and another as replica AZ). When the shard specification is 1-primary-2-replica, the primary and one of the replicas are deployed in the primary AZ.
*/
public String [] getZones() {
return this.Zones;
}
/**
* Set AZs to deploy instance nodes. You can specify up to two AZs (one as primary AZ and another as replica AZ). When the shard specification is 1-primary-2-replica, the primary and one of the replicas are deployed in the primary AZ.
* @param Zones AZs to deploy instance nodes. You can specify up to two AZs (one as primary AZ and another as replica AZ). When the shard specification is 1-primary-2-replica, the primary and one of the replicas are deployed in the primary AZ.
*/
public void setZones(String [] Zones) {
this.Zones = Zones;
}
/**
* Get Number of nodes, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
* @return NodeCount Number of nodes, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
*/
public Long getNodeCount() {
return this.NodeCount;
}
/**
* Set Number of nodes, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
* @param NodeCount Number of nodes, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
*/
public void setNodeCount(Long NodeCount) {
this.NodeCount = NodeCount;
}
/**
* Get Memory size in GB, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
* @return Memory Memory size in GB, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
*/
public Long getMemory() {
return this.Memory;
}
/**
* Set Memory size in GB, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
* @param Memory Memory size in GB, which can be obtained
by querying the instance specification through the `DescribeDBInstanceSpecs` API.
*/
public void setMemory(Long Memory) {
this.Memory = Memory;
}
/**
* Get Storage capacity in GB. The maximum and minimum storage space can be obtained
by querying instance specification through the `DescribeDBInstanceSpecs` API.
* @return Storage Storage capacity in GB. The maximum and minimum storage space can be obtained
by querying instance specification through the `DescribeDBInstanceSpecs` API.
*/
public Long getStorage() {
return this.Storage;
}
/**
* Set Storage capacity in GB. The maximum and minimum storage space can be obtained
by querying instance specification through the `DescribeDBInstanceSpecs` API.
* @param Storage Storage capacity in GB. The maximum and minimum storage space can be obtained
by querying instance specification through the `DescribeDBInstanceSpecs` API.
*/
public void setStorage(Long Storage) {
this.Storage = Storage;
}
/**
* Get Validity period in months
* @return Period Validity period in months
*/
public Long getPeriod() {
return this.Period;
}
/**
* Set Validity period in months
* @param Period Validity period in months
*/
public void setPeriod(Long Period) {
this.Period = Period;
}
/**
* Get The number of instances to be purchased. Only one instance is queried for price by default.
* @return Count The number of instances to be purchased. Only one instance is queried for price by default.
*/
public Long getCount() {
return this.Count;
}
/**
* Set The number of instances to be purchased. Only one instance is queried for price by default.
* @param Count The number of instances to be purchased. Only one instance is queried for price by default.
*/
public void setCount(Long Count) {
this.Count = Count;
}
/**
* Get Whether to automatically use vouchers. This option is disabled by default.
* @return AutoVoucher Whether to automatically use vouchers. This option is disabled by default.
*/
public Boolean getAutoVoucher() {
return this.AutoVoucher;
}
/**
* Set Whether to automatically use vouchers. This option is disabled by default.
* @param AutoVoucher Whether to automatically use vouchers. This option is disabled by default.
*/
public void setAutoVoucher(Boolean AutoVoucher) {
this.AutoVoucher = AutoVoucher;
}
/**
* Get Voucher ID list. Currently, you can specify only one voucher.
* @return VoucherIds Voucher ID list. Currently, you can specify only one voucher.
*/
public String [] getVoucherIds() {
return this.VoucherIds;
}
/**
* Set Voucher ID list. Currently, you can specify only one voucher.
* @param VoucherIds Voucher ID list. Currently, you can specify only one voucher.
*/
public void setVoucherIds(String [] VoucherIds) {
this.VoucherIds = VoucherIds;
}
/**
* Get VPC ID. If this parameter is not passed in, the instance will be created on the classic network.
* @return VpcId VPC ID. If this parameter is not passed in, the instance will be created on the classic network.
*/
public String getVpcId() {
return this.VpcId;
}
/**
* Set VPC ID. If this parameter is not passed in, the instance will be created on the classic network.
* @param VpcId VPC ID. If this parameter is not passed in, the instance will be created on the classic network.
*/
public void setVpcId(String VpcId) {
this.VpcId = VpcId;
}
/**
* Get VPC subnet ID, which is required when `VpcId` is specified.
* @return SubnetId VPC subnet ID, which is required when `VpcId` is specified.
*/
public String getSubnetId() {
return this.SubnetId;
}
/**
* Set VPC subnet ID, which is required when `VpcId` is specified.
* @param SubnetId VPC subnet ID, which is required when `VpcId` is specified.
*/
public void setSubnetId(String SubnetId) {
this.SubnetId = SubnetId;
}
/**
* Get Project ID, which can be obtained through the `DescribeProjects` API. If this parameter is not passed in, the instance will be associated with the default project.
* @return ProjectId Project ID, which can be obtained through the `DescribeProjects` API. If this parameter is not passed in, the instance will be associated with the default project.
*/
public Long getProjectId() {
return this.ProjectId;
}
/**
* Set Project ID, which can be obtained through the `DescribeProjects` API. If this parameter is not passed in, the instance will be associated with the default project.
* @param ProjectId Project ID, which can be obtained through the `DescribeProjects` API. If this parameter is not passed in, the instance will be associated with the default project.
*/
public void setProjectId(Long ProjectId) {
this.ProjectId = ProjectId;
}
/**
* Get Database engine version. Valid values: `5.7`, `8.0`, `10.0`, `10.1`.
* @return DbVersionId Database engine version. Valid values: `5.7`, `8.0`, `10.0`, `10.1`.
*/
public String getDbVersionId() {
return this.DbVersionId;
}
/**
* Set Database engine version. Valid values: `5.7`, `8.0`, `10.0`, `10.1`.
* @param DbVersionId Database engine version. Valid values: `5.7`, `8.0`, `10.0`, `10.1`.
*/
public void setDbVersionId(String DbVersionId) {
this.DbVersionId = DbVersionId;
}
/**
* Get Name of the instance, which can be customized.
* @return InstanceName Name of the instance, which can be customized.
*/
public String getInstanceName() {
return this.InstanceName;
}
/**
* Set Name of the instance, which can be customized.
* @param InstanceName Name of the instance, which can be customized.
*/
public void setInstanceName(String InstanceName) {
this.InstanceName = InstanceName;
}
/**
* Get List of security group IDs
* @return SecurityGroupIds List of security group IDs
*/
public String [] getSecurityGroupIds() {
return this.SecurityGroupIds;
}
/**
* Set List of security group IDs
* @param SecurityGroupIds List of security group IDs
*/
public void setSecurityGroupIds(String [] SecurityGroupIds) {
this.SecurityGroupIds = SecurityGroupIds;
}
/**
* Get Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration).
* @return AutoRenewFlag Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration).
*/
public Long getAutoRenewFlag() {
return this.AutoRenewFlag;
}
/**
* Set Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration).
* @param AutoRenewFlag Auto-renewal flag. Valid values: `1` (auto-renewal), `2` (no renewal upon expiration).
*/
public void setAutoRenewFlag(Long AutoRenewFlag) {
this.AutoRenewFlag = AutoRenewFlag;
}
/**
* Get Whether IPv6 is supported. Valid values: `0` (unsupported), `1` (supported).
* @return Ipv6Flag Whether IPv6 is supported. Valid values: `0` (unsupported), `1` (supported).
*/
public Long getIpv6Flag() {
return this.Ipv6Flag;
}
/**
* Set Whether IPv6 is supported. Valid values: `0` (unsupported), `1` (supported).
* @param Ipv6Flag Whether IPv6 is supported. Valid values: `0` (unsupported), `1` (supported).
*/
public void setIpv6Flag(Long Ipv6Flag) {
this.Ipv6Flag = Ipv6Flag;
}
/**
* Get Array of tag key-value pairs
* @return ResourceTags Array of tag key-value pairs
*/
public ResourceTag [] getResourceTags() {
return this.ResourceTags;
}
/**
* Set Array of tag key-value pairs
* @param ResourceTags Array of tag key-value pairs
*/
public void setResourceTags(ResourceTag [] ResourceTags) {
this.ResourceTags = ResourceTags;
}
/**
* Get List of parameters. Valid values: `character_set_server` (character set; required); `lower_case_table_names` (table name case sensitivity; required; `0`: case-sensitive; `1`: case-insensitive); `innodb_page_size` (InnoDB data page size; default size: 16 KB); `sync_mode` (sync mode; `0`: async; `1`: strong sync; `2`: downgradable strong sync; default value: `2`).
* @return InitParams List of parameters. Valid values: `character_set_server` (character set; required); `lower_case_table_names` (table name case sensitivity; required; `0`: case-sensitive; `1`: case-insensitive); `innodb_page_size` (InnoDB data page size; default size: 16 KB); `sync_mode` (sync mode; `0`: async; `1`: strong sync; `2`: downgradable strong sync; default value: `2`).
*/
public DBParamValue [] getInitParams() {
return this.InitParams;
}
/**
* Set List of parameters. Valid values: `character_set_server` (character set; required); `lower_case_table_names` (table name case sensitivity; required; `0`: case-sensitive; `1`: case-insensitive); `innodb_page_size` (InnoDB data page size; default size: 16 KB); `sync_mode` (sync mode; `0`: async; `1`: strong sync; `2`: downgradable strong sync; default value: `2`).
* @param InitParams List of parameters. Valid values: `character_set_server` (character set; required); `lower_case_table_names` (table name case sensitivity; required; `0`: case-sensitive; `1`: case-insensitive); `innodb_page_size` (InnoDB data page size; default size: 16 KB); `sync_mode` (sync mode; `0`: async; `1`: strong sync; `2`: downgradable strong sync; default value: `2`).
*/
public void setInitParams(DBParamValue [] InitParams) {
this.InitParams = InitParams;
}
/**
* Get DCN source region
* @return DcnRegion DCN source region
*/
public String getDcnRegion() {
return this.DcnRegion;
}
/**
* Set DCN source region
* @param DcnRegion DCN source region
*/
public void setDcnRegion(String DcnRegion) {
this.DcnRegion = DcnRegion;
}
/**
* Get DCN source instance ID
* @return DcnInstanceId DCN source instance ID
*/
public String getDcnInstanceId() {
return this.DcnInstanceId;
}
/**
* Set DCN source instance ID
* @param DcnInstanceId DCN source instance ID
*/
public void setDcnInstanceId(String DcnInstanceId) {
this.DcnInstanceId = DcnInstanceId;
}
public CreateDBInstanceRequest() {
}
/**
* 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 CreateDBInstanceRequest(CreateDBInstanceRequest source) {
if (source.Zones != null) {
this.Zones = new String[source.Zones.length];
for (int i = 0; i < source.Zones.length; i++) {
this.Zones[i] = new String(source.Zones[i]);
}
}
if (source.NodeCount != null) {
this.NodeCount = new Long(source.NodeCount);
}
if (source.Memory != null) {
this.Memory = new Long(source.Memory);
}
if (source.Storage != null) {
this.Storage = new Long(source.Storage);
}
if (source.Period != null) {
this.Period = new Long(source.Period);
}
if (source.Count != null) {
this.Count = new Long(source.Count);
}
if (source.AutoVoucher != null) {
this.AutoVoucher = new Boolean(source.AutoVoucher);
}
if (source.VoucherIds != null) {
this.VoucherIds = new String[source.VoucherIds.length];
for (int i = 0; i < source.VoucherIds.length; i++) {
this.VoucherIds[i] = new String(source.VoucherIds[i]);
}
}
if (source.VpcId != null) {
this.VpcId = new String(source.VpcId);
}
if (source.SubnetId != null) {
this.SubnetId = new String(source.SubnetId);
}
if (source.ProjectId != null) {
this.ProjectId = new Long(source.ProjectId);
}
if (source.DbVersionId != null) {
this.DbVersionId = new String(source.DbVersionId);
}
if (source.InstanceName != null) {
this.InstanceName = new String(source.InstanceName);
}
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.AutoRenewFlag != null) {
this.AutoRenewFlag = new Long(source.AutoRenewFlag);
}
if (source.Ipv6Flag != null) {
this.Ipv6Flag = new Long(source.Ipv6Flag);
}
if (source.ResourceTags != null) {
this.ResourceTags = new ResourceTag[source.ResourceTags.length];
for (int i = 0; i < source.ResourceTags.length; i++) {
this.ResourceTags[i] = new ResourceTag(source.ResourceTags[i]);
}
}
if (source.InitParams != null) {
this.InitParams = new DBParamValue[source.InitParams.length];
for (int i = 0; i < source.InitParams.length; i++) {
this.InitParams[i] = new DBParamValue(source.InitParams[i]);
}
}
if (source.DcnRegion != null) {
this.DcnRegion = new String(source.DcnRegion);
}
if (source.DcnInstanceId != null) {
this.DcnInstanceId = new String(source.DcnInstanceId);
}
}
/**
* Internal implementation, normal users should not use it.
*/
public void toMap(HashMap map, String prefix) {
this.setParamArraySimple(map, prefix + "Zones.", this.Zones);
this.setParamSimple(map, prefix + "NodeCount", this.NodeCount);
this.setParamSimple(map, prefix + "Memory", this.Memory);
this.setParamSimple(map, prefix + "Storage", this.Storage);
this.setParamSimple(map, prefix + "Period", this.Period);
this.setParamSimple(map, prefix + "Count", this.Count);
this.setParamSimple(map, prefix + "AutoVoucher", this.AutoVoucher);
this.setParamArraySimple(map, prefix + "VoucherIds.", this.VoucherIds);
this.setParamSimple(map, prefix + "VpcId", this.VpcId);
this.setParamSimple(map, prefix + "SubnetId", this.SubnetId);
this.setParamSimple(map, prefix + "ProjectId", this.ProjectId);
this.setParamSimple(map, prefix + "DbVersionId", this.DbVersionId);
this.setParamSimple(map, prefix + "InstanceName", this.InstanceName);
this.setParamArraySimple(map, prefix + "SecurityGroupIds.", this.SecurityGroupIds);
this.setParamSimple(map, prefix + "AutoRenewFlag", this.AutoRenewFlag);
this.setParamSimple(map, prefix + "Ipv6Flag", this.Ipv6Flag);
this.setParamArrayObj(map, prefix + "ResourceTags.", this.ResourceTags);
this.setParamArrayObj(map, prefix + "InitParams.", this.InitParams);
this.setParamSimple(map, prefix + "DcnRegion", this.DcnRegion);
this.setParamSimple(map, prefix + "DcnInstanceId", this.DcnInstanceId);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy