/* * 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.iot.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CancelJobExecutionRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The ID of the job to be canceled. *
*/ private String jobId; /** ** The name of the thing whose execution of the job will be canceled. *
*/ private String thingName; /** *
* (Optional) If true
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
*
* Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution * status. Use caution and ensure that the device is able to recover to a valid state. *
*/ private Boolean force; /** ** (Optional) The expected current version of the job execution. Each time you update the job execution, its version * is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a * VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. * (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job * execution status data.) *
*/ private Long expectedVersion; /** ** A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. *
*/ private java.util.Map* The ID of the job to be canceled. *
* * @param jobId * The ID of the job to be canceled. */ public void setJobId(String jobId) { this.jobId = jobId; } /** ** The ID of the job to be canceled. *
* * @return The ID of the job to be canceled. */ public String getJobId() { return this.jobId; } /** ** The ID of the job to be canceled. *
* * @param jobId * The ID of the job to be canceled. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJobExecutionRequest withJobId(String jobId) { setJobId(jobId); return this; } /** ** The name of the thing whose execution of the job will be canceled. *
* * @param thingName * The name of the thing whose execution of the job will be canceled. */ public void setThingName(String thingName) { this.thingName = thingName; } /** ** The name of the thing whose execution of the job will be canceled. *
* * @return The name of the thing whose execution of the job will be canceled. */ public String getThingName() { return this.thingName; } /** ** The name of the thing whose execution of the job will be canceled. *
* * @param thingName * The name of the thing whose execution of the job will be canceled. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJobExecutionRequest withThingName(String thingName) { setThingName(thingName); return this; } /** *
* (Optional) If true
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
*
* Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution * status. Use caution and ensure that the device is able to recover to a valid state. *
* * @param force * (Optional) Iftrue
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
* * Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job * execution status. Use caution and ensure that the device is able to recover to a valid state. */ public void setForce(Boolean force) { this.force = force; } /** *
* (Optional) If true
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
*
* Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution * status. Use caution and ensure that the device is able to recover to a valid state. *
* * @return (Optional) Iftrue
the job execution will be canceled if it has status IN_PROGRESS or
* QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to
* cancel a job execution that is IN_PROGRESS, and you do not set force
to true
,
* then an InvalidStateTransitionException
will be thrown. The default is false
* .
* * Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job * execution status. Use caution and ensure that the device is able to recover to a valid state. */ public Boolean getForce() { return this.force; } /** *
* (Optional) If true
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
*
* Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution * status. Use caution and ensure that the device is able to recover to a valid state. *
* * @param force * (Optional) Iftrue
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
* * Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job * execution status. Use caution and ensure that the device is able to recover to a valid state. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJobExecutionRequest withForce(Boolean force) { setForce(force); return this; } /** *
* (Optional) If true
the job execution will be canceled if it has status IN_PROGRESS or QUEUED,
* otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to cancel a job
* execution that is IN_PROGRESS, and you do not set force
to true
, then an
* InvalidStateTransitionException
will be thrown. The default is false
.
*
* Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job execution * status. Use caution and ensure that the device is able to recover to a valid state. *
* * @return (Optional) Iftrue
the job execution will be canceled if it has status IN_PROGRESS or
* QUEUED, otherwise the job execution will be canceled only if it has status QUEUED. If you attempt to
* cancel a job execution that is IN_PROGRESS, and you do not set force
to true
,
* then an InvalidStateTransitionException
will be thrown. The default is false
* .
* * Canceling a job execution which is "IN_PROGRESS", will cause the device to be unable to update the job * execution status. Use caution and ensure that the device is able to recover to a valid state. */ public Boolean isForce() { return this.force; } /** *
* (Optional) The expected current version of the job execution. Each time you update the job execution, its version * is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a * VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. * (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job * execution status data.) *
* * @param expectedVersion * (Optional) The expected current version of the job execution. Each time you update the job execution, its * version is incremented. If the version of the job execution stored in Jobs does not match, the update is * rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status * data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order * to obtain the job execution status data.) */ public void setExpectedVersion(Long expectedVersion) { this.expectedVersion = expectedVersion; } /** ** (Optional) The expected current version of the job execution. Each time you update the job execution, its version * is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a * VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. * (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job * execution status data.) *
* * @return (Optional) The expected current version of the job execution. Each time you update the job execution, its * version is incremented. If the version of the job execution stored in Jobs does not match, the update is * rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution * status data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in * order to obtain the job execution status data.) */ public Long getExpectedVersion() { return this.expectedVersion; } /** ** (Optional) The expected current version of the job execution. Each time you update the job execution, its version * is incremented. If the version of the job execution stored in Jobs does not match, the update is rejected with a * VersionMismatch error, and an ErrorResponse that contains the current job execution status data is returned. * (This makes it unnecessary to perform a separate DescribeJobExecution request in order to obtain the job * execution status data.) *
* * @param expectedVersion * (Optional) The expected current version of the job execution. Each time you update the job execution, its * version is incremented. If the version of the job execution stored in Jobs does not match, the update is * rejected with a VersionMismatch error, and an ErrorResponse that contains the current job execution status * data is returned. (This makes it unnecessary to perform a separate DescribeJobExecution request in order * to obtain the job execution status data.) * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJobExecutionRequest withExpectedVersion(Long expectedVersion) { setExpectedVersion(expectedVersion); return this; } /** ** A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. *
* * @return A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. */ public java.util.Map* A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. *
* * @param statusDetails * A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. */ public void setStatusDetails(java.util.Map* A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. *
* * @param statusDetails * A collection of name/value pairs that describe the status of the job execution. If not specified, the * statusDetails are unchanged. You can specify at most 10 name/value pairs. * @return Returns a reference to this object so that method calls can be chained together. */ public CancelJobExecutionRequest withStatusDetails(java.util.Map