com.amazonaws.services.fsx.model.OpenZFSOriginSnapshotConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-fsx Show documentation
/*
* Copyright 2019-2024 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.fsx.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* The snapshot configuration used when creating an Amazon FSx for OpenZFS volume from a snapshot.
*
*
* @see AWS API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class OpenZFSOriginSnapshotConfiguration implements Serializable, Cloneable, StructuredPojo {
private String snapshotARN;
/**
*
* The strategy used when copying data from the snapshot to the new volume.
*
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is faster than
* copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin
* snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from another
* FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
*
*/
private String copyStrategy;
/**
* @param snapshotARN
*/
public void setSnapshotARN(String snapshotARN) {
this.snapshotARN = snapshotARN;
}
/**
* @return
*/
public String getSnapshotARN() {
return this.snapshotARN;
}
/**
* @param snapshotARN
* @return Returns a reference to this object so that method calls can be chained together.
*/
public OpenZFSOriginSnapshotConfiguration withSnapshotARN(String snapshotARN) {
setSnapshotARN(snapshotARN);
return this;
}
/**
*
* The strategy used when copying data from the snapshot to the new volume.
*
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is faster than
* copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin
* snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from another
* FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
*
*
* @param copyStrategy
* The strategy used when copying data from the snapshot to the new volume.
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is
* faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However,
* the origin snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from
* another FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
* @see OpenZFSCopyStrategy
*/
public void setCopyStrategy(String copyStrategy) {
this.copyStrategy = copyStrategy;
}
/**
*
* The strategy used when copying data from the snapshot to the new volume.
*
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is faster than
* copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin
* snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from another
* FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
*
*
* @return The strategy used when copying data from the snapshot to the new volume.
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is
* faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput.
* However, the origin snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from
* another FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
* @see OpenZFSCopyStrategy
*/
public String getCopyStrategy() {
return this.copyStrategy;
}
/**
*
* The strategy used when copying data from the snapshot to the new volume.
*
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is faster than
* copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin
* snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from another
* FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
*
*
* @param copyStrategy
* The strategy used when copying data from the snapshot to the new volume.
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is
* faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However,
* the origin snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from
* another FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see OpenZFSCopyStrategy
*/
public OpenZFSOriginSnapshotConfiguration withCopyStrategy(String copyStrategy) {
setCopyStrategy(copyStrategy);
return this;
}
/**
*
* The strategy used when copying data from the snapshot to the new volume.
*
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is faster than
* copying the data from a snapshot to a new volume and doesn't consume disk throughput. However, the origin
* snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from another
* FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
*
*
* @param copyStrategy
* The strategy used when copying data from the snapshot to the new volume.
*
* -
*
* CLONE
- The new volume references the data in the origin snapshot. Cloning a snapshot is
* faster than copying the data from a snapshot to a new volume and doesn't consume disk throughput. However,
* the origin snapshot can't be deleted if there is a volume using its copied data.
*
*
* -
*
* FULL_COPY
- Copies all data from the snapshot to the new volume.
*
*
*
*
*
* The INCREMENTAL_COPY
option is only for updating an existing volume by using a snapshot from
* another FSx for OpenZFS file system. For more information, see CopySnapshotAndUpdateVolume.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see OpenZFSCopyStrategy
*/
public OpenZFSOriginSnapshotConfiguration withCopyStrategy(OpenZFSCopyStrategy copyStrategy) {
this.copyStrategy = copyStrategy.toString();
return this;
}
/**
* 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 (getSnapshotARN() != null)
sb.append("SnapshotARN: ").append(getSnapshotARN()).append(",");
if (getCopyStrategy() != null)
sb.append("CopyStrategy: ").append(getCopyStrategy());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof OpenZFSOriginSnapshotConfiguration == false)
return false;
OpenZFSOriginSnapshotConfiguration other = (OpenZFSOriginSnapshotConfiguration) obj;
if (other.getSnapshotARN() == null ^ this.getSnapshotARN() == null)
return false;
if (other.getSnapshotARN() != null && other.getSnapshotARN().equals(this.getSnapshotARN()) == false)
return false;
if (other.getCopyStrategy() == null ^ this.getCopyStrategy() == null)
return false;
if (other.getCopyStrategy() != null && other.getCopyStrategy().equals(this.getCopyStrategy()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getSnapshotARN() == null) ? 0 : getSnapshotARN().hashCode());
hashCode = prime * hashCode + ((getCopyStrategy() == null) ? 0 : getCopyStrategy().hashCode());
return hashCode;
}
@Override
public OpenZFSOriginSnapshotConfiguration clone() {
try {
return (OpenZFSOriginSnapshotConfiguration) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.fsx.model.transform.OpenZFSOriginSnapshotConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}