
com.amazonaws.services.lightsail.model.CreateDiskFromSnapshotRequest Maven / Gradle / Ivy
/*
* Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with
* the License. A copy of the License is located at
*
* http://aws.amazon.com/apache2.0
*
* or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
* CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions
* and limitations under the License.
*/
package com.amazonaws.services.lightsail.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.AmazonWebServiceRequest;
/**
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CreateDiskFromSnapshotRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The unique Lightsail disk name (e.g., my-disk
).
*
*/
private String diskName;
/**
*
* The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage disk.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
*
*/
private String diskSnapshotName;
/**
*
* The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
*
*/
private String availabilityZone;
/**
*
* The size of the disk in GB (e.g., 32
).
*
*/
private Integer sizeInGb;
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*/
private java.util.List tags;
/**
*
* An array of objects that represent the add-ons to enable for the new disk.
*
*/
private java.util.List addOns;
/**
*
* The name of the source disk from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*/
private String sourceDiskName;
/**
*
* The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
operation to
* identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*/
private String restoreDate;
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*/
private Boolean useLatestRestorableAutoSnapshot;
/**
*
* The unique Lightsail disk name (e.g., my-disk
).
*
*
* @param diskName
* The unique Lightsail disk name (e.g., my-disk
).
*/
public void setDiskName(String diskName) {
this.diskName = diskName;
}
/**
*
* The unique Lightsail disk name (e.g., my-disk
).
*
*
* @return The unique Lightsail disk name (e.g., my-disk
).
*/
public String getDiskName() {
return this.diskName;
}
/**
*
* The unique Lightsail disk name (e.g., my-disk
).
*
*
* @param diskName
* The unique Lightsail disk name (e.g., my-disk
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withDiskName(String diskName) {
setDiskName(diskName);
return this;
}
/**
*
* The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage disk.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
*
*
* @param diskSnapshotName
* The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage
* disk.
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
*/
public void setDiskSnapshotName(String diskSnapshotName) {
this.diskSnapshotName = diskSnapshotName;
}
/**
*
* The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage disk.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
*
*
* @return The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage
* disk.
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
*/
public String getDiskSnapshotName() {
return this.diskSnapshotName;
}
/**
*
* The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage disk.
*
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
*
*
* @param diskSnapshotName
* The name of the disk snapshot (e.g., my-snapshot
) from which to create the new storage
* disk.
*
* Constraint:
*
*
* -
*
* This parameter cannot be defined together with the source disk name
parameter. The
* disk snapshot name
and source disk name
parameters are mutually exclusive.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withDiskSnapshotName(String diskSnapshotName) {
setDiskSnapshotName(diskSnapshotName);
return this;
}
/**
*
* The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
*
*
* @param availabilityZone
* The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
*/
public void setAvailabilityZone(String availabilityZone) {
this.availabilityZone = availabilityZone;
}
/**
*
* The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
*
*
* @return The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
*/
public String getAvailabilityZone() {
return this.availabilityZone;
}
/**
*
* The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
*
*
* @param availabilityZone
* The Availability Zone where you want to create the disk (e.g., us-east-2a
). Choose the same
* Availability Zone as the Lightsail instance where you want to create the disk.
*
* Use the GetRegions operation to list the Availability Zones where Lightsail is currently available.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withAvailabilityZone(String availabilityZone) {
setAvailabilityZone(availabilityZone);
return this;
}
/**
*
* The size of the disk in GB (e.g., 32
).
*
*
* @param sizeInGb
* The size of the disk in GB (e.g., 32
).
*/
public void setSizeInGb(Integer sizeInGb) {
this.sizeInGb = sizeInGb;
}
/**
*
* The size of the disk in GB (e.g., 32
).
*
*
* @return The size of the disk in GB (e.g., 32
).
*/
public Integer getSizeInGb() {
return this.sizeInGb;
}
/**
*
* The size of the disk in GB (e.g., 32
).
*
*
* @param sizeInGb
* The size of the disk in GB (e.g., 32
).
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withSizeInGb(Integer sizeInGb) {
setSizeInGb(sizeInGb);
return this;
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* @return The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* @param tags
* The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* The tag keys and optional values to add to the resource during create.
*
*
* Use the TagResource
action to tag a resource after it's created.
*
*
* @param tags
* The tag keys and optional values to add to the resource during create.
*
* Use the TagResource
action to tag a resource after it's created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withTags(java.util.Collection tags) {
setTags(tags);
return this;
}
/**
*
* An array of objects that represent the add-ons to enable for the new disk.
*
*
* @return An array of objects that represent the add-ons to enable for the new disk.
*/
public java.util.List getAddOns() {
return addOns;
}
/**
*
* An array of objects that represent the add-ons to enable for the new disk.
*
*
* @param addOns
* An array of objects that represent the add-ons to enable for the new disk.
*/
public void setAddOns(java.util.Collection addOns) {
if (addOns == null) {
this.addOns = null;
return;
}
this.addOns = new java.util.ArrayList(addOns);
}
/**
*
* An array of objects that represent the add-ons to enable for the new disk.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setAddOns(java.util.Collection)} or {@link #withAddOns(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param addOns
* An array of objects that represent the add-ons to enable for the new disk.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withAddOns(AddOnRequest... addOns) {
if (this.addOns == null) {
setAddOns(new java.util.ArrayList(addOns.length));
}
for (AddOnRequest ele : addOns) {
this.addOns.add(ele);
}
return this;
}
/**
*
* An array of objects that represent the add-ons to enable for the new disk.
*
*
* @param addOns
* An array of objects that represent the add-ons to enable for the new disk.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withAddOns(java.util.Collection addOns) {
setAddOns(addOns);
return this;
}
/**
*
* The name of the source disk from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param sourceDiskName
* The name of the source disk from which the source automatic snapshot was created.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public void setSourceDiskName(String sourceDiskName) {
this.sourceDiskName = sourceDiskName;
}
/**
*
* The name of the source disk from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return The name of the source disk from which the source automatic snapshot was created.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public String getSourceDiskName() {
return this.sourceDiskName;
}
/**
*
* The name of the source disk from which the source automatic snapshot was created.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param sourceDiskName
* The name of the source disk from which the source automatic snapshot was created.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the disk snapshot name
parameter. The
* source disk name
and disk snapshot name
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withSourceDiskName(String sourceDiskName) {
setSourceDiskName(sourceDiskName);
return this;
}
/**
*
* The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
operation to
* identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param restoreDate
* The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
* operation to identify the dates of the available automatic snapshots.
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public void setRestoreDate(String restoreDate) {
this.restoreDate = restoreDate;
}
/**
*
* The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
operation to
* identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
* operation to identify the dates of the available automatic snapshots.
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public String getRestoreDate() {
return this.restoreDate;
}
/**
*
* The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
operation to
* identify the dates of the available automatic snapshots.
*
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
parameter.
* The restore date
and use latest restorable auto snapshot
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param restoreDate
* The date of the automatic snapshot to use for the new disk. Use the get auto snapshots
* operation to identify the dates of the available automatic snapshots.
*
* Constraints:
*
*
* -
*
* Must be specified in YYYY-MM-DD
format.
*
*
* -
*
* This parameter cannot be defined together with the use latest restorable auto snapshot
* parameter. The restore date
and use latest restorable auto snapshot
parameters
* are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withRestoreDate(String restoreDate) {
setRestoreDate(restoreDate);
return this;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param useLatestRestorableAutoSnapshot
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public void setUseLatestRestorableAutoSnapshot(Boolean useLatestRestorableAutoSnapshot) {
this.useLatestRestorableAutoSnapshot = useLatestRestorableAutoSnapshot;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public Boolean getUseLatestRestorableAutoSnapshot() {
return this.useLatestRestorableAutoSnapshot;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @param useLatestRestorableAutoSnapshot
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateDiskFromSnapshotRequest withUseLatestRestorableAutoSnapshot(Boolean useLatestRestorableAutoSnapshot) {
setUseLatestRestorableAutoSnapshot(useLatestRestorableAutoSnapshot);
return this;
}
/**
*
* A Boolean value to indicate whether to use the latest available automatic snapshot.
*
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see the
* Amazon Lightsail Developer Guide.
*
*
*
*
* @return A Boolean value to indicate whether to use the latest available automatic snapshot.
*
* Constraints:
*
*
* -
*
* This parameter cannot be defined together with the restore date
parameter. The
* use latest restorable auto snapshot
and restore date
parameters are mutually
* exclusive.
*
*
* -
*
* Define this parameter only when creating a new disk from an automatic snapshot. For more information, see
* the Amazon Lightsail Developer Guide.
*
*
*/
public Boolean isUseLatestRestorableAutoSnapshot() {
return this.useLatestRestorableAutoSnapshot;
}
/**
* Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be
* redacted from this string using a placeholder value.
*
* @return A string representation of this object.
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("{");
if (getDiskName() != null)
sb.append("DiskName: ").append(getDiskName()).append(",");
if (getDiskSnapshotName() != null)
sb.append("DiskSnapshotName: ").append(getDiskSnapshotName()).append(",");
if (getAvailabilityZone() != null)
sb.append("AvailabilityZone: ").append(getAvailabilityZone()).append(",");
if (getSizeInGb() != null)
sb.append("SizeInGb: ").append(getSizeInGb()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags()).append(",");
if (getAddOns() != null)
sb.append("AddOns: ").append(getAddOns()).append(",");
if (getSourceDiskName() != null)
sb.append("SourceDiskName: ").append(getSourceDiskName()).append(",");
if (getRestoreDate() != null)
sb.append("RestoreDate: ").append(getRestoreDate()).append(",");
if (getUseLatestRestorableAutoSnapshot() != null)
sb.append("UseLatestRestorableAutoSnapshot: ").append(getUseLatestRestorableAutoSnapshot());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateDiskFromSnapshotRequest == false)
return false;
CreateDiskFromSnapshotRequest other = (CreateDiskFromSnapshotRequest) obj;
if (other.getDiskName() == null ^ this.getDiskName() == null)
return false;
if (other.getDiskName() != null && other.getDiskName().equals(this.getDiskName()) == false)
return false;
if (other.getDiskSnapshotName() == null ^ this.getDiskSnapshotName() == null)
return false;
if (other.getDiskSnapshotName() != null && other.getDiskSnapshotName().equals(this.getDiskSnapshotName()) == false)
return false;
if (other.getAvailabilityZone() == null ^ this.getAvailabilityZone() == null)
return false;
if (other.getAvailabilityZone() != null && other.getAvailabilityZone().equals(this.getAvailabilityZone()) == false)
return false;
if (other.getSizeInGb() == null ^ this.getSizeInGb() == null)
return false;
if (other.getSizeInGb() != null && other.getSizeInGb().equals(this.getSizeInGb()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
if (other.getAddOns() == null ^ this.getAddOns() == null)
return false;
if (other.getAddOns() != null && other.getAddOns().equals(this.getAddOns()) == false)
return false;
if (other.getSourceDiskName() == null ^ this.getSourceDiskName() == null)
return false;
if (other.getSourceDiskName() != null && other.getSourceDiskName().equals(this.getSourceDiskName()) == false)
return false;
if (other.getRestoreDate() == null ^ this.getRestoreDate() == null)
return false;
if (other.getRestoreDate() != null && other.getRestoreDate().equals(this.getRestoreDate()) == false)
return false;
if (other.getUseLatestRestorableAutoSnapshot() == null ^ this.getUseLatestRestorableAutoSnapshot() == null)
return false;
if (other.getUseLatestRestorableAutoSnapshot() != null
&& other.getUseLatestRestorableAutoSnapshot().equals(this.getUseLatestRestorableAutoSnapshot()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDiskName() == null) ? 0 : getDiskName().hashCode());
hashCode = prime * hashCode + ((getDiskSnapshotName() == null) ? 0 : getDiskSnapshotName().hashCode());
hashCode = prime * hashCode + ((getAvailabilityZone() == null) ? 0 : getAvailabilityZone().hashCode());
hashCode = prime * hashCode + ((getSizeInGb() == null) ? 0 : getSizeInGb().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
hashCode = prime * hashCode + ((getAddOns() == null) ? 0 : getAddOns().hashCode());
hashCode = prime * hashCode + ((getSourceDiskName() == null) ? 0 : getSourceDiskName().hashCode());
hashCode = prime * hashCode + ((getRestoreDate() == null) ? 0 : getRestoreDate().hashCode());
hashCode = prime * hashCode + ((getUseLatestRestorableAutoSnapshot() == null) ? 0 : getUseLatestRestorableAutoSnapshot().hashCode());
return hashCode;
}
@Override
public CreateDiskFromSnapshotRequest clone() {
return (CreateDiskFromSnapshotRequest) super.clone();
}
}