/** * 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 Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace IoT { namespace Model { /** *

The job execution object represents the execution of a job on a particular * device.

See Also:

AWS * API Reference

*/ class JobExecution { public: AWS_IOT_API JobExecution(); AWS_IOT_API JobExecution(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API JobExecution& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

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

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

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

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

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

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

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

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

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

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

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

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

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

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

The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED).

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

The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED).

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

The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED).

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

The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED).

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

The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED).

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

The status of the job execution (IN_PROGRESS, QUEUED, FAILED, SUCCEEDED, * TIMED_OUT, CANCELED, or REJECTED).

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

Will be true if the job execution was canceled with the optional * force parameter set to true.

*/ inline bool GetForceCanceled() const{ return m_forceCanceled; } /** *

Will be true if the job execution was canceled with the optional * force parameter set to true.

*/ inline bool ForceCanceledHasBeenSet() const { return m_forceCanceledHasBeenSet; } /** *

Will be true if the job execution was canceled with the optional * force parameter set to true.

*/ inline void SetForceCanceled(bool value) { m_forceCanceledHasBeenSet = true; m_forceCanceled = value; } /** *

Will be true if the job execution was canceled with the optional * force parameter set to true.

*/ inline JobExecution& WithForceCanceled(bool value) { SetForceCanceled(value); return *this;} /** *

A collection of name/value pairs that describe the status of the job * execution.

*/ inline const JobExecutionStatusDetails& GetStatusDetails() const{ return m_statusDetails; } /** *

A collection of name/value pairs that describe the status of the job * execution.

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

A collection of name/value pairs that describe the status of the job * execution.

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

A collection of name/value pairs that describe the status of the job * execution.

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

A collection of name/value pairs that describe the status of the job * execution.

*/ inline JobExecution& WithStatusDetails(const JobExecutionStatusDetails& value) { SetStatusDetails(value); return *this;} /** *

A collection of name/value pairs that describe the status of the job * execution.

*/ inline JobExecution& WithStatusDetails(JobExecutionStatusDetails&& value) { SetStatusDetails(std::move(value)); return *this;} /** *

The ARN of the thing on which the job execution is running.

*/ inline const Aws::String& GetThingArn() const{ return m_thingArn; } /** *

The ARN of the thing on which the job execution is running.

*/ inline bool ThingArnHasBeenSet() const { return m_thingArnHasBeenSet; } /** *

The ARN of the thing on which the job execution is running.

*/ inline void SetThingArn(const Aws::String& value) { m_thingArnHasBeenSet = true; m_thingArn = value; } /** *

The ARN of the thing on which the job execution is running.

*/ inline void SetThingArn(Aws::String&& value) { m_thingArnHasBeenSet = true; m_thingArn = std::move(value); } /** *

The ARN of the thing on which the job execution is running.

*/ inline void SetThingArn(const char* value) { m_thingArnHasBeenSet = true; m_thingArn.assign(value); } /** *

The ARN of the thing on which the job execution is running.

*/ inline JobExecution& WithThingArn(const Aws::String& value) { SetThingArn(value); return *this;} /** *

The ARN of the thing on which the job execution is running.

*/ inline JobExecution& WithThingArn(Aws::String&& value) { SetThingArn(std::move(value)); return *this;} /** *

The ARN of the thing on which the job execution is running.

*/ inline JobExecution& WithThingArn(const char* value) { SetThingArn(value); return *this;} /** *

The time, in seconds since the epoch, when the job execution was queued.

*/ inline const Aws::Utils::DateTime& GetQueuedAt() const{ return m_queuedAt; } /** *

The time, in seconds since the epoch, when the job execution was queued.

*/ inline bool QueuedAtHasBeenSet() const { return m_queuedAtHasBeenSet; } /** *

The time, in seconds since the epoch, when the job execution was queued.

*/ inline void SetQueuedAt(const Aws::Utils::DateTime& value) { m_queuedAtHasBeenSet = true; m_queuedAt = value; } /** *

The time, in seconds since the epoch, when the job execution was queued.

*/ inline void SetQueuedAt(Aws::Utils::DateTime&& value) { m_queuedAtHasBeenSet = true; m_queuedAt = std::move(value); } /** *

The time, in seconds since the epoch, when the job execution was queued.

*/ inline JobExecution& WithQueuedAt(const Aws::Utils::DateTime& value) { SetQueuedAt(value); return *this;} /** *

The time, in seconds since the epoch, when the job execution was queued.

*/ inline JobExecution& WithQueuedAt(Aws::Utils::DateTime&& value) { SetQueuedAt(std::move(value)); return *this;} /** *

The time, in seconds since the epoch, when the job execution started.

*/ inline const Aws::Utils::DateTime& GetStartedAt() const{ return m_startedAt; } /** *

The time, in seconds since the epoch, when the job execution started.

*/ inline bool StartedAtHasBeenSet() const { return m_startedAtHasBeenSet; } /** *

The time, in seconds since the epoch, when the job execution started.

*/ inline void SetStartedAt(const Aws::Utils::DateTime& value) { m_startedAtHasBeenSet = true; m_startedAt = value; } /** *

The time, in seconds since the epoch, when the job execution started.

*/ inline void SetStartedAt(Aws::Utils::DateTime&& value) { m_startedAtHasBeenSet = true; m_startedAt = std::move(value); } /** *

The time, in seconds since the epoch, when the job execution started.

*/ inline JobExecution& WithStartedAt(const Aws::Utils::DateTime& value) { SetStartedAt(value); return *this;} /** *

The time, in seconds since the epoch, when the job execution started.

*/ inline JobExecution& WithStartedAt(Aws::Utils::DateTime&& value) { SetStartedAt(std::move(value)); return *this;} /** *

The time, in seconds since the epoch, when the job execution was last * updated.

*/ inline const Aws::Utils::DateTime& GetLastUpdatedAt() const{ return m_lastUpdatedAt; } /** *

The time, in seconds since the epoch, when the job execution was last * updated.

*/ inline bool LastUpdatedAtHasBeenSet() const { return m_lastUpdatedAtHasBeenSet; } /** *

The time, in seconds since the epoch, when the job execution was last * updated.

*/ inline void SetLastUpdatedAt(const Aws::Utils::DateTime& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = value; } /** *

The time, in seconds since the epoch, when the job execution was last * updated.

*/ inline void SetLastUpdatedAt(Aws::Utils::DateTime&& value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = std::move(value); } /** *

The time, in seconds since the epoch, when the job execution was last * updated.

*/ inline JobExecution& WithLastUpdatedAt(const Aws::Utils::DateTime& value) { SetLastUpdatedAt(value); return *this;} /** *

The time, in seconds since the epoch, when the job execution was last * updated.

*/ inline JobExecution& WithLastUpdatedAt(Aws::Utils::DateTime&& value) { SetLastUpdatedAt(std::move(value)); return *this;} /** *

A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in commands * which return or update job execution information.

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

A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in commands * which return or update job execution information.

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

A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in commands * which return or update job execution information.

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

A string (consisting of the digits "0" through "9") which identifies this * particular job execution on this particular device. It can be used in commands * which return or update job execution information.

*/ inline JobExecution& WithExecutionNumber(long long value) { SetExecutionNumber(value); return *this;} /** *

The version of the job execution. Job execution versions are incremented each * time they are updated by a device.

*/ inline long long GetVersionNumber() const{ return m_versionNumber; } /** *

The version of the job execution. Job execution versions are incremented each * time they are updated by a device.

*/ inline bool VersionNumberHasBeenSet() const { return m_versionNumberHasBeenSet; } /** *

The version of the job execution. Job execution versions are incremented each * time they are updated by a device.

*/ inline void SetVersionNumber(long long value) { m_versionNumberHasBeenSet = true; m_versionNumber = value; } /** *

The version of the job execution. Job execution versions are incremented each * time they are updated by a device.

*/ inline JobExecution& WithVersionNumber(long long value) { SetVersionNumber(value); return *this;} /** *

The estimated number of seconds that remain before the job execution status * will be changed to TIMED_OUT. The timeout interval can be anywhere * between 1 minute and 7 days (1 to 10080 minutes). The actual job execution * timeout can occur up to 60 seconds later than the estimated duration. This value * will not be included if the job execution has reached a terminal status.

*/ inline long long GetApproximateSecondsBeforeTimedOut() const{ return m_approximateSecondsBeforeTimedOut; } /** *

The estimated number of seconds that remain before the job execution status * will be changed to TIMED_OUT. The timeout interval can be anywhere * between 1 minute and 7 days (1 to 10080 minutes). The actual job execution * timeout can occur up to 60 seconds later than the estimated duration. This value * will not be included if the job execution has reached a terminal status.

*/ inline bool ApproximateSecondsBeforeTimedOutHasBeenSet() const { return m_approximateSecondsBeforeTimedOutHasBeenSet; } /** *

The estimated number of seconds that remain before the job execution status * will be changed to TIMED_OUT. The timeout interval can be anywhere * between 1 minute and 7 days (1 to 10080 minutes). The actual job execution * timeout can occur up to 60 seconds later than the estimated duration. This value * will not be included if the job execution has reached a terminal status.

*/ inline void SetApproximateSecondsBeforeTimedOut(long long value) { m_approximateSecondsBeforeTimedOutHasBeenSet = true; m_approximateSecondsBeforeTimedOut = value; } /** *

The estimated number of seconds that remain before the job execution status * will be changed to TIMED_OUT. The timeout interval can be anywhere * between 1 minute and 7 days (1 to 10080 minutes). The actual job execution * timeout can occur up to 60 seconds later than the estimated duration. This value * will not be included if the job execution has reached a terminal status.

*/ inline JobExecution& WithApproximateSecondsBeforeTimedOut(long long value) { SetApproximateSecondsBeforeTimedOut(value); return *this;} private: Aws::String m_jobId; bool m_jobIdHasBeenSet = false; JobExecutionStatus m_status; bool m_statusHasBeenSet = false; bool m_forceCanceled; bool m_forceCanceledHasBeenSet = false; JobExecutionStatusDetails m_statusDetails; bool m_statusDetailsHasBeenSet = false; Aws::String m_thingArn; bool m_thingArnHasBeenSet = false; Aws::Utils::DateTime m_queuedAt; bool m_queuedAtHasBeenSet = false; Aws::Utils::DateTime m_startedAt; bool m_startedAtHasBeenSet = false; Aws::Utils::DateTime m_lastUpdatedAt; bool m_lastUpdatedAtHasBeenSet = false; long long m_executionNumber; bool m_executionNumberHasBeenSet = false; long long m_versionNumber; bool m_versionNumberHasBeenSet = false; long long m_approximateSecondsBeforeTimedOut; bool m_approximateSecondsBeforeTimedOutHasBeenSet = false; }; } // namespace Model } // namespace IoT } // namespace Aws