com.aliyun.sdk.service.ecs20140526.models.DescribeRenewalPriceRequest 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 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 DescribeRenewalPriceRequest} extends {@link RequestModel}
*
* DescribeRenewalPriceRequest
*/
public class DescribeRenewalPriceRequest 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("ExpectedRenewDay")
private Integer expectedRenewDay;
@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("PriceUnit")
private String priceUnit;
@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("ResourceId")
@com.aliyun.core.annotation.Validation(required = true)
private String resourceId;
@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("ResourceType")
private String resourceType;
private DescribeRenewalPriceRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.expectedRenewDay = builder.expectedRenewDay;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.period = builder.period;
this.priceUnit = builder.priceUnit;
this.regionId = builder.regionId;
this.resourceId = builder.resourceId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.resourceType = builder.resourceType;
}
public static Builder builder() {
return new Builder();
}
public static DescribeRenewalPriceRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return expectedRenewDay
*/
public Integer getExpectedRenewDay() {
return this.expectedRenewDay;
}
/**
* @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 priceUnit
*/
public String getPriceUnit() {
return this.priceUnit;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return resourceId
*/
public String getResourceId() {
return this.resourceId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
/**
* @return resourceType
*/
public String getResourceType() {
return this.resourceType;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private Integer expectedRenewDay;
private String ownerAccount;
private Long ownerId;
private Integer period;
private String priceUnit;
private String regionId;
private String resourceId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String resourceType;
private Builder() {
super();
}
private Builder(DescribeRenewalPriceRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.expectedRenewDay = request.expectedRenewDay;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.period = request.period;
this.priceUnit = request.priceUnit;
this.regionId = request.regionId;
this.resourceId = request.resourceId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.resourceType = request.resourceType;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The synchronized expiration date. If you specify this parameter, the price for renewing a specified instance to the specified synchronized expiration date is queried. Valid values: 1 to 28.
* For information about how to synchronize the expiration dates of instances, see Synchronize the expiration dates of instances.
*
* The renewal period-related parameter pair (Period
and PeriodUnit
) and the ExpectedRenewDay
parameter are mutually exclusive.
*
*
* example:
* 5
*/
public Builder expectedRenewDay(Integer expectedRenewDay) {
this.putQueryParameter("ExpectedRenewDay", expectedRenewDay);
this.expectedRenewDay = expectedRenewDay;
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 renewal period. Valid values:
*
* - Valid values when the
PriceUnit
parameter is set to Month
: 1, 2, 3, 4, 5, 6, 7, 8, and 9.
* - Valid values when the
PriceUnit
parameter is set to Year
: 1, 2, 3.
*
* Default value: 1.
*
* The renewal period-related parameter pair (Period
and PeriodUnit
) and the ExpectedRenewDay
parameter are mutually exclusive.
*
*
* example:
* 1
*/
public Builder period(Integer period) {
this.putQueryParameter("Period", period);
this.period = period;
return this;
}
/**
* The unit of the renewal period. Valid values:
*
* - Month
* - Year
*
* Default value: Month.
*
* example:
* Month
*/
public Builder priceUnit(String priceUnit) {
this.putQueryParameter("PriceUnit", priceUnit);
this.priceUnit = priceUnit;
return this;
}
/**
* The region ID of the instance. You can call the DescribeRegions operation to query the most recent list of regions.
* This parameter is required.
*
* example:
* cn-hangzhou
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
return this;
}
/**
* The ID of the resource. If the ResourceType
parameter is set to instance
, the value of the ResourceId
parameter is the ID of the specified instance.``
* This parameter is required.
*
* example:
* i-bp1f2o4ldh8l29zv****
*/
public Builder resourceId(String resourceId) {
this.putQueryParameter("ResourceId", resourceId);
this.resourceId = resourceId;
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 type of the resource. Set the value to instance.
* Default value: instance.
*
* example:
* instance
*/
public Builder resourceType(String resourceType) {
this.putQueryParameter("ResourceType", resourceType);
this.resourceType = resourceType;
return this;
}
@Override
public DescribeRenewalPriceRequest build() {
return new DescribeRenewalPriceRequest(this);
}
}
}