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

com.amazonaws.services.support.model.Communication Maven / Gradle / Ivy

Go to download

The AWS SDK for Java with support for OSGi. The AWS SDK for Java provides Java APIs for building software on AWS' cost-effective, scalable, and reliable infrastructure products. The AWS Java SDK allows developers to code against APIs for all of Amazon's infrastructure web services (Amazon S3, Amazon EC2, Amazon SQS, Amazon Relational Database Service, Amazon AutoScaling, etc).

There is a newer version: 1.11.60
Show newest version
/*
 * Copyright 2011-2016 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.support.model;

import java.io.Serializable;

/**
 * 

* A communication associated with an AWS Support case. The communication * consists of the case ID, the message body, attachment information, the * account email address, and the date and time of the communication. *

*/ public class Communication implements Serializable, Cloneable { /** *

* The AWS Support case ID requested or returned in the call. The case ID is * an alphanumeric string formatted as shown in this example: * case-12345678910-2013-c4c1d2bf33c5cf47 *

*/ private String caseId; /** *

* The text of the communication between the customer and AWS Support. *

*/ private String body; /** *

* The email address of the account that submitted the AWS Support case. *

*/ private String submittedBy; /** *

* The time the communication was created. *

*/ private String timeCreated; /** *

* Information about the attachments to the case communication. *

*/ private com.amazonaws.internal.SdkInternalList attachmentSet; /** *

* The AWS Support case ID requested or returned in the call. The case ID is * an alphanumeric string formatted as shown in this example: * case-12345678910-2013-c4c1d2bf33c5cf47 *

* * @param caseId * The AWS Support case ID requested or returned in the call. The * case ID is an alphanumeric string formatted as shown in this * example: case-12345678910-2013-c4c1d2bf33c5cf47 */ public void setCaseId(String caseId) { this.caseId = caseId; } /** *

* The AWS Support case ID requested or returned in the call. The case ID is * an alphanumeric string formatted as shown in this example: * case-12345678910-2013-c4c1d2bf33c5cf47 *

* * @return The AWS Support case ID requested or returned in the call. The * case ID is an alphanumeric string formatted as shown in this * example: case-12345678910-2013-c4c1d2bf33c5cf47 */ public String getCaseId() { return this.caseId; } /** *

* The AWS Support case ID requested or returned in the call. The case ID is * an alphanumeric string formatted as shown in this example: * case-12345678910-2013-c4c1d2bf33c5cf47 *

* * @param caseId * The AWS Support case ID requested or returned in the call. The * case ID is an alphanumeric string formatted as shown in this * example: case-12345678910-2013-c4c1d2bf33c5cf47 * @return Returns a reference to this object so that method calls can be * chained together. */ public Communication withCaseId(String caseId) { setCaseId(caseId); return this; } /** *

* The text of the communication between the customer and AWS Support. *

* * @param body * The text of the communication between the customer and AWS * Support. */ public void setBody(String body) { this.body = body; } /** *

* The text of the communication between the customer and AWS Support. *

* * @return The text of the communication between the customer and AWS * Support. */ public String getBody() { return this.body; } /** *

* The text of the communication between the customer and AWS Support. *

* * @param body * The text of the communication between the customer and AWS * Support. * @return Returns a reference to this object so that method calls can be * chained together. */ public Communication withBody(String body) { setBody(body); return this; } /** *

* The email address of the account that submitted the AWS Support case. *

* * @param submittedBy * The email address of the account that submitted the AWS Support * case. */ public void setSubmittedBy(String submittedBy) { this.submittedBy = submittedBy; } /** *

* The email address of the account that submitted the AWS Support case. *

* * @return The email address of the account that submitted the AWS Support * case. */ public String getSubmittedBy() { return this.submittedBy; } /** *

* The email address of the account that submitted the AWS Support case. *

* * @param submittedBy * The email address of the account that submitted the AWS Support * case. * @return Returns a reference to this object so that method calls can be * chained together. */ public Communication withSubmittedBy(String submittedBy) { setSubmittedBy(submittedBy); return this; } /** *

* The time the communication was created. *

* * @param timeCreated * The time the communication was created. */ public void setTimeCreated(String timeCreated) { this.timeCreated = timeCreated; } /** *

* The time the communication was created. *

* * @return The time the communication was created. */ public String getTimeCreated() { return this.timeCreated; } /** *

* The time the communication was created. *

* * @param timeCreated * The time the communication was created. * @return Returns a reference to this object so that method calls can be * chained together. */ public Communication withTimeCreated(String timeCreated) { setTimeCreated(timeCreated); return this; } /** *

* Information about the attachments to the case communication. *

* * @return Information about the attachments to the case communication. */ public java.util.List getAttachmentSet() { if (attachmentSet == null) { attachmentSet = new com.amazonaws.internal.SdkInternalList(); } return attachmentSet; } /** *

* Information about the attachments to the case communication. *

* * @param attachmentSet * Information about the attachments to the case communication. */ public void setAttachmentSet( java.util.Collection attachmentSet) { if (attachmentSet == null) { this.attachmentSet = null; return; } this.attachmentSet = new com.amazonaws.internal.SdkInternalList( attachmentSet); } /** *

* Information about the attachments to the case communication. *

*

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

* * @param attachmentSet * Information about the attachments to the case communication. * @return Returns a reference to this object so that method calls can be * chained together. */ public Communication withAttachmentSet(AttachmentDetails... attachmentSet) { if (this.attachmentSet == null) { setAttachmentSet(new com.amazonaws.internal.SdkInternalList( attachmentSet.length)); } for (AttachmentDetails ele : attachmentSet) { this.attachmentSet.add(ele); } return this; } /** *

* Information about the attachments to the case communication. *

* * @param attachmentSet * Information about the attachments to the case communication. * @return Returns a reference to this object so that method calls can be * chained together. */ public Communication withAttachmentSet( java.util.Collection attachmentSet) { setAttachmentSet(attachmentSet); return this; } /** * Returns a string representation of this object; useful for testing and * debugging. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCaseId() != null) sb.append("CaseId: " + getCaseId() + ","); if (getBody() != null) sb.append("Body: " + getBody() + ","); if (getSubmittedBy() != null) sb.append("SubmittedBy: " + getSubmittedBy() + ","); if (getTimeCreated() != null) sb.append("TimeCreated: " + getTimeCreated() + ","); if (getAttachmentSet() != null) sb.append("AttachmentSet: " + getAttachmentSet()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Communication == false) return false; Communication other = (Communication) obj; if (other.getCaseId() == null ^ this.getCaseId() == null) return false; if (other.getCaseId() != null && other.getCaseId().equals(this.getCaseId()) == false) return false; if (other.getBody() == null ^ this.getBody() == null) return false; if (other.getBody() != null && other.getBody().equals(this.getBody()) == false) return false; if (other.getSubmittedBy() == null ^ this.getSubmittedBy() == null) return false; if (other.getSubmittedBy() != null && other.getSubmittedBy().equals(this.getSubmittedBy()) == false) return false; if (other.getTimeCreated() == null ^ this.getTimeCreated() == null) return false; if (other.getTimeCreated() != null && other.getTimeCreated().equals(this.getTimeCreated()) == false) return false; if (other.getAttachmentSet() == null ^ this.getAttachmentSet() == null) return false; if (other.getAttachmentSet() != null && other.getAttachmentSet().equals(this.getAttachmentSet()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCaseId() == null) ? 0 : getCaseId().hashCode()); hashCode = prime * hashCode + ((getBody() == null) ? 0 : getBody().hashCode()); hashCode = prime * hashCode + ((getSubmittedBy() == null) ? 0 : getSubmittedBy().hashCode()); hashCode = prime * hashCode + ((getTimeCreated() == null) ? 0 : getTimeCreated().hashCode()); hashCode = prime * hashCode + ((getAttachmentSet() == null) ? 0 : getAttachmentSet() .hashCode()); return hashCode; } @Override public Communication clone() { try { return (Communication) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException( "Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy