/* * Copyright 2018-2023 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.iotjobsdataplane.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS * API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class DescribeJobExecutionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The unique identifier assigned to this job when it was created. *

*/ private String jobId; /** *

* The thing name associated with the device the job execution is running on. *

*/ private String thingName; /** *

* Optional. When set to true, the response contains the job document. The default is false. *

*/ private Boolean includeJobDocument; /** *

* Optional. A number that identifies a particular job execution on a particular device. If not specified, the * latest job execution is returned. *

*/ private Long executionNumber; /** *

* The unique identifier assigned to this job when it was created. *

* * @param jobId * The unique identifier assigned to this job when it was created. */ public void setJobId(String jobId) { this.jobId = jobId; } /** *

* The unique identifier assigned to this job when it was created. *

* * @return The unique identifier assigned to this job when it was created. */ public String getJobId() { return this.jobId; } /** *

* The unique identifier assigned to this job when it was created. *

* * @param jobId * The unique identifier assigned to this job when it was created. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeJobExecutionRequest withJobId(String jobId) { setJobId(jobId); return this; } /** *

* The thing name associated with the device the job execution is running on. *

* * @param thingName * The thing name associated with the device the job execution is running on. */ public void setThingName(String thingName) { this.thingName = thingName; } /** *

* The thing name associated with the device the job execution is running on. *

* * @return The thing name associated with the device the job execution is running on. */ public String getThingName() { return this.thingName; } /** *

* The thing name associated with the device the job execution is running on. *

* * @param thingName * The thing name associated with the device the job execution is running on. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeJobExecutionRequest withThingName(String thingName) { setThingName(thingName); return this; } /** *

* Optional. When set to true, the response contains the job document. The default is false. *

* * @param includeJobDocument * Optional. When set to true, the response contains the job document. The default is false. */ public void setIncludeJobDocument(Boolean includeJobDocument) { this.includeJobDocument = includeJobDocument; } /** *

* Optional. When set to true, the response contains the job document. The default is false. *

* * @return Optional. When set to true, the response contains the job document. The default is false. */ public Boolean getIncludeJobDocument() { return this.includeJobDocument; } /** *

* Optional. When set to true, the response contains the job document. The default is false. *

* * @param includeJobDocument * Optional. When set to true, the response contains the job document. The default is false. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeJobExecutionRequest withIncludeJobDocument(Boolean includeJobDocument) { setIncludeJobDocument(includeJobDocument); return this; } /** *

* Optional. When set to true, the response contains the job document. The default is false. *

* * @return Optional. When set to true, the response contains the job document. The default is false. */ public Boolean isIncludeJobDocument() { return this.includeJobDocument; } /** *

* Optional. A number that identifies a particular job execution on a particular device. If not specified, the * latest job execution is returned. *

* * @param executionNumber * Optional. A number that identifies a particular job execution on a particular device. If not specified, * the latest job execution is returned. */ public void setExecutionNumber(Long executionNumber) { this.executionNumber = executionNumber; } /** *

* Optional. A number that identifies a particular job execution on a particular device. If not specified, the * latest job execution is returned. *

* * @return Optional. A number that identifies a particular job execution on a particular device. If not specified, * the latest job execution is returned. */ public Long getExecutionNumber() { return this.executionNumber; } /** *

* Optional. A number that identifies a particular job execution on a particular device. If not specified, the * latest job execution is returned. *

* * @param executionNumber * Optional. A number that identifies a particular job execution on a particular device. If not specified, * the latest job execution is returned. * @return Returns a reference to this object so that method calls can be chained together. */ public DescribeJobExecutionRequest withExecutionNumber(Long executionNumber) { setExecutionNumber(executionNumber); 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 (getJobId() != null) sb.append("JobId: ").append(getJobId()).append(","); if (getThingName() != null) sb.append("ThingName: ").append(getThingName()).append(","); if (getIncludeJobDocument() != null) sb.append("IncludeJobDocument: ").append(getIncludeJobDocument()).append(","); if (getExecutionNumber() != null) sb.append("ExecutionNumber: ").append(getExecutionNumber()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DescribeJobExecutionRequest == false) return false; DescribeJobExecutionRequest other = (DescribeJobExecutionRequest) obj; if (other.getJobId() == null ^ this.getJobId() == null) return false; if (other.getJobId() != null && other.getJobId().equals(this.getJobId()) == false) return false; if (other.getThingName() == null ^ this.getThingName() == null) return false; if (other.getThingName() != null && other.getThingName().equals(this.getThingName()) == false) return false; if (other.getIncludeJobDocument() == null ^ this.getIncludeJobDocument() == null) return false; if (other.getIncludeJobDocument() != null && other.getIncludeJobDocument().equals(this.getIncludeJobDocument()) == false) return false; if (other.getExecutionNumber() == null ^ this.getExecutionNumber() == null) return false; if (other.getExecutionNumber() != null && other.getExecutionNumber().equals(this.getExecutionNumber()) == 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 + ((getThingName() == null) ? 0 : getThingName().hashCode()); hashCode = prime * hashCode + ((getIncludeJobDocument() == null) ? 0 : getIncludeJobDocument().hashCode()); hashCode = prime * hashCode + ((getExecutionNumber() == null) ? 0 : getExecutionNumber().hashCode()); return hashCode; } @Override public DescribeJobExecutionRequest clone() { return (DescribeJobExecutionRequest) super.clone(); } }