/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include namespace Aws { namespace Http { class URI; } //namespace Http namespace IoT { namespace Model { /** */ class DeleteJobRequest : public IoTRequest { public: AWS_IOT_API DeleteJobRequest(); // 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 "DeleteJob"; } 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 deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

The ID of the job to be deleted.

After a job deletion is completed, * you may reuse this jobId when you create a new job. However, this is not * recommended, and you must ensure that your devices are not using the jobId to * refer to the deleted job.

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

(Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, * you can only delete a job which is in a terminal state ("COMPLETED" or * "CANCELED") or an exception will occur. The default is false.

*

Deleting a job which is "IN_PROGRESS", will cause a device which is executing * the job to be unable to access job information or update the job execution * status. Use caution and ensure that each device executing a job which is deleted * is able to recover to a valid state.

*/ inline bool GetForce() const{ return m_force; } /** *

(Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, * you can only delete a job which is in a terminal state ("COMPLETED" or * "CANCELED") or an exception will occur. The default is false.

*

Deleting a job which is "IN_PROGRESS", will cause a device which is executing * the job to be unable to access job information or update the job execution * status. Use caution and ensure that each device executing a job which is deleted * is able to recover to a valid state.

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

(Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, * you can only delete a job which is in a terminal state ("COMPLETED" or * "CANCELED") or an exception will occur. The default is false.

*

Deleting a job which is "IN_PROGRESS", will cause a device which is executing * the job to be unable to access job information or update the job execution * status. Use caution and ensure that each device executing a job which is deleted * is able to recover to a valid state.

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

(Optional) When true, you can delete a job which is "IN_PROGRESS". Otherwise, * you can only delete a job which is in a terminal state ("COMPLETED" or * "CANCELED") or an exception will occur. The default is false.

*

Deleting a job which is "IN_PROGRESS", will cause a device which is executing * the job to be unable to access job information or update the job execution * status. Use caution and ensure that each device executing a job which is deleted * is able to recover to a valid state.

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

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline const Aws::String& GetNamespaceId() const{ return m_namespaceId; } /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline bool NamespaceIdHasBeenSet() const { return m_namespaceIdHasBeenSet; } /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline void SetNamespaceId(const Aws::String& value) { m_namespaceIdHasBeenSet = true; m_namespaceId = value; } /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline void SetNamespaceId(Aws::String&& value) { m_namespaceIdHasBeenSet = true; m_namespaceId = std::move(value); } /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline void SetNamespaceId(const char* value) { m_namespaceIdHasBeenSet = true; m_namespaceId.assign(value); } /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline DeleteJobRequest& WithNamespaceId(const Aws::String& value) { SetNamespaceId(value); return *this;} /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline DeleteJobRequest& WithNamespaceId(Aws::String&& value) { SetNamespaceId(std::move(value)); return *this;} /** *

The namespace used to indicate that a job is a customer-managed job.

*

When you specify a value for this parameter, Amazon Web Services IoT Core * sends jobs notifications to MQTT topics that contain the value in the following * format.

* $aws/things/THING_NAME/jobs/JOB_ID/notify-namespace-NAMESPACE_ID/ *

The namespaceId feature is in public preview.

* */ inline DeleteJobRequest& WithNamespaceId(const char* value) { SetNamespaceId(value); return *this;} private: Aws::String m_jobId; bool m_jobIdHasBeenSet = false; bool m_force; bool m_forceHasBeenSet = false; Aws::String m_namespaceId; bool m_namespaceIdHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws