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 Java SDK for AWS Support module holds the client classes that are used for communicating with AWS Support Service

There is a newer version: 1.12.778
Show newest version
/*
 * Copyright 2016-2021 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;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* A communication associated with a support case. The communication consists of the case ID, the message body, * attachment information, the submitter of the communication, and the date and time of the communication. *

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

* The 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 identity of the account that submitted, or responded to, the support case. Customer entries include the role * or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web Services," * and don't show an email address. *

*/ 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 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 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 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 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 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 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 identity of the account that submitted, or responded to, the support case. Customer entries include the role * or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web Services," * and don't show an email address. *

* * @param submittedBy * The identity of the account that submitted, or responded to, the support case. Customer entries include * the role or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web * Services," and don't show an email address. */ public void setSubmittedBy(String submittedBy) { this.submittedBy = submittedBy; } /** *

* The identity of the account that submitted, or responded to, the support case. Customer entries include the role * or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web Services," * and don't show an email address. *

* * @return The identity of the account that submitted, or responded to, the support case. Customer entries include * the role or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web * Services," and don't show an email address. */ public String getSubmittedBy() { return this.submittedBy; } /** *

* The identity of the account that submitted, or responded to, the support case. Customer entries include the role * or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web Services," * and don't show an email address. *

* * @param submittedBy * The identity of the account that submitted, or responded to, the support case. Customer entries include * the role or IAM user as well as the email address. For example, * "AdminRole (Role) <[email protected]>. Entries from the AWS Support team display "Amazon Web * Services," and don't show an email address. * @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. 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 (getCaseId() != null) sb.append("CaseId: ").append(getCaseId()).append(","); if (getBody() != null) sb.append("Body: ").append(getBody()).append(","); if (getSubmittedBy() != null) sb.append("SubmittedBy: ").append(getSubmittedBy()).append(","); if (getTimeCreated() != null) sb.append("TimeCreated: ").append(getTimeCreated()).append(","); if (getAttachmentSet() != null) sb.append("AttachmentSet: ").append(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); } } @com.amazonaws.annotation.SdkInternalApi @Override public void marshall(ProtocolMarshaller protocolMarshaller) { com.amazonaws.services.support.model.transform.CommunicationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy