com.aliyun.sdk.service.ess20220222.models.DetachServerGroupsRequest 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 DetachServerGroupsRequest} extends {@link RequestModel}
*
* DetachServerGroupsRequest
*/
public class DetachServerGroupsRequest 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("ForceDetach")
private Boolean forceDetach;
@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("ServerGroups")
@com.aliyun.core.annotation.Validation(required = true)
private java.util.List < ServerGroups> serverGroups;
private DetachServerGroupsRequest(Builder builder) {
super(builder);
this.clientToken = builder.clientToken;
this.forceDetach = builder.forceDetach;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.scalingGroupId = builder.scalingGroupId;
this.serverGroups = builder.serverGroups;
}
public static Builder builder() {
return new Builder();
}
public static DetachServerGroupsRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return clientToken
*/
public String getClientToken() {
return this.clientToken;
}
/**
* @return forceDetach
*/
public Boolean getForceDetach() {
return this.forceDetach;
}
/**
* @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 serverGroups
*/
public java.util.List < ServerGroups> getServerGroups() {
return this.serverGroups;
}
public static final class Builder extends Request.Builder {
private String clientToken;
private Boolean forceDetach;
private Long ownerId;
private String regionId;
private String resourceOwnerAccount;
private String scalingGroupId;
private java.util.List < ServerGroups> serverGroups;
private Builder() {
super();
}
private Builder(DetachServerGroupsRequest request) {
super(request);
this.clientToken = request.clientToken;
this.forceDetach = request.forceDetach;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.scalingGroupId = request.scalingGroupId;
this.serverGroups = request.serverGroups;
}
/**
* 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 remove the existing Elastic Compute Service (ECS) instances or elastic container instances in the scaling group from the server group marked for detachment.
*
*
* * true
* * false
*
* Default value: false.
*/
public Builder forceDetach(Boolean forceDetach) {
this.putQueryParameter("ForceDetach", forceDetach);
this.forceDetach = forceDetach;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The region ID of the scaling group.
*/
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 server groups.
*/
public Builder serverGroups(java.util.List < ServerGroups> serverGroups) {
this.putQueryParameter("ServerGroups", serverGroups);
this.serverGroups = serverGroups;
return this;
}
@Override
public DetachServerGroupsRequest build() {
return new DetachServerGroupsRequest(this);
}
}
public static class ServerGroups extends TeaModel {
@com.aliyun.core.annotation.NameInMap("Port")
@com.aliyun.core.annotation.Validation(required = true)
private Integer port;
@com.aliyun.core.annotation.NameInMap("ServerGroupId")
@com.aliyun.core.annotation.Validation(required = true)
private String serverGroupId;
@com.aliyun.core.annotation.NameInMap("Type")
@com.aliyun.core.annotation.Validation(required = true)
private String type;
private ServerGroups(Builder builder) {
this.port = builder.port;
this.serverGroupId = builder.serverGroupId;
this.type = builder.type;
}
public static Builder builder() {
return new Builder();
}
public static ServerGroups create() {
return builder().build();
}
/**
* @return port
*/
public Integer getPort() {
return this.port;
}
/**
* @return serverGroupId
*/
public String getServerGroupId() {
return this.serverGroupId;
}
/**
* @return type
*/
public String getType() {
return this.type;
}
public static final class Builder {
private Integer port;
private String serverGroupId;
private String type;
/**
* The port used by ECS instances or elastic container instances as backend servers of the server group.
*/
public Builder port(Integer port) {
this.port = port;
return this;
}
/**
* The ID of the server group.
*/
public Builder serverGroupId(String serverGroupId) {
this.serverGroupId = serverGroupId;
return this;
}
/**
* The type of the server group. Valid values:
*
*
* * ALB
* * NLB
*/
public Builder type(String type) {
this.type = type;
return this;
}
public ServerGroups build() {
return new ServerGroups(this);
}
}
}
}