com.aliyun.sdk.service.polardb20170801.models.UpgradeDBClusterVersionRequest 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 UpgradeDBClusterVersionRequest} extends {@link RequestModel}
*
* UpgradeDBClusterVersionRequest
*/
public class UpgradeDBClusterVersionRequest 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("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("TargetDBRevisionVersionCode")
private String targetDBRevisionVersionCode;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("TargetProxyRevisionVersionCode")
private String targetProxyRevisionVersionCode;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("UpgradeLabel")
private String upgradeLabel;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("UpgradePolicy")
private String upgradePolicy;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("UpgradeType")
private String upgradeType;
private UpgradeDBClusterVersionRequest(Builder builder) {
super(builder);
this.DBClusterId = builder.DBClusterId;
this.fromTimeService = builder.fromTimeService;
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.targetDBRevisionVersionCode = builder.targetDBRevisionVersionCode;
this.targetProxyRevisionVersionCode = builder.targetProxyRevisionVersionCode;
this.upgradeLabel = builder.upgradeLabel;
this.upgradePolicy = builder.upgradePolicy;
this.upgradeType = builder.upgradeType;
}
public static Builder builder() {
return new Builder();
}
public static UpgradeDBClusterVersionRequest 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 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 targetDBRevisionVersionCode
*/
public String getTargetDBRevisionVersionCode() {
return this.targetDBRevisionVersionCode;
}
/**
* @return targetProxyRevisionVersionCode
*/
public String getTargetProxyRevisionVersionCode() {
return this.targetProxyRevisionVersionCode;
}
/**
* @return upgradeLabel
*/
public String getUpgradeLabel() {
return this.upgradeLabel;
}
/**
* @return upgradePolicy
*/
public String getUpgradePolicy() {
return this.upgradePolicy;
}
/**
* @return upgradeType
*/
public String getUpgradeType() {
return this.upgradeType;
}
public static final class Builder extends Request.Builder {
private String DBClusterId;
private Boolean fromTimeService;
private String ownerAccount;
private Long ownerId;
private String plannedEndTime;
private String plannedStartTime;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String targetDBRevisionVersionCode;
private String targetProxyRevisionVersionCode;
private String upgradeLabel;
private String upgradePolicy;
private String upgradeType;
private Builder() {
super();
}
private Builder(UpgradeDBClusterVersionRequest request) {
super(request);
this.DBClusterId = request.DBClusterId;
this.fromTimeService = request.fromTimeService;
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.targetDBRevisionVersionCode = request.targetDBRevisionVersionCode;
this.targetProxyRevisionVersionCode = request.targetProxyRevisionVersionCode;
this.upgradeLabel = request.upgradeLabel;
this.upgradePolicy = request.upgradePolicy;
this.upgradeType = request.upgradeType;
}
/**
* The ID of cluster.
* This parameter is required.
*
* example:
* pc-****************
*/
public Builder DBClusterId(String DBClusterId) {
this.putQueryParameter("DBClusterId", DBClusterId);
this.DBClusterId = DBClusterId;
return this;
}
/**
* Specifies whether to immediately run the kernel upgrade task. Valid values:
*
* - false (default)
* - true
*
*
* This parameter is not required when you call the operation.
*
*
* example:
* false
*/
public Builder fromTimeService(Boolean fromTimeService) {
this.putQueryParameter("FromTimeService", fromTimeService);
this.fromTimeService = fromTimeService;
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 run the task that updates the kernel version of the cluster. 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 PlannedEndTime + 30 minutes
. For example, if you set PlannedStartTime
to 2021-01-14T09:00:00Z
and 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 to run the task that updates the kernel version of the cluster. Specify the time in the YYYY-MM-DDThh:mm:ssZ
format. The time must be in UTC.
*
*
*
* The earliest start time of the task can be a point in time within the next 72 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-17T09:00:00Z
.
*
* If you do not specify this parameter, the kernel update task runs immediately after you submit the request.
*
*
*
* example:
* 2021-01-14T09:00:00Z
*/
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 code of the db version to which you want to upgrade the cluster. You can call the DescribeDBClusterVersion operation to query the version code.
*
* example:
* 20230707
*/
public Builder targetDBRevisionVersionCode(String targetDBRevisionVersionCode) {
this.putQueryParameter("TargetDBRevisionVersionCode", targetDBRevisionVersionCode);
this.targetDBRevisionVersionCode = targetDBRevisionVersionCode;
return this;
}
/**
* The code of the proxy version to which you want to upgrade the cluster. You can call the DescribeDBClusterVersion operation to query the version code.
*
* example:
* 20240702
*/
public Builder targetProxyRevisionVersionCode(String targetProxyRevisionVersionCode) {
this.putQueryParameter("TargetProxyRevisionVersionCode", targetProxyRevisionVersionCode);
this.targetProxyRevisionVersionCode = targetProxyRevisionVersionCode;
return this;
}
/**
* The upgrade tag. The value is fixed as INNOVATE.
*
*
* - This parameter is applicable only when you upgrade PolarDB for MySQL 8.0.1 to PolarDB for MySQL 8.0.2.
* - If you specify this parameter, you must set
UpgradePolicy
to COLD.
*
*
*
* example:
* INNOVATE
*/
public Builder upgradeLabel(String upgradeLabel) {
this.putQueryParameter("UpgradeLabel", upgradeLabel);
this.upgradeLabel = upgradeLabel;
return this;
}
/**
* The engine version upgrade policy. Valid values:
*
* - HOT: hot upgrade.
* - COLD: cold upgrade. Only PolarDB for MySQL 8.0 Cluster Edition supports this upgrade method.
*
*
* example:
* HOT
*/
public Builder upgradePolicy(String upgradePolicy) {
this.putQueryParameter("UpgradePolicy", upgradePolicy);
this.upgradePolicy = upgradePolicy;
return this;
}
/**
* The update type. Valid values:
*
* - PROXY: specifies to upgrade PloarProxy.
* - DB: specifies to upgrade the kernel version.
* - ALL: specifies to upgrade both PloarProxy and kernel version.
*
*
* example:
* PROXY
*/
public Builder upgradeType(String upgradeType) {
this.putQueryParameter("UpgradeType", upgradeType);
this.upgradeType = upgradeType;
return this;
}
@Override
public UpgradeDBClusterVersionRequest build() {
return new UpgradeDBClusterVersionRequest(this);
}
}
}