@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOperationId() == null) ? 0 : getOperationId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode()); hashCode = prime * hashCode + ((getSubmittedDate() == null) ? 0 : getSubmittedDate().hashCode()); return hashCode; }
/** * <p> * Identifier returned to track the requested action. * </p> * * @param operationId * Identifier returned to track the requested action. * @return Returns a reference to this object so that method calls can be chained together. */ public OperationSummary withOperationId(String operationId) { setOperationId(operationId); return this; }
/** * <p> * The current status of the requested operation in the system. * </p> * * @param status * The current status of the requested operation in the system. * @return Returns a reference to this object so that method calls can be chained together. * @see OperationStatus */ public OperationSummary withStatus(String status) { setStatus(status); return this; }
public OperationSummary unmarshall(JsonUnmarshallerContext context) throws Exception { OperationSummary operationSummary = new OperationSummary(); if (context.testExpression("OperationId", targetDepth)) { context.nextToken(); operationSummary.setOperationId(context.getUnmarshaller(String.class).unmarshall(context)); operationSummary.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); operationSummary.setType(context.getUnmarshaller(String.class).unmarshall(context)); operationSummary.setSubmittedDate(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context));
/** * <p> * The current status of the requested operation in the system. * </p> * * @param status * The current status of the requested operation in the system. * @see OperationStatus */ public void setStatus(OperationStatus status) { withStatus(status); }
/** * <p> * Type of the action requested. * </p> * * @param type * Type of the action requested. * @return Returns a reference to this object so that method calls can be chained together. * @see OperationType */ public OperationSummary withType(String type) { setType(type); return this; }
/** * <p> * The date when the request was submitted. * </p> * * @param submittedDate * The date when the request was submitted. * @return Returns a reference to this object so that method calls can be chained together. */ public OperationSummary withSubmittedDate(java.util.Date submittedDate) { setSubmittedDate(submittedDate); return this; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof OperationSummary == false) return false; OperationSummary other = (OperationSummary) obj; if (other.getOperationId() == null ^ this.getOperationId() == null) return false; if (other.getOperationId() != null && other.getOperationId().equals(this.getOperationId()) == 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.getType() == null ^ this.getType() == null) return false; if (other.getType() != null && other.getType().equals(this.getType()) == false) return false; if (other.getSubmittedDate() == null ^ this.getSubmittedDate() == null) return false; if (other.getSubmittedDate() != null && other.getSubmittedDate().equals(this.getSubmittedDate()) == 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 (getOperationId() != null) sb.append("OperationId: ").append(getOperationId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getType() != null) sb.append("Type: ").append(getType()).append(","); if (getSubmittedDate() != null) sb.append("SubmittedDate: ").append(getSubmittedDate()); sb.append("}"); return sb.toString(); }
/** * Marshall the given parameter object. */ public void marshall(OperationSummary operationSummary, ProtocolMarshaller protocolMarshaller) { if (operationSummary == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(operationSummary.getOperationId(), OPERATIONID_BINDING); protocolMarshaller.marshall(operationSummary.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(operationSummary.getType(), TYPE_BINDING); protocolMarshaller.marshall(operationSummary.getSubmittedDate(), SUBMITTEDDATE_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }