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

com.aliyun.sdk.service.ecs20140526.models.DetachDiskRequest 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 DetachDiskRequest} extends {@link RequestModel}
 *
 * 

DetachDiskRequest

*/ public class DetachDiskRequest 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("DeleteWithInstance") private Boolean deleteWithInstance; @com.aliyun.core.annotation.Query @com.aliyun.core.annotation.NameInMap("DiskId") @com.aliyun.core.annotation.Validation(required = true) private String diskId; @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; private DetachDiskRequest(Builder builder) { super(builder); this.sourceRegionId = builder.sourceRegionId; this.deleteWithInstance = builder.deleteWithInstance; this.diskId = builder.diskId; this.instanceId = builder.instanceId; this.ownerAccount = builder.ownerAccount; this.ownerId = builder.ownerId; this.resourceOwnerAccount = builder.resourceOwnerAccount; this.resourceOwnerId = builder.resourceOwnerId; } public static Builder builder() { return new Builder(); } public static DetachDiskRequest create() { return builder().build(); } @Override public Builder toBuilder() { return new Builder(this); } /** * @return sourceRegionId */ public String getSourceRegionId() { return this.sourceRegionId; } /** * @return deleteWithInstance */ public Boolean getDeleteWithInstance() { return this.deleteWithInstance; } /** * @return diskId */ public String getDiskId() { return this.diskId; } /** * @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; } public static final class Builder extends Request.Builder { private String sourceRegionId; private Boolean deleteWithInstance; private String diskId; private String instanceId; private String ownerAccount; private Long ownerId; private String resourceOwnerAccount; private Long resourceOwnerId; private Builder() { super(); } private Builder(DetachDiskRequest request) { super(request); this.sourceRegionId = request.sourceRegionId; this.deleteWithInstance = request.deleteWithInstance; this.diskId = request.diskId; this.instanceId = request.instanceId; this.ownerAccount = request.ownerAccount; this.ownerId = request.ownerId; this.resourceOwnerAccount = request.resourceOwnerAccount; this.resourceOwnerId = request.resourceOwnerId; } /** * SourceRegionId. */ public Builder sourceRegionId(String sourceRegionId) { this.putHostParameter("SourceRegionId", sourceRegionId); this.sourceRegionId = sourceRegionId; return this; } /** * Specifies whether to release the system disk or data disk when the instance from which you want to detach the disk is released. Valid values: *

* * * true: releases the disk when the instance is released. * * false: does not release the disk when the instance is released. The disk is retained as a pay-as-you-go data disk. * * Default value: true. * * Take note of the following items: * * * You cannot specify this parameter for disks for which the multi-attach feature is enabled. * * If a data disk is to be detached, the default value is `false`. * * If you want to detach an `elastic ephemeral disk`, you must set `DeleteWithInstance` to `true`. */ public Builder deleteWithInstance(Boolean deleteWithInstance) { this.putQueryParameter("DeleteWithInstance", deleteWithInstance); this.deleteWithInstance = deleteWithInstance; return this; } /** * The ID of the disk that you want to detach. */ public Builder diskId(String diskId) { this.putQueryParameter("DiskId", diskId); this.diskId = diskId; return this; } /** * The ID of the ECS instance from which you want to detach the disk. */ 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; } @Override public DetachDiskRequest build() { return new DetachDiskRequest(this); } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy