com.amazonaws.services.drs.model.DataReplicationInitiation Maven / Gradle / Ivy
Show all versions of aws-java-sdk-drs Show documentation
/*
* 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;
/**
*
* Data replication initiation.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DataReplicationInitiation implements Serializable, Cloneable, StructuredPojo {
/**
*
* The date and time of the next attempt to initiate data replication.
*
*/
private String nextAttemptDateTime;
/**
*
* The date and time of the current attempt to initiate data replication.
*
*/
private String startDateTime;
/**
*
* The steps of the current attempt to initiate data replication.
*
*/
private java.util.List steps;
/**
*
* The date and time of the next attempt to initiate data replication.
*
*
* @param nextAttemptDateTime
* The date and time of the next attempt to initiate data replication.
*/
public void setNextAttemptDateTime(String nextAttemptDateTime) {
this.nextAttemptDateTime = nextAttemptDateTime;
}
/**
*
* The date and time of the next attempt to initiate data replication.
*
*
* @return The date and time of the next attempt to initiate data replication.
*/
public String getNextAttemptDateTime() {
return this.nextAttemptDateTime;
}
/**
*
* The date and time of the next attempt to initiate data replication.
*
*
* @param nextAttemptDateTime
* The date and time of the next attempt to initiate data replication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataReplicationInitiation withNextAttemptDateTime(String nextAttemptDateTime) {
setNextAttemptDateTime(nextAttemptDateTime);
return this;
}
/**
*
* The date and time of the current attempt to initiate data replication.
*
*
* @param startDateTime
* The date and time of the current attempt to initiate data replication.
*/
public void setStartDateTime(String startDateTime) {
this.startDateTime = startDateTime;
}
/**
*
* The date and time of the current attempt to initiate data replication.
*
*
* @return The date and time of the current attempt to initiate data replication.
*/
public String getStartDateTime() {
return this.startDateTime;
}
/**
*
* The date and time of the current attempt to initiate data replication.
*
*
* @param startDateTime
* The date and time of the current attempt to initiate data replication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataReplicationInitiation withStartDateTime(String startDateTime) {
setStartDateTime(startDateTime);
return this;
}
/**
*
* The steps of the current attempt to initiate data replication.
*
*
* @return The steps of the current attempt to initiate data replication.
*/
public java.util.List getSteps() {
return steps;
}
/**
*
* The steps of the current attempt to initiate data replication.
*
*
* @param steps
* The steps of the current attempt to initiate data replication.
*/
public void setSteps(java.util.Collection steps) {
if (steps == null) {
this.steps = null;
return;
}
this.steps = new java.util.ArrayList(steps);
}
/**
*
* The steps of the current attempt to initiate data replication.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSteps(java.util.Collection)} or {@link #withSteps(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param steps
* The steps of the current attempt to initiate data replication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataReplicationInitiation withSteps(DataReplicationInitiationStep... steps) {
if (this.steps == null) {
setSteps(new java.util.ArrayList(steps.length));
}
for (DataReplicationInitiationStep ele : steps) {
this.steps.add(ele);
}
return this;
}
/**
*
* The steps of the current attempt to initiate data replication.
*
*
* @param steps
* The steps of the current attempt to initiate data replication.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DataReplicationInitiation withSteps(java.util.Collection steps) {
setSteps(steps);
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 (getNextAttemptDateTime() != null)
sb.append("NextAttemptDateTime: ").append(getNextAttemptDateTime()).append(",");
if (getStartDateTime() != null)
sb.append("StartDateTime: ").append(getStartDateTime()).append(",");
if (getSteps() != null)
sb.append("Steps: ").append(getSteps());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DataReplicationInitiation == false)
return false;
DataReplicationInitiation other = (DataReplicationInitiation) obj;
if (other.getNextAttemptDateTime() == null ^ this.getNextAttemptDateTime() == null)
return false;
if (other.getNextAttemptDateTime() != null && other.getNextAttemptDateTime().equals(this.getNextAttemptDateTime()) == false)
return false;
if (other.getStartDateTime() == null ^ this.getStartDateTime() == null)
return false;
if (other.getStartDateTime() != null && other.getStartDateTime().equals(this.getStartDateTime()) == false)
return false;
if (other.getSteps() == null ^ this.getSteps() == null)
return false;
if (other.getSteps() != null && other.getSteps().equals(this.getSteps()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getNextAttemptDateTime() == null) ? 0 : getNextAttemptDateTime().hashCode());
hashCode = prime * hashCode + ((getStartDateTime() == null) ? 0 : getStartDateTime().hashCode());
hashCode = prime * hashCode + ((getSteps() == null) ? 0 : getSteps().hashCode());
return hashCode;
}
@Override
public DataReplicationInitiation clone() {
try {
return (DataReplicationInitiation) 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.DataReplicationInitiationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}