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

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

PurchaseStorageCapacityUnitRequest

*/ public class PurchaseStorageCapacityUnitRequest extends Request { @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Amount") @com.aliyun.core.annotation.Validation(maximum = 20, minimum = 1) private Integer amount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Capacity") @com.aliyun.core.annotation.Validation(required = true) private Integer capacity; @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("FromApp") private String fromApp; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Name") private String name; @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("Tag") private java.util.List < Tag> tag; private PurchaseStorageCapacityUnitRequest(Builder builder) { super(builder); this.amount = builder.amount; this.capacity = builder.capacity; this.clientToken = builder.clientToken; this.description = builder.description; this.fromApp = builder.fromApp; this.name = builder.name; 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.tag = builder.tag; } public static Builder builder() { return new Builder(); } public static PurchaseStorageCapacityUnitRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return amount */ public Integer getAmount() { return this.amount; } /** * @return capacity */ public Integer getCapacity() { return this.capacity; } /** * @return clientToken */ public String getClientToken() { return this.clientToken; } /** * @return description */ public String getDescription() { return this.description; } /** * @return fromApp */ public String getFromApp() { return this.fromApp; } /** * @return name */ public String getName() { return this.name; } /** * @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 tag */ public java.util.List < Tag> getTag() { return this.tag; } public static final class Builder extends Request.Builder { private Integer amount; private Integer capacity; private String clientToken; private String description; private String fromApp; private String name; 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 java.util.List < Tag> tag; private Builder() { super(); } private Builder(PurchaseStorageCapacityUnitRequest request) { super(request); this.amount = request.amount; this.capacity = request.capacity; this.clientToken = request.clientToken; this.description = request.description; this.fromApp = request.fromApp; this.name = request.name; 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.tag = request.tag; } /** * The number of SCUs that you want to purchase. Valid values: 1 to 20. *

* * Default value: 1. */ public Builder amount(Integer amount) { this.putQueryParameter("Amount", amount); this.amount = amount; return this; } /** * The capacity of the SCU. Unit: GiB. Valid values: 20, 40, 100, 200, 500, 1024, 2048, 5210, 10240, 20480, and 52100. */ public Builder capacity(Integer capacity) { this.putQueryParameter("Capacity", capacity); this.capacity = capacity; 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 across requests. The `token` 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 SCU. The description must be 2 to 256 characters in length and cannot start with `http://` or `https://`. */ public Builder description(String description) { this.putQueryParameter("Description", description); this.description = description; return this; } /** * The source of the request. The value is automatically set to OpenAPI and does not need to be changed. Default value: OpenAPI. */ public Builder fromApp(String fromApp) { this.putQueryParameter("FromApp", fromApp); this.fromApp = fromApp; return this; } /** * The name of the SCU. 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 name(String name) { this.putQueryParameter("Name", name); this.name = name; 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 SCU. Valid values: *

* * * Valid values when PeriodUnit is set to Month: 1, 2, 3, and 6. * * Valid values when PeriodUnit is set to Year: 1, 3, and 5. * * 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 SCU. Valid values: *

* * * Month * * Year * * Default value: Month. */ public Builder periodUnit(String periodUnit) { this.putQueryParameter("PeriodUnit", periodUnit); this.periodUnit = periodUnit; return this; } /** * The ID of the region in which to purchase the SCU. The purchased SCU can offset the bills of pay-as-you-go disks that reside in the specified region. 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 time at which the SCU takes effect. It can be up to six months later than the time at which the SCU is created. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. *

* * This parameter is empty by default. If this parameter is left empty, the SCU takes effect immediately after it is created. */ public Builder startTime(String startTime) { this.putQueryParameter("StartTime", startTime); this.startTime = startTime; return this; } /** * The list of tags. */ public Builder tag(java.util.List < Tag> tag) { this.putQueryParameter("Tag", tag); this.tag = tag; return this; } @Override public PurchaseStorageCapacityUnitRequest build() { return new PurchaseStorageCapacityUnitRequest(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 to add to the SCU. N is the identifier of the tag key that you specify. Valid values of N: 1 to 20. The tag key cannot be an empty string. It can be up to 128 characters in length and cannot start with `acs:` or `aliyun`. It cannot contain `http://` or `https://`. */ public Builder key(String key) { this.key = key; return this; } /** * The value of tag N. N is the identifier of the tag value that you specify and corresponds to the N in `Tag.N.Key`. Valid values: 1 to 20. The tag value can be an empty string. It can be up to 128 characters in length. It cannot start with `acs:` or contain `http://` or `https://`. */ public Builder value(String value) { this.value = value; return this; } public Tag build() { return new Tag(this); } } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy