com.amazonaws.services.resiliencehub.model.DisruptionCompliance Maven / Gradle / Ivy
Show all versions of aws-java-sdk-resiliencehub 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.resiliencehub.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Defines the compliance against the resiliency policy for a disruption.
*
*
* @see AWS
* API Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class DisruptionCompliance implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Recovery Point Objective (RPO) that is achievable, in seconds.
*
*/
private Integer achievableRpoInSecs;
/**
*
* The Recovery Time Objective (RTO) that is achievable, in seconds
*
*/
private Integer achievableRtoInSecs;
/**
*
* The current status of compliance for the resiliency policy.
*
*/
private String complianceStatus;
/**
*
* The current RPO, in seconds.
*
*/
private Integer currentRpoInSecs;
/**
*
* The current RTO, in seconds.
*
*/
private Integer currentRtoInSecs;
/**
*
* The disruption compliance message.
*
*/
private String message;
/**
*
* The RPO description.
*
*/
private String rpoDescription;
/**
*
* Reference identifier of the RPO .
*
*/
private String rpoReferenceId;
/**
*
* The RTO description.
*
*/
private String rtoDescription;
/**
*
* Reference identifier of the RTO.
*
*/
private String rtoReferenceId;
/**
*
* The Recovery Point Objective (RPO) that is achievable, in seconds.
*
*
* @param achievableRpoInSecs
* The Recovery Point Objective (RPO) that is achievable, in seconds.
*/
public void setAchievableRpoInSecs(Integer achievableRpoInSecs) {
this.achievableRpoInSecs = achievableRpoInSecs;
}
/**
*
* The Recovery Point Objective (RPO) that is achievable, in seconds.
*
*
* @return The Recovery Point Objective (RPO) that is achievable, in seconds.
*/
public Integer getAchievableRpoInSecs() {
return this.achievableRpoInSecs;
}
/**
*
* The Recovery Point Objective (RPO) that is achievable, in seconds.
*
*
* @param achievableRpoInSecs
* The Recovery Point Objective (RPO) that is achievable, in seconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withAchievableRpoInSecs(Integer achievableRpoInSecs) {
setAchievableRpoInSecs(achievableRpoInSecs);
return this;
}
/**
*
* The Recovery Time Objective (RTO) that is achievable, in seconds
*
*
* @param achievableRtoInSecs
* The Recovery Time Objective (RTO) that is achievable, in seconds
*/
public void setAchievableRtoInSecs(Integer achievableRtoInSecs) {
this.achievableRtoInSecs = achievableRtoInSecs;
}
/**
*
* The Recovery Time Objective (RTO) that is achievable, in seconds
*
*
* @return The Recovery Time Objective (RTO) that is achievable, in seconds
*/
public Integer getAchievableRtoInSecs() {
return this.achievableRtoInSecs;
}
/**
*
* The Recovery Time Objective (RTO) that is achievable, in seconds
*
*
* @param achievableRtoInSecs
* The Recovery Time Objective (RTO) that is achievable, in seconds
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withAchievableRtoInSecs(Integer achievableRtoInSecs) {
setAchievableRtoInSecs(achievableRtoInSecs);
return this;
}
/**
*
* The current status of compliance for the resiliency policy.
*
*
* @param complianceStatus
* The current status of compliance for the resiliency policy.
* @see ComplianceStatus
*/
public void setComplianceStatus(String complianceStatus) {
this.complianceStatus = complianceStatus;
}
/**
*
* The current status of compliance for the resiliency policy.
*
*
* @return The current status of compliance for the resiliency policy.
* @see ComplianceStatus
*/
public String getComplianceStatus() {
return this.complianceStatus;
}
/**
*
* The current status of compliance for the resiliency policy.
*
*
* @param complianceStatus
* The current status of compliance for the resiliency policy.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ComplianceStatus
*/
public DisruptionCompliance withComplianceStatus(String complianceStatus) {
setComplianceStatus(complianceStatus);
return this;
}
/**
*
* The current status of compliance for the resiliency policy.
*
*
* @param complianceStatus
* The current status of compliance for the resiliency policy.
* @return Returns a reference to this object so that method calls can be chained together.
* @see ComplianceStatus
*/
public DisruptionCompliance withComplianceStatus(ComplianceStatus complianceStatus) {
this.complianceStatus = complianceStatus.toString();
return this;
}
/**
*
* The current RPO, in seconds.
*
*
* @param currentRpoInSecs
* The current RPO, in seconds.
*/
public void setCurrentRpoInSecs(Integer currentRpoInSecs) {
this.currentRpoInSecs = currentRpoInSecs;
}
/**
*
* The current RPO, in seconds.
*
*
* @return The current RPO, in seconds.
*/
public Integer getCurrentRpoInSecs() {
return this.currentRpoInSecs;
}
/**
*
* The current RPO, in seconds.
*
*
* @param currentRpoInSecs
* The current RPO, in seconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withCurrentRpoInSecs(Integer currentRpoInSecs) {
setCurrentRpoInSecs(currentRpoInSecs);
return this;
}
/**
*
* The current RTO, in seconds.
*
*
* @param currentRtoInSecs
* The current RTO, in seconds.
*/
public void setCurrentRtoInSecs(Integer currentRtoInSecs) {
this.currentRtoInSecs = currentRtoInSecs;
}
/**
*
* The current RTO, in seconds.
*
*
* @return The current RTO, in seconds.
*/
public Integer getCurrentRtoInSecs() {
return this.currentRtoInSecs;
}
/**
*
* The current RTO, in seconds.
*
*
* @param currentRtoInSecs
* The current RTO, in seconds.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withCurrentRtoInSecs(Integer currentRtoInSecs) {
setCurrentRtoInSecs(currentRtoInSecs);
return this;
}
/**
*
* The disruption compliance message.
*
*
* @param message
* The disruption compliance message.
*/
public void setMessage(String message) {
this.message = message;
}
/**
*
* The disruption compliance message.
*
*
* @return The disruption compliance message.
*/
public String getMessage() {
return this.message;
}
/**
*
* The disruption compliance message.
*
*
* @param message
* The disruption compliance message.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withMessage(String message) {
setMessage(message);
return this;
}
/**
*
* The RPO description.
*
*
* @param rpoDescription
* The RPO description.
*/
public void setRpoDescription(String rpoDescription) {
this.rpoDescription = rpoDescription;
}
/**
*
* The RPO description.
*
*
* @return The RPO description.
*/
public String getRpoDescription() {
return this.rpoDescription;
}
/**
*
* The RPO description.
*
*
* @param rpoDescription
* The RPO description.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withRpoDescription(String rpoDescription) {
setRpoDescription(rpoDescription);
return this;
}
/**
*
* Reference identifier of the RPO .
*
*
* @param rpoReferenceId
* Reference identifier of the RPO .
*/
public void setRpoReferenceId(String rpoReferenceId) {
this.rpoReferenceId = rpoReferenceId;
}
/**
*
* Reference identifier of the RPO .
*
*
* @return Reference identifier of the RPO .
*/
public String getRpoReferenceId() {
return this.rpoReferenceId;
}
/**
*
* Reference identifier of the RPO .
*
*
* @param rpoReferenceId
* Reference identifier of the RPO .
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withRpoReferenceId(String rpoReferenceId) {
setRpoReferenceId(rpoReferenceId);
return this;
}
/**
*
* The RTO description.
*
*
* @param rtoDescription
* The RTO description.
*/
public void setRtoDescription(String rtoDescription) {
this.rtoDescription = rtoDescription;
}
/**
*
* The RTO description.
*
*
* @return The RTO description.
*/
public String getRtoDescription() {
return this.rtoDescription;
}
/**
*
* The RTO description.
*
*
* @param rtoDescription
* The RTO description.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withRtoDescription(String rtoDescription) {
setRtoDescription(rtoDescription);
return this;
}
/**
*
* Reference identifier of the RTO.
*
*
* @param rtoReferenceId
* Reference identifier of the RTO.
*/
public void setRtoReferenceId(String rtoReferenceId) {
this.rtoReferenceId = rtoReferenceId;
}
/**
*
* Reference identifier of the RTO.
*
*
* @return Reference identifier of the RTO.
*/
public String getRtoReferenceId() {
return this.rtoReferenceId;
}
/**
*
* Reference identifier of the RTO.
*
*
* @param rtoReferenceId
* Reference identifier of the RTO.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public DisruptionCompliance withRtoReferenceId(String rtoReferenceId) {
setRtoReferenceId(rtoReferenceId);
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 (getAchievableRpoInSecs() != null)
sb.append("AchievableRpoInSecs: ").append(getAchievableRpoInSecs()).append(",");
if (getAchievableRtoInSecs() != null)
sb.append("AchievableRtoInSecs: ").append(getAchievableRtoInSecs()).append(",");
if (getComplianceStatus() != null)
sb.append("ComplianceStatus: ").append(getComplianceStatus()).append(",");
if (getCurrentRpoInSecs() != null)
sb.append("CurrentRpoInSecs: ").append(getCurrentRpoInSecs()).append(",");
if (getCurrentRtoInSecs() != null)
sb.append("CurrentRtoInSecs: ").append(getCurrentRtoInSecs()).append(",");
if (getMessage() != null)
sb.append("Message: ").append(getMessage()).append(",");
if (getRpoDescription() != null)
sb.append("RpoDescription: ").append(getRpoDescription()).append(",");
if (getRpoReferenceId() != null)
sb.append("RpoReferenceId: ").append(getRpoReferenceId()).append(",");
if (getRtoDescription() != null)
sb.append("RtoDescription: ").append(getRtoDescription()).append(",");
if (getRtoReferenceId() != null)
sb.append("RtoReferenceId: ").append(getRtoReferenceId());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof DisruptionCompliance == false)
return false;
DisruptionCompliance other = (DisruptionCompliance) obj;
if (other.getAchievableRpoInSecs() == null ^ this.getAchievableRpoInSecs() == null)
return false;
if (other.getAchievableRpoInSecs() != null && other.getAchievableRpoInSecs().equals(this.getAchievableRpoInSecs()) == false)
return false;
if (other.getAchievableRtoInSecs() == null ^ this.getAchievableRtoInSecs() == null)
return false;
if (other.getAchievableRtoInSecs() != null && other.getAchievableRtoInSecs().equals(this.getAchievableRtoInSecs()) == false)
return false;
if (other.getComplianceStatus() == null ^ this.getComplianceStatus() == null)
return false;
if (other.getComplianceStatus() != null && other.getComplianceStatus().equals(this.getComplianceStatus()) == false)
return false;
if (other.getCurrentRpoInSecs() == null ^ this.getCurrentRpoInSecs() == null)
return false;
if (other.getCurrentRpoInSecs() != null && other.getCurrentRpoInSecs().equals(this.getCurrentRpoInSecs()) == false)
return false;
if (other.getCurrentRtoInSecs() == null ^ this.getCurrentRtoInSecs() == null)
return false;
if (other.getCurrentRtoInSecs() != null && other.getCurrentRtoInSecs().equals(this.getCurrentRtoInSecs()) == false)
return false;
if (other.getMessage() == null ^ this.getMessage() == null)
return false;
if (other.getMessage() != null && other.getMessage().equals(this.getMessage()) == false)
return false;
if (other.getRpoDescription() == null ^ this.getRpoDescription() == null)
return false;
if (other.getRpoDescription() != null && other.getRpoDescription().equals(this.getRpoDescription()) == false)
return false;
if (other.getRpoReferenceId() == null ^ this.getRpoReferenceId() == null)
return false;
if (other.getRpoReferenceId() != null && other.getRpoReferenceId().equals(this.getRpoReferenceId()) == false)
return false;
if (other.getRtoDescription() == null ^ this.getRtoDescription() == null)
return false;
if (other.getRtoDescription() != null && other.getRtoDescription().equals(this.getRtoDescription()) == false)
return false;
if (other.getRtoReferenceId() == null ^ this.getRtoReferenceId() == null)
return false;
if (other.getRtoReferenceId() != null && other.getRtoReferenceId().equals(this.getRtoReferenceId()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAchievableRpoInSecs() == null) ? 0 : getAchievableRpoInSecs().hashCode());
hashCode = prime * hashCode + ((getAchievableRtoInSecs() == null) ? 0 : getAchievableRtoInSecs().hashCode());
hashCode = prime * hashCode + ((getComplianceStatus() == null) ? 0 : getComplianceStatus().hashCode());
hashCode = prime * hashCode + ((getCurrentRpoInSecs() == null) ? 0 : getCurrentRpoInSecs().hashCode());
hashCode = prime * hashCode + ((getCurrentRtoInSecs() == null) ? 0 : getCurrentRtoInSecs().hashCode());
hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode());
hashCode = prime * hashCode + ((getRpoDescription() == null) ? 0 : getRpoDescription().hashCode());
hashCode = prime * hashCode + ((getRpoReferenceId() == null) ? 0 : getRpoReferenceId().hashCode());
hashCode = prime * hashCode + ((getRtoDescription() == null) ? 0 : getRtoDescription().hashCode());
hashCode = prime * hashCode + ((getRtoReferenceId() == null) ? 0 : getRtoReferenceId().hashCode());
return hashCode;
}
@Override
public DisruptionCompliance clone() {
try {
return (DisruptionCompliance) 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.resiliencehub.model.transform.DisruptionComplianceMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}