/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace IoTJobsDataPlane { namespace Model { /** */ class UpdateJobExecutionRequest : public IoTJobsDataPlaneRequest { public: AWS_IOTJOBSDATAPLANE_API UpdateJobExecutionRequest(); // 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 "UpdateJobExecution"; } AWS_IOTJOBSDATAPLANE_API Aws::String SerializePayload() const override; /** *

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

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

The name of the thing associated with the device.

*/ inline UpdateJobExecutionRequest& WithThingName(const char* value) { SetThingName(value); return *this;} /** *

The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or * REJECTED). This must be specified on every update.

*/ inline const JobExecutionStatus& GetStatus() const{ return m_status; } /** *

The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or * REJECTED). This must be specified on every update.

*/ inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } /** *

The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or * REJECTED). This must be specified on every update.

*/ inline void SetStatus(const JobExecutionStatus& value) { m_statusHasBeenSet = true; m_status = value; } /** *

The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or * REJECTED). This must be specified on every update.

*/ inline void SetStatus(JobExecutionStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } /** *

The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or * REJECTED). This must be specified on every update.

*/ inline UpdateJobExecutionRequest& WithStatus(const JobExecutionStatus& value) { SetStatus(value); return *this;} /** *

The new status for the job execution (IN_PROGRESS, FAILED, SUCCESS, or * REJECTED). This must be specified on every update.

*/ inline UpdateJobExecutionRequest& WithStatus(JobExecutionStatus&& value) { SetStatus(std::move(value)); return *this;} /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline const Aws::Map& GetStatusDetails() const{ return m_statusDetails; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

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

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

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

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

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

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& WithStatusDetails(const Aws::Map& value) { SetStatusDetails(value); return *this;} /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& WithStatusDetails(Aws::Map&& value) { SetStatusDetails(std::move(value)); return *this;} /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(const Aws::String& key, const Aws::String& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, value); return *this; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(Aws::String&& key, const Aws::String& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), value); return *this; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(const Aws::String& key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, std::move(value)); return *this; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(Aws::String&& key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), std::move(value)); return *this; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(const char* key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, std::move(value)); return *this; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(Aws::String&& key, const char* value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), value); return *this; } /** *

Optional. A collection of name/value pairs that describe the status of the * job execution. If not specified, the statusDetails are unchanged.

*/ inline UpdateJobExecutionRequest& AddStatusDetails(const char* key, const char* value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, value); return *this; } /** *

Specifies the amount of time this device has to finish execution of this job. * If the job execution status is not set to a terminal state before this timer * expires, or before the timer is reset (by again calling * UpdateJobExecution, setting the status to IN_PROGRESS * and specifying a new timeout value in this field) the job execution status will * be automatically set to TIMED_OUT. Note that setting or resetting * this timeout has no effect on that job execution timeout which may have been * specified when the job was created (CreateJob using field * timeoutConfig).

*/ inline long long GetStepTimeoutInMinutes() const{ return m_stepTimeoutInMinutes; } /** *

Specifies the amount of time this device has to finish execution of this job. * If the job execution status is not set to a terminal state before this timer * expires, or before the timer is reset (by again calling * UpdateJobExecution, setting the status to IN_PROGRESS * and specifying a new timeout value in this field) the job execution status will * be automatically set to TIMED_OUT. Note that setting or resetting * this timeout has no effect on that job execution timeout which may have been * specified when the job was created (CreateJob using field * timeoutConfig).

*/ inline bool StepTimeoutInMinutesHasBeenSet() const { return m_stepTimeoutInMinutesHasBeenSet; } /** *

Specifies the amount of time this device has to finish execution of this job. * If the job execution status is not set to a terminal state before this timer * expires, or before the timer is reset (by again calling * UpdateJobExecution, setting the status to IN_PROGRESS * and specifying a new timeout value in this field) the job execution status will * be automatically set to TIMED_OUT. Note that setting or resetting * this timeout has no effect on that job execution timeout which may have been * specified when the job was created (CreateJob using field * timeoutConfig).

*/ inline void SetStepTimeoutInMinutes(long long value) { m_stepTimeoutInMinutesHasBeenSet = true; m_stepTimeoutInMinutes = value; } /** *

Specifies the amount of time this device has to finish execution of this job. * If the job execution status is not set to a terminal state before this timer * expires, or before the timer is reset (by again calling * UpdateJobExecution, setting the status to IN_PROGRESS * and specifying a new timeout value in this field) the job execution status will * be automatically set to TIMED_OUT. Note that setting or resetting * this timeout has no effect on that job execution timeout which may have been * specified when the job was created (CreateJob using field * timeoutConfig).

*/ inline UpdateJobExecutionRequest& WithStepTimeoutInMinutes(long long value) { SetStepTimeoutInMinutes(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 UpdateJobExecutionRequest& WithExpectedVersion(long long value) { SetExpectedVersion(value); return *this;} /** *

Optional. When included and set to true, the response contains the * JobExecutionState data. The default is false.

*/ inline bool GetIncludeJobExecutionState() const{ return m_includeJobExecutionState; } /** *

Optional. When included and set to true, the response contains the * JobExecutionState data. The default is false.

*/ inline bool IncludeJobExecutionStateHasBeenSet() const { return m_includeJobExecutionStateHasBeenSet; } /** *

Optional. When included and set to true, the response contains the * JobExecutionState data. The default is false.

*/ inline void SetIncludeJobExecutionState(bool value) { m_includeJobExecutionStateHasBeenSet = true; m_includeJobExecutionState = value; } /** *

Optional. When included and set to true, the response contains the * JobExecutionState data. The default is false.

*/ inline UpdateJobExecutionRequest& WithIncludeJobExecutionState(bool value) { SetIncludeJobExecutionState(value); return *this;} /** *

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

*/ inline bool GetIncludeJobDocument() const{ return m_includeJobDocument; } /** *

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

*/ inline bool IncludeJobDocumentHasBeenSet() const { return m_includeJobDocumentHasBeenSet; } /** *

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

*/ inline void SetIncludeJobDocument(bool value) { m_includeJobDocumentHasBeenSet = true; m_includeJobDocument = value; } /** *

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

*/ inline UpdateJobExecutionRequest& WithIncludeJobDocument(bool value) { SetIncludeJobDocument(value); return *this;} /** *

Optional. A number that identifies a particular job execution on a particular * device.

*/ inline long long GetExecutionNumber() const{ return m_executionNumber; } /** *

Optional. A number that identifies a particular job execution on a particular * device.

*/ inline bool ExecutionNumberHasBeenSet() const { return m_executionNumberHasBeenSet; } /** *

Optional. A number that identifies a particular job execution on a particular * device.

*/ inline void SetExecutionNumber(long long value) { m_executionNumberHasBeenSet = true; m_executionNumber = value; } /** *

Optional. A number that identifies a particular job execution on a particular * device.

*/ inline UpdateJobExecutionRequest& WithExecutionNumber(long long value) { SetExecutionNumber(value); return *this;} private: Aws::String m_jobId; bool m_jobIdHasBeenSet = false; Aws::String m_thingName; bool m_thingNameHasBeenSet = false; JobExecutionStatus m_status; bool m_statusHasBeenSet = false; Aws::Map m_statusDetails; bool m_statusDetailsHasBeenSet = false; long long m_stepTimeoutInMinutes; bool m_stepTimeoutInMinutesHasBeenSet = false; long long m_expectedVersion; bool m_expectedVersionHasBeenSet = false; bool m_includeJobExecutionState; bool m_includeJobExecutionStateHasBeenSet = false; bool m_includeJobDocument; bool m_includeJobDocumentHasBeenSet = false; long long m_executionNumber; bool m_executionNumberHasBeenSet = false; }; } // namespace Model } // namespace IoTJobsDataPlane } // namespace Aws