com.aliyun.sdk.service.polardb20170801.models.CreateDBNodesRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-polardb20170801 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.polardb20170801.models;
import com.aliyun.sdk.gateway.pop.*;
import darabonba.core.*;
import darabonba.core.async.*;
import darabonba.core.sync.*;
import darabonba.core.client.*;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
*
* {@link CreateDBNodesRequest} extends {@link RequestModel}
*
* CreateDBNodesRequest
*/
public class CreateDBNodesRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ClientToken")
private String clientToken;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DBClusterId")
@com.aliyun.core.annotation.Validation(required = true)
private String DBClusterId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DBNode")
@com.aliyun.core.annotation.Validation(required = true)
private java.util.List DBNode;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DBNodeType")
private String DBNodeType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("EndpointBindList")
private String endpointBindList;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ImciSwitch")
private String imciSwitch;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerAccount")
private String ownerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerId")
private Long ownerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("PlannedEndTime")
private String plannedEndTime;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("PlannedStartTime")
private String plannedStartTime;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceGroupId")
private String resourceGroupId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount")
private String resourceOwnerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerId")
private Long resourceOwnerId;
private CreateDBNodesRequest(Builder builder) {
super(builder);
this.clientToken = builder.clientToken;
this.DBClusterId = builder.DBClusterId;
this.DBNode = builder.DBNode;
this.DBNodeType = builder.DBNodeType;
this.endpointBindList = builder.endpointBindList;
this.imciSwitch = builder.imciSwitch;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.plannedEndTime = builder.plannedEndTime;
this.plannedStartTime = builder.plannedStartTime;
this.resourceGroupId = builder.resourceGroupId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
}
public static Builder builder() {
return new Builder();
}
public static CreateDBNodesRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return DBClusterId
*/
public String getDBClusterId() {
return this.DBClusterId;
}
/**
* @return DBNode
*/
public java.util.List getDBNode() {
return this.DBNode;
}
/**
* @return DBNodeType
*/
public String getDBNodeType() {
return this.DBNodeType;
}
/**
* @return endpointBindList
*/
public String getEndpointBindList() {
return this.endpointBindList;
}
/**
* @return imciSwitch
*/
public String getImciSwitch() {
return this.imciSwitch;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return plannedEndTime
*/
public String getPlannedEndTime() {
return this.plannedEndTime;
}
/**
* @return plannedStartTime
*/
public String getPlannedStartTime() {
return this.plannedStartTime;
}
/**
* @return resourceGroupId
*/
public String getResourceGroupId() {
return this.resourceGroupId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
public static final class Builder extends Request.Builder {
private String clientToken;
private String DBClusterId;
private java.util.List DBNode;
private String DBNodeType;
private String endpointBindList;
private String imciSwitch;
private String ownerAccount;
private Long ownerId;
private String plannedEndTime;
private String plannedStartTime;
private String resourceGroupId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private Builder() {
super();
}
private Builder(CreateDBNodesRequest request) {
super(request);
this.clientToken = request.clientToken;
this.DBClusterId = request.DBClusterId;
this.DBNode = request.DBNode;
this.DBNodeType = request.DBNodeType;
this.endpointBindList = request.endpointBindList;
this.imciSwitch = request.imciSwitch;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.plannedEndTime = request.plannedEndTime;
this.plannedStartTime = request.plannedStartTime;
this.resourceGroupId = request.resourceGroupId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
}
/**
* The client token that is used to ensure the idempotence of the request. You can use the client to generate the value, but you must make sure that it is unique among different requests. The token can contain only ASCII characters and cannot exceed 64 characters in length. The token is case-sensitive.
*
* example:
* 6000170000591aed949d0f54a343f1a4233c1e7d1c5c******
*/
public Builder clientToken(String clientToken) {
this.putQueryParameter("ClientToken", clientToken);
this.clientToken = clientToken;
return this;
}
/**
* The ID of the cluster.
* This parameter is required.
*
* example:
* pc-*************
*/
public Builder DBClusterId(String DBClusterId) {
this.putQueryParameter("DBClusterId", DBClusterId);
this.DBClusterId = DBClusterId;
return this;
}
/**
* The details of the read-only node.
* This parameter is required.
*/
public Builder DBNode(java.util.List DBNode) {
this.putQueryParameter("DBNode", DBNode);
this.DBNode = DBNode;
return this;
}
/**
* The type of the node. Valid values:
*
* - RO
* - STANDBY
* - DLNode
*
*
* example:
* RO
*/
public Builder DBNodeType(String DBNodeType) {
this.putQueryParameter("DBNodeType", DBNodeType);
this.DBNodeType = DBNodeType;
return this;
}
/**
* The ID of the cluster endpoint to which the read-only node is added. If you want to add the read-only node to multiple endpoints at the same time, separate the endpoint IDs with commas (,).
*
*
* - You can call the DescribeDBClusterEndpoints operation to query the details of cluster endpoints, including endpoint IDs.
* - You can enter the ID of the default cluster endpoint or a custom cluster endpoint.
* - If you leave this parameter empty, the read-only node is added to all cluster endpoints for which the Automatically Associate New Nodes feature is enabled. If you set
AutoAddNewNodes
to Enable
, the Automatically Associate New Nodes feature is enabled.
*
*
*
* example:
* pe-,pe-
*/
public Builder endpointBindList(String endpointBindList) {
this.putQueryParameter("EndpointBindList", endpointBindList);
this.endpointBindList = endpointBindList;
return this;
}
/**
* Specifies whether to enable the In-Memory Column Index (IMCI) feature. Default value: OFF. Valid values:
*
* - ON
* - OFF
*
*
* This parameter is invalid for a PolarDB for Oracle or PolarDB for PostgreSQL cluster.
*
*
* example:
* ON
*/
public Builder imciSwitch(String imciSwitch) {
this.putQueryParameter("ImciSwitch", imciSwitch);
this.imciSwitch = imciSwitch;
return this;
}
/**
* OwnerAccount.
*/
public Builder ownerAccount(String ownerAccount) {
this.putQueryParameter("OwnerAccount", ownerAccount);
this.ownerAccount = ownerAccount;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The latest start time for upgrading the specifications within the scheduled time period. Specify the time in the YYYY-MM-DDThh:mm:ssZ
format. The time must be in UTC.
*
*
* - The value of this parameter must be at least 30 minutes later than the value of PlannedStartTime.
* - If you specify
PlannedStartTime
but do not specify PlannedEndTime, the latest start time of the task is set to a value that is calculated by using the following formula: PlannedEndTime value + 30 minutes
. For example, if you set PlannedStartTime
to 2021-01-14T09:00:00Z
and you do not specify PlannedEndTime, the latest start time of the task is set to 2021-01-14T09:30:00Z
.
*
*
*
* example:
* 2021-01-14T09:30:00Z
*/
public Builder plannedEndTime(String plannedEndTime) {
this.putQueryParameter("PlannedEndTime", plannedEndTime);
this.plannedEndTime = plannedEndTime;
return this;
}
/**
* The earliest start time of the scheduled task for adding the read-only node. The scheduled task specifies that the task is run in the required period. Specify the time in the YYYY-MM-DDThh:mm:ssZ
format. The time must be in UTC.
*
*
* - The earliest start time of the scheduled task can be a point in time within the next 24 hours. For example, if the current time is
2021-01-14T09:00:00Z
, you can specify a point in time between 2021-01-14T09:00:00Z
and 2021-01-15T09:00:00Z
.
* - If you leave this parameter empty, the task for adding the read-only node is immediately run by default.
*
*
*
* example:
* 2021-01-14T09:00:00Z
*/
public Builder plannedStartTime(String plannedStartTime) {
this.putQueryParameter("PlannedStartTime", plannedStartTime);
this.plannedStartTime = plannedStartTime;
return this;
}
/**
* The ID of the resource group.
*
* example:
* rg-************
*/
public Builder resourceGroupId(String resourceGroupId) {
this.putQueryParameter("ResourceGroupId", resourceGroupId);
this.resourceGroupId = resourceGroupId;
return this;
}
/**
* ResourceOwnerAccount.
*/
public Builder resourceOwnerAccount(String resourceOwnerAccount) {
this.putQueryParameter("ResourceOwnerAccount", resourceOwnerAccount);
this.resourceOwnerAccount = resourceOwnerAccount;
return this;
}
/**
* ResourceOwnerId.
*/
public Builder resourceOwnerId(Long resourceOwnerId) {
this.putQueryParameter("ResourceOwnerId", resourceOwnerId);
this.resourceOwnerId = resourceOwnerId;
return this;
}
@Override
public CreateDBNodesRequest build() {
return new CreateDBNodesRequest(this);
}
}
/**
*
* {@link CreateDBNodesRequest} extends {@link TeaModel}
*
* CreateDBNodesRequest
*/
public static class DBNode extends TeaModel {
@com.aliyun.core.annotation.NameInMap("TargetClass")
private String targetClass;
@com.aliyun.core.annotation.NameInMap("ZoneId")
private String zoneId;
private DBNode(Builder builder) {
this.targetClass = builder.targetClass;
this.zoneId = builder.zoneId;
}
public static Builder builder() {
return new Builder();
}
public static DBNode create() {
return builder().build();
}
/**
* @return targetClass
*/
public String getTargetClass() {
return this.targetClass;
}
/**
* @return zoneId
*/
public String getZoneId() {
return this.zoneId;
}
public static final class Builder {
private String targetClass;
private String zoneId;
/**
* The specifications of the read-only node that you want to add, which must be the same as the specifications of the existing nodes. For more information, see the following topics:
*
* - PolarDB for MySQL: Specifications of compute nodes
* - PolarDB for PostgreSQL (Compatible with Oracle): Specifications of compute nodes
* - PolarDB for PostgreSQL: Specifications of compute nodes
*
*
*
* - You need to specify either DBNode.N.ZoneId or DBNode.N.TargetClass. N is an integer that starts from 1. The maximum value of N is equal to 16 minus the number of existing nodes.
* - You can add multiple read-only nodes at the same time only to PolarDB for MySQL clusters, which can contain up to of 15 read-only nodes.
* - This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is optional for PolarDB for MySQL clusters.
*
*
*
* example:
* polar.mysql.x4.medium
*/
public Builder targetClass(String targetClass) {
this.targetClass = targetClass;
return this;
}
/**
* The zone ID of the node that you want to add, which must be the same as the zone ID of existing nodes. You can call the DescribeRegions operation to query the IDs of zones.
*
*
* - You need to specify either DBNode.N.ZoneId or DBNode.N.TargetClass. N is an integer that starts from 1. The maximum value of N is equal to 16 minus the number of existing nodes.
* - You can add multiple read-only nodes at the same time only to PolarDB for MySQL clusters, which can contain up to of 15 read-only nodes.
* - This parameter is required for PolarDB for PostgreSQL (Compatible with Oracle) clusters or PolarDB for PostgreSQL clusters. This parameter is optional for PolarDB for MySQL clusters.
*
*
*
* example:
* cn-qingdao-c
*/
public Builder zoneId(String zoneId) {
this.zoneId = zoneId;
return this;
}
public DBNode build() {
return new DBNode(this);
}
}
}
}