com.aliyun.sdk.service.ess20220222.models.AttachVServerGroupsRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ess20220222 Show documentation
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ess20220222.models;
import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;
/**
* {@link AttachVServerGroupsRequest} extends {@link RequestModel}
*
* AttachVServerGroupsRequest
*/
public class AttachVServerGroupsRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ClientToken")
private String clientToken;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ForceAttach")
private Boolean forceAttach;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerId")
private Long ownerId;
@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("ScalingGroupId")
@com.aliyun.core.annotation.Validation(required = true)
private String scalingGroupId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("VServerGroups")
@com.aliyun.core.annotation.Validation(required = true)
private java.util.List < VServerGroups> vServerGroups;
private AttachVServerGroupsRequest(Builder builder) {
super(builder);
this.clientToken = builder.clientToken;
this.forceAttach = builder.forceAttach;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.scalingGroupId = builder.scalingGroupId;
this.vServerGroups = builder.vServerGroups;
}
public static Builder builder() {
return new Builder();
}
public static AttachVServerGroupsRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return forceAttach
*/
public Boolean getForceAttach() {
return this.forceAttach;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return regionId
*/
public String getRegionId() {
return this.regionId;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return scalingGroupId
*/
public String getScalingGroupId() {
return this.scalingGroupId;
}
/**
* @return vServerGroups
*/
public java.util.List < VServerGroups> getVServerGroups() {
return this.vServerGroups;
}
public static final class Builder extends Request.Builder {
private String clientToken;
private Boolean forceAttach;
private Long ownerId;
private String regionId;
private String resourceOwnerAccount;
private String scalingGroupId;
private java.util.List < VServerGroups> vServerGroups;
private Builder() {
super();
}
private Builder(AttachVServerGroupsRequest request) {
super(request);
this.clientToken = request.clientToken;
this.forceAttach = request.forceAttach;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.scalingGroupId = request.scalingGroupId;
this.vServerGroups = request.vServerGroups;
}
/**
* 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 [Ensure idempotence](~~25965~~).
*/
public Builder clientToken(String clientToken) {
this.putQueryParameter("ClientToken", clientToken);
this.clientToken = clientToken;
return this;
}
/**
* Specifies whether to add the existing Elastic Compute Service (ECS) instances or elastic container instances in the scaling group to the new vServer group. Valid values:
*
*
* * true
* * false
*
* Default value: false.
*/
public Builder forceAttach(Boolean forceAttach) {
this.putQueryParameter("ForceAttach", forceAttach);
this.forceAttach = forceAttach;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The region ID of the scaling group. Examples: cn-hangzhou and cn-shanghai. For information about regions and zones, see [Regions and zones](~~40654~~).
*/
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;
}
/**
* The ID of the scaling group.
*/
public Builder scalingGroupId(String scalingGroupId) {
this.putQueryParameter("ScalingGroupId", scalingGroupId);
this.scalingGroupId = scalingGroupId;
return this;
}
/**
* The information about the vServer groups.
*/
public Builder vServerGroups(java.util.List < VServerGroups> vServerGroups) {
this.putQueryParameter("VServerGroups", vServerGroups);
this.vServerGroups = vServerGroups;
return this;
}
@Override
public AttachVServerGroupsRequest build() {
return new AttachVServerGroupsRequest(this);
}
}
public static class VServerGroupAttributes extends TeaModel {
@com.aliyun.core.annotation.NameInMap("Port")
private Integer port;
@com.aliyun.core.annotation.NameInMap("VServerGroupId")
private String vServerGroupId;
@com.aliyun.core.annotation.NameInMap("Weight")
private Integer weight;
private VServerGroupAttributes(Builder builder) {
this.port = builder.port;
this.vServerGroupId = builder.vServerGroupId;
this.weight = builder.weight;
}
public static Builder builder() {
return new Builder();
}
public static VServerGroupAttributes create() {
return builder().build();
}
/**
* @return port
*/
public Integer getPort() {
return this.port;
}
/**
* @return vServerGroupId
*/
public String getVServerGroupId() {
return this.vServerGroupId;
}
/**
* @return weight
*/
public Integer getWeight() {
return this.weight;
}
public static final class Builder {
private Integer port;
private String vServerGroupId;
private Integer weight;
/**
* The port number over which Auto Scaling adds ECS instances or elastic container instances to the new vServer group. Valid values: 1 to 65535.
*/
public Builder port(Integer port) {
this.port = port;
return this;
}
/**
* The ID of the vServer group.
*/
public Builder vServerGroupId(String vServerGroupId) {
this.vServerGroupId = vServerGroupId;
return this;
}
/**
* The weight of an ECS instance or elastic container instance as a backend server. Valid values: 0 to 100.
*
*
* Default value: 50.
*/
public Builder weight(Integer weight) {
this.weight = weight;
return this;
}
public VServerGroupAttributes build() {
return new VServerGroupAttributes(this);
}
}
}
public static class VServerGroups extends TeaModel {
@com.aliyun.core.annotation.NameInMap("LoadBalancerId")
private String loadBalancerId;
@com.aliyun.core.annotation.NameInMap("VServerGroupAttributes")
private java.util.List < VServerGroupAttributes> vServerGroupAttributes;
private VServerGroups(Builder builder) {
this.loadBalancerId = builder.loadBalancerId;
this.vServerGroupAttributes = builder.vServerGroupAttributes;
}
public static Builder builder() {
return new Builder();
}
public static VServerGroups create() {
return builder().build();
}
/**
* @return loadBalancerId
*/
public String getLoadBalancerId() {
return this.loadBalancerId;
}
/**
* @return vServerGroupAttributes
*/
public java.util.List < VServerGroupAttributes> getVServerGroupAttributes() {
return this.vServerGroupAttributes;
}
public static final class Builder {
private String loadBalancerId;
private java.util.List < VServerGroupAttributes> vServerGroupAttributes;
/**
* The ID of the CLB instance to which the new vServer group belongs.
*/
public Builder loadBalancerId(String loadBalancerId) {
this.loadBalancerId = loadBalancerId;
return this;
}
/**
* The attributes of the vServer group.
*/
public Builder vServerGroupAttributes(java.util.List < VServerGroupAttributes> vServerGroupAttributes) {
this.vServerGroupAttributes = vServerGroupAttributes;
return this;
}
public VServerGroups build() {
return new VServerGroups(this);
}
}
}
}