1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/iot-jobs-data/IoTJobsDataPlane_EXPORTS.h> 8 #include <aws/iot-jobs-data/model/JobExecutionStatus.h> 9 #include <aws/core/utils/memory/stl/AWSMap.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <utility> 12 13 namespace Aws 14 { 15 namespace Utils 16 { 17 namespace Json 18 { 19 class JsonValue; 20 class JsonView; 21 } // namespace Json 22 } // namespace Utils 23 namespace IoTJobsDataPlane 24 { 25 namespace Model 26 { 27 28 /** 29 * <p>Contains data about the state of a job execution.</p><p><h3>See Also:</h3> 30 * <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/iot-jobs-data-2017-09-29/JobExecutionState">AWS 32 * API Reference</a></p> 33 */ 34 class AWS_IOTJOBSDATAPLANE_API JobExecutionState 35 { 36 public: 37 JobExecutionState(); 38 JobExecutionState(Aws::Utils::Json::JsonView jsonValue); 39 JobExecutionState& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", 45 * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".</p> 46 */ GetStatus()47 inline const JobExecutionStatus& GetStatus() const{ return m_status; } 48 49 /** 50 * <p>The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", 51 * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".</p> 52 */ StatusHasBeenSet()53 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; } 54 55 /** 56 * <p>The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", 57 * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".</p> 58 */ SetStatus(const JobExecutionStatus & value)59 inline void SetStatus(const JobExecutionStatus& value) { m_statusHasBeenSet = true; m_status = value; } 60 61 /** 62 * <p>The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", 63 * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".</p> 64 */ SetStatus(JobExecutionStatus && value)65 inline void SetStatus(JobExecutionStatus&& value) { m_statusHasBeenSet = true; m_status = std::move(value); } 66 67 /** 68 * <p>The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", 69 * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".</p> 70 */ WithStatus(const JobExecutionStatus & value)71 inline JobExecutionState& WithStatus(const JobExecutionStatus& value) { SetStatus(value); return *this;} 72 73 /** 74 * <p>The status of the job execution. Can be one of: "QUEUED", "IN_PROGRESS", 75 * "FAILED", "SUCCESS", "CANCELED", "REJECTED", or "REMOVED".</p> 76 */ WithStatus(JobExecutionStatus && value)77 inline JobExecutionState& WithStatus(JobExecutionStatus&& value) { SetStatus(std::move(value)); return *this;} 78 79 80 /** 81 * <p>A collection of name/value pairs that describe the status of the job 82 * execution.</p> 83 */ GetStatusDetails()84 inline const Aws::Map<Aws::String, Aws::String>& GetStatusDetails() const{ return m_statusDetails; } 85 86 /** 87 * <p>A collection of name/value pairs that describe the status of the job 88 * execution.</p> 89 */ StatusDetailsHasBeenSet()90 inline bool StatusDetailsHasBeenSet() const { return m_statusDetailsHasBeenSet; } 91 92 /** 93 * <p>A collection of name/value pairs that describe the status of the job 94 * execution.</p> 95 */ SetStatusDetails(const Aws::Map<Aws::String,Aws::String> & value)96 inline void SetStatusDetails(const Aws::Map<Aws::String, Aws::String>& value) { m_statusDetailsHasBeenSet = true; m_statusDetails = value; } 97 98 /** 99 * <p>A collection of name/value pairs that describe the status of the job 100 * execution.</p> 101 */ SetStatusDetails(Aws::Map<Aws::String,Aws::String> && value)102 inline void SetStatusDetails(Aws::Map<Aws::String, Aws::String>&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails = std::move(value); } 103 104 /** 105 * <p>A collection of name/value pairs that describe the status of the job 106 * execution.</p> 107 */ WithStatusDetails(const Aws::Map<Aws::String,Aws::String> & value)108 inline JobExecutionState& WithStatusDetails(const Aws::Map<Aws::String, Aws::String>& value) { SetStatusDetails(value); return *this;} 109 110 /** 111 * <p>A collection of name/value pairs that describe the status of the job 112 * execution.</p> 113 */ WithStatusDetails(Aws::Map<Aws::String,Aws::String> && value)114 inline JobExecutionState& WithStatusDetails(Aws::Map<Aws::String, Aws::String>&& value) { SetStatusDetails(std::move(value)); return *this;} 115 116 /** 117 * <p>A collection of name/value pairs that describe the status of the job 118 * execution.</p> 119 */ AddStatusDetails(const Aws::String & key,const Aws::String & value)120 inline JobExecutionState& AddStatusDetails(const Aws::String& key, const Aws::String& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, value); return *this; } 121 122 /** 123 * <p>A collection of name/value pairs that describe the status of the job 124 * execution.</p> 125 */ AddStatusDetails(Aws::String && key,const Aws::String & value)126 inline JobExecutionState& AddStatusDetails(Aws::String&& key, const Aws::String& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), value); return *this; } 127 128 /** 129 * <p>A collection of name/value pairs that describe the status of the job 130 * execution.</p> 131 */ AddStatusDetails(const Aws::String & key,Aws::String && value)132 inline JobExecutionState& AddStatusDetails(const Aws::String& key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, std::move(value)); return *this; } 133 134 /** 135 * <p>A collection of name/value pairs that describe the status of the job 136 * execution.</p> 137 */ AddStatusDetails(Aws::String && key,Aws::String && value)138 inline JobExecutionState& AddStatusDetails(Aws::String&& key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), std::move(value)); return *this; } 139 140 /** 141 * <p>A collection of name/value pairs that describe the status of the job 142 * execution.</p> 143 */ AddStatusDetails(const char * key,Aws::String && value)144 inline JobExecutionState& AddStatusDetails(const char* key, Aws::String&& value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, std::move(value)); return *this; } 145 146 /** 147 * <p>A collection of name/value pairs that describe the status of the job 148 * execution.</p> 149 */ AddStatusDetails(Aws::String && key,const char * value)150 inline JobExecutionState& AddStatusDetails(Aws::String&& key, const char* value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(std::move(key), value); return *this; } 151 152 /** 153 * <p>A collection of name/value pairs that describe the status of the job 154 * execution.</p> 155 */ AddStatusDetails(const char * key,const char * value)156 inline JobExecutionState& AddStatusDetails(const char* key, const char* value) { m_statusDetailsHasBeenSet = true; m_statusDetails.emplace(key, value); return *this; } 157 158 159 /** 160 * <p>The version of the job execution. Job execution versions are incremented each 161 * time they are updated by a device.</p> 162 */ GetVersionNumber()163 inline long long GetVersionNumber() const{ return m_versionNumber; } 164 165 /** 166 * <p>The version of the job execution. Job execution versions are incremented each 167 * time they are updated by a device.</p> 168 */ VersionNumberHasBeenSet()169 inline bool VersionNumberHasBeenSet() const { return m_versionNumberHasBeenSet; } 170 171 /** 172 * <p>The version of the job execution. Job execution versions are incremented each 173 * time they are updated by a device.</p> 174 */ SetVersionNumber(long long value)175 inline void SetVersionNumber(long long value) { m_versionNumberHasBeenSet = true; m_versionNumber = value; } 176 177 /** 178 * <p>The version of the job execution. Job execution versions are incremented each 179 * time they are updated by a device.</p> 180 */ WithVersionNumber(long long value)181 inline JobExecutionState& WithVersionNumber(long long value) { SetVersionNumber(value); return *this;} 182 183 private: 184 185 JobExecutionStatus m_status; 186 bool m_statusHasBeenSet; 187 188 Aws::Map<Aws::String, Aws::String> m_statusDetails; 189 bool m_statusDetailsHasBeenSet; 190 191 long long m_versionNumber; 192 bool m_versionNumberHasBeenSet; 193 }; 194 195 } // namespace Model 196 } // namespace IoTJobsDataPlane 197 } // namespace Aws 198