com.aliyun.sdk.service.ess20220222.models.SetGroupDeletionProtectionRequest 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 SetGroupDeletionProtectionRequest} extends {@link RequestModel}
*
* SetGroupDeletionProtectionRequest
*/
public class SetGroupDeletionProtectionRequest extends Request {
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("GroupDeletionProtection")
@com.aliyun.core.annotation.Validation(required = true)
private Boolean groupDeletionProtection;
@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")
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;
private SetGroupDeletionProtectionRequest(Builder builder) {
super(builder);
this.groupDeletionProtection = builder.groupDeletionProtection;
this.ownerId = builder.ownerId;
this.regionId = builder.regionId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.scalingGroupId = builder.scalingGroupId;
}
public static Builder builder() {
return new Builder();
}
public static SetGroupDeletionProtectionRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return groupDeletionProtection
*/
public Boolean getGroupDeletionProtection() {
return this.groupDeletionProtection;
}
/**
* @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;
}
public static final class Builder extends Request.Builder {
private Boolean groupDeletionProtection;
private Long ownerId;
private String regionId;
private String resourceOwnerAccount;
private String scalingGroupId;
private Builder() {
super();
}
private Builder(SetGroupDeletionProtectionRequest request) {
super(request);
this.groupDeletionProtection = request.groupDeletionProtection;
this.ownerId = request.ownerId;
this.regionId = request.regionId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.scalingGroupId = request.scalingGroupId;
}
/**
* Specifies whether to enable deletion protection for the scaling group. Valid values:
*
*
* * true: enables deletion protection. In this case, you cannot delete the scaling group by using the Auto Scaling console or calling an API operation. You must disable deletion protection before you can delete the scaling group.
* * false: disables deletion protection.
*
* Default value: false.
*/
public Builder groupDeletionProtection(Boolean groupDeletionProtection) {
this.putQueryParameter("GroupDeletionProtection", groupDeletionProtection);
this.groupDeletionProtection = groupDeletionProtection;
return this;
}
/**
* OwnerId.
*/
public Builder ownerId(Long ownerId) {
this.putQueryParameter("OwnerId", ownerId);
this.ownerId = ownerId;
return this;
}
/**
* The region ID.
*/
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;
}
@Override
public SetGroupDeletionProtectionRequest build() {
return new SetGroupDeletionProtectionRequest(this);
}
}
}