com.aliyun.sdk.service.ecs20140526.models.ModifyInstanceNetworkSpecRequest 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 com.aliyun.core.annotation.*;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link ModifyInstanceNetworkSpecRequest} extends {@link RequestModel}
*
* ModifyInstanceNetworkSpecRequest
*/
public class ModifyInstanceNetworkSpecRequest extends Request {
@Host
@NameInMap("SourceRegionId")
private String sourceRegionId;
@Query
@NameInMap("AllocatePublicIp")
private Boolean allocatePublicIp;
@Query
@NameInMap("AutoPay")
private Boolean autoPay;
@Query
@NameInMap("ClientToken")
private String clientToken;
@Query
@NameInMap("EndTime")
private String endTime;
@Query
@NameInMap("ISP")
private String ISP;
@Query
@NameInMap("InstanceId")
@Validation(required = true)
private String instanceId;
@Query
@NameInMap("InternetMaxBandwidthIn")
@Validation(maximum = 200, minimum = 1)
private Integer internetMaxBandwidthIn;
@Query
@NameInMap("InternetMaxBandwidthOut")
private Integer internetMaxBandwidthOut;
@Query
@NameInMap("NetworkChargeType")
private String networkChargeType;
@Query
@NameInMap("OwnerAccount")
private String ownerAccount;
@Query
@NameInMap("OwnerId")
private Long ownerId;
@Query
@NameInMap("ResourceOwnerAccount")
private String resourceOwnerAccount;
@Query
@NameInMap("ResourceOwnerId")
private Long resourceOwnerId;
@Query
@NameInMap("StartTime")
private String startTime;
private ModifyInstanceNetworkSpecRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.allocatePublicIp = builder.allocatePublicIp;
this.autoPay = builder.autoPay;
this.clientToken = builder.clientToken;
this.endTime = builder.endTime;
this.ISP = builder.ISP;
this.instanceId = builder.instanceId;
this.internetMaxBandwidthIn = builder.internetMaxBandwidthIn;
this.internetMaxBandwidthOut = builder.internetMaxBandwidthOut;
this.networkChargeType = builder.networkChargeType;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.startTime = builder.startTime;
}
public static Builder builder() {
return new Builder();
}
public static ModifyInstanceNetworkSpecRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return allocatePublicIp
*/
public Boolean getAllocatePublicIp() {
return this.allocatePublicIp;
}
/**
* @return autoPay
*/
public Boolean getAutoPay() {
return this.autoPay;
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return endTime
*/
public String getEndTime() {
return this.endTime;
}
/**
* @return ISP
*/
public String getISP() {
return this.ISP;
}
/**
* @return instanceId
*/
public String getInstanceId() {
return this.instanceId;
}
/**
* @return internetMaxBandwidthIn
*/
public Integer getInternetMaxBandwidthIn() {
return this.internetMaxBandwidthIn;
}
/**
* @return internetMaxBandwidthOut
*/
public Integer getInternetMaxBandwidthOut() {
return this.internetMaxBandwidthOut;
}
/**
* @return networkChargeType
*/
public String getNetworkChargeType() {
return this.networkChargeType;
}
/**
* @return ownerAccount
*/
public String getOwnerAccount() {
return this.ownerAccount;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return resourceOwnerId
*/
public Long getResourceOwnerId() {
return this.resourceOwnerId;
}
/**
* @return startTime
*/
public String getStartTime() {
return this.startTime;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private Boolean allocatePublicIp;
private Boolean autoPay;
private String clientToken;
private String endTime;
private String ISP;
private String instanceId;
private Integer internetMaxBandwidthIn;
private Integer internetMaxBandwidthOut;
private String networkChargeType;
private String ownerAccount;
private Long ownerId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private String startTime;
private Builder() {
super();
}
private Builder(ModifyInstanceNetworkSpecRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.allocatePublicIp = request.allocatePublicIp;
this.autoPay = request.autoPay;
this.clientToken = request.clientToken;
this.endTime = request.endTime;
this.ISP = request.ISP;
this.instanceId = request.instanceId;
this.internetMaxBandwidthIn = request.internetMaxBandwidthIn;
this.internetMaxBandwidthOut = request.internetMaxBandwidthOut;
this.networkChargeType = request.networkChargeType;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.startTime = request.startTime;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* Specifies whether to allocate a public IP address.
*
*
* Default value: false.
*/
public Builder allocatePublicIp(Boolean allocatePublicIp) {
this.putQueryParameter("AllocatePublicIp", allocatePublicIp);
this.allocatePublicIp = allocatePublicIp;
return this;
}
/**
* Specifies whether to enable the automatic payment feature. Valid values:
*
*
* * true: After you modify the bandwidth configurations, the payment is automatically complete. Make sure that you have a sufficient balance in your account before you set AutoPay to true. If your account balance is insufficient, your order cannot be paid in the ECS console and becomes invalid. You must cancel the order.
* * false: After you modify the bandwidth configurations, an order is generated but the payment is not complete. If your account balance is insufficient, you can set AutoPay to false to generate an unpaid order. Then, you can log on to the [ECS console](https://ecs.console.aliyun.com) to pay for the order.
*
* Default value: true.
*/
public Builder autoPay(Boolean autoPay) {
this.putQueryParameter("AutoPay", autoPay);
this.autoPay = autoPay;
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 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 end time of the temporary bandwidth upgrade. Specify the time in the [ISO 8601](~~25696~~) standard in the yyyy-MM-ddThhZ format. The time must be in UTC and accurate to **hours** (hh).
*
*
* > The interval between the end time and the start time of the temporary bandwidth upgrade must be greater than or equal to 3 hours.
*/
public Builder endTime(String endTime) {
this.putQueryParameter("EndTime", endTime);
this.endTime = endTime;
return this;
}
/**
* > This parameter is in invitational preview and is not publicly available.
*/
public Builder ISP(String ISP) {
this.putQueryParameter("ISP", ISP);
this.ISP = ISP;
return this;
}
/**
* The ID of the instance for which you want to modify bandwidth configurations.
*/
public Builder instanceId(String instanceId) {
this.putQueryParameter("InstanceId", instanceId);
this.instanceId = instanceId;
return this;
}
/**
* The maximum inbound public bandwidth. Unit: Mbit/s. Valid values:
*
*
* * If the purchased outbound public bandwidth is less than or equal to 10 Mbit/s, the valid values of this parameter range from 1 to 10, and the default value is 10.
* * If the purchased outbound public bandwidth is greater than 10 Mbit/s, the valid values of this parameter range from 1 to the value of `InternetMaxBandwidthOut`, and the default value is the value of `InternetMaxBandwidthOut`.
*/
public Builder internetMaxBandwidthIn(Integer internetMaxBandwidthIn) {
this.putQueryParameter("InternetMaxBandwidthIn", internetMaxBandwidthIn);
this.internetMaxBandwidthIn = internetMaxBandwidthIn;
return this;
}
/**
* The maximum outbound public bandwidth. Unit: Mbit/s. Valid values: 0 to 100.
*/
public Builder internetMaxBandwidthOut(Integer internetMaxBandwidthOut) {
this.putQueryParameter("InternetMaxBandwidthOut", internetMaxBandwidthOut);
this.internetMaxBandwidthOut = internetMaxBandwidthOut;
return this;
}
/**
* The billing method for network usage. Valid values:
*
*
* * PayByBandwidth
* * PayByTraffic
*
* > When the **pay-by-traffic** billing method for network usage is used, the maximum inbound and outbound bandwidth values are used as the upper limits of bandwidths instead of guaranteed values. In scenarios where demand outstrips resource supplies, these maximum bandwidths may be limited. If you want guaranteed bandwidths for your instance, use the **pay-by-bandwidth** billing method for network usage.
*/
public Builder networkChargeType(String networkChargeType) {
this.putQueryParameter("NetworkChargeType", networkChargeType);
this.networkChargeType = networkChargeType;
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;
}
/**
* 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 temporary bandwidth upgrade. Specify the time in the [ISO 8601](~~25696~~) standard in the yyyy-MM-ddThh:mmZ format. The time must be in UTC and accurate to **minutes** (mm).
*/
public Builder startTime(String startTime) {
this.putQueryParameter("StartTime", startTime);
this.startTime = startTime;
return this;
}
@Override
public ModifyInstanceNetworkSpecRequest build() {
return new ModifyInstanceNetworkSpecRequest(this);
}
}
}