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

com.amazonaws.services.drs.model.RecoverySnapshot Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Elastic Disaster Recovery module holds the client classes that are used for communicating with Elastic Disaster Recovery Service

There is a newer version: 1.12.772
Show newest version
/*
 * 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.drs.model;

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

/**
 * 

* A snapshot of a Source Server used during recovery. *

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

* A list of EBS snapshots. *

*/ private java.util.List ebsSnapshots; /** *

* The timestamp of when we expect the snapshot to be taken. *

*/ private String expectedTimestamp; /** *

* The ID of the Recovery Snapshot. *

*/ private String snapshotID; /** *

* The ID of the Source Server that the snapshot was taken for. *

*/ private String sourceServerID; /** *

* The actual timestamp that the snapshot was taken. *

*/ private String timestamp; /** *

* A list of EBS snapshots. *

* * @return A list of EBS snapshots. */ public java.util.List getEbsSnapshots() { return ebsSnapshots; } /** *

* A list of EBS snapshots. *

* * @param ebsSnapshots * A list of EBS snapshots. */ public void setEbsSnapshots(java.util.Collection ebsSnapshots) { if (ebsSnapshots == null) { this.ebsSnapshots = null; return; } this.ebsSnapshots = new java.util.ArrayList(ebsSnapshots); } /** *

* A list of EBS snapshots. *

*

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

* * @param ebsSnapshots * A list of EBS snapshots. * @return Returns a reference to this object so that method calls can be chained together. */ public RecoverySnapshot withEbsSnapshots(String... ebsSnapshots) { if (this.ebsSnapshots == null) { setEbsSnapshots(new java.util.ArrayList(ebsSnapshots.length)); } for (String ele : ebsSnapshots) { this.ebsSnapshots.add(ele); } return this; } /** *

* A list of EBS snapshots. *

* * @param ebsSnapshots * A list of EBS snapshots. * @return Returns a reference to this object so that method calls can be chained together. */ public RecoverySnapshot withEbsSnapshots(java.util.Collection ebsSnapshots) { setEbsSnapshots(ebsSnapshots); return this; } /** *

* The timestamp of when we expect the snapshot to be taken. *

* * @param expectedTimestamp * The timestamp of when we expect the snapshot to be taken. */ public void setExpectedTimestamp(String expectedTimestamp) { this.expectedTimestamp = expectedTimestamp; } /** *

* The timestamp of when we expect the snapshot to be taken. *

* * @return The timestamp of when we expect the snapshot to be taken. */ public String getExpectedTimestamp() { return this.expectedTimestamp; } /** *

* The timestamp of when we expect the snapshot to be taken. *

* * @param expectedTimestamp * The timestamp of when we expect the snapshot to be taken. * @return Returns a reference to this object so that method calls can be chained together. */ public RecoverySnapshot withExpectedTimestamp(String expectedTimestamp) { setExpectedTimestamp(expectedTimestamp); return this; } /** *

* The ID of the Recovery Snapshot. *

* * @param snapshotID * The ID of the Recovery Snapshot. */ public void setSnapshotID(String snapshotID) { this.snapshotID = snapshotID; } /** *

* The ID of the Recovery Snapshot. *

* * @return The ID of the Recovery Snapshot. */ public String getSnapshotID() { return this.snapshotID; } /** *

* The ID of the Recovery Snapshot. *

* * @param snapshotID * The ID of the Recovery Snapshot. * @return Returns a reference to this object so that method calls can be chained together. */ public RecoverySnapshot withSnapshotID(String snapshotID) { setSnapshotID(snapshotID); return this; } /** *

* The ID of the Source Server that the snapshot was taken for. *

* * @param sourceServerID * The ID of the Source Server that the snapshot was taken for. */ public void setSourceServerID(String sourceServerID) { this.sourceServerID = sourceServerID; } /** *

* The ID of the Source Server that the snapshot was taken for. *

* * @return The ID of the Source Server that the snapshot was taken for. */ public String getSourceServerID() { return this.sourceServerID; } /** *

* The ID of the Source Server that the snapshot was taken for. *

* * @param sourceServerID * The ID of the Source Server that the snapshot was taken for. * @return Returns a reference to this object so that method calls can be chained together. */ public RecoverySnapshot withSourceServerID(String sourceServerID) { setSourceServerID(sourceServerID); return this; } /** *

* The actual timestamp that the snapshot was taken. *

* * @param timestamp * The actual timestamp that the snapshot was taken. */ public void setTimestamp(String timestamp) { this.timestamp = timestamp; } /** *

* The actual timestamp that the snapshot was taken. *

* * @return The actual timestamp that the snapshot was taken. */ public String getTimestamp() { return this.timestamp; } /** *

* The actual timestamp that the snapshot was taken. *

* * @param timestamp * The actual timestamp that the snapshot was taken. * @return Returns a reference to this object so that method calls can be chained together. */ public RecoverySnapshot withTimestamp(String timestamp) { setTimestamp(timestamp); 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 (getEbsSnapshots() != null) sb.append("EbsSnapshots: ").append(getEbsSnapshots()).append(","); if (getExpectedTimestamp() != null) sb.append("ExpectedTimestamp: ").append(getExpectedTimestamp()).append(","); if (getSnapshotID() != null) sb.append("SnapshotID: ").append(getSnapshotID()).append(","); if (getSourceServerID() != null) sb.append("SourceServerID: ").append(getSourceServerID()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RecoverySnapshot == false) return false; RecoverySnapshot other = (RecoverySnapshot) obj; if (other.getEbsSnapshots() == null ^ this.getEbsSnapshots() == null) return false; if (other.getEbsSnapshots() != null && other.getEbsSnapshots().equals(this.getEbsSnapshots()) == false) return false; if (other.getExpectedTimestamp() == null ^ this.getExpectedTimestamp() == null) return false; if (other.getExpectedTimestamp() != null && other.getExpectedTimestamp().equals(this.getExpectedTimestamp()) == false) return false; if (other.getSnapshotID() == null ^ this.getSnapshotID() == null) return false; if (other.getSnapshotID() != null && other.getSnapshotID().equals(this.getSnapshotID()) == false) return false; if (other.getSourceServerID() == null ^ this.getSourceServerID() == null) return false; if (other.getSourceServerID() != null && other.getSourceServerID().equals(this.getSourceServerID()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null) return false; if (other.getTimestamp() != null && other.getTimestamp().equals(this.getTimestamp()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getEbsSnapshots() == null) ? 0 : getEbsSnapshots().hashCode()); hashCode = prime * hashCode + ((getExpectedTimestamp() == null) ? 0 : getExpectedTimestamp().hashCode()); hashCode = prime * hashCode + ((getSnapshotID() == null) ? 0 : getSnapshotID().hashCode()); hashCode = prime * hashCode + ((getSourceServerID() == null) ? 0 : getSourceServerID().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); return hashCode; } @Override public RecoverySnapshot clone() { try { return (RecoverySnapshot) 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.drs.model.transform.RecoverySnapshotMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy