
com.aliyun.sdk.service.polardb20170801.models.ModifyDBClusterPrimaryZoneRequest 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 darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link ModifyDBClusterPrimaryZoneRequest} extends {@link RequestModel}
*
* ModifyDBClusterPrimaryZoneRequest
*/
public class ModifyDBClusterPrimaryZoneRequest extends Request {
@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("FromTimeService")
private Boolean fromTimeService;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("IsSwitchOverForDisaster")
private String isSwitchOverForDisaster;
@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("ResourceOwnerAccount")
private String resourceOwnerAccount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ResourceOwnerId")
private Long resourceOwnerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("VPCId")
private String VPCId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("VSwitchId")
private String vSwitchId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ZoneId")
@com.aliyun.core.annotation.Validation(required = true)
private String zoneId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ZoneType")
private String zoneType;
private ModifyDBClusterPrimaryZoneRequest(Builder builder) {
super(builder);
this.DBClusterId = builder.DBClusterId;
this.fromTimeService = builder.fromTimeService;
this.isSwitchOverForDisaster = builder.isSwitchOverForDisaster;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.plannedEndTime = builder.plannedEndTime;
this.plannedStartTime = builder.plannedStartTime;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.VPCId = builder.VPCId;
this.vSwitchId = builder.vSwitchId;
this.zoneId = builder.zoneId;
this.zoneType = builder.zoneType;
}
public static Builder builder() {
return new Builder();
}
public static ModifyDBClusterPrimaryZoneRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return DBClusterId
*/
public String getDBClusterId() {
return this.DBClusterId;
}
/**
* @return fromTimeService
*/
public Boolean getFromTimeService() {
return this.fromTimeService;
}
/**
* @return isSwitchOverForDisaster
*/
public String getIsSwitchOverForDisaster() {
return this.isSwitchOverForDisaster;
}
/**
* @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 resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
/**
* @return VPCId
*/
public String getVPCId() {
return this.VPCId;
}
/**
* @return vSwitchId
*/
public String getVSwitchId() {
return this.vSwitchId;
}
/**
* @return zoneId
*/
public String getZoneId() {
return this.zoneId;
}
/**
* @return zoneType
*/
public String getZoneType() {
return this.zoneType;
}
public static final class Builder extends Request.Builder {
private String DBClusterId;
private Boolean fromTimeService;
private String isSwitchOverForDisaster;
private String ownerAccount;
private Long ownerId;
private String plannedEndTime;
private String plannedStartTime;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String VPCId;
private String vSwitchId;
private String zoneId;
private String zoneType;
private Builder() {
super();
}
private Builder(ModifyDBClusterPrimaryZoneRequest request) {
super(request);
this.DBClusterId = request.DBClusterId;
this.fromTimeService = request.fromTimeService;
this.isSwitchOverForDisaster = request.isSwitchOverForDisaster;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.plannedEndTime = request.plannedEndTime;
this.plannedStartTime = request.plannedStartTime;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.VPCId = request.VPCId;
this.vSwitchId = request.vSwitchId;
this.zoneId = request.zoneId;
this.zoneType = request.zoneType;
}
/**
* The ID of the cluster.
*
*
* > You can call the [DescribeDBClusters](~~173433~~) operation to query information about all clusters that are deployed in a specified region, such as the cluster ID.
*/
public Builder DBClusterId(String DBClusterId) {
this.putQueryParameter("DBClusterId", DBClusterId);
this.DBClusterId = DBClusterId;
return this;
}
/**
* Specifies whether to change the primary zone immediately. Valid values:
*
*
* * false (default): changes the primary zone as scheduled.
* * true: changes the primary zone immediately.
*/
public Builder fromTimeService(Boolean fromTimeService) {
this.putQueryParameter("FromTimeService", fromTimeService);
this.fromTimeService = fromTimeService;
return this;
}
/**
* Specifies whether to switch back to the original primary zone.
*
*
* * true: switches back to the original primary zone.
* * false: does not switch back to the original primary zone.
*/
public Builder isSwitchOverForDisaster(String isSwitchOverForDisaster) {
this.putQueryParameter("IsSwitchOverForDisaster", isSwitchOverForDisaster);
this.isSwitchOverForDisaster = isSwitchOverForDisaster;
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 to switch the primary zone within the scheduled time period. Specify the time in the ISO 8601 standard in the `YYYY-MM-DDThh:mm:ssZ` format. The time must be in UTC.
*
*
* > * The latest start time must be at least 30 minutes later than the earliest start time.
* >* If you specify the `PlannedStartTime` parameter but do not specify the PlannedEndTime parameter, the latest start time of the task is set to a value that is calculated by `the value of the PlannedEndTime parameter + 30 minutes` by default. For example, if you set the `PlannedStartTime` parameter to `2021-01-14T09:00:00Z` and you do not specify the PlannedEndTime parameter, the latest start time of the task is set to `2021-01-14T09:30:00Z`.
*/
public Builder plannedEndTime(String plannedEndTime) {
this.putQueryParameter("PlannedEndTime", plannedEndTime);
this.plannedEndTime = plannedEndTime;
return this;
}
/**
* The start time to change the primary zone within the scheduled time period. Specify the time in the ISO 8601 standard in the `YYYY-MM-DDThh:mm:ssZ` format. The time must be in UTC.
*
*
* > * The start time of the 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 from `2021-01-14T09:00:00Z` to `2021-01-15T09:00:00Z`.
* >* If you leave this parameter empty, the primary zone is immediately changed.
*/
public Builder plannedStartTime(String plannedStartTime) {
this.putQueryParameter("PlannedStartTime", plannedStartTime);
this.plannedStartTime = plannedStartTime;
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;
}
/**
* The virtual private cloud (VPC) ID of the destination primary zone.
*/
public Builder VPCId(String VPCId) {
this.putQueryParameter("VPCId", VPCId);
this.VPCId = VPCId;
return this;
}
/**
* The ID of the vSwitch in the destination primary zone.
*
*
* > * For a PolarDB for PostgreSQL (Compatible with Oracle) cluster or a PolarDB for PostgreSQL cluster, this parameter is required.
* >* For a PolarDB for MySQL cluster, the default vSwitch is used if no vSwitches are created in the destination zone. If a vSwitch is in the destination zone, this parameter is required.
*/
public Builder vSwitchId(String vSwitchId) {
this.putQueryParameter("VSwitchId", vSwitchId);
this.vSwitchId = vSwitchId;
return this;
}
/**
* The ID of the destination primary zone.
*
*
* > You can call the DescribeRegions operation to query available zones.[](~~98041~~)
*/
public Builder zoneId(String zoneId) {
this.putQueryParameter("ZoneId", zoneId);
this.zoneId = zoneId;
return this;
}
/**
* The type of the zone. Valid values:
*
*
* * **Primary**: primary zone
* * **Standby**: secondary zone
*/
public Builder zoneType(String zoneType) {
this.putQueryParameter("ZoneType", zoneType);
this.zoneType = zoneType;
return this;
}
@Override
public ModifyDBClusterPrimaryZoneRequest build() {
return new ModifyDBClusterPrimaryZoneRequest(this);
}
}
}