/* * Copyright 2010-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.iot.model; import java.io.Serializable; /** *
* The job execution object represents the execution of a job on a particular * device. *
*/ public class JobExecution implements Serializable { /** ** The unique identifier you assigned to the job when it was created. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*/
private String jobId;
/**
*
* The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED). *
*
* Constraints:
* Allowed Values: QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT,
* REJECTED, REMOVED, CANCELED
*/
private String status;
/**
*
* Will be true
if the job execution was canceled with the
* optional force
parameter set to true
.
*
* A collection of name/value pairs that describe the status of the job * execution. *
*/ private JobExecutionStatusDetails statusDetails; /** ** The ARN of the thing on which the job execution is running. *
*/ private String thingArn; /** ** The time, in seconds since the epoch, when the job execution was queued. *
*/ private java.util.Date queuedAt; /** ** The time, in seconds since the epoch, when the job execution started. *
*/ private java.util.Date startedAt; /** ** The time, in seconds since the epoch, when the job execution was last * updated. *
*/ private java.util.Date lastUpdatedAt; /** ** A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in * commands which return or update job execution information. *
*/ private Long executionNumber; /** ** The version of the job execution. Job execution versions are incremented * each time they are updated by a device. *
*/ private Long versionNumber; /** *
* The estimated number of seconds that remain before the job execution
* status will be changed to TIMED_OUT
. The timeout interval
* can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The
* actual job execution timeout can occur up to 60 seconds later than the
* estimated duration. This value will not be included if the job execution
* has reached a terminal status.
*
* The unique identifier you assigned to the job when it was created. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*
* @return
* The unique identifier you assigned to the job when it was * created. *
*/ public String getJobId() { return jobId; } /** ** The unique identifier you assigned to the job when it was created. *
*
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*
* @param jobId
* The unique identifier you assigned to the job when it was * created. *
*/ public void setJobId(String jobId) { this.jobId = jobId; } /** ** The unique identifier you assigned to the job when it was created. *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Length: 1 - 64
* Pattern: [a-zA-Z0-9_-]+
*
* @param jobId
* The unique identifier you assigned to the job when it was * created. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withJobId(String jobId) { this.jobId = jobId; return this; } /** ** The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED). *
*
* Constraints:
* Allowed Values: QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT,
* REJECTED, REMOVED, CANCELED
*
* @return
* The status of the job execution (IN_PROGRESS, QUEUED, FAILED, * SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED). *
* @see JobExecutionStatus */ public String getStatus() { return status; } /** ** The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED). *
*
* Constraints:
* Allowed Values: QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT,
* REJECTED, REMOVED, CANCELED
*
* @param status
* The status of the job execution (IN_PROGRESS, QUEUED, FAILED, * SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED). *
* @see JobExecutionStatus */ public void setStatus(String status) { this.status = status; } /** ** The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED). *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT,
* REJECTED, REMOVED, CANCELED
*
* @param status
* The status of the job execution (IN_PROGRESS, QUEUED, FAILED, * SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED). *
* @return A reference to this updated object so that method calls can be * chained together. * @see JobExecutionStatus */ public JobExecution withStatus(String status) { this.status = status; return this; } /** ** The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED). *
*
* Constraints:
* Allowed Values: QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT,
* REJECTED, REMOVED, CANCELED
*
* @param status
* The status of the job execution (IN_PROGRESS, QUEUED, FAILED, * SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED). *
* @see JobExecutionStatus */ public void setStatus(JobExecutionStatus status) { this.status = status.toString(); } /** ** The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED). *
** Returns a reference to this object so that method calls can be chained * together. *
* Constraints:
* Allowed Values: QUEUED, IN_PROGRESS, SUCCEEDED, FAILED, TIMED_OUT,
* REJECTED, REMOVED, CANCELED
*
* @param status
* The status of the job execution (IN_PROGRESS, QUEUED, FAILED, * SUCCEEDED, TIMED_OUT, CANCELED, or REJECTED). *
* @return A reference to this updated object so that method calls can be * chained together. * @see JobExecutionStatus */ public JobExecution withStatus(JobExecutionStatus status) { this.status = status.toString(); return this; } /** *
* Will be true
if the job execution was canceled with the
* optional force
parameter set to true
.
*
* Will be true
if the job execution was canceled with
* the optional force
parameter set to
* true
.
*
* Will be true
if the job execution was canceled with the
* optional force
parameter set to true
.
*
* Will be true
if the job execution was canceled with
* the optional force
parameter set to
* true
.
*
* Will be true
if the job execution was canceled with the
* optional force
parameter set to true
.
*
* Will be true
if the job execution was canceled
* with the optional force
parameter set to
* true
.
*
* Will be true
if the job execution was canceled with the
* optional force
parameter set to true
.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param forceCanceled
* Will be true
if the job execution was canceled
* with the optional force
parameter set to
* true
.
*
* A collection of name/value pairs that describe the status of the job * execution. *
* * @return* A collection of name/value pairs that describe the status of the * job execution. *
*/ public JobExecutionStatusDetails getStatusDetails() { return statusDetails; } /** ** A collection of name/value pairs that describe the status of the job * execution. *
* * @param statusDetails* A collection of name/value pairs that describe the status of * the job execution. *
*/ public void setStatusDetails(JobExecutionStatusDetails statusDetails) { this.statusDetails = statusDetails; } /** ** A collection of name/value pairs that describe the status of the job * execution. *
** Returns a reference to this object so that method calls can be chained * together. * * @param statusDetails
* A collection of name/value pairs that describe the status of * the job execution. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withStatusDetails(JobExecutionStatusDetails statusDetails) { this.statusDetails = statusDetails; return this; } /** ** The ARN of the thing on which the job execution is running. *
* * @return* The ARN of the thing on which the job execution is running. *
*/ public String getThingArn() { return thingArn; } /** ** The ARN of the thing on which the job execution is running. *
* * @param thingArn* The ARN of the thing on which the job execution is running. *
*/ public void setThingArn(String thingArn) { this.thingArn = thingArn; } /** ** The ARN of the thing on which the job execution is running. *
** Returns a reference to this object so that method calls can be chained * together. * * @param thingArn
* The ARN of the thing on which the job execution is running. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withThingArn(String thingArn) { this.thingArn = thingArn; return this; } /** ** The time, in seconds since the epoch, when the job execution was queued. *
* * @return* The time, in seconds since the epoch, when the job execution was * queued. *
*/ public java.util.Date getQueuedAt() { return queuedAt; } /** ** The time, in seconds since the epoch, when the job execution was queued. *
* * @param queuedAt* The time, in seconds since the epoch, when the job execution * was queued. *
*/ public void setQueuedAt(java.util.Date queuedAt) { this.queuedAt = queuedAt; } /** ** The time, in seconds since the epoch, when the job execution was queued. *
** Returns a reference to this object so that method calls can be chained * together. * * @param queuedAt
* The time, in seconds since the epoch, when the job execution * was queued. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withQueuedAt(java.util.Date queuedAt) { this.queuedAt = queuedAt; return this; } /** ** The time, in seconds since the epoch, when the job execution started. *
* * @return* The time, in seconds since the epoch, when the job execution * started. *
*/ public java.util.Date getStartedAt() { return startedAt; } /** ** The time, in seconds since the epoch, when the job execution started. *
* * @param startedAt* The time, in seconds since the epoch, when the job execution * started. *
*/ public void setStartedAt(java.util.Date startedAt) { this.startedAt = startedAt; } /** ** The time, in seconds since the epoch, when the job execution started. *
** Returns a reference to this object so that method calls can be chained * together. * * @param startedAt
* The time, in seconds since the epoch, when the job execution * started. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withStartedAt(java.util.Date startedAt) { this.startedAt = startedAt; return this; } /** ** The time, in seconds since the epoch, when the job execution was last * updated. *
* * @return* The time, in seconds since the epoch, when the job execution was * last updated. *
*/ public java.util.Date getLastUpdatedAt() { return lastUpdatedAt; } /** ** The time, in seconds since the epoch, when the job execution was last * updated. *
* * @param lastUpdatedAt* The time, in seconds since the epoch, when the job execution * was last updated. *
*/ public void setLastUpdatedAt(java.util.Date lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; } /** ** The time, in seconds since the epoch, when the job execution was last * updated. *
** Returns a reference to this object so that method calls can be chained * together. * * @param lastUpdatedAt
* The time, in seconds since the epoch, when the job execution * was last updated. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withLastUpdatedAt(java.util.Date lastUpdatedAt) { this.lastUpdatedAt = lastUpdatedAt; return this; } /** ** A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in * commands which return or update job execution information. *
* * @return* A string (consisting of the digits "0" through "9") which * identifies this particular job execution on this particular * device. It can be used in commands which return or update job * execution information. *
*/ public Long getExecutionNumber() { return executionNumber; } /** ** A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in * commands which return or update job execution information. *
* * @param executionNumber* A string (consisting of the digits "0" through "9") which * identifies this particular job execution on this particular * device. It can be used in commands which return or update job * execution information. *
*/ public void setExecutionNumber(Long executionNumber) { this.executionNumber = executionNumber; } /** ** A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in * commands which return or update job execution information. *
** Returns a reference to this object so that method calls can be chained * together. * * @param executionNumber
* A string (consisting of the digits "0" through "9") which * identifies this particular job execution on this particular * device. It can be used in commands which return or update job * execution information. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withExecutionNumber(Long executionNumber) { this.executionNumber = executionNumber; return this; } /** ** The version of the job execution. Job execution versions are incremented * each time they are updated by a device. *
* * @return* The version of the job execution. Job execution versions are * incremented each time they are updated by a device. *
*/ public Long getVersionNumber() { return versionNumber; } /** ** The version of the job execution. Job execution versions are incremented * each time they are updated by a device. *
* * @param versionNumber* The version of the job execution. Job execution versions are * incremented each time they are updated by a device. *
*/ public void setVersionNumber(Long versionNumber) { this.versionNumber = versionNumber; } /** ** The version of the job execution. Job execution versions are incremented * each time they are updated by a device. *
** Returns a reference to this object so that method calls can be chained * together. * * @param versionNumber
* The version of the job execution. Job execution versions are * incremented each time they are updated by a device. *
* @return A reference to this updated object so that method calls can be * chained together. */ public JobExecution withVersionNumber(Long versionNumber) { this.versionNumber = versionNumber; return this; } /** *
* The estimated number of seconds that remain before the job execution
* status will be changed to TIMED_OUT
. The timeout interval
* can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The
* actual job execution timeout can occur up to 60 seconds later than the
* estimated duration. This value will not be included if the job execution
* has reached a terminal status.
*
* The estimated number of seconds that remain before the job
* execution status will be changed to TIMED_OUT
. The
* timeout interval can be anywhere between 1 minute and 7 days (1
* to 10080 minutes). The actual job execution timeout can occur up
* to 60 seconds later than the estimated duration. This value will
* not be included if the job execution has reached a terminal
* status.
*
* The estimated number of seconds that remain before the job execution
* status will be changed to TIMED_OUT
. The timeout interval
* can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The
* actual job execution timeout can occur up to 60 seconds later than the
* estimated duration. This value will not be included if the job execution
* has reached a terminal status.
*
* The estimated number of seconds that remain before the job
* execution status will be changed to TIMED_OUT
.
* The timeout interval can be anywhere between 1 minute and 7
* days (1 to 10080 minutes). The actual job execution timeout
* can occur up to 60 seconds later than the estimated duration.
* This value will not be included if the job execution has
* reached a terminal status.
*
* The estimated number of seconds that remain before the job execution
* status will be changed to TIMED_OUT
. The timeout interval
* can be anywhere between 1 minute and 7 days (1 to 10080 minutes). The
* actual job execution timeout can occur up to 60 seconds later than the
* estimated duration. This value will not be included if the job execution
* has reached a terminal status.
*
* Returns a reference to this object so that method calls can be chained * together. * * @param approximateSecondsBeforeTimedOut
* The estimated number of seconds that remain before the job
* execution status will be changed to TIMED_OUT
.
* The timeout interval can be anywhere between 1 minute and 7
* days (1 to 10080 minutes). The actual job execution timeout
* can occur up to 60 seconds later than the estimated duration.
* This value will not be included if the job execution has
* reached a terminal status.
*