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

com.amazonaws.services.fsx.model.CopySnapshotAndUpdateVolumeRequest Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon FSx module holds the client classes that are used for communicating with Amazon FSx Service

The newest version!
/*
 * 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.AmazonWebServiceRequest;

/**
 * 
 * @see AWS
 *      API Documentation
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class CopySnapshotAndUpdateVolumeRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {

    private String clientRequestToken;
    /**
     * 

* Specifies the ID of the volume that you are copying the snapshot to. *

*/ private String volumeId; private String sourceSnapshotARN; /** *

* Specifies the strategy to use when copying data from a snapshot to the volume. *

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume operation. *

*
*/ private String copyStrategy; /** *

* Confirms that you want to delete data on the destination volume that wasn’t there during the previous snapshot * replication. *

*

* Your replication will fail if you don’t include an option for a specific type of data and that data is on your * destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there are * intermediate snapshots on the destination, you can’t copy the snapshot. *

*
    *
  • *

    * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on the * source volume. *

    *
  • *
  • *

    * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the source * volume. *

    *
  • *
  • *

    * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match the * source snapshot that you’re copying. *

    *
  • *
*/ private java.util.List options; /** * @param clientRequestToken */ public void setClientRequestToken(String clientRequestToken) { this.clientRequestToken = clientRequestToken; } /** * @return */ public String getClientRequestToken() { return this.clientRequestToken; } /** * @param clientRequestToken * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotAndUpdateVolumeRequest withClientRequestToken(String clientRequestToken) { setClientRequestToken(clientRequestToken); return this; } /** *

* Specifies the ID of the volume that you are copying the snapshot to. *

* * @param volumeId * Specifies the ID of the volume that you are copying the snapshot to. */ public void setVolumeId(String volumeId) { this.volumeId = volumeId; } /** *

* Specifies the ID of the volume that you are copying the snapshot to. *

* * @return Specifies the ID of the volume that you are copying the snapshot to. */ public String getVolumeId() { return this.volumeId; } /** *

* Specifies the ID of the volume that you are copying the snapshot to. *

* * @param volumeId * Specifies the ID of the volume that you are copying the snapshot to. * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotAndUpdateVolumeRequest withVolumeId(String volumeId) { setVolumeId(volumeId); return this; } /** * @param sourceSnapshotARN */ public void setSourceSnapshotARN(String sourceSnapshotARN) { this.sourceSnapshotARN = sourceSnapshotARN; } /** * @return */ public String getSourceSnapshotARN() { return this.sourceSnapshotARN; } /** * @param sourceSnapshotARN * @return Returns a reference to this object so that method calls can be chained together. */ public CopySnapshotAndUpdateVolumeRequest withSourceSnapshotARN(String sourceSnapshotARN) { setSourceSnapshotARN(sourceSnapshotARN); return this; } /** *

* Specifies the strategy to use when copying data from a snapshot to the volume. *

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume operation. *

*
* * @param copyStrategy * Specifies the strategy to use when copying data from a snapshot to the volume.

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous * replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume * operation. *

* @see OpenZFSCopyStrategy */ public void setCopyStrategy(String copyStrategy) { this.copyStrategy = copyStrategy; } /** *

* Specifies the strategy to use when copying data from a snapshot to the volume. *

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume operation. *

*
* * @return Specifies the strategy to use when copying data from a snapshot to the volume.

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous * replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume * operation. *

* @see OpenZFSCopyStrategy */ public String getCopyStrategy() { return this.copyStrategy; } /** *

* Specifies the strategy to use when copying data from a snapshot to the volume. *

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume operation. *

*
* * @param copyStrategy * Specifies the strategy to use when copying data from a snapshot to the volume.

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous * replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume * operation. *

* @return Returns a reference to this object so that method calls can be chained together. * @see OpenZFSCopyStrategy */ public CopySnapshotAndUpdateVolumeRequest withCopyStrategy(String copyStrategy) { setCopyStrategy(copyStrategy); return this; } /** *

* Specifies the strategy to use when copying data from a snapshot to the volume. *

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume operation. *

*
* * @param copyStrategy * Specifies the strategy to use when copying data from a snapshot to the volume.

*
    *
  • *

    * FULL_COPY - Copies all data from the snapshot to the volume. *

    *
  • *
  • *

    * INCREMENTAL_COPY - Copies only the snapshot data that's changed since the previous * replication. *

    *
  • *
* *

* CLONE isn't a valid copy strategy option for the CopySnapshotAndUpdateVolume * operation. *

* @return Returns a reference to this object so that method calls can be chained together. * @see OpenZFSCopyStrategy */ public CopySnapshotAndUpdateVolumeRequest withCopyStrategy(OpenZFSCopyStrategy copyStrategy) { this.copyStrategy = copyStrategy.toString(); return this; } /** *

* Confirms that you want to delete data on the destination volume that wasn’t there during the previous snapshot * replication. *

*

* Your replication will fail if you don’t include an option for a specific type of data and that data is on your * destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there are * intermediate snapshots on the destination, you can’t copy the snapshot. *

*
    *
  • *

    * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on the * source volume. *

    *
  • *
  • *

    * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the source * volume. *

    *
  • *
  • *

    * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match the * source snapshot that you’re copying. *

    *
  • *
* * @return Confirms that you want to delete data on the destination volume that wasn’t there during the previous * snapshot replication.

*

* Your replication will fail if you don’t include an option for a specific type of data and that data is on * your destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there * are intermediate snapshots on the destination, you can’t copy the snapshot. *

*
    *
  • *

    * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on * the source volume. *

    *
  • *
  • *

    * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the * source volume. *

    *
  • *
  • *

    * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match * the source snapshot that you’re copying. *

    *
  • * @see UpdateOpenZFSVolumeOption */ public java.util.List getOptions() { return options; } /** *

    * Confirms that you want to delete data on the destination volume that wasn’t there during the previous snapshot * replication. *

    *

    * Your replication will fail if you don’t include an option for a specific type of data and that data is on your * destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there are * intermediate snapshots on the destination, you can’t copy the snapshot. *

    *
      *
    • *

      * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on the * source volume. *

      *
    • *
    • *

      * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the source * volume. *

      *
    • *
    • *

      * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match the * source snapshot that you’re copying. *

      *
    • *
    * * @param options * Confirms that you want to delete data on the destination volume that wasn’t there during the previous * snapshot replication.

    *

    * Your replication will fail if you don’t include an option for a specific type of data and that data is on * your destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there * are intermediate snapshots on the destination, you can’t copy the snapshot. *

    *
      *
    • *

      * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on * the source volume. *

      *
    • *
    • *

      * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the * source volume. *

      *
    • *
    • *

      * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match * the source snapshot that you’re copying. *

      *
    • * @see UpdateOpenZFSVolumeOption */ public void setOptions(java.util.Collection options) { if (options == null) { this.options = null; return; } this.options = new java.util.ArrayList(options); } /** *

      * Confirms that you want to delete data on the destination volume that wasn’t there during the previous snapshot * replication. *

      *

      * Your replication will fail if you don’t include an option for a specific type of data and that data is on your * destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there are * intermediate snapshots on the destination, you can’t copy the snapshot. *

      *
        *
      • *

        * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on the * source volume. *

        *
      • *
      • *

        * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the source * volume. *

        *
      • *
      • *

        * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match the * source snapshot that you’re copying. *

        *
      • *
      *

      * NOTE: This method appends the values to the existing list (if any). Use * {@link #setOptions(java.util.Collection)} or {@link #withOptions(java.util.Collection)} if you want to override * the existing values. *

      * * @param options * Confirms that you want to delete data on the destination volume that wasn’t there during the previous * snapshot replication.

      *

      * Your replication will fail if you don’t include an option for a specific type of data and that data is on * your destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there * are intermediate snapshots on the destination, you can’t copy the snapshot. *

      *
        *
      • *

        * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on * the source volume. *

        *
      • *
      • *

        * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the * source volume. *

        *
      • *
      • *

        * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match * the source snapshot that you’re copying. *

        *
      • * @return Returns a reference to this object so that method calls can be chained together. * @see UpdateOpenZFSVolumeOption */ public CopySnapshotAndUpdateVolumeRequest withOptions(String... options) { if (this.options == null) { setOptions(new java.util.ArrayList(options.length)); } for (String ele : options) { this.options.add(ele); } return this; } /** *

        * Confirms that you want to delete data on the destination volume that wasn’t there during the previous snapshot * replication. *

        *

        * Your replication will fail if you don’t include an option for a specific type of data and that data is on your * destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there are * intermediate snapshots on the destination, you can’t copy the snapshot. *

        *
          *
        • *

          * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on the * source volume. *

          *
        • *
        • *

          * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the source * volume. *

          *
        • *
        • *

          * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match the * source snapshot that you’re copying. *

          *
        • *
        * * @param options * Confirms that you want to delete data on the destination volume that wasn’t there during the previous * snapshot replication.

        *

        * Your replication will fail if you don’t include an option for a specific type of data and that data is on * your destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there * are intermediate snapshots on the destination, you can’t copy the snapshot. *

        *
          *
        • *

          * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on * the source volume. *

          *
        • *
        • *

          * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the * source volume. *

          *
        • *
        • *

          * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match * the source snapshot that you’re copying. *

          *
        • * @return Returns a reference to this object so that method calls can be chained together. * @see UpdateOpenZFSVolumeOption */ public CopySnapshotAndUpdateVolumeRequest withOptions(java.util.Collection options) { setOptions(options); return this; } /** *

          * Confirms that you want to delete data on the destination volume that wasn’t there during the previous snapshot * replication. *

          *

          * Your replication will fail if you don’t include an option for a specific type of data and that data is on your * destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there are * intermediate snapshots on the destination, you can’t copy the snapshot. *

          *
            *
          • *

            * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on the * source volume. *

            *
          • *
          • *

            * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the source * volume. *

            *
          • *
          • *

            * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match the * source snapshot that you’re copying. *

            *
          • *
          * * @param options * Confirms that you want to delete data on the destination volume that wasn’t there during the previous * snapshot replication.

          *

          * Your replication will fail if you don’t include an option for a specific type of data and that data is on * your destination. For example, if you don’t include DELETE_INTERMEDIATE_SNAPSHOTS and there * are intermediate snapshots on the destination, you can’t copy the snapshot. *

          *
            *
          • *

            * DELETE_INTERMEDIATE_SNAPSHOTS - Deletes snapshots on the destination volume that aren’t on * the source volume. *

            *
          • *
          • *

            * DELETE_CLONED_VOLUMES - Deletes snapshot clones on the destination volume that aren't on the * source volume. *

            *
          • *
          • *

            * DELETE_INTERMEDIATE_DATA - Overwrites snapshots on the destination volume that don’t match * the source snapshot that you’re copying. *

            *
          • * @return Returns a reference to this object so that method calls can be chained together. * @see UpdateOpenZFSVolumeOption */ public CopySnapshotAndUpdateVolumeRequest withOptions(UpdateOpenZFSVolumeOption... options) { java.util.ArrayList optionsCopy = new java.util.ArrayList(options.length); for (UpdateOpenZFSVolumeOption value : options) { optionsCopy.add(value.toString()); } if (getOptions() == null) { setOptions(optionsCopy); } else { getOptions().addAll(optionsCopy); } 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 (getClientRequestToken() != null) sb.append("ClientRequestToken: ").append(getClientRequestToken()).append(","); if (getVolumeId() != null) sb.append("VolumeId: ").append(getVolumeId()).append(","); if (getSourceSnapshotARN() != null) sb.append("SourceSnapshotARN: ").append(getSourceSnapshotARN()).append(","); if (getCopyStrategy() != null) sb.append("CopyStrategy: ").append(getCopyStrategy()).append(","); if (getOptions() != null) sb.append("Options: ").append(getOptions()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CopySnapshotAndUpdateVolumeRequest == false) return false; CopySnapshotAndUpdateVolumeRequest other = (CopySnapshotAndUpdateVolumeRequest) obj; if (other.getClientRequestToken() == null ^ this.getClientRequestToken() == null) return false; if (other.getClientRequestToken() != null && other.getClientRequestToken().equals(this.getClientRequestToken()) == false) return false; if (other.getVolumeId() == null ^ this.getVolumeId() == null) return false; if (other.getVolumeId() != null && other.getVolumeId().equals(this.getVolumeId()) == false) return false; if (other.getSourceSnapshotARN() == null ^ this.getSourceSnapshotARN() == null) return false; if (other.getSourceSnapshotARN() != null && other.getSourceSnapshotARN().equals(this.getSourceSnapshotARN()) == false) return false; if (other.getCopyStrategy() == null ^ this.getCopyStrategy() == null) return false; if (other.getCopyStrategy() != null && other.getCopyStrategy().equals(this.getCopyStrategy()) == false) return false; if (other.getOptions() == null ^ this.getOptions() == null) return false; if (other.getOptions() != null && other.getOptions().equals(this.getOptions()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); hashCode = prime * hashCode + ((getVolumeId() == null) ? 0 : getVolumeId().hashCode()); hashCode = prime * hashCode + ((getSourceSnapshotARN() == null) ? 0 : getSourceSnapshotARN().hashCode()); hashCode = prime * hashCode + ((getCopyStrategy() == null) ? 0 : getCopyStrategy().hashCode()); hashCode = prime * hashCode + ((getOptions() == null) ? 0 : getOptions().hashCode()); return hashCode; } @Override public CopySnapshotAndUpdateVolumeRequest clone() { return (CopySnapshotAndUpdateVolumeRequest) super.clone(); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy