All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.ecs20140526.models.CreateDemandRequest Maven / Gradle / Ivy

There is a newer version: 5.0.29
Show newest version
// 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 CreateDemandRequest} extends {@link RequestModel}
 *
 * 

CreateDemandRequest

*/ public class CreateDemandRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Amount") @com.aliyun.core.annotation.Validation(required = true) 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("DemandName") private String demandName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("EndTime") @com.aliyun.core.annotation.Validation(required = true) 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") @com.aliyun.core.annotation.Validation(required = true) 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") @com.aliyun.core.annotation.Validation(required = true) private Integer period; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("PeriodUnit") @com.aliyun.core.annotation.Validation(required = true) 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") @com.aliyun.core.annotation.Validation(required = true) private String startTime; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ZoneId") @com.aliyun.core.annotation.Validation(required = true) private String zoneId; private CreateDemandRequest(Builder builder) { super(builder); this.amount = builder.amount; this.clientToken = builder.clientToken; this.demandDescription = builder.demandDescription; 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 CreateDemandRequest 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 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 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(CreateDemandRequest request) { super(request); this.amount = request.amount; this.clientToken = request.clientToken; this.demandDescription = request.demandDescription; 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. */ 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 make sure that the token is unique among different requests. The value of `ClientToken` can contain only ASCII characters and cannot exceed 64 characters in length. For more information, see [How to ensure idempotence](~~25693~~). */ 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 and cannot start with [http:// or https://](http://https://。). */ public Builder demandDescription(String demandDescription) { this.putQueryParameter("DemandDescription", demandDescription); this.demandDescription = demandDescription; 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://](http://https://). It can contain letters, digits, colons (:), underscores (\_), periods (.), and hyphens (-). *

* * The default value is the instance type name. */ 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 8601](~~25696~~) 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 specified minute (mm). The value of EndTime is later than the value of Starttime. In most cases, the interval between the two times cannot be more than 10 days. */ 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: pay-as-you-go. This is the default value. */ public Builder instanceChargeType(String instanceChargeType) { this.putQueryParameter("InstanceChargeType", instanceChargeType); this.instanceChargeType = instanceChargeType; return this; } /** * The instance type. See [Instance families](~~25378~~) or call the [DescribeInstanceTypes](~~25620~~) operation to query the performance data of an instance type, or see [Select instance types](~~58291~~) to learn how to select instance types. */ 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. Valid values: *

* * * Valid values when the value of PeriodUnit is Day: 1, 2, 3, 4, 5, and 6. * * Valid values when the value of PeriodUnit is Week: 1, 2, 3, and 4. * * Valid values when the value of PeriodUnit is Month: 1, 2, 3, 4, 5, 6, 7, 8, 9, 12, 24, 36, 48, and 60. */ public Builder period(Integer period) { this.putQueryParameter("Period", period); this.period = period; return this; } /** * The unit of the subscription period. Valid values: *

* * * Day * * Week * * Month. This is the default value. */ 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](~~25609~~) operation to query the most recent region list. */ 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](~~25696~~) 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 specified minute (mm). The value of EndTime must be later than the value of Starttime. In most cases, the interval between the two times cannot be more than 10 days. */ 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](~~25610~~) 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. */ public Builder zoneId(String zoneId) { this.putQueryParameter("ZoneId", zoneId); this.zoneId = zoneId; return this; } @Override public CreateDemandRequest build() { return new CreateDemandRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy