com.aliyun.sdk.service.ecs20140526.models.ModifyReservedInstanceAutoRenewAttributeRequest 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 ModifyReservedInstanceAutoRenewAttributeRequest} extends {@link RequestModel}
*
* ModifyReservedInstanceAutoRenewAttributeRequest
*/
public class ModifyReservedInstanceAutoRenewAttributeRequest 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("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")
@com.aliyun.core.annotation.Validation(required = true)
private String regionId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("RenewalStatus")
private String renewalStatus;
@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 ModifyReservedInstanceAutoRenewAttributeRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.period = builder.period;
this.periodUnit = builder.periodUnit;
this.regionId = builder.regionId;
this.renewalStatus = builder.renewalStatus;
this.reservedInstanceId = builder.reservedInstanceId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
}
public static Builder builder() {
return new Builder();
}
public static ModifyReservedInstanceAutoRenewAttributeRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @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 renewalStatus
*/
public String getRenewalStatus() {
return this.renewalStatus;
}
/**
* @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 String ownerAccount;
private Long ownerId;
private Integer period;
private String periodUnit;
private String regionId;
private String renewalStatus;
private java.util.List < String > reservedInstanceId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private Builder() {
super();
}
private Builder(ModifyReservedInstanceAutoRenewAttributeRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.period = request.period;
this.periodUnit = request.periodUnit;
this.regionId = request.regionId;
this.renewalStatus = request.renewalStatus;
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;
}
/**
* 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 auto-renewal cycle.
*
*
* Valid values: 1 and 3.
*/
public Builder period(Integer period) {
this.putQueryParameter("Period", period);
this.period = period;
return this;
}
/**
* The unit of the auto-renewal duration.
*
*
* Valid values: Year and Month.
*/
public Builder periodUnit(String periodUnit) {
this.putQueryParameter("PeriodUnit", periodUnit);
this.periodUnit = periodUnit;
return this;
}
/**
* The region ID of the reserved instances. You can call the [DescribeRegions](~~25609~~) operation to query the most recent region list.
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* Specifies whether to automatically renew the reserved instances. Valid values:
*
*
* * AutoRenewal: automatically renews the reserved instances.
* * Normal: manually renews the reserved instances.
*/
public Builder renewalStatus(String renewalStatus) {
this.putQueryParameter("RenewalStatus", renewalStatus);
this.renewalStatus = renewalStatus;
return this;
}
/**
* The IDs of the reserved instances.
*/
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 ModifyReservedInstanceAutoRenewAttributeRequest build() {
return new ModifyReservedInstanceAutoRenewAttributeRequest(this);
}
}
}