@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCaseId() == null) ? 0 : getCaseId().hashCode()); hashCode = prime * hashCode + ((getDisplayId() == null) ? 0 : getDisplayId().hashCode()); hashCode = prime * hashCode + ((getSubject() == null) ? 0 : getSubject().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode()); hashCode = prime * hashCode + ((getCategoryCode() == null) ? 0 : getCategoryCode().hashCode()); hashCode = prime * hashCode + ((getSeverityCode() == null) ? 0 : getSeverityCode().hashCode()); hashCode = prime * hashCode + ((getSubmittedBy() == null) ? 0 : getSubmittedBy().hashCode()); hashCode = prime * hashCode + ((getTimeCreated() == null) ? 0 : getTimeCreated().hashCode()); hashCode = prime * hashCode + ((getRecentCommunications() == null) ? 0 : getRecentCommunications().hashCode()); hashCode = prime * hashCode + ((getCcEmailAddresses() == null) ? 0 : getCcEmailAddresses().hashCode()); hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); return hashCode; }
public CaseDetails unmarshall(JsonUnmarshallerContext context) throws Exception { CaseDetails caseDetails = new CaseDetails(); if (context.testExpression("caseId", targetDepth)) { context.nextToken(); caseDetails.setCaseId(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setDisplayId(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setSubject(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setServiceCode(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setCategoryCode(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setSeverityCode(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setSubmittedBy(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setTimeCreated(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setRecentCommunications(RecentCaseCommunicationsJsonUnmarshaller.getInstance().unmarshall(context)); caseDetails.setCcEmailAddresses(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); caseDetails.setLanguage(context.getUnmarshaller(String.class).unmarshall(context));
@Override public void onSuccess(DescribeCasesRequest request, DescribeCasesResult describeCasesResult) { describeCasesResult.getCases().forEach(caseDetails -> { logger.debug(caseDetails.toString()); cases.addOpenCase( caseDetails.getCaseId(), caseDetails.getTimeCreated(), caseDetails.getStatus(), caseDetails.getSubmittedBy(), caseDetails.getSubject() ); }); String returnedNextToken = describeCasesResult.getNextToken(); if (returnedNextToken != null && !returnedNextToken.isEmpty()){ describeCases(returnedNextToken, cases, future); } else { future.complete(cases); if (autoshutdown){ shutdown(); } } } });
public CaseDetails unmarshall(JsonUnmarshallerContext context) throws Exception { CaseDetails caseDetails = new CaseDetails(); if (context.testExpression("caseId", targetDepth)) { context.nextToken(); caseDetails.setCaseId(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setDisplayId(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setSubject(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setServiceCode(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setCategoryCode(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setSeverityCode(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setSubmittedBy(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setTimeCreated(context.getUnmarshaller(String.class).unmarshall(context)); caseDetails.setRecentCommunications(RecentCaseCommunicationsJsonUnmarshaller.getInstance().unmarshall(context)); caseDetails.setCcEmailAddresses(new ListUnmarshaller<String>(context.getUnmarshaller(String.class)).unmarshall(context)); caseDetails.setLanguage(context.getUnmarshaller(String.class).unmarshall(context));
return false; CaseDetails other = (CaseDetails) obj; if (other.getCaseId() == null ^ this.getCaseId() == null) return false; if (other.getCaseId() != null && other.getCaseId().equals(this.getCaseId()) == false) return false; if (other.getDisplayId() == null ^ this.getDisplayId() == null) return false; if (other.getDisplayId() != null && other.getDisplayId().equals(this.getDisplayId()) == false) return false; if (other.getSubject() == null ^ this.getSubject() == null) return false; if (other.getSubject() != null && other.getSubject().equals(this.getSubject()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getServiceCode() == null ^ this.getServiceCode() == null) return false; if (other.getServiceCode() != null && other.getServiceCode().equals(this.getServiceCode()) == false) return false; if (other.getCategoryCode() == null ^ this.getCategoryCode() == null) return false; if (other.getCategoryCode() != null && other.getCategoryCode().equals(this.getCategoryCode()) == false) return false; if (other.getSeverityCode() == null ^ this.getSeverityCode() == null) return false; if (other.getSeverityCode() != null && other.getSeverityCode().equals(this.getSeverityCode()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCaseId() != null) sb.append("CaseId: ").append(getCaseId()).append(","); if (getDisplayId() != null) sb.append("DisplayId: ").append(getDisplayId()).append(","); if (getSubject() != null) sb.append("Subject: ").append(getSubject()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getServiceCode() != null) sb.append("ServiceCode: ").append(getServiceCode()).append(","); if (getCategoryCode() != null) sb.append("CategoryCode: ").append(getCategoryCode()).append(","); if (getSeverityCode() != null) sb.append("SeverityCode: ").append(getSeverityCode()).append(","); if (getSubmittedBy() != null) sb.append("SubmittedBy: ").append(getSubmittedBy()).append(","); if (getTimeCreated() != null) sb.append("TimeCreated: ").append(getTimeCreated()).append(","); if (getRecentCommunications() != null) sb.append("RecentCommunications: ").append(getRecentCommunications()).append(","); if (getCcEmailAddresses() != null) sb.append("CcEmailAddresses: ").append(getCcEmailAddresses()).append(","); if (getLanguage() != null) sb.append("Language: ").append(getLanguage()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(CaseDetails caseDetails, ProtocolMarshaller protocolMarshaller) { if (caseDetails == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(caseDetails.getCaseId(), CASEID_BINDING); protocolMarshaller.marshall(caseDetails.getDisplayId(), DISPLAYID_BINDING); protocolMarshaller.marshall(caseDetails.getSubject(), SUBJECT_BINDING); protocolMarshaller.marshall(caseDetails.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(caseDetails.getServiceCode(), SERVICECODE_BINDING); protocolMarshaller.marshall(caseDetails.getCategoryCode(), CATEGORYCODE_BINDING); protocolMarshaller.marshall(caseDetails.getSeverityCode(), SEVERITYCODE_BINDING); protocolMarshaller.marshall(caseDetails.getSubmittedBy(), SUBMITTEDBY_BINDING); protocolMarshaller.marshall(caseDetails.getTimeCreated(), TIMECREATED_BINDING); protocolMarshaller.marshall(caseDetails.getRecentCommunications(), RECENTCOMMUNICATIONS_BINDING); protocolMarshaller.marshall(caseDetails.getCcEmailAddresses(), CCEMAILADDRESSES_BINDING); protocolMarshaller.marshall(caseDetails.getLanguage(), LANGUAGE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCaseId() == null) ? 0 : getCaseId().hashCode()); hashCode = prime * hashCode + ((getDisplayId() == null) ? 0 : getDisplayId().hashCode()); hashCode = prime * hashCode + ((getSubject() == null) ? 0 : getSubject().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getServiceCode() == null) ? 0 : getServiceCode().hashCode()); hashCode = prime * hashCode + ((getCategoryCode() == null) ? 0 : getCategoryCode().hashCode()); hashCode = prime * hashCode + ((getSeverityCode() == null) ? 0 : getSeverityCode().hashCode()); hashCode = prime * hashCode + ((getSubmittedBy() == null) ? 0 : getSubmittedBy().hashCode()); hashCode = prime * hashCode + ((getTimeCreated() == null) ? 0 : getTimeCreated().hashCode()); hashCode = prime * hashCode + ((getRecentCommunications() == null) ? 0 : getRecentCommunications().hashCode()); hashCode = prime * hashCode + ((getCcEmailAddresses() == null) ? 0 : getCcEmailAddresses().hashCode()); hashCode = prime * hashCode + ((getLanguage() == null) ? 0 : getLanguage().hashCode()); return hashCode; }
return false; CaseDetails other = (CaseDetails) obj; if (other.getCaseId() == null ^ this.getCaseId() == null) return false; if (other.getCaseId() != null && other.getCaseId().equals(this.getCaseId()) == false) return false; if (other.getDisplayId() == null ^ this.getDisplayId() == null) return false; if (other.getDisplayId() != null && other.getDisplayId().equals(this.getDisplayId()) == false) return false; if (other.getSubject() == null ^ this.getSubject() == null) return false; if (other.getSubject() != null && other.getSubject().equals(this.getSubject()) == false) return false; if (other.getStatus() == null ^ this.getStatus() == null) return false; if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false) return false; if (other.getServiceCode() == null ^ this.getServiceCode() == null) return false; if (other.getServiceCode() != null && other.getServiceCode().equals(this.getServiceCode()) == false) return false; if (other.getCategoryCode() == null ^ this.getCategoryCode() == null) return false; if (other.getCategoryCode() != null && other.getCategoryCode().equals(this.getCategoryCode()) == false) return false; if (other.getSeverityCode() == null ^ this.getSeverityCode() == null) return false; if (other.getSeverityCode() != null && other.getSeverityCode().equals(this.getSeverityCode()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getCaseId() != null) sb.append("CaseId: ").append(getCaseId()).append(","); if (getDisplayId() != null) sb.append("DisplayId: ").append(getDisplayId()).append(","); if (getSubject() != null) sb.append("Subject: ").append(getSubject()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getServiceCode() != null) sb.append("ServiceCode: ").append(getServiceCode()).append(","); if (getCategoryCode() != null) sb.append("CategoryCode: ").append(getCategoryCode()).append(","); if (getSeverityCode() != null) sb.append("SeverityCode: ").append(getSeverityCode()).append(","); if (getSubmittedBy() != null) sb.append("SubmittedBy: ").append(getSubmittedBy()).append(","); if (getTimeCreated() != null) sb.append("TimeCreated: ").append(getTimeCreated()).append(","); if (getRecentCommunications() != null) sb.append("RecentCommunications: ").append(getRecentCommunications()).append(","); if (getCcEmailAddresses() != null) sb.append("CcEmailAddresses: ").append(getCcEmailAddresses()).append(","); if (getLanguage() != null) sb.append("Language: ").append(getLanguage()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(CaseDetails caseDetails, ProtocolMarshaller protocolMarshaller) { if (caseDetails == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(caseDetails.getCaseId(), CASEID_BINDING); protocolMarshaller.marshall(caseDetails.getDisplayId(), DISPLAYID_BINDING); protocolMarshaller.marshall(caseDetails.getSubject(), SUBJECT_BINDING); protocolMarshaller.marshall(caseDetails.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(caseDetails.getServiceCode(), SERVICECODE_BINDING); protocolMarshaller.marshall(caseDetails.getCategoryCode(), CATEGORYCODE_BINDING); protocolMarshaller.marshall(caseDetails.getSeverityCode(), SEVERITYCODE_BINDING); protocolMarshaller.marshall(caseDetails.getSubmittedBy(), SUBMITTEDBY_BINDING); protocolMarshaller.marshall(caseDetails.getTimeCreated(), TIMECREATED_BINDING); protocolMarshaller.marshall(caseDetails.getRecentCommunications(), RECENTCOMMUNICATIONS_BINDING); protocolMarshaller.marshall(caseDetails.getCcEmailAddresses(), CCEMAILADDRESSES_BINDING); protocolMarshaller.marshall(caseDetails.getLanguage(), LANGUAGE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }