/** * 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 CancelJobRequest : public IoTRequest { public: AWS_IOT_API CancelJobRequest(); // 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 "CancelJob"; } AWS_IOT_API Aws::String SerializePayload() const override; AWS_IOT_API void AddQueryStringParameters(Aws::Http::URI& uri) const override; /** *

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

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

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

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

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

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

The unique identifier you 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 you assigned to this job when it was created.

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

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

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

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

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

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

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

(Optional)A reason code string that explains why the job was canceled.

*/ inline const Aws::String& GetReasonCode() const{ return m_reasonCode; } /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline bool ReasonCodeHasBeenSet() const { return m_reasonCodeHasBeenSet; } /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline void SetReasonCode(const Aws::String& value) { m_reasonCodeHasBeenSet = true; m_reasonCode = value; } /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline void SetReasonCode(Aws::String&& value) { m_reasonCodeHasBeenSet = true; m_reasonCode = std::move(value); } /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline void SetReasonCode(const char* value) { m_reasonCodeHasBeenSet = true; m_reasonCode.assign(value); } /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline CancelJobRequest& WithReasonCode(const Aws::String& value) { SetReasonCode(value); return *this;} /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline CancelJobRequest& WithReasonCode(Aws::String&& value) { SetReasonCode(std::move(value)); return *this;} /** *

(Optional)A reason code string that explains why the job was canceled.

*/ inline CancelJobRequest& WithReasonCode(const char* value) { SetReasonCode(value); return *this;} /** *

An optional comment string describing why the job was canceled.

*/ inline const Aws::String& GetComment() const{ return m_comment; } /** *

An optional comment string describing why the job was canceled.

*/ inline bool CommentHasBeenSet() const { return m_commentHasBeenSet; } /** *

An optional comment string describing why the job was canceled.

*/ inline void SetComment(const Aws::String& value) { m_commentHasBeenSet = true; m_comment = value; } /** *

An optional comment string describing why the job was canceled.

*/ inline void SetComment(Aws::String&& value) { m_commentHasBeenSet = true; m_comment = std::move(value); } /** *

An optional comment string describing why the job was canceled.

*/ inline void SetComment(const char* value) { m_commentHasBeenSet = true; m_comment.assign(value); } /** *

An optional comment string describing why the job was canceled.

*/ inline CancelJobRequest& WithComment(const Aws::String& value) { SetComment(value); return *this;} /** *

An optional comment string describing why the job was canceled.

*/ inline CancelJobRequest& WithComment(Aws::String&& value) { SetComment(std::move(value)); return *this;} /** *

An optional comment string describing why the job was canceled.

*/ inline CancelJobRequest& WithComment(const char* value) { SetComment(value); return *this;} /** *

(Optional) If true job executions with status "IN_PROGRESS" and * "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are * canceled. The default is false.

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

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

(Optional) If true job executions with status "IN_PROGRESS" and * "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are * canceled. The default is false.

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

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

(Optional) If true job executions with status "IN_PROGRESS" and * "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are * canceled. The default is false.

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

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

(Optional) If true job executions with status "IN_PROGRESS" and * "QUEUED" are canceled, otherwise only job executions with status "QUEUED" are * canceled. The default is false.

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

*/ inline CancelJobRequest& WithForce(bool value) { SetForce(value); return *this;} private: Aws::String m_jobId; bool m_jobIdHasBeenSet = false; Aws::String m_reasonCode; bool m_reasonCodeHasBeenSet = false; Aws::String m_comment; bool m_commentHasBeenSet = false; bool m_force; bool m_forceHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws