public JobExecution unmarshall(JsonUnmarshallerContext context) throws Exception { JobExecution jobExecution = new JobExecution(); if (context.testExpression("jobId", targetDepth)) { context.nextToken(); jobExecution.setJobId(context.getUnmarshaller(String.class).unmarshall(context)); jobExecution.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); jobExecution.setForceCanceled(context.getUnmarshaller(Boolean.class).unmarshall(context)); jobExecution.setStatusDetails(JobExecutionStatusDetailsJsonUnmarshaller.getInstance().unmarshall(context)); jobExecution.setThingArn(context.getUnmarshaller(String.class).unmarshall(context)); jobExecution.setQueuedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); jobExecution.setStartedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); jobExecution.setLastUpdatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); jobExecution.setExecutionNumber(context.getUnmarshaller(Long.class).unmarshall(context)); jobExecution.setVersionNumber(context.getUnmarshaller(Long.class).unmarshall(context)); jobExecution.setApproximateSecondsBeforeTimedOut(context.getUnmarshaller(Long.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeJobExecutionResult == false) return false; DescribeJobExecutionResult other = (DescribeJobExecutionResult) obj; if (other.getExecution() == null ^ this.getExecution() == null) return false; if (other.getExecution() != null && other.getExecution().equals(this.getExecution()) == false) return false; return true; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getForceCanceled() == null) ? 0 : getForceCanceled().hashCode()); hashCode = prime * hashCode + ((getStatusDetails() == null) ? 0 : getStatusDetails().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getQueuedAt() == null) ? 0 : getQueuedAt().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getExecutionNumber() == null) ? 0 : getExecutionNumber().hashCode()); hashCode = prime * hashCode + ((getVersionNumber() == null) ? 0 : getVersionNumber().hashCode()); hashCode = prime * hashCode + ((getApproximateSecondsBeforeTimedOut() == null) ? 0 : getApproximateSecondsBeforeTimedOut().hashCode()); return hashCode; }
return false; JobExecution other = (JobExecution) obj; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == 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.getForceCanceled() == null ^ this.getForceCanceled() == null) return false; if (other.getForceCanceled() != null && other.getForceCanceled().equals(this.getForceCanceled()) == false) return false; if (other.getStatusDetails() == null ^ this.getStatusDetails() == null) return false; if (other.getStatusDetails() != null && other.getStatusDetails().equals(this.getStatusDetails()) == false) return false; if (other.getThingArn() == null ^ this.getThingArn() == null) return false; if (other.getThingArn() != null && other.getThingArn().equals(this.getThingArn()) == false) return false; if (other.getQueuedAt() == null ^ this.getQueuedAt() == null) return false; if (other.getQueuedAt() != null && other.getQueuedAt().equals(this.getQueuedAt()) == false) return false; if (other.getStartedAt() == null ^ this.getStartedAt() == null) return false; if (other.getStartedAt() != null && other.getStartedAt().equals(this.getStartedAt()) == false)
JobExecution jobExecution = new JobExecution(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("jobId")) { jobExecution.setJobId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("status")) { jobExecution.setStatus(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("forceCanceled")) { jobExecution.setForceCanceled(BooleanJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("statusDetails")) { jobExecution.setStatusDetails(JobExecutionStatusDetailsJsonUnmarshaller .getInstance() .unmarshall(context)); } else if (name.equals("thingArn")) { jobExecution.setThingArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("queuedAt")) { jobExecution.setQueuedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("startedAt")) { jobExecution.setStartedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("lastUpdatedAt")) { jobExecution.setLastUpdatedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeJobExecutionResult == false) return false; DescribeJobExecutionResult other = (DescribeJobExecutionResult) obj; if (other.getExecution() == null ^ this.getExecution() == null) return false; if (other.getExecution() != null && other.getExecution().equals(this.getExecution()) == false) return false; return true; } }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getJobId() != null) sb.append("JobId: ").append(getJobId()).append(","); if (getStatus() != null) sb.append("Status: ").append(getStatus()).append(","); if (getForceCanceled() != null) sb.append("ForceCanceled: ").append(getForceCanceled()).append(","); if (getStatusDetails() != null) sb.append("StatusDetails: ").append(getStatusDetails()).append(","); if (getThingArn() != null) sb.append("ThingArn: ").append(getThingArn()).append(","); if (getQueuedAt() != null) sb.append("QueuedAt: ").append(getQueuedAt()).append(","); if (getStartedAt() != null) sb.append("StartedAt: ").append(getStartedAt()).append(","); if (getLastUpdatedAt() != null) sb.append("LastUpdatedAt: ").append(getLastUpdatedAt()).append(","); if (getExecutionNumber() != null) sb.append("ExecutionNumber: ").append(getExecutionNumber()).append(","); if (getVersionNumber() != null) sb.append("VersionNumber: ").append(getVersionNumber()).append(","); if (getApproximateSecondsBeforeTimedOut() != null) sb.append("ApproximateSecondsBeforeTimedOut: ").append(getApproximateSecondsBeforeTimedOut()); sb.append("}"); return sb.toString();
JobExecution jobExecution = new JobExecution(); reader.beginObject(); while (reader.hasNext()) { String name = reader.nextName(); if (name.equals("jobId")) { jobExecution.setJobId(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("status")) { jobExecution.setStatus(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("forceCanceled")) { jobExecution.setForceCanceled(BooleanJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("statusDetails")) { jobExecution.setStatusDetails(JobExecutionStatusDetailsJsonUnmarshaller .getInstance() .unmarshall(context)); } else if (name.equals("thingArn")) { jobExecution.setThingArn(StringJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("queuedAt")) { jobExecution.setQueuedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("startedAt")) { jobExecution.setStartedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context)); } else if (name.equals("lastUpdatedAt")) { jobExecution.setLastUpdatedAt(DateJsonUnmarshaller.getInstance() .unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeJobExecutionResult == false) return false; DescribeJobExecutionResult other = (DescribeJobExecutionResult) obj; if (other.getExecution() == null ^ this.getExecution() == null) return false; if (other.getExecution() != null && other.getExecution().equals(this.getExecution()) == false) return false; return true; }
/** * Marshall the given parameter object. */ public void marshall(JobExecution jobExecution, ProtocolMarshaller protocolMarshaller) { if (jobExecution == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(jobExecution.getJobId(), JOBID_BINDING); protocolMarshaller.marshall(jobExecution.getStatus(), STATUS_BINDING); protocolMarshaller.marshall(jobExecution.getForceCanceled(), FORCECANCELED_BINDING); protocolMarshaller.marshall(jobExecution.getStatusDetails(), STATUSDETAILS_BINDING); protocolMarshaller.marshall(jobExecution.getThingArn(), THINGARN_BINDING); protocolMarshaller.marshall(jobExecution.getQueuedAt(), QUEUEDAT_BINDING); protocolMarshaller.marshall(jobExecution.getStartedAt(), STARTEDAT_BINDING); protocolMarshaller.marshall(jobExecution.getLastUpdatedAt(), LASTUPDATEDAT_BINDING); protocolMarshaller.marshall(jobExecution.getExecutionNumber(), EXECUTIONNUMBER_BINDING); protocolMarshaller.marshall(jobExecution.getVersionNumber(), VERSIONNUMBER_BINDING); protocolMarshaller.marshall(jobExecution.getApproximateSecondsBeforeTimedOut(), APPROXIMATESECONDSBEFORETIMEDOUT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
public JobExecution unmarshall(JsonUnmarshallerContext context) throws Exception { JobExecution jobExecution = new JobExecution(); if (context.testExpression("jobId", targetDepth)) { context.nextToken(); jobExecution.setJobId(context.getUnmarshaller(String.class).unmarshall(context)); jobExecution.setStatus(context.getUnmarshaller(String.class).unmarshall(context)); jobExecution.setForceCanceled(context.getUnmarshaller(Boolean.class).unmarshall(context)); jobExecution.setStatusDetails(JobExecutionStatusDetailsJsonUnmarshaller.getInstance().unmarshall(context)); jobExecution.setThingArn(context.getUnmarshaller(String.class).unmarshall(context)); jobExecution.setQueuedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); jobExecution.setStartedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); jobExecution.setLastUpdatedAt(DateJsonUnmarshallerFactory.getInstance("unixTimestamp").unmarshall(context)); jobExecution.setExecutionNumber(context.getUnmarshaller(Long.class).unmarshall(context)); jobExecution.setVersionNumber(context.getUnmarshaller(Long.class).unmarshall(context)); jobExecution.setApproximateSecondsBeforeTimedOut(context.getUnmarshaller(Long.class).unmarshall(context));
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeJobExecutionResult == false) return false; DescribeJobExecutionResult other = (DescribeJobExecutionResult) obj; if (other.getExecution() == null ^ this.getExecution() == null) return false; if (other.getExecution() != null && other.getExecution().equals(this.getExecution()) == false) return false; return true; } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getForceCanceled() == null) ? 0 : getForceCanceled().hashCode()); hashCode = prime * hashCode + ((getStatusDetails() == null) ? 0 : getStatusDetails().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getQueuedAt() == null) ? 0 : getQueuedAt().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getExecutionNumber() == null) ? 0 : getExecutionNumber().hashCode()); hashCode = prime * hashCode + ((getVersionNumber() == null) ? 0 : getVersionNumber().hashCode()); hashCode = prime * hashCode + ((getApproximateSecondsBeforeTimedOut() == null) ? 0 : getApproximateSecondsBeforeTimedOut().hashCode()); return hashCode; }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getJobId() != null) sb.append("jobId: " + getJobId() + ","); if (getStatus() != null) sb.append("status: " + getStatus() + ","); if (getForceCanceled() != null) sb.append("forceCanceled: " + getForceCanceled() + ","); if (getStatusDetails() != null) sb.append("statusDetails: " + getStatusDetails() + ","); if (getThingArn() != null) sb.append("thingArn: " + getThingArn() + ","); if (getQueuedAt() != null) sb.append("queuedAt: " + getQueuedAt() + ","); if (getStartedAt() != null) sb.append("startedAt: " + getStartedAt() + ","); if (getLastUpdatedAt() != null) sb.append("lastUpdatedAt: " + getLastUpdatedAt() + ","); if (getExecutionNumber() != null) sb.append("executionNumber: " + getExecutionNumber() + ","); if (getVersionNumber() != null) sb.append("versionNumber: " + getVersionNumber() + ","); if (getApproximateSecondsBeforeTimedOut() != null) sb.append("approximateSecondsBeforeTimedOut: " + getApproximateSecondsBeforeTimedOut()); sb.append("}"); return sb.toString();
if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == 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.getForceCanceled() == null ^ this.getForceCanceled() == null) return false; if (other.getForceCanceled() != null && other.getForceCanceled().equals(this.getForceCanceled()) == false) return false; if (other.getStatusDetails() == null ^ this.getStatusDetails() == null) return false; if (other.getStatusDetails() != null && other.getStatusDetails().equals(this.getStatusDetails()) == false) return false; if (other.getThingArn() == null ^ this.getThingArn() == null) return false; if (other.getThingArn() != null && other.getThingArn().equals(this.getThingArn()) == false) return false; if (other.getQueuedAt() == null ^ this.getQueuedAt() == null) return false; if (other.getQueuedAt() != null && other.getQueuedAt().equals(this.getQueuedAt()) == false) return false; if (other.getStartedAt() == null ^ this.getStartedAt() == null) return false; if (other.getStartedAt() != null
public void marshall(JobExecution jobExecution, AwsJsonWriter jsonWriter) throws Exception { jsonWriter.beginObject(); if (jobExecution.getJobId() != null) { String jobId = jobExecution.getJobId(); jsonWriter.name("jobId"); jsonWriter.value(jobId); if (jobExecution.getStatus() != null) { String status = jobExecution.getStatus(); jsonWriter.name("status"); jsonWriter.value(status); if (jobExecution.getForceCanceled() != null) { Boolean forceCanceled = jobExecution.getForceCanceled(); jsonWriter.name("forceCanceled"); jsonWriter.value(forceCanceled); if (jobExecution.getStatusDetails() != null) { JobExecutionStatusDetails statusDetails = jobExecution.getStatusDetails(); jsonWriter.name("statusDetails"); JobExecutionStatusDetailsJsonMarshaller.getInstance().marshall(statusDetails, jsonWriter); if (jobExecution.getThingArn() != null) { String thingArn = jobExecution.getThingArn(); jsonWriter.name("thingArn"); jsonWriter.value(thingArn); if (jobExecution.getQueuedAt() != null) { java.util.Date queuedAt = jobExecution.getQueuedAt();
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getForceCanceled() == null) ? 0 : getForceCanceled().hashCode()); hashCode = prime * hashCode + ((getStatusDetails() == null) ? 0 : getStatusDetails().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getQueuedAt() == null) ? 0 : getQueuedAt().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getExecutionNumber() == null) ? 0 : getExecutionNumber().hashCode()); hashCode = prime * hashCode + ((getVersionNumber() == null) ? 0 : getVersionNumber().hashCode()); hashCode = prime * hashCode + ((getApproximateSecondsBeforeTimedOut() == null) ? 0 : getApproximateSecondsBeforeTimedOut().hashCode()); return hashCode; }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobId() == null) ? 0 : getJobId().hashCode()); hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode()); hashCode = prime * hashCode + ((getForceCanceled() == null) ? 0 : getForceCanceled().hashCode()); hashCode = prime * hashCode + ((getStatusDetails() == null) ? 0 : getStatusDetails().hashCode()); hashCode = prime * hashCode + ((getThingArn() == null) ? 0 : getThingArn().hashCode()); hashCode = prime * hashCode + ((getQueuedAt() == null) ? 0 : getQueuedAt().hashCode()); hashCode = prime * hashCode + ((getStartedAt() == null) ? 0 : getStartedAt().hashCode()); hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode()); hashCode = prime * hashCode + ((getExecutionNumber() == null) ? 0 : getExecutionNumber().hashCode()); hashCode = prime * hashCode + ((getVersionNumber() == null) ? 0 : getVersionNumber().hashCode()); hashCode = prime * hashCode + ((getApproximateSecondsBeforeTimedOut() == null) ? 0 : getApproximateSecondsBeforeTimedOut().hashCode()); return hashCode; }
return false; JobExecution other = (JobExecution) obj; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == 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.getForceCanceled() == null ^ this.getForceCanceled() == null) return false; if (other.getForceCanceled() != null && other.getForceCanceled().equals(this.getForceCanceled()) == false) return false; if (other.getStatusDetails() == null ^ this.getStatusDetails() == null) return false; if (other.getStatusDetails() != null && other.getStatusDetails().equals(this.getStatusDetails()) == false) return false; if (other.getThingArn() == null ^ this.getThingArn() == null) return false; if (other.getThingArn() != null && other.getThingArn().equals(this.getThingArn()) == false) return false; if (other.getQueuedAt() == null ^ this.getQueuedAt() == null) return false; if (other.getQueuedAt() != null && other.getQueuedAt().equals(this.getQueuedAt()) == false) return false; if (other.getStartedAt() == null ^ this.getStartedAt() == null) return false; if (other.getStartedAt() != null && other.getStartedAt().equals(this.getStartedAt()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getJobId() != null) sb.append("jobId: " + getJobId() + ","); if (getStatus() != null) sb.append("status: " + getStatus() + ","); if (getForceCanceled() != null) sb.append("forceCanceled: " + getForceCanceled() + ","); if (getStatusDetails() != null) sb.append("statusDetails: " + getStatusDetails() + ","); if (getThingArn() != null) sb.append("thingArn: " + getThingArn() + ","); if (getQueuedAt() != null) sb.append("queuedAt: " + getQueuedAt() + ","); if (getStartedAt() != null) sb.append("startedAt: " + getStartedAt() + ","); if (getLastUpdatedAt() != null) sb.append("lastUpdatedAt: " + getLastUpdatedAt() + ","); if (getExecutionNumber() != null) sb.append("executionNumber: " + getExecutionNumber() + ","); if (getVersionNumber() != null) sb.append("versionNumber: " + getVersionNumber() + ","); if (getApproximateSecondsBeforeTimedOut() != null) sb.append("approximateSecondsBeforeTimedOut: " + getApproximateSecondsBeforeTimedOut()); sb.append("}"); return sb.toString();