com.aliyun.sdk.service.ess20220222.models.SetInstancesProtectionRequest 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 SetInstancesProtectionRequest} extends {@link RequestModel}
*
* SetInstancesProtectionRequest
*/
public class SetInstancesProtectionRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("InstanceIds")
@com.aliyun.core.annotation.Validation(required = true)
private java.util.List < String > instanceIds;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("OwnerId")
private Long ownerId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("ProtectedFromScaleIn")
@com.aliyun.core.annotation.Validation(required = true)
private Boolean protectedFromScaleIn;
@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;
private SetInstancesProtectionRequest(Builder builder) {
super(builder);
this.instanceIds = builder.instanceIds;
this.ownerId = builder.ownerId;
this.protectedFromScaleIn = builder.protectedFromScaleIn;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.scalingGroupId = builder.scalingGroupId;
}
public static Builder builder() {
return new Builder();
}
public static SetInstancesProtectionRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return instanceIds
*/
public java.util.List < String > getInstanceIds() {
return this.instanceIds;
}
/**
* @return ownerId
*/
public Long getOwnerId() {
return this.ownerId;
}
/**
* @return protectedFromScaleIn
*/
public Boolean getProtectedFromScaleIn() {
return this.protectedFromScaleIn;
}
/**
* @return resourceOwnerAccount
*/
public String getResourceOwnerAccount() {
return this.resourceOwnerAccount;
}
/**
* @return scalingGroupId
*/
public String getScalingGroupId() {
return this.scalingGroupId;
}
public static final class Builder extends Request.Builder {
private java.util.List < String > instanceIds;
private Long ownerId;
private Boolean protectedFromScaleIn;
private String resourceOwnerAccount;
private String scalingGroupId;
private Builder() {
super();
}
private Builder(SetInstancesProtectionRequest request) {
super(request);
this.instanceIds = request.instanceIds;
this.ownerId = request.ownerId;
this.protectedFromScaleIn = request.protectedFromScaleIn;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.scalingGroupId = request.scalingGroupId;
}
/**
* The IDs of the ECS instances.
*/
public Builder instanceIds(java.util.List < String > instanceIds) {
this.putQueryParameter("InstanceIds", instanceIds);
this.instanceIds = instanceIds;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* Specifies whether to protect ECS instances from being stopped or removed from the scaling group during scale-ins. Valid values:
*
*
* * true
* * false
*/
public Builder protectedFromScaleIn(Boolean protectedFromScaleIn) {
this.putQueryParameter("ProtectedFromScaleIn", protectedFromScaleIn);
this.protectedFromScaleIn = protectedFromScaleIn;
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;
}
@Override
public SetInstancesProtectionRequest build() {
return new SetInstancesProtectionRequest(this);
}
}
}