@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; }
/** * <p> * Information about the attachments to the case communication. * </p> * * @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<AttachmentDetails> attachmentSet) { setAttachmentSet(attachmentSet); return this; }
/** * <p> * The text of the communication between the customer and AWS Support. * </p> * * @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; }
public Communication unmarshall(JsonUnmarshallerContext context) throws Exception { Communication communication = new Communication(); if (context.testExpression("caseId", targetDepth)) { context.nextToken(); communication.setCaseId(context.getUnmarshaller(String.class).unmarshall(context)); communication.setBody(context.getUnmarshaller(String.class).unmarshall(context)); communication.setSubmittedBy(context.getUnmarshaller(String.class).unmarshall(context)); communication.setTimeCreated(context.getUnmarshaller(String.class).unmarshall(context)); .setAttachmentSet(new ListUnmarshaller<AttachmentDetails>(AttachmentDetailsJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * The email address of the account that submitted the AWS Support case. * </p> * * @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; }
/** * <p> * 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-<i>12345678910-2013-c4c1d2bf33c5cf47</i> * </p> * * @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-<i>12345678910-2013-c4c1d2bf33c5cf47</i> * @return Returns a reference to this object so that method calls can be chained together. */ public Communication withCaseId(String caseId) { setCaseId(caseId); return this; }
public Communication unmarshall(JsonUnmarshallerContext context) throws Exception { Communication communication = new Communication(); if (context.testExpression("caseId", targetDepth)) { context.nextToken(); communication.setCaseId(context.getUnmarshaller(String.class).unmarshall(context)); communication.setBody(context.getUnmarshaller(String.class).unmarshall(context)); communication.setSubmittedBy(context.getUnmarshaller(String.class).unmarshall(context)); communication.setTimeCreated(context.getUnmarshaller(String.class).unmarshall(context)); .setAttachmentSet(new ListUnmarshaller<AttachmentDetails>(AttachmentDetailsJsonUnmarshaller.getInstance()).unmarshall(context));
/** * <p> * The email address of the account that submitted the AWS Support case. * </p> * * @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; }
/** * <p> * 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-<i>12345678910-2013-c4c1d2bf33c5cf47</i> * </p> * * @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-<i>12345678910-2013-c4c1d2bf33c5cf47</i> * @return Returns a reference to this object so that method calls can be chained together. */ public Communication withCaseId(String caseId) { setCaseId(caseId); return this; }
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;
/** * <p> * Information about the attachments to the case communication. * </p> * <p> * <b>NOTE:</b> 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. * </p> * * @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<AttachmentDetails>(attachmentSet.length)); } for (AttachmentDetails ele : attachmentSet) { this.attachmentSet.add(ele); } return this; }
/** * <p> * The text of the communication between the customer and AWS Support. * </p> * * @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; }
/** * 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(); }
/** * <p> * Information about the attachments to the case communication. * </p> * * @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<AttachmentDetails> attachmentSet) { setAttachmentSet(attachmentSet); return this; }
/** * Marshall the given parameter object. */ public void marshall(Communication communication, ProtocolMarshaller protocolMarshaller) { if (communication == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(communication.getCaseId(), CASEID_BINDING); protocolMarshaller.marshall(communication.getBody(), BODY_BINDING); protocolMarshaller.marshall(communication.getSubmittedBy(), SUBMITTEDBY_BINDING); protocolMarshaller.marshall(communication.getTimeCreated(), TIMECREATED_BINDING); protocolMarshaller.marshall(communication.getAttachmentSet(), ATTACHMENTSET_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
/** * <p> * Information about the attachments to the case communication. * </p> * <p> * <b>NOTE:</b> 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. * </p> * * @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<AttachmentDetails>(attachmentSet.length)); } for (AttachmentDetails ele : attachmentSet) { this.attachmentSet.add(ele); } return this; }
@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; }
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;
/** * 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(); }
/** * Marshall the given parameter object. */ public void marshall(Communication communication, ProtocolMarshaller protocolMarshaller) { if (communication == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(communication.getCaseId(), CASEID_BINDING); protocolMarshaller.marshall(communication.getBody(), BODY_BINDING); protocolMarshaller.marshall(communication.getSubmittedBy(), SUBMITTEDBY_BINDING); protocolMarshaller.marshall(communication.getTimeCreated(), TIMECREATED_BINDING); protocolMarshaller.marshall(communication.getAttachmentSet(), ATTACHMENTSET_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }