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

com.amazonaws.services.networkmanager.model.AttachmentError Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS Network Manager module holds the client classes that are used for communicating with AWS Network Manager 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.networkmanager.model;

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

/**
 * 

* Describes the error associated with an attachment request. *

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

* The error code for the attachment request. *

*/ private String code; /** *

* The message associated with the error code. *

*/ private String message; /** *

* The ARN of the requested attachment resource. *

*/ private String resourceArn; /** *

* The ID of the attachment request. *

*/ private String requestId; /** *

* The error code for the attachment request. *

* * @param code * The error code for the attachment request. * @see AttachmentErrorCode */ public void setCode(String code) { this.code = code; } /** *

* The error code for the attachment request. *

* * @return The error code for the attachment request. * @see AttachmentErrorCode */ public String getCode() { return this.code; } /** *

* The error code for the attachment request. *

* * @param code * The error code for the attachment request. * @return Returns a reference to this object so that method calls can be chained together. * @see AttachmentErrorCode */ public AttachmentError withCode(String code) { setCode(code); return this; } /** *

* The error code for the attachment request. *

* * @param code * The error code for the attachment request. * @return Returns a reference to this object so that method calls can be chained together. * @see AttachmentErrorCode */ public AttachmentError withCode(AttachmentErrorCode code) { this.code = code.toString(); return this; } /** *

* The message associated with the error code. *

* * @param message * The message associated with the error code. */ public void setMessage(String message) { this.message = message; } /** *

* The message associated with the error code. *

* * @return The message associated with the error code. */ public String getMessage() { return this.message; } /** *

* The message associated with the error code. *

* * @param message * The message associated with the error code. * @return Returns a reference to this object so that method calls can be chained together. */ public AttachmentError withMessage(String message) { setMessage(message); return this; } /** *

* The ARN of the requested attachment resource. *

* * @param resourceArn * The ARN of the requested attachment resource. */ public void setResourceArn(String resourceArn) { this.resourceArn = resourceArn; } /** *

* The ARN of the requested attachment resource. *

* * @return The ARN of the requested attachment resource. */ public String getResourceArn() { return this.resourceArn; } /** *

* The ARN of the requested attachment resource. *

* * @param resourceArn * The ARN of the requested attachment resource. * @return Returns a reference to this object so that method calls can be chained together. */ public AttachmentError withResourceArn(String resourceArn) { setResourceArn(resourceArn); return this; } /** *

* The ID of the attachment request. *

* * @param requestId * The ID of the attachment request. */ public void setRequestId(String requestId) { this.requestId = requestId; } /** *

* The ID of the attachment request. *

* * @return The ID of the attachment request. */ public String getRequestId() { return this.requestId; } /** *

* The ID of the attachment request. *

* * @param requestId * The ID of the attachment request. * @return Returns a reference to this object so that method calls can be chained together. */ public AttachmentError withRequestId(String requestId) { setRequestId(requestId); 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 (getCode() != null) sb.append("Code: ").append(getCode()).append(","); if (getMessage() != null) sb.append("Message: ").append(getMessage()).append(","); if (getResourceArn() != null) sb.append("ResourceArn: ").append(getResourceArn()).append(","); if (getRequestId() != null) sb.append("RequestId: ").append(getRequestId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AttachmentError == false) return false; AttachmentError other = (AttachmentError) obj; if (other.getCode() == null ^ this.getCode() == null) return false; if (other.getCode() != null && other.getCode().equals(this.getCode()) == 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.getResourceArn() == null ^ this.getResourceArn() == null) return false; if (other.getResourceArn() != null && other.getResourceArn().equals(this.getResourceArn()) == false) return false; if (other.getRequestId() == null ^ this.getRequestId() == null) return false; if (other.getRequestId() != null && other.getRequestId().equals(this.getRequestId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCode() == null) ? 0 : getCode().hashCode()); hashCode = prime * hashCode + ((getMessage() == null) ? 0 : getMessage().hashCode()); hashCode = prime * hashCode + ((getResourceArn() == null) ? 0 : getResourceArn().hashCode()); hashCode = prime * hashCode + ((getRequestId() == null) ? 0 : getRequestId().hashCode()); return hashCode; } @Override public AttachmentError clone() { try { return (AttachmentError) 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.networkmanager.model.transform.AttachmentErrorMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy