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

com.amazonaws.services.memorydb.model.Snapshot Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Amazon MemoryDB module holds the client classes that are used for communicating with Amazon MemoryDB 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.memorydb.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Represents a copy of an entire cluster as of the time when the snapshot was taken. *

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

* The name of the snapshot *

*/ private String name; /** *

* The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. *

*/ private String status; /** *

* Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). *

*/ private String source; /** *

* The ID of the KMS key used to encrypt the snapshot. *

*/ private String kmsKeyId; /** *

* The ARN (Amazon Resource Name) of the snapshot. *

*/ private String aRN; /** *

* The configuration of the cluster from which the snapshot was taken *

*/ private ClusterConfiguration clusterConfiguration; /** *

* Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must * be set when using r6gd nodes. For more information, see Data tiering. *

*/ private String dataTiering; /** *

* The name of the snapshot *

* * @param name * The name of the snapshot */ public void setName(String name) { this.name = name; } /** *

* The name of the snapshot *

* * @return The name of the snapshot */ public String getName() { return this.name; } /** *

* The name of the snapshot *

* * @param name * The name of the snapshot * @return Returns a reference to this object so that method calls can be chained together. */ public Snapshot withName(String name) { setName(name); return this; } /** *

* The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. *

* * @param status * The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. */ public void setStatus(String status) { this.status = status; } /** *

* The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. *

* * @return The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. */ public String getStatus() { return this.status; } /** *

* The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. *

* * @param status * The status of the snapshot. Valid values: creating | available | restoring | copying | deleting. * @return Returns a reference to this object so that method calls can be chained together. */ public Snapshot withStatus(String status) { setStatus(status); return this; } /** *

* Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). *

* * @param source * Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). */ public void setSource(String source) { this.source = source; } /** *

* Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). *

* * @return Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). */ public String getSource() { return this.source; } /** *

* Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). *

* * @param source * Indicates whether the snapshot is from an automatic backup (automated) or was created manually (manual). * @return Returns a reference to this object so that method calls can be chained together. */ public Snapshot withSource(String source) { setSource(source); return this; } /** *

* The ID of the KMS key used to encrypt the snapshot. *

* * @param kmsKeyId * The ID of the KMS key used to encrypt the snapshot. */ public void setKmsKeyId(String kmsKeyId) { this.kmsKeyId = kmsKeyId; } /** *

* The ID of the KMS key used to encrypt the snapshot. *

* * @return The ID of the KMS key used to encrypt the snapshot. */ public String getKmsKeyId() { return this.kmsKeyId; } /** *

* The ID of the KMS key used to encrypt the snapshot. *

* * @param kmsKeyId * The ID of the KMS key used to encrypt the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public Snapshot withKmsKeyId(String kmsKeyId) { setKmsKeyId(kmsKeyId); return this; } /** *

* The ARN (Amazon Resource Name) of the snapshot. *

* * @param aRN * The ARN (Amazon Resource Name) of the snapshot. */ public void setARN(String aRN) { this.aRN = aRN; } /** *

* The ARN (Amazon Resource Name) of the snapshot. *

* * @return The ARN (Amazon Resource Name) of the snapshot. */ public String getARN() { return this.aRN; } /** *

* The ARN (Amazon Resource Name) of the snapshot. *

* * @param aRN * The ARN (Amazon Resource Name) of the snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public Snapshot withARN(String aRN) { setARN(aRN); return this; } /** *

* The configuration of the cluster from which the snapshot was taken *

* * @param clusterConfiguration * The configuration of the cluster from which the snapshot was taken */ public void setClusterConfiguration(ClusterConfiguration clusterConfiguration) { this.clusterConfiguration = clusterConfiguration; } /** *

* The configuration of the cluster from which the snapshot was taken *

* * @return The configuration of the cluster from which the snapshot was taken */ public ClusterConfiguration getClusterConfiguration() { return this.clusterConfiguration; } /** *

* The configuration of the cluster from which the snapshot was taken *

* * @param clusterConfiguration * The configuration of the cluster from which the snapshot was taken * @return Returns a reference to this object so that method calls can be chained together. */ public Snapshot withClusterConfiguration(ClusterConfiguration clusterConfiguration) { setClusterConfiguration(clusterConfiguration); return this; } /** *

* Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must * be set when using r6gd nodes. For more information, see Data tiering. *

* * @param dataTiering * Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter * must be set when using r6gd nodes. For more information, see Data tiering. * @see DataTieringStatus */ public void setDataTiering(String dataTiering) { this.dataTiering = dataTiering; } /** *

* Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must * be set when using r6gd nodes. For more information, see Data tiering. *

* * @return Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This * parameter must be set when using r6gd nodes. For more information, see Data tiering. * @see DataTieringStatus */ public String getDataTiering() { return this.dataTiering; } /** *

* Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must * be set when using r6gd nodes. For more information, see Data tiering. *

* * @param dataTiering * Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter * must be set when using r6gd nodes. For more information, see Data tiering. * @return Returns a reference to this object so that method calls can be chained together. * @see DataTieringStatus */ public Snapshot withDataTiering(String dataTiering) { setDataTiering(dataTiering); return this; } /** *

* Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter must * be set when using r6gd nodes. For more information, see Data tiering. *

* * @param dataTiering * Enables data tiering. Data tiering is only supported for clusters using the r6gd node type. This parameter * must be set when using r6gd nodes. For more information, see Data tiering. * @return Returns a reference to this object so that method calls can be chained together. * @see DataTieringStatus */ public Snapshot withDataTiering(DataTieringStatus dataTiering) { this.dataTiering = dataTiering.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 (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getSource() != null) sb.append("Source: ").append(getSource()).append(","); if (getKmsKeyId() != null) sb.append("KmsKeyId: ").append(getKmsKeyId()).append(","); if (getARN() != null) sb.append("ARN: ").append(getARN()).append(","); if (getClusterConfiguration() != null) sb.append("ClusterConfiguration: ").append(getClusterConfiguration()).append(","); if (getDataTiering() != null) sb.append("DataTiering: ").append(getDataTiering()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Snapshot == false) return false; Snapshot other = (Snapshot) obj; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getSource() == null ^ this.getSource() == null) return false; if (other.getSource() != null && other.getSource().equals(this.getSource()) == false) return false; if (other.getKmsKeyId() == null ^ this.getKmsKeyId() == null) return false; if (other.getKmsKeyId() != null && other.getKmsKeyId().equals(this.getKmsKeyId()) == false) return false; if (other.getARN() == null ^ this.getARN() == null) return false; if (other.getARN() != null && other.getARN().equals(this.getARN()) == false) return false; if (other.getClusterConfiguration() == null ^ this.getClusterConfiguration() == null) return false; if (other.getClusterConfiguration() != null && other.getClusterConfiguration().equals(this.getClusterConfiguration()) == false) return false; if (other.getDataTiering() == null ^ this.getDataTiering() == null) return false; if (other.getDataTiering() != null && other.getDataTiering().equals(this.getDataTiering()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getSource() == null) ? 0 : getSource().hashCode()); hashCode = prime * hashCode + ((getKmsKeyId() == null) ? 0 : getKmsKeyId().hashCode()); hashCode = prime * hashCode + ((getARN() == null) ? 0 : getARN().hashCode()); hashCode = prime * hashCode + ((getClusterConfiguration() == null) ? 0 : getClusterConfiguration().hashCode()); hashCode = prime * hashCode + ((getDataTiering() == null) ? 0 : getDataTiering().hashCode()); return hashCode; } @Override public Snapshot clone() { try { return (Snapshot) 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.memorydb.model.transform.SnapshotMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy