com.aliyun.sdk.service.ecs20140526.models.RenewReservedInstancesRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ecs20140526 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link RenewReservedInstancesRequest} extends {@link RequestModel}
*
* RenewReservedInstancesRequest
*/
public class RenewReservedInstancesRequest extends Request {
@com.aliyun.core.annotation.Host
@com.aliyun.core.annotation.NameInMap("SourceRegionId")
private String sourceRegionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("AutoRenew")
private Boolean autoRenew;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("AutoRenewPeriod")
private Integer autoRenewPeriod;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ClientToken")
private String clientToken;
@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("Period")
private Integer period;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("PeriodUnit")
private String periodUnit;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("RegionId")
private String regionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ReservedInstanceId")
private java.util.List < String > reservedInstanceId;
@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 RenewReservedInstancesRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.autoRenew = builder.autoRenew;
this.autoRenewPeriod = builder.autoRenewPeriod;
this.clientToken = builder.clientToken;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.period = builder.period;
this.periodUnit = builder.periodUnit;
this.regionId = builder.regionId;
this.reservedInstanceId = builder.reservedInstanceId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
}
public static Builder builder() {
return new Builder();
}
public static RenewReservedInstancesRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return autoRenew
*/
public Boolean getAutoRenew() {
return this.autoRenew;
}
/**
* @return autoRenewPeriod
*/
public Integer getAutoRenewPeriod() {
return this.autoRenewPeriod;
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return period
*/
public Integer getPeriod() {
return this.period;
}
/**
* @return periodUnit
*/
public String getPeriodUnit() {
return this.periodUnit;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return reservedInstanceId
*/
public java.util.List < String > getReservedInstanceId() {
return this.reservedInstanceId;
}
/**
* @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 sourceRegionId;
private Boolean autoRenew;
private Integer autoRenewPeriod;
private String clientToken;
private String ownerAccount;
private Long ownerId;
private Integer period;
private String periodUnit;
private String regionId;
private java.util.List < String > reservedInstanceId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private Builder() {
super();
}
private Builder(RenewReservedInstancesRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.autoRenew = request.autoRenew;
this.autoRenewPeriod = request.autoRenewPeriod;
this.clientToken = request.clientToken;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.period = request.period;
this.periodUnit = request.periodUnit;
this.regionId = request.regionId;
this.reservedInstanceId = request.reservedInstanceId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The auto-renewal duration. Unit: months. This parameter takes effect only when AutoRenew is set to true.
*
*
* Valid values: 12 and 36. Default value: 12.
*/
public Builder autoRenew(Boolean autoRenew) {
this.putQueryParameter("AutoRenew", autoRenew);
this.autoRenew = autoRenew;
return this;
}
/**
* The request ID.
*/
public Builder autoRenewPeriod(Integer autoRenewPeriod) {
this.putQueryParameter("AutoRenewPeriod", autoRenewPeriod);
this.autoRenewPeriod = autoRenewPeriod;
return this;
}
/**
* Specifies whether to enable auto-renewal for the reserved instance. Valid values:
*
*
* * true
* * false
*
* Default value: false.
*/
public Builder clientToken(String clientToken) {
this.putQueryParameter("ClientToken", clientToken);
this.clientToken = clientToken;
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 unit of the validity period of the reserved instance.
*
*
* Set the value to Year.
*/
public Builder period(Integer period) {
this.putQueryParameter("Period", period);
this.period = period;
return this;
}
/**
* The client token that is used to ensure the idempotence of the request. You can use the client to generate the token, but you must make sure that the token is unique among different requests. The **token** can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~).
*/
public Builder periodUnit(String periodUnit) {
this.putQueryParameter("PeriodUnit", periodUnit);
this.periodUnit = periodUnit;
return this;
}
/**
* The validity period of the reserved instance.
*
*
* Valid values: 1 and 3.
*
* Default value: 1.
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* The ID of the reserved instance. You can call the [DescribeReservedInstances](~~100065~~) operation to query the IDs of reserved instances that you purchased.
*
*
* You can specify up to 10 IDs of reserved instances in a single request.
*/
public Builder reservedInstanceId(java.util.List < String > reservedInstanceId) {
this.putQueryParameter("ReservedInstanceId", reservedInstanceId);
this.reservedInstanceId = reservedInstanceId;
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 RenewReservedInstancesRequest build() {
return new RenewReservedInstancesRequest(this);
}
}
}