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

com.aliyun.sdk.service.ecs20140526.models.PurchaseReservedInstancesOfferingRequest 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 PurchaseReservedInstancesOfferingRequest} extends {@link RequestModel}
 *
 * 

PurchaseReservedInstancesOfferingRequest

*/ public class PurchaseReservedInstancesOfferingRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoRenew") private Boolean autoRenew; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("AutoRenewPeriod") private Integer autoRenewPeriod; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ClientToken") private String clientToken; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Description") private String description; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceAmount") @com.aliyun.core.annotation.Validation(maximum = 100, minimum = 1) private Integer instanceAmount; @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("OfferingType") private String offeringType; @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("Platform") private String platform; @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("ReservedInstanceName") private String reservedInstanceName; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceGroupId") private String resourceGroupId; @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("Scope") private String scope; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Tag") private java.util.List < Tag> tag; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ZoneId") private String zoneId; private PurchaseReservedInstancesOfferingRequest(Builder builder) { super(builder); this.autoRenew = builder.autoRenew; this.autoRenewPeriod = builder.autoRenewPeriod; this.clientToken = builder.clientToken; this.description = builder.description; this.instanceAmount = builder.instanceAmount; this.instanceType = builder.instanceType; this.offeringType = builder.offeringType; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.period = builder.period; this.periodUnit = builder.periodUnit; this.platform = builder.platform; this.regionId = builder.regionId; this.reservedInstanceName = builder.reservedInstanceName; this.resourceGroupId = builder.resourceGroupId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.scope = builder.scope; this.tag = builder.tag; this.zoneId = builder.zoneId; } public static Builder builder() { return new Builder(); } public static PurchaseReservedInstancesOfferingRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return autoRenew */ public Boolean getAutoRenew() { return this.autoRenew; } /** * @return autoRenewPeriod */ public Integer getAutoRenewPeriod() { return this.autoRenewPeriod; } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return description */ public String getDescription() { return this.description; } /** * @return instanceAmount */ public Integer getInstanceAmount() { return this.instanceAmount; } /** * @return instanceType */ public String getInstanceType() { return this.instanceType; } /** * @return offeringType */ public String getOfferingType() { return this.offeringType; } /** * @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 platform */ public String getPlatform() { return this.platform; } /** * @return regionId */ public String getRegionId() { return this.regionId; } /** * @return reservedInstanceName */ public String getReservedInstanceName() { return this.reservedInstanceName; } /** * @return resourceGroupId */ public String getResourceGroupId() { return this.resourceGroupId; } /** * @return resourceOwnerAccount */ public String getResourceOwnerAccount() { return this.resourceOwnerAccount; } /** * @return resourceOwnerId */ public Long getResourceOwnerId() { return this.resourceOwnerId; } /** * @return scope */ public String getScope() { return this.scope; } /** * @return tag */ public java.util.List < Tag> getTag() { return this.tag; } /** * @return zoneId */ public String getZoneId() { return this.zoneId; } public static final class Builder extends Request.Builder { private Boolean autoRenew; private Integer autoRenewPeriod; private String clientToken; private String description; private Integer instanceAmount; private String instanceType; private String offeringType; private String ownerAccount; private Long ownerId; private Integer period; private String periodUnit; private String platform; private String regionId; private String reservedInstanceName; private String resourceGroupId; private String resourceOwnerAccount; private Long resourceOwnerId; private String scope; private java.util.List < Tag> tag; private String zoneId; private Builder() { super(); } private Builder(PurchaseReservedInstancesOfferingRequest request) { super(request); this.autoRenew = request.autoRenew; this.autoRenewPeriod = request.autoRenewPeriod; this.clientToken = request.clientToken; this.description = request.description; this.instanceAmount = request.instanceAmount; this.instanceType = request.instanceType; this.offeringType = request.offeringType; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.period = request.period; this.periodUnit = request.periodUnit; this.platform = request.platform; this.regionId = request.regionId; this.reservedInstanceName = request.reservedInstanceName; this.resourceGroupId = request.resourceGroupId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.scope = request.scope; this.tag = request.tag; this.zoneId = request.zoneId; } /** * Specifies whether to enable auto-renewal for the reserved instance. Default value: false. Valid values: *

* * true: enables auto-renewal for the reserved instance. false: does not enable auto-renewal for the reserved instance. */ public Builder autoRenew(Boolean autoRenew) { this.putQueryParameter("AutoRenew", autoRenew); this.autoRenew = autoRenew; return this; } /** * The auto-renewal term of the reserved instance. Unit: months. This parameter takes effect only when AutoRenew is set to true. *

* * Valid values: 12 and 36. * * Default value when PeriodUnit is set to Year: 12. */ public Builder autoRenewPeriod(Integer autoRenewPeriod) { this.putQueryParameter("AutoRenewPeriod", autoRenewPeriod); this.autoRenewPeriod = autoRenewPeriod; 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 **ClientToken** value 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 reserved instance. The description can be 2 to 256 characters in length and cannot start with [http:// or https://](http://https://。). *

* * This parameter is left empty by default. */ public Builder description(String description) { this.putQueryParameter("Description", description); this.description = description; return this; } /** * The number of pay-as-you-go instances of the same instance type that the reserved instance can match at the same time. Valid values: 1 to 50. *

* * For example, if you set the InstanceAmount parameter to 3 and the InstanceType parameter to ecs.g5.large, the reserved instance can be matched three ecs.g5.large pay-as-you-go instances at the same time. */ public Builder instanceAmount(Integer instanceAmount) { this.putQueryParameter("InstanceAmount", instanceAmount); this.instanceAmount = instanceAmount; return this; } /** * The type of the reserved instance. For more information, see [Instance family](~~25378~~). */ public Builder instanceType(String instanceType) { this.putQueryParameter("InstanceType", instanceType); this.instanceType = instanceType; return this; } /** * The payment option of the reserved instance. Valid values: *

* * * No Upfront * * Partial Upfront * * All Upfront * * Default value: All Upfront. */ public Builder offeringType(String offeringType) { this.putQueryParameter("OfferingType", offeringType); this.offeringType = offeringType; 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 validity period of the reserved instance. *

* * Valid values: 1 and 3. * * Default value: 1. */ public Builder period(Integer period) { this.putQueryParameter("Period", period); this.period = period; return this; } /** * The unit of the validity period of the reserved instance. *

* * Valid value: Year. * * Default value: Year. */ public Builder periodUnit(String periodUnit) { this.putQueryParameter("PeriodUnit", periodUnit); this.periodUnit = periodUnit; return this; } /** * The operating system of the image used by the instance. Valid values: *

* * * Windows: Windows Server operating system * * Linux: Linux and UNIX-like operating system * * Default value: Linux. */ public Builder platform(String platform) { this.putQueryParameter("Platform", platform); this.platform = platform; 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; } /** * The name of the reserved instance. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. The name can contain letters, digits, colons (:), underscores (\_), and hyphens (-). */ public Builder reservedInstanceName(String reservedInstanceName) { this.putQueryParameter("ReservedInstanceName", reservedInstanceName); this.reservedInstanceName = reservedInstanceName; return this; } /** * The ID of the resource group. */ public Builder resourceGroupId(String resourceGroupId) { this.putQueryParameter("ResourceGroupId", resourceGroupId); this.resourceGroupId = resourceGroupId; 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 scope of reserved instance N. Valid values: *

* * * Region: regional * * Zone: zonal * * Default value: Region. */ public Builder scope(String scope) { this.putQueryParameter("Scope", scope); this.scope = scope; return this; } /** * The list of tags. */ public Builder tag(java.util.List < Tag> tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } /** * The zone ID of the instance. This parameter is required when `Scope` is set to `Zone`. You can call the [DescribeZones](~~25610~~) operation to query the most recent zone list. */ public Builder zoneId(String zoneId) { this.putQueryParameter("ZoneId", zoneId); this.zoneId = zoneId; return this; } @Override public PurchaseReservedInstancesOfferingRequest build() { return new PurchaseReservedInstancesOfferingRequest(this); } } public static class Tag extends TeaModel { @com.aliyun.core.annotation.NameInMap("Key") private String key; @com.aliyun.core.annotation.NameInMap("Value") private String value; private Tag(Builder builder) { this.key = builder.key; this.value = builder.value; } public static Builder builder() { return new Builder(); } public static Tag create() { return builder().build(); } /** * @return key */ public String getKey() { return this.key; } /** * @return value */ public String getValue() { return this.value; } public static final class Builder { private String key; private String value; /** * The key of tag N of the reserved instance. Valid values of N: 1 to 20. The tag key cannot be an empty string. The tag key can be up to 128 characters in length and cannot contain `http://` or `https://`. It cannot start with `acs:` or `aliyun`. */ public Builder key(String key) { this.key = key; return this; } /** * The value of tag N of the reserved instance. Valid values of N: 1 to 20. The tag value cannot be an empty string. The tag value can be up to 128 characters in length and cannot contain `http://` or `https://`. It cannot start with `acs:` or `aliyun`. */ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy