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

com.amazonaws.services.route53recoveryreadiness.model.RuleResult Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.778
Show 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.route53recoveryreadiness.model;

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

/**
 * 

* The result of a successful Rule request, with status for an individual rule. *

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

* The time the resource was last checked for readiness, in ISO-8601 format, UTC. *

*/ private java.util.Date lastCheckedTimestamp; /** *

* Details about the resource's readiness. *

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

* The readiness at rule level. *

*/ private String readiness; /** *

* The identifier of the rule. *

*/ private String ruleId; /** *

* The time the resource was last checked for readiness, in ISO-8601 format, UTC. *

* * @param lastCheckedTimestamp * The time the resource was last checked for readiness, in ISO-8601 format, UTC. */ public void setLastCheckedTimestamp(java.util.Date lastCheckedTimestamp) { this.lastCheckedTimestamp = lastCheckedTimestamp; } /** *

* The time the resource was last checked for readiness, in ISO-8601 format, UTC. *

* * @return The time the resource was last checked for readiness, in ISO-8601 format, UTC. */ public java.util.Date getLastCheckedTimestamp() { return this.lastCheckedTimestamp; } /** *

* The time the resource was last checked for readiness, in ISO-8601 format, UTC. *

* * @param lastCheckedTimestamp * The time the resource was last checked for readiness, in ISO-8601 format, UTC. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleResult withLastCheckedTimestamp(java.util.Date lastCheckedTimestamp) { setLastCheckedTimestamp(lastCheckedTimestamp); return this; } /** *

* Details about the resource's readiness. *

* * @return Details about the resource's readiness. */ public java.util.List getMessages() { return messages; } /** *

* Details about the resource's readiness. *

* * @param messages * Details about the resource's readiness. */ public void setMessages(java.util.Collection messages) { if (messages == null) { this.messages = null; return; } this.messages = new java.util.ArrayList(messages); } /** *

* Details about the resource's readiness. *

*

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

* * @param messages * Details about the resource's readiness. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleResult withMessages(Message... messages) { if (this.messages == null) { setMessages(new java.util.ArrayList(messages.length)); } for (Message ele : messages) { this.messages.add(ele); } return this; } /** *

* Details about the resource's readiness. *

* * @param messages * Details about the resource's readiness. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleResult withMessages(java.util.Collection messages) { setMessages(messages); return this; } /** *

* The readiness at rule level. *

* * @param readiness * The readiness at rule level. * @see Readiness */ public void setReadiness(String readiness) { this.readiness = readiness; } /** *

* The readiness at rule level. *

* * @return The readiness at rule level. * @see Readiness */ public String getReadiness() { return this.readiness; } /** *

* The readiness at rule level. *

* * @param readiness * The readiness at rule level. * @return Returns a reference to this object so that method calls can be chained together. * @see Readiness */ public RuleResult withReadiness(String readiness) { setReadiness(readiness); return this; } /** *

* The readiness at rule level. *

* * @param readiness * The readiness at rule level. * @return Returns a reference to this object so that method calls can be chained together. * @see Readiness */ public RuleResult withReadiness(Readiness readiness) { this.readiness = readiness.toString(); return this; } /** *

* The identifier of the rule. *

* * @param ruleId * The identifier of the rule. */ public void setRuleId(String ruleId) { this.ruleId = ruleId; } /** *

* The identifier of the rule. *

* * @return The identifier of the rule. */ public String getRuleId() { return this.ruleId; } /** *

* The identifier of the rule. *

* * @param ruleId * The identifier of the rule. * @return Returns a reference to this object so that method calls can be chained together. */ public RuleResult withRuleId(String ruleId) { setRuleId(ruleId); 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 (getLastCheckedTimestamp() != null) sb.append("LastCheckedTimestamp: ").append(getLastCheckedTimestamp()).append(","); if (getMessages() != null) sb.append("Messages: ").append(getMessages()).append(","); if (getReadiness() != null) sb.append("Readiness: ").append(getReadiness()).append(","); if (getRuleId() != null) sb.append("RuleId: ").append(getRuleId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof RuleResult == false) return false; RuleResult other = (RuleResult) obj; if (other.getLastCheckedTimestamp() == null ^ this.getLastCheckedTimestamp() == null) return false; if (other.getLastCheckedTimestamp() != null && other.getLastCheckedTimestamp().equals(this.getLastCheckedTimestamp()) == false) return false; if (other.getMessages() == null ^ this.getMessages() == null) return false; if (other.getMessages() != null && other.getMessages().equals(this.getMessages()) == false) return false; if (other.getReadiness() == null ^ this.getReadiness() == null) return false; if (other.getReadiness() != null && other.getReadiness().equals(this.getReadiness()) == false) return false; if (other.getRuleId() == null ^ this.getRuleId() == null) return false; if (other.getRuleId() != null && other.getRuleId().equals(this.getRuleId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLastCheckedTimestamp() == null) ? 0 : getLastCheckedTimestamp().hashCode()); hashCode = prime * hashCode + ((getMessages() == null) ? 0 : getMessages().hashCode()); hashCode = prime * hashCode + ((getReadiness() == null) ? 0 : getReadiness().hashCode()); hashCode = prime * hashCode + ((getRuleId() == null) ? 0 : getRuleId().hashCode()); return hashCode; } @Override public RuleResult clone() { try { return (RuleResult) 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.route53recoveryreadiness.model.transform.RuleResultMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy