com.aliyun.sdk.service.ecs20140526.models.PurchaseElasticityAssuranceRequest 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 PurchaseElasticityAssuranceRequest} extends {@link RequestModel}
*
* PurchaseElasticityAssuranceRequest
*/
public class PurchaseElasticityAssuranceRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("PrivatePoolOptions")
private PrivatePoolOptions privatePoolOptions;
@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")
@com.aliyun.core.annotation.Validation(required = true)
private String regionId;
@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("StartTime")
private String startTime;
private PurchaseElasticityAssuranceRequest(Builder builder) {
super(builder);
this.privatePoolOptions = builder.privatePoolOptions;
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.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.startTime = builder.startTime;
}
public static Builder builder() {
return new Builder();
}
public static PurchaseElasticityAssuranceRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return privatePoolOptions
*/
public PrivatePoolOptions getPrivatePoolOptions() {
return this.privatePoolOptions;
}
/**
* @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 resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
/**
* @return startTime
*/
public String getStartTime() {
return this.startTime;
}
public static final class Builder extends Request.Builder {
private PrivatePoolOptions privatePoolOptions;
private String clientToken;
private String ownerAccount;
private Long ownerId;
private Integer period;
private String periodUnit;
private String regionId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String startTime;
private Builder() {
super();
}
private Builder(PurchaseElasticityAssuranceRequest request) {
super(request);
this.privatePoolOptions = request.privatePoolOptions;
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.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.startTime = request.startTime;
}
/**
* PrivatePoolOptions.
*/
public Builder privatePoolOptions(PrivatePoolOptions privatePoolOptions) {
this.putQueryParameter("PrivatePoolOptions", privatePoolOptions);
this.privatePoolOptions = privatePoolOptions;
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.
*
* example:
* 123e4567-e89b-12d3-a456-426655440000
*/
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 term of the elasticity assurance. The unit of the term is determined by the PeriodUnit value. Valid values:
*
* - When the PeriodUnit parameter is set to Month, valid values are 1, 2, 3, 4, 5, 6, 7, 8, and 9.
* - When the PeriodUnit parameter is set to Year, valid values are 1, 2, 3, 4, and 5.
*
* Default value: 1.
*
* example:
* 1
*/
public Builder period(Integer period) {
this.putQueryParameter("Period", period);
this.period = period;
return this;
}
/**
* The unit of the term of the elasticity assurance. Valid values:
*
* - Month
* - Year
*
* Default value: Year.
*
* example:
* Month
*/
public Builder periodUnit(String periodUnit) {
this.putQueryParameter("PeriodUnit", periodUnit);
this.periodUnit = periodUnit;
return this;
}
/**
* The region ID of the elasticity assurance. You can call the DescribeRegions operation to query the most recent region list.
* This parameter is required.
*
* example:
* cn-hangzhou
*/
public Builder regionId(String regionId) {
this.putQueryParameter("RegionId", regionId);
this.regionId = regionId;
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 time when the elasticity assurance takes effect. The default value is the time when the elasticity assurance is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ
format. The time must be in UTC. For more information, see ISO 8601.
*
* example:
* 2024-06-18T00:00Z
*/
public Builder startTime(String startTime) {
this.putQueryParameter("StartTime", startTime);
this.startTime = startTime;
return this;
}
@Override
public PurchaseElasticityAssuranceRequest build() {
return new PurchaseElasticityAssuranceRequest(this);
}
}
/**
*
* {@link PurchaseElasticityAssuranceRequest} extends {@link TeaModel}
*
* PurchaseElasticityAssuranceRequest
*/
public static class PrivatePoolOptions extends TeaModel {
@com.aliyun.core.annotation.NameInMap("Id")
@com.aliyun.core.annotation.Validation(required = true)
private String id;
@com.aliyun.core.annotation.NameInMap("MatchCriteria")
private String matchCriteria;
private PrivatePoolOptions(Builder builder) {
this.id = builder.id;
this.matchCriteria = builder.matchCriteria;
}
public static Builder builder() {
return new Builder();
}
public static PrivatePoolOptions create() {
return builder().build();
}
/**
* @return id
*/
public String getId() {
return this.id;
}
/**
* @return matchCriteria
*/
public String getMatchCriteria() {
return this.matchCriteria;
}
public static final class Builder {
private String id;
private String matchCriteria;
/**
* The ID of the elasticity assurance.
* This parameter is required.
*
* example:
* eap-bp67acfmxazb4****
*/
public Builder id(String id) {
this.id = id;
return this;
}
/**
* The type of the private pool that is associated with the elasticity assurance. Valid values:
*
* - Open: open private pool. If you use the elasticity assurance to create ECS instances, the open private pool that is associated with the elasticity assurance is automatically matched. If no capacity is available in the open private pool, resources in the public pool are automatically used to create the ECS instances.
* - Target: targeted private pool. If you use the elasticity assurance to create ECS instances, the targeted private pool that is associated with the elasticity assurance is automatically matched. If no capacity is available in the private pool, the ECS instances fail to be created.
*
* Default value: Open.
*
* example:
* Open
*/
public Builder matchCriteria(String matchCriteria) {
this.matchCriteria = matchCriteria;
return this;
}
public PrivatePoolOptions build() {
return new PrivatePoolOptions(this);
}
}
}
}