com.aliyun.sdk.service.ecs20140526.models.DescribeDemandsRequest 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 DescribeDemandsRequest} extends {@link RequestModel}
*
* DescribeDemandsRequest
*/
public class DescribeDemandsRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DemandId")
private String demandId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DemandStatus")
private java.util.List < String > demandStatus;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DemandType")
private String demandType;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DryRun")
private Boolean dryRun;
@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("InstanceTypeFamily")
private String instanceTypeFamily;
@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("PageNumber")
private Integer pageNumber;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("PageSize")
@com.aliyun.core.annotation.Validation(maximum = 100, minimum = 1)
private Integer pageSize;
@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("Tag")
private java.util.List < Tag> tag;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ZoneId")
private String zoneId;
private DescribeDemandsRequest(Builder builder) {
super(builder);
this.demandId = builder.demandId;
this.demandStatus = builder.demandStatus;
this.demandType = builder.demandType;
this.dryRun = builder.dryRun;
this.instanceChargeType = builder.instanceChargeType;
this.instanceType = builder.instanceType;
this.instanceTypeFamily = builder.instanceTypeFamily;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.pageNumber = builder.pageNumber;
this.pageSize = builder.pageSize;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.tag = builder.tag;
this.zoneId = builder.zoneId;
}
public static Builder builder() {
return new Builder();
}
public static DescribeDemandsRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return demandId
*/
public String getDemandId() {
return this.demandId;
}
/**
* @return demandStatus
*/
public java.util.List < String > getDemandStatus() {
return this.demandStatus;
}
/**
* @return demandType
*/
public String getDemandType() {
return this.demandType;
}
/**
* @return dryRun
*/
public Boolean getDryRun() {
return this.dryRun;
}
/**
* @return instanceChargeType
*/
public String getInstanceChargeType() {
return this.instanceChargeType;
}
/**
* @return instanceType
*/
public String getInstanceType() {
return this.instanceType;
}
/**
* @return instanceTypeFamily
*/
public String getInstanceTypeFamily() {
return this.instanceTypeFamily;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return pageNumber
*/
public Integer getPageNumber() {
return this.pageNumber;
}
/**
* @return pageSize
*/
public Integer getPageSize() {
return this.pageSize;
}
/**
* @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 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 String demandId;
private java.util.List < String > demandStatus;
private String demandType;
private Boolean dryRun;
private String instanceChargeType;
private String instanceType;
private String instanceTypeFamily;
private String ownerAccount;
private Long ownerId;
private Integer pageNumber;
private Integer pageSize;
private String regionId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private java.util.List < Tag> tag;
private String zoneId;
private Builder() {
super();
}
private Builder(DescribeDemandsRequest request) {
super(request);
this.demandId = request.demandId;
this.demandStatus = request.demandStatus;
this.demandType = request.demandType;
this.dryRun = request.dryRun;
this.instanceChargeType = request.instanceChargeType;
this.instanceType = request.instanceType;
this.instanceTypeFamily = request.instanceTypeFamily;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.pageNumber = request.pageNumber;
this.pageSize = request.pageSize;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.tag = request.tag;
this.zoneId = request.zoneId;
}
/**
* The ID of the demand. If this parameter is specified, other optional request parameters are ignored.
*/
public Builder demandId(String demandId) {
this.putQueryParameter("DemandId", demandId);
this.demandId = demandId;
return this;
}
/**
* The status of the demand or filed resources. Valid values:
*
*
* * Creating: The demand is being created.
* * Active: The filed resources are being supplied.
* * Expired: The demand has expired.
* * Finished: The filed resources are consumed.
* * Refused: The demand is rejected. To view the reason for rejection, see the `Comment` parameter in the response.
* * Cancelled: The demand is canceled.
*/
public Builder demandStatus(java.util.List < String > demandStatus) {
this.putQueryParameter("DemandStatus", demandStatus);
this.demandStatus = demandStatus;
return this;
}
/**
* The source of the instance. Valid values:
*
*
* * Custom: filed on your own.
* * System (default): filed by Alibaba Cloud.
*/
public Builder demandType(String demandType) {
this.putQueryParameter("DemandType", demandType);
this.demandType = demandType;
return this;
}
/**
* Specifies whether to perform only a dry run, without performing the actual request. Valid values: Valid values:
*
*
* * true: performs only a dry run. The system checks whether your AccessKey pair is valid, whether RAM users are granted required permissions, and whether the required parameters are specified. If the request fails the dry run, an error message is returned. If the request passes the dry run, the DryRunOperation error code is returned.
* * false (default): performs a dry run and performs the actual request. If the request passes the dry run, a 2xx HTTP status code is returned and the operation is performed.
*/
public Builder dryRun(Boolean dryRun) {
this.putQueryParameter("DryRun", dryRun);
this.dryRun = dryRun;
return this;
}
/**
* The billing method of the instance. Valid values:
*
*
* * PostPaid: pay-as-you-go.
* * PrePaid: subscription.
*/
public Builder instanceChargeType(String instanceChargeType) {
this.putQueryParameter("InstanceChargeType", instanceChargeType);
this.instanceChargeType = instanceChargeType;
return this;
}
/**
* The instance type of the instance.
*/
public Builder instanceType(String instanceType) {
this.putQueryParameter("InstanceType", instanceType);
this.instanceType = instanceType;
return this;
}
/**
* The instance family of the instance.
*/
public Builder instanceTypeFamily(String instanceTypeFamily) {
this.putQueryParameter("InstanceTypeFamily", instanceTypeFamily);
this.instanceTypeFamily = instanceTypeFamily;
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 page number. Pages start from page 1.
*
*
* Default value: 1.
*/
public Builder pageNumber(Integer pageNumber) {
this.putQueryParameter("PageNumber", pageNumber);
this.pageNumber = pageNumber;
return this;
}
/**
* The number of entries per page. Maximum value: 100.
*
*
* Default value: 10.
*/
public Builder pageSize(Integer pageSize) {
this.putQueryParameter("PageSize", pageSize);
this.pageSize = pageSize;
return this;
}
/**
* The region ID of the resource. 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 tags.
*/
public Builder tag(java.util.List < Tag> tag) {
this.putQueryParameter("Tag", tag);
this.tag = tag;
return this;
}
/**
* The zone ID of the resource. You can call the [DescribeZones](~~25610~~) operation to query the most recent region list.
*/
public Builder zoneId(String zoneId) {
this.putQueryParameter("ZoneId", zoneId);
this.zoneId = zoneId;
return this;
}
@Override
public DescribeDemandsRequest build() {
return new DescribeDemandsRequest(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;
/**
* > This parameter is not publicly available.
*/
public Builder key(String key) {
this.key = key;
return this;
}
/**
* > This parameter is not publicly available.
*/
public Builder value(String value) {
this.value = value;
return this;
}
public Tag build() {
return new Tag(this);
}
}
}
}