AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
Operation.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/lightsail/Lightsail_EXPORTS.h>
10#include <aws/lightsail/model/OperationStatus.h>
11#include <aws/lightsail/model/OperationType.h>
12#include <aws/lightsail/model/ResourceLocation.h>
13#include <aws/lightsail/model/ResourceType.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace Lightsail {
25namespace Model {
26
32class Operation {
33 public:
34 AWS_LIGHTSAIL_API Operation() = default;
35 AWS_LIGHTSAIL_API Operation(Aws::Utils::Json::JsonView jsonValue);
36 AWS_LIGHTSAIL_API Operation& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetId() const { return m_id; }
44 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
45 template <typename IdT = Aws::String>
46 void SetId(IdT&& value) {
47 m_idHasBeenSet = true;
48 m_id = std::forward<IdT>(value);
49 }
50 template <typename IdT = Aws::String>
51 Operation& WithId(IdT&& value) {
52 SetId(std::forward<IdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetResourceName() const { return m_resourceName; }
62 inline bool ResourceNameHasBeenSet() const { return m_resourceNameHasBeenSet; }
63 template <typename ResourceNameT = Aws::String>
64 void SetResourceName(ResourceNameT&& value) {
65 m_resourceNameHasBeenSet = true;
66 m_resourceName = std::forward<ResourceNameT>(value);
67 }
68 template <typename ResourceNameT = Aws::String>
69 Operation& WithResourceName(ResourceNameT&& value) {
70 SetResourceName(std::forward<ResourceNameT>(value));
71 return *this;
72 }
74
76
79 inline ResourceType GetResourceType() const { return m_resourceType; }
80 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
81 inline void SetResourceType(ResourceType value) {
82 m_resourceTypeHasBeenSet = true;
83 m_resourceType = value;
84 }
86 SetResourceType(value);
87 return *this;
88 }
90
92
96 inline const Aws::Utils::DateTime& GetCreatedAt() const { return m_createdAt; }
97 inline bool CreatedAtHasBeenSet() const { return m_createdAtHasBeenSet; }
98 template <typename CreatedAtT = Aws::Utils::DateTime>
99 void SetCreatedAt(CreatedAtT&& value) {
100 m_createdAtHasBeenSet = true;
101 m_createdAt = std::forward<CreatedAtT>(value);
102 }
103 template <typename CreatedAtT = Aws::Utils::DateTime>
104 Operation& WithCreatedAt(CreatedAtT&& value) {
105 SetCreatedAt(std::forward<CreatedAtT>(value));
106 return *this;
107 }
109
111
114 inline const ResourceLocation& GetLocation() const { return m_location; }
115 inline bool LocationHasBeenSet() const { return m_locationHasBeenSet; }
116 template <typename LocationT = ResourceLocation>
117 void SetLocation(LocationT&& value) {
118 m_locationHasBeenSet = true;
119 m_location = std::forward<LocationT>(value);
120 }
121 template <typename LocationT = ResourceLocation>
122 Operation& WithLocation(LocationT&& value) {
123 SetLocation(std::forward<LocationT>(value));
124 return *this;
125 }
127
129
132 inline bool GetIsTerminal() const { return m_isTerminal; }
133 inline bool IsTerminalHasBeenSet() const { return m_isTerminalHasBeenSet; }
134 inline void SetIsTerminal(bool value) {
135 m_isTerminalHasBeenSet = true;
136 m_isTerminal = value;
137 }
138 inline Operation& WithIsTerminal(bool value) {
139 SetIsTerminal(value);
140 return *this;
141 }
143
145
148 inline const Aws::String& GetOperationDetails() const { return m_operationDetails; }
149 inline bool OperationDetailsHasBeenSet() const { return m_operationDetailsHasBeenSet; }
150 template <typename OperationDetailsT = Aws::String>
151 void SetOperationDetails(OperationDetailsT&& value) {
152 m_operationDetailsHasBeenSet = true;
153 m_operationDetails = std::forward<OperationDetailsT>(value);
154 }
155 template <typename OperationDetailsT = Aws::String>
156 Operation& WithOperationDetails(OperationDetailsT&& value) {
157 SetOperationDetails(std::forward<OperationDetailsT>(value));
158 return *this;
159 }
161
163
166 inline OperationType GetOperationType() const { return m_operationType; }
167 inline bool OperationTypeHasBeenSet() const { return m_operationTypeHasBeenSet; }
168 inline void SetOperationType(OperationType value) {
169 m_operationTypeHasBeenSet = true;
170 m_operationType = value;
171 }
173 SetOperationType(value);
174 return *this;
175 }
177
179
182 inline OperationStatus GetStatus() const { return m_status; }
183 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
184 inline void SetStatus(OperationStatus value) {
185 m_statusHasBeenSet = true;
186 m_status = value;
187 }
189 SetStatus(value);
190 return *this;
191 }
193
195
198 inline const Aws::Utils::DateTime& GetStatusChangedAt() const { return m_statusChangedAt; }
199 inline bool StatusChangedAtHasBeenSet() const { return m_statusChangedAtHasBeenSet; }
200 template <typename StatusChangedAtT = Aws::Utils::DateTime>
201 void SetStatusChangedAt(StatusChangedAtT&& value) {
202 m_statusChangedAtHasBeenSet = true;
203 m_statusChangedAt = std::forward<StatusChangedAtT>(value);
204 }
205 template <typename StatusChangedAtT = Aws::Utils::DateTime>
206 Operation& WithStatusChangedAt(StatusChangedAtT&& value) {
207 SetStatusChangedAt(std::forward<StatusChangedAtT>(value));
208 return *this;
209 }
211
213
216 inline const Aws::String& GetErrorCode() const { return m_errorCode; }
217 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
218 template <typename ErrorCodeT = Aws::String>
219 void SetErrorCode(ErrorCodeT&& value) {
220 m_errorCodeHasBeenSet = true;
221 m_errorCode = std::forward<ErrorCodeT>(value);
222 }
223 template <typename ErrorCodeT = Aws::String>
224 Operation& WithErrorCode(ErrorCodeT&& value) {
225 SetErrorCode(std::forward<ErrorCodeT>(value));
226 return *this;
227 }
229
231
234 inline const Aws::String& GetErrorDetails() const { return m_errorDetails; }
235 inline bool ErrorDetailsHasBeenSet() const { return m_errorDetailsHasBeenSet; }
236 template <typename ErrorDetailsT = Aws::String>
237 void SetErrorDetails(ErrorDetailsT&& value) {
238 m_errorDetailsHasBeenSet = true;
239 m_errorDetails = std::forward<ErrorDetailsT>(value);
240 }
241 template <typename ErrorDetailsT = Aws::String>
242 Operation& WithErrorDetails(ErrorDetailsT&& value) {
243 SetErrorDetails(std::forward<ErrorDetailsT>(value));
244 return *this;
245 }
247 private:
248 Aws::String m_id;
249
250 Aws::String m_resourceName;
251
252 ResourceType m_resourceType{ResourceType::NOT_SET};
253
254 Aws::Utils::DateTime m_createdAt{};
255
256 ResourceLocation m_location;
257
258 bool m_isTerminal{false};
259
260 Aws::String m_operationDetails;
261
262 OperationType m_operationType{OperationType::NOT_SET};
263
265
266 Aws::Utils::DateTime m_statusChangedAt{};
267
268 Aws::String m_errorCode;
269
270 Aws::String m_errorDetails;
271 bool m_idHasBeenSet = false;
272 bool m_resourceNameHasBeenSet = false;
273 bool m_resourceTypeHasBeenSet = false;
274 bool m_createdAtHasBeenSet = false;
275 bool m_locationHasBeenSet = false;
276 bool m_isTerminalHasBeenSet = false;
277 bool m_operationDetailsHasBeenSet = false;
278 bool m_operationTypeHasBeenSet = false;
279 bool m_statusHasBeenSet = false;
280 bool m_statusChangedAtHasBeenSet = false;
281 bool m_errorCodeHasBeenSet = false;
282 bool m_errorDetailsHasBeenSet = false;
283};
284
285} // namespace Model
286} // namespace Lightsail
287} // namespace Aws
void SetStatusChangedAt(StatusChangedAtT &&value)
Definition Operation.h:201
Operation & WithStatus(OperationStatus value)
Definition Operation.h:188
Operation & WithResourceType(ResourceType value)
Definition Operation.h:85
AWS_LIGHTSAIL_API Operation()=default
void SetErrorCode(ErrorCodeT &&value)
Definition Operation.h:219
void SetOperationDetails(OperationDetailsT &&value)
Definition Operation.h:151
void SetResourceName(ResourceNameT &&value)
Definition Operation.h:64
void SetCreatedAt(CreatedAtT &&value)
Definition Operation.h:99
void SetLocation(LocationT &&value)
Definition Operation.h:117
ResourceType GetResourceType() const
Definition Operation.h:79
AWS_LIGHTSAIL_API Operation & operator=(Aws::Utils::Json::JsonView jsonValue)
const ResourceLocation & GetLocation() const
Definition Operation.h:114
const Aws::String & GetOperationDetails() const
Definition Operation.h:148
Operation & WithOperationType(OperationType value)
Definition Operation.h:172
const Aws::String & GetErrorDetails() const
Definition Operation.h:234
void SetErrorDetails(ErrorDetailsT &&value)
Definition Operation.h:237
Operation & WithErrorDetails(ErrorDetailsT &&value)
Definition Operation.h:242
void SetOperationType(OperationType value)
Definition Operation.h:168
bool OperationDetailsHasBeenSet() const
Definition Operation.h:149
void SetStatus(OperationStatus value)
Definition Operation.h:184
Operation & WithStatusChangedAt(StatusChangedAtT &&value)
Definition Operation.h:206
OperationType GetOperationType() const
Definition Operation.h:166
Operation & WithResourceName(ResourceNameT &&value)
Definition Operation.h:69
Operation & WithOperationDetails(OperationDetailsT &&value)
Definition Operation.h:156
Operation & WithIsTerminal(bool value)
Definition Operation.h:138
void SetResourceType(ResourceType value)
Definition Operation.h:81
const Aws::String & GetId() const
Definition Operation.h:43
OperationStatus GetStatus() const
Definition Operation.h:182
Operation & WithId(IdT &&value)
Definition Operation.h:51
const Aws::String & GetErrorCode() const
Definition Operation.h:216
Operation & WithCreatedAt(CreatedAtT &&value)
Definition Operation.h:104
const Aws::Utils::DateTime & GetStatusChangedAt() const
Definition Operation.h:198
Operation & WithLocation(LocationT &&value)
Definition Operation.h:122
Operation & WithErrorCode(ErrorCodeT &&value)
Definition Operation.h:224
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_LIGHTSAIL_API Operation(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetResourceName() const
Definition Operation.h:61
const Aws::Utils::DateTime & GetCreatedAt() const
Definition Operation.h:96
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue