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

com.amazonaws.services.resiliencehub.model.ResourceError Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Resilience Hub module holds the client classes that are used for communicating with AWS Resilience Hub Service

There is a newer version: 1.12.772
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.resiliencehub.model;

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

/**
 * 

* Defines application resource errors. *

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

* Identifier of the logical resource. *

*/ private String logicalResourceId; /** *

* Identifier of the physical resource. *

*/ private String physicalResourceId; /** *

* This is the error message. *

*/ private String reason; /** *

* Identifier of the logical resource. *

* * @param logicalResourceId * Identifier of the logical resource. */ public void setLogicalResourceId(String logicalResourceId) { this.logicalResourceId = logicalResourceId; } /** *

* Identifier of the logical resource. *

* * @return Identifier of the logical resource. */ public String getLogicalResourceId() { return this.logicalResourceId; } /** *

* Identifier of the logical resource. *

* * @param logicalResourceId * Identifier of the logical resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceError withLogicalResourceId(String logicalResourceId) { setLogicalResourceId(logicalResourceId); return this; } /** *

* Identifier of the physical resource. *

* * @param physicalResourceId * Identifier of the physical resource. */ public void setPhysicalResourceId(String physicalResourceId) { this.physicalResourceId = physicalResourceId; } /** *

* Identifier of the physical resource. *

* * @return Identifier of the physical resource. */ public String getPhysicalResourceId() { return this.physicalResourceId; } /** *

* Identifier of the physical resource. *

* * @param physicalResourceId * Identifier of the physical resource. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceError withPhysicalResourceId(String physicalResourceId) { setPhysicalResourceId(physicalResourceId); return this; } /** *

* This is the error message. *

* * @param reason * This is the error message. */ public void setReason(String reason) { this.reason = reason; } /** *

* This is the error message. *

* * @return This is the error message. */ public String getReason() { return this.reason; } /** *

* This is the error message. *

* * @param reason * This is the error message. * @return Returns a reference to this object so that method calls can be chained together. */ public ResourceError withReason(String reason) { setReason(reason); 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 (getLogicalResourceId() != null) sb.append("LogicalResourceId: ").append(getLogicalResourceId()).append(","); if (getPhysicalResourceId() != null) sb.append("PhysicalResourceId: ").append(getPhysicalResourceId()).append(","); if (getReason() != null) sb.append("Reason: ").append(getReason()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ResourceError == false) return false; ResourceError other = (ResourceError) obj; if (other.getLogicalResourceId() == null ^ this.getLogicalResourceId() == null) return false; if (other.getLogicalResourceId() != null && other.getLogicalResourceId().equals(this.getLogicalResourceId()) == false) return false; if (other.getPhysicalResourceId() == null ^ this.getPhysicalResourceId() == null) return false; if (other.getPhysicalResourceId() != null && other.getPhysicalResourceId().equals(this.getPhysicalResourceId()) == false) return false; if (other.getReason() == null ^ this.getReason() == null) return false; if (other.getReason() != null && other.getReason().equals(this.getReason()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); hashCode = prime * hashCode + ((getPhysicalResourceId() == null) ? 0 : getPhysicalResourceId().hashCode()); hashCode = prime * hashCode + ((getReason() == null) ? 0 : getReason().hashCode()); return hashCode; } @Override public ResourceError clone() { try { return (ResourceError) 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.ResourceErrorMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy