/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace IoT { namespace Model { /** */ class CancelJobExecutionRequest : public IoTRequest { public: AWS_IOT_API CancelJobExecutionRequest(); // Service request name is the Operation name which will send this request out, // each operation should has unique request name, so that we can get operation's name from this request. // Note: this is not true for response, multiple operations may have the same response name, // so we can not get operation's name from response. inline virtual const char* GetServiceRequestName() const override { return "CancelJobExecution"; } AWS_IOT_API Aws::String SerializePayload() const override; AWS_IOT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

The ID of the job to be canceled.

*/ inline const Aws::String& GetJobId() const{ return m_jobId; } /** *

The ID of the job to be canceled.

*/ inline bool JobIdHasBeenSet() const { return m_jobIdHasBeenSet; } /** *

The ID of the job to be canceled.

*/ inline void SetJobId(const Aws::String& value) { m_jobIdHasBeenSet = true; m_jobId = value; } /** *

The ID of the job to be canceled.

*/ inline void SetJobId(Aws::String&& value) { m_jobIdHasBeenSet = true; m_jobId = std::move(value); } /** *

The ID of the job to be canceled.

*/ inline void SetJobId(const char* value) { m_jobIdHasBeenSet = true; m_jobId.assign(value); } /** *

The ID of the job to be canceled.

*/ inline CancelJobExecutionRequest& WithJobId(const Aws::String& value) { SetJobId(value); return *this;} /** *

The ID of the job to be canceled.

*/ inline CancelJobExecutionRequest& WithJobId(Aws::String&& value) { SetJobId(std::move(value)); return *this;} /** *

The ID of the job to be canceled.

*/ inline CancelJobExecutionRequest& WithJobId(const char* value) { SetJobId(value); return *this;} /** *

The name of the thing whose execution of the job will be canceled.

*/ inline const Aws::String& GetThingName() const{ return m_thingName; } /** *

The name of the thing whose execution of the job will be canceled.

*/ inline bool ThingNameHasBeenSet() const { return m_thingNameHasBeenSet; } /** *

The name of the thing whose execution of the job will be canceled.

*/ inline void SetThingName(const Aws::String& value) { m_thingNameHasBeenSet = true; m_thingName = value; } /** *

The name of the thing whose execution of the job will be canceled.

*/ inline void SetThingName(Aws::String&& value) { m_thingNameHasBeenSet = true; m_thingName = std::move(value); } /** *

The name of the thing whose execution of the job will be canceled.

*/ inline void SetThingName(const char* value) { m_thingNameHasBeenSet = true; m_thingName.assign(value); } /** *

The name of the thing whose execution of the job will be canceled.

*/ inline CancelJobExecutionRequest& WithThingName(const Aws::String& value) { SetThingName(value); return *this;} /** *

The name of the thing whose execution of the job will be canceled.

*/ inline CancelJobExecutionRequest& WithThingName(Aws::String&& value) { SetThingName(std::move(value)); return *this;} /** *

The name of the thing whose execution of the job will be canceled.

*/ inline CancelJobExecutionRequest& WithThingName(const char* value) { SetThingName(value); 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.

*/ inline bool GetForce() const{ return m_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.

*/ inline bool ForceHasBeenSet() const { return m_forceHasBeenSet; } /** *

(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.

*/ inline void SetForce(bool value) { m_forceHasBeenSet = true; m_force = value; } /** *

(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.

*/ inline CancelJobExecutionRequest& WithForce(bool value) { SetForce(value); return *this;} /** *

(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.)

*/ inline long long GetExpectedVersion() const{ return m_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.)

*/ inline bool ExpectedVersionHasBeenSet() const { return m_expectedVersionHasBeenSet; } /** *

(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.)

*/ inline void SetExpectedVersion(long long value) { m_expectedVersionHasBeenSet = true; m_expectedVersion = value; } /** *

(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.)

*/ inline CancelJobExecutionRequest& WithExpectedVersion(long long value) { SetExpectedVersion(value); 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.

*/ inline const Aws::Map& GetStatusDetails() const{ return m_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.

*/ inline bool StatusDetailsHasBeenSet() const { return m_statusDetailsHasBeenSet; } /** *

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.

*/ inline void SetStatusDetails(const Aws::Map& value) { m_statusDetailsHasBeenSet = true; m_statusDetails = value; } /** *

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.

*/ inline void SetStatusDetails(Aws::Map&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails = std::move(value); } /** *

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.

*/ inline CancelJobExecutionRequest& WithStatusDetails(const Aws::Map& value) { SetStatusDetails(value); 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.

*/ inline CancelJobExecutionRequest& WithStatusDetails(Aws::Map&& value) { SetStatusDetails(std::move(value)); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(const Aws::String& key, const Aws::String& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, value); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(Aws::String&& key, const Aws::String& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), value); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(const Aws::String& key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, std::move(value)); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(Aws::String&& key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), std::move(value)); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(const char* key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, std::move(value)); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(Aws::String&& key, const char* value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), value); 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.

*/ inline CancelJobExecutionRequest& AddStatusDetails(const char* key, const char* value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, value); return *this; } private: Aws::String m_jobId; bool m_jobIdHasBeenSet = false; Aws::String m_thingName; bool m_thingNameHasBeenSet = false; bool m_force; bool m_forceHasBeenSet = false; long long m_expectedVersion; bool m_expectedVersionHasBeenSet = false; Aws::Map m_statusDetails; bool m_statusDetailsHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws