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

Contains data about a job execution.

See Also:

AWS * API Reference

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

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 JobExecution& WithJobId(const Aws::String& value) { SetJobId(value); return *this;} /** *

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

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

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

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The name of the thing that is executing the job.

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

The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".

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

The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".

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

The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".

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

The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".

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

The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".

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

The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".

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

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

*/ inline const Aws::Map& 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 Aws::Map& value) { m_statusDetailsHasBeenSet = true; m_statusDetails = value; } /** *

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

*/ 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.

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

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

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

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

*/ inline JobExecution& 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.

*/ inline JobExecution& 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.

*/ inline JobExecution& 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.

*/ inline JobExecution& 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.

*/ inline JobExecution& 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.

*/ inline JobExecution& 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.

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

The time, in milliseconds since the epoch, when the job execution was * enqueued.

*/ inline long long GetQueuedAt() const{ return m_queuedAt; } /** *

The time, in milliseconds since the epoch, when the job execution was * enqueued.

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

The time, in milliseconds since the epoch, when the job execution was * enqueued.

*/ inline void SetQueuedAt(long long value) { m_queuedAtHasBeenSet = true; m_queuedAt = value; } /** *

The time, in milliseconds since the epoch, when the job execution was * enqueued.

*/ inline JobExecution& WithQueuedAt(long long value) { SetQueuedAt(value); return *this;} /** *

The time, in milliseconds since the epoch, when the job execution was * started.

*/ inline long long GetStartedAt() const{ return m_startedAt; } /** *

The time, in milliseconds since the epoch, when the job execution was * started.

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

The time, in milliseconds since the epoch, when the job execution was * started.

*/ inline void SetStartedAt(long long value) { m_startedAtHasBeenSet = true; m_startedAt = value; } /** *

The time, in milliseconds since the epoch, when the job execution was * started.

*/ inline JobExecution& WithStartedAt(long long value) { SetStartedAt(value); return *this;} /** *

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

*/ inline long long GetLastUpdatedAt() const{ return m_lastUpdatedAt; } /** *

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

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

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

*/ inline void SetLastUpdatedAt(long long value) { m_lastUpdatedAtHasBeenSet = true; m_lastUpdatedAt = value; } /** *

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

*/ inline JobExecution& WithLastUpdatedAt(long long value) { SetLastUpdatedAt(value); return *this;} /** *

The estimated number of seconds that remain before the job execution status * will be changed to TIMED_OUT.

*/ 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.

*/ 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.

*/ 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.

*/ inline JobExecution& WithApproximateSecondsBeforeTimedOut(long long value) { SetApproximateSecondsBeforeTimedOut(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;} /** *

A number that identifies a particular job execution on a particular device. * It can be used later in commands that return or update job execution * information.

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

A number that identifies a particular job execution on a particular device. * It can be used later in commands that return or update job execution * information.

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

A number that identifies a particular job execution on a particular device. * It can be used later in commands that return or update job execution * information.

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

A number that identifies a particular job execution on a particular device. * It can be used later in commands that return or update job execution * information.

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

The content of the job document.

*/ inline const Aws::String& GetJobDocument() const{ return m_jobDocument; } /** *

The content of the job document.

*/ inline bool JobDocumentHasBeenSet() const { return m_jobDocumentHasBeenSet; } /** *

The content of the job document.

*/ inline void SetJobDocument(const Aws::String& value) { m_jobDocumentHasBeenSet = true; m_jobDocument = value; } /** *

The content of the job document.

*/ inline void SetJobDocument(Aws::String&& value) { m_jobDocumentHasBeenSet = true; m_jobDocument = std::move(value); } /** *

The content of the job document.

*/ inline void SetJobDocument(const char* value) { m_jobDocumentHasBeenSet = true; m_jobDocument.assign(value); } /** *

The content of the job document.

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

The content of the job document.

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

The content of the job document.

*/ inline JobExecution& WithJobDocument(const char* value) { SetJobDocument(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_queuedAt; bool m_queuedAtHasBeenSet = false; long long m_startedAt; bool m_startedAtHasBeenSet = false; long long m_lastUpdatedAt; bool m_lastUpdatedAtHasBeenSet = false; long long m_approximateSecondsBeforeTimedOut; bool m_approximateSecondsBeforeTimedOutHasBeenSet = false; long long m_versionNumber; bool m_versionNumberHasBeenSet = false; long long m_executionNumber; bool m_executionNumberHasBeenSet = false; Aws::String m_jobDocument; bool m_jobDocumentHasBeenSet = false; }; } // namespace Model } // namespace IoTJobsDataPlane } // namespace Aws