com.aliyun.sdk.service.ecs20140526.models.ModifyDemandRequest 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 ModifyDemandRequest} extends {@link RequestModel}
*
* ModifyDemandRequest
*/
public class ModifyDemandRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("Amount")
private Integer amount;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ClientToken")
private String clientToken;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DemandDescription")
private String demandDescription;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DemandId")
@com.aliyun.core.annotation.Validation(required = true)
private String demandId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DemandName")
private String demandName;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("EndTime")
private String endTime;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceChargeType")
private String instanceChargeType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceType")
private String instanceType;
@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;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ZoneId")
private String zoneId;
private ModifyDemandRequest(Builder builder) {
super(builder);
this.amount = builder.amount;
this.clientToken = builder.clientToken;
this.demandDescription = builder.demandDescription;
this.demandId = builder.demandId;
this.demandName = builder.demandName;
this.endTime = builder.endTime;
this.instanceChargeType = builder.instanceChargeType;
this.instanceType = builder.instanceType;
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;
this.zoneId = builder.zoneId;
}
public static Builder builder() {
return new Builder();
}
public static ModifyDemandRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return amount
*/
public Integer getAmount() {
return this.amount;
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return demandDescription
*/
public String getDemandDescription() {
return this.demandDescription;
}
/**
* @return demandId
*/
public String getDemandId() {
return this.demandId;
}
/**
* @return demandName
*/
public String getDemandName() {
return this.demandName;
}
/**
* @return endTime
*/
public String getEndTime() {
return this.endTime;
}
/**
* @return instanceChargeType
*/
public String getInstanceChargeType() {
return this.instanceChargeType;
}
/**
* @return instanceType
*/
public String getInstanceType() {
return this.instanceType;
}
/**
* @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;
}
/**
* @return zoneId
*/
public String getZoneId() {
return this.zoneId;
}
public static final class Builder extends Request.Builder {
private Integer amount;
private String clientToken;
private String demandDescription;
private String demandId;
private String demandName;
private String endTime;
private String instanceChargeType;
private String instanceType;
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 String zoneId;
private Builder() {
super();
}
private Builder(ModifyDemandRequest request) {
super(request);
this.amount = request.amount;
this.clientToken = request.clientToken;
this.demandDescription = request.demandDescription;
this.demandId = request.demandId;
this.demandName = request.demandName;
this.endTime = request.endTime;
this.instanceChargeType = request.instanceChargeType;
this.instanceType = request.instanceType;
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;
this.zoneId = request.zoneId;
}
/**
* The number of instances. Valid values: 1 to 100000.
*
* example:
* 1
*/
public Builder amount(Integer amount) {
this.putQueryParameter("Amount", amount);
this.amount = amount;
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 only contain ASCII characters and cannot exceed 64 characters in length. For more information, see How to ensure idempotence.
*
* example:
* 473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
*/
public Builder clientToken(String clientToken) {
this.putQueryParameter("ClientToken", clientToken);
this.clientToken = clientToken;
return this;
}
/**
* The description of the demand. The description must be 2 to 256 characters in length. It cannot start with http:// or https://.
*
* example:
* testDemandDescription
*/
public Builder demandDescription(String demandDescription) {
this.putQueryParameter("DemandDescription", demandDescription);
this.demandDescription = demandDescription;
return this;
}
/**
* The ID of the demand that you want to modify.
* This parameter is required.
*
* example:
* ed-bp11n21kq00sl71p****
*/
public Builder demandId(String demandId) {
this.putQueryParameter("DemandId", demandId);
this.demandId = demandId;
return this;
}
/**
* The name of the demand. The name must be 2 to 128 characters in length. The name must start with a letter but cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (_), periods (.), and hyphens (-).
* The default value is the instance type name.
*
* example:
* testDemandName
*/
public Builder demandName(String demandName) {
this.putQueryParameter("DemandName", demandName);
this.demandName = demandName;
return this;
}
/**
* The end time of the subscription period. Specify the time in the ISO 8601standard in the yyyy-MM-dd HH:mm:ss format. The time must be in UTC.
* If the value of seconds (ss) is not 00, the time is automatically set to the beginning of the minute (mm).
* The value of EndTime must be later than the value of StartTime.
* in most cases, the interval between StartTime and EndTime cannot be more than 10 days.
*
* example:
* 2019-12-10 12:05:00
*/
public Builder endTime(String endTime) {
this.putQueryParameter("EndTime", endTime);
this.endTime = endTime;
return this;
}
/**
* The billing method of the instance. Valid values:
*
* - PrePaid: subscription
* - PostPaid (default): pay-as-you-go
*
*
* example:
* PrePaid
*/
public Builder instanceChargeType(String instanceChargeType) {
this.putQueryParameter("InstanceChargeType", instanceChargeType);
this.instanceChargeType = instanceChargeType;
return this;
}
/**
* The instance type. For more information, see Instance families. You can also call the DescribeInstanceTypes operation to query the performance data of the specified instance type. To learn how to select instance types, see Select instance types.
*
* example:
* ecs.c6.large
*/
public Builder instanceType(String instanceType) {
this.putQueryParameter("InstanceType", instanceType);
this.instanceType = instanceType;
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 subscription period of the resource. Unit: month. You must specify this parameter. This parameter is valid only if you set InstanceChargeType
to PrePaid. Valid values:
*
* - Valid values when PeriodUnit is set to Week: 1, 2, 3, and 4.
* - Valid values when PeriodUnit is set to Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60.
*
*
* example:
* 1
*/
public Builder period(Integer period) {
this.putQueryParameter("Period", period);
this.period = period;
return this;
}
/**
* The unit of the subscription period of the resource. Valid values:
*
* - Day
* - Week
* - Month. This is the default value.
*
*
* example:
* Month
*/
public Builder periodUnit(String periodUnit) {
this.putQueryParameter("PeriodUnit", periodUnit);
this.periodUnit = periodUnit;
return this;
}
/**
* The region ID of the instance. 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 start time of the subscription period. Specify the time in the ISO 8601 standard in the yyyy-MM-dd HH:mm:ss format. The time must be in UTC.
* If the value of seconds (ss) is not 00, the time is automatically set to the beginning of the minute (mm).
* The value of EndTime must be later than the value of StartTime.
* In most cases, the interval between StartTime and EndTime cannot be more than 10 days.
*
* example:
* 2019-12-01 12:05:00
*/
public Builder startTime(String startTime) {
this.putQueryParameter("StartTime", startTime);
this.startTime = startTime;
return this;
}
/**
* The zone ID of the instance. You can call the DescribeZones operation to query the most recent zone list.
* This parameter is empty by default. If you leave this parameter empty, the system randomly selects a zone.
*
* example:
* cn-hangzhou-g
*/
public Builder zoneId(String zoneId) {
this.putQueryParameter("ZoneId", zoneId);
this.zoneId = zoneId;
return this;
}
@Override
public ModifyDemandRequest build() {
return new ModifyDemandRequest(this);
}
}
}