All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.aliyun.sdk.service.ecs20140526.models.DeleteInstanceRequest Maven / Gradle / Ivy

There is a newer version: 5.0.29
Show newest version
// This file is auto-generated, don't edit it. Thanks.
package com.aliyun.sdk.service.ecs20140526.models;

import darabonba.core.RequestModel;
import darabonba.core.TeaModel;
import com.aliyun.sdk.gateway.pop.models.*;

/**
 * {@link DeleteInstanceRequest} extends {@link RequestModel}
 *
 * 

DeleteInstanceRequest

*/ public class DeleteInstanceRequest extends Request { @com.aliyun.core.annotation.Host @com.aliyun.core.annotation.NameInMap("SourceRegionId") private String sourceRegionId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DryRun") private Boolean dryRun; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("Force") private Boolean force; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("InstanceId") @com.aliyun.core.annotation.Validation(required = true) private String instanceId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerAccount") private String ownerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("OwnerId") private Long ownerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerAccount") private String resourceOwnerAccount; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("ResourceOwnerId") private Long resourceOwnerId; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("TerminateSubscription") private Boolean terminateSubscription; private DeleteInstanceRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.dryRun = builder.dryRun; this.force = builder.force; this.instanceId = builder.instanceId; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; this.terminateSubscription = builder.terminateSubscription; } public static Builder builder() { return new Builder(); } public static DeleteInstanceRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return dryRun */ public Boolean getDryRun() { return this.dryRun; } /** * @return force */ public Boolean getForce() { return this.force; } /** * @return instanceId */ public String getInstanceId() { return this.instanceId; } /** * @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 terminateSubscription */ public Boolean getTerminateSubscription() { return this.terminateSubscription; } public static final class Builder extends Request.Builder { private String sourceRegionId; private Boolean dryRun; private Boolean force; private String instanceId; private String ownerAccount; private Long ownerId; private String resourceOwnerAccount; private Long resourceOwnerId; private Boolean terminateSubscription; private Builder() { super(); } private Builder(DeleteInstanceRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.dryRun = request.dryRun; this.force = request.force; this.instanceId = request.instanceId; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; this.terminateSubscription = request.terminateSubscription; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** * Specifies whether to perform only a dry run, without performing the actual request. Valid values: *

* * * true: performs only a dry run. The system checks the request for potential issues, including missing parameter values, incorrect request syntax, service limits, and unavailable ECS resources. If the request fails the dry run, an error message is returned. If the request passes the dry run, the `DryRunOperation` error code is returned. * * false (default): performs a dry run and performs the actual request. If the request passes the dry run, the instance is released. */ public Builder dryRun(Boolean dryRun) { this.putQueryParameter("DryRun", dryRun); this.dryRun = dryRun; return this; } /** * Specifies whether to forcefully release the instance in the **Running** (`Running`) state. Valid values: *

* * * true: forcefully releases the instance in the **Running** (`Running`) state. This operation is equivalent to the power-off operation. Cache data that is not written to persistent storage will be lost. * * false: normally releases the instance. This value take effects only if the instance is in the **Stopped** (`Stopped`) state. * * Default value: false. */ public Builder force(Boolean force) { this.putQueryParameter("Force", force); this.force = force; return this; } /** * The ID of the instance. */ public Builder instanceId(String instanceId) { this.putQueryParameter("InstanceId", instanceId); this.instanceId = instanceId; 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; } /** * Specifies whether to release the expired subscription instance. Valid values: *

* * * true * * false * * Default value: false. */ public Builder terminateSubscription(Boolean terminateSubscription) { this.putQueryParameter("TerminateSubscription", terminateSubscription); this.terminateSubscription = terminateSubscription; return this; } @Override public DeleteInstanceRequest build() { return new DeleteInstanceRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy