com.aliyun.sdk.service.ecs20140526.models.ModifySnapshotAttributeRequest Maven / Gradle / Ivy
Show all versions of alibabacloud-ecs20140526 Show documentation
// 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 ModifySnapshotAttributeRequest} extends {@link RequestModel}
*
* ModifySnapshotAttributeRequest
*/
public class ModifySnapshotAttributeRequest 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("Description")
private String description;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("DisableInstantAccess")
private Boolean disableInstantAccess;
@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("RetentionDays")
private Integer retentionDays;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("SnapshotId")
@com.aliyun.core.annotation.Validation(required = true)
private String snapshotId;
@com.aliyun.core.annotation.Query
@com.aliyun.core.annotation.NameInMap("SnapshotName")
private String snapshotName;
private ModifySnapshotAttributeRequest(Builder builder) {
super(builder);
this.sourceRegionId = builder.sourceRegionId;
this.description = builder.description;
this.disableInstantAccess = builder.disableInstantAccess;
this.ownerAccount = builder.ownerAccount;
this.ownerId = builder.ownerId;
this.resourceOwnerAccount = builder.resourceOwnerAccount;
this.resourceOwnerId = builder.resourceOwnerId;
this.retentionDays = builder.retentionDays;
this.snapshotId = builder.snapshotId;
this.snapshotName = builder.snapshotName;
}
public static Builder builder() {
return new Builder();
}
public static ModifySnapshotAttributeRequest create() {
return builder().build();
}
@Override
public Builder toBuilder() {
return new Builder(this);
}
/**
* @return sourceRegionId
*/
public String getSourceRegionId() {
return this.sourceRegionId;
}
/**
* @return description
*/
public String getDescription() {
return this.description;
}
/**
* @return disableInstantAccess
*/
public Boolean getDisableInstantAccess() {
return this.disableInstantAccess;
}
/**
* @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 retentionDays
*/
public Integer getRetentionDays() {
return this.retentionDays;
}
/**
* @return snapshotId
*/
public String getSnapshotId() {
return this.snapshotId;
}
/**
* @return snapshotName
*/
public String getSnapshotName() {
return this.snapshotName;
}
public static final class Builder extends Request.Builder {
private String sourceRegionId;
private String description;
private Boolean disableInstantAccess;
private String ownerAccount;
private Long ownerId;
private String resourceOwnerAccount;
private Long resourceOwnerId;
private Integer retentionDays;
private String snapshotId;
private String snapshotName;
private Builder() {
super();
}
private Builder(ModifySnapshotAttributeRequest request) {
super(request);
this.sourceRegionId = request.sourceRegionId;
this.description = request.description;
this.disableInstantAccess = request.disableInstantAccess;
this.ownerAccount = request.ownerAccount;
this.ownerId = request.ownerId;
this.resourceOwnerAccount = request.resourceOwnerAccount;
this.resourceOwnerId = request.resourceOwnerId;
this.retentionDays = request.retentionDays;
this.snapshotId = request.snapshotId;
this.snapshotName = request.snapshotName;
}
/**
* SourceRegionId.
*/
public Builder sourceRegionId(String sourceRegionId) {
this.putHostParameter("SourceRegionId", sourceRegionId);
this.sourceRegionId = sourceRegionId;
return this;
}
/**
* The description of the snapshot. The description must be 2 to 256 characters in length and cannot start with [http:// or https://](http://https://。).
*/
public Builder description(String description) {
this.putQueryParameter("Description", description);
this.description = description;
return this;
}
/**
* Specifies whether to disable the instant access feature. Valid values:
*
*
* * true
* * false
*
* Default value: false.
*
* > This parameter is no longer used. By default, new normal snapshots of ESSDs are upgraded to instant access snapshots free of charge without the need for additional configurations. For more information, see [Use the instant access feature](~~193667~~).
*/
public Builder disableInstantAccess(Boolean disableInstantAccess) {
this.putQueryParameter("DisableInstantAccess", disableInstantAccess);
this.disableInstantAccess = disableInstantAccess;
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;
}
/**
* The retention period of the snapshot. After you specify this parameter, the end time of the new retention period is the specified number of days apart from the **creation time** of the snapshot, which follows the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format and is displayed in UTC. Valid values: 1 to 65536.
*
*
* > You can extend the retention period of the snapshot and cannot shorten the retention period.
*/
public Builder retentionDays(Integer retentionDays) {
this.putQueryParameter("RetentionDays", retentionDays);
this.retentionDays = retentionDays;
return this;
}
/**
* The ID of the snapshot.
*/
public Builder snapshotId(String snapshotId) {
this.putQueryParameter("SnapshotId", snapshotId);
this.snapshotId = snapshotId;
return this;
}
/**
* The name of the snapshot. The name must be 2 to 128 characters in length. It must start with a letter and cannot start with http:// or https://. It can contain letters, digits, colons (:), underscores (\_), and hyphens (-).
*
*
* The name cannot start with auto because snapshots whose names start with auto are recognized as automatic snapshots.
*/
public Builder snapshotName(String snapshotName) {
this.putQueryParameter("SnapshotName", snapshotName);
this.snapshotName = snapshotName;
return this;
}
@Override
public ModifySnapshotAttributeRequest build() {
return new ModifySnapshotAttributeRequest(this);
}
}
}