AWS SDK for C++

AWS SDK for C++ Version 1.11.632

Loading...
Searching...
No Matches
State.h
1
6#pragma once
7#include <aws/inspector2/Inspector2_EXPORTS.h>
8#include <aws/inspector2/model/Status.h>
9#include <aws/inspector2/model/ErrorCode.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <utility>
12
13namespace Aws
14{
15namespace Utils
16{
17namespace Json
18{
19 class JsonValue;
20 class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace Inspector2
24{
25namespace Model
26{
27
34 class State
35 {
36 public:
37 AWS_INSPECTOR2_API State() = default;
38 AWS_INSPECTOR2_API State(Aws::Utils::Json::JsonView jsonValue);
39 AWS_INSPECTOR2_API State& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const;
41
42
44
47 inline Status GetStatus() const { return m_status; }
48 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
49 inline void SetStatus(Status value) { m_statusHasBeenSet = true; m_status = value; }
50 inline State& WithStatus(Status value) { SetStatus(value); return *this;}
52
54
58 inline ErrorCode GetErrorCode() const { return m_errorCode; }
59 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
60 inline void SetErrorCode(ErrorCode value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
61 inline State& WithErrorCode(ErrorCode value) { SetErrorCode(value); return *this;}
63
65
69 inline const Aws::String& GetErrorMessage() const { return m_errorMessage; }
70 inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
71 template<typename ErrorMessageT = Aws::String>
72 void SetErrorMessage(ErrorMessageT&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::forward<ErrorMessageT>(value); }
73 template<typename ErrorMessageT = Aws::String>
74 State& WithErrorMessage(ErrorMessageT&& value) { SetErrorMessage(std::forward<ErrorMessageT>(value)); return *this;}
76 private:
77
78 Status m_status{Status::NOT_SET};
79 bool m_statusHasBeenSet = false;
80
81 ErrorCode m_errorCode{ErrorCode::NOT_SET};
82 bool m_errorCodeHasBeenSet = false;
83
84 Aws::String m_errorMessage;
85 bool m_errorMessageHasBeenSet = false;
86 };
87
88} // namespace Model
89} // namespace Inspector2
90} // namespace Aws
ErrorCode GetErrorCode() const
Definition State.h:58
State & WithStatus(Status value)
Definition State.h:50
bool StatusHasBeenSet() const
Definition State.h:48
void SetErrorCode(ErrorCode value)
Definition State.h:60
State & WithErrorMessage(ErrorMessageT &&value)
Definition State.h:74
AWS_INSPECTOR2_API State(Aws::Utils::Json::JsonView jsonValue)
State & WithErrorCode(ErrorCode value)
Definition State.h:61
bool ErrorCodeHasBeenSet() const
Definition State.h:59
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStatus(Status value)
Definition State.h:49
void SetErrorMessage(ErrorMessageT &&value)
Definition State.h:72
AWS_INSPECTOR2_API State()=default
const Aws::String & GetErrorMessage() const
Definition State.h:69
Status GetStatus() const
Definition State.h:47
AWS_INSPECTOR2_API State & operator=(Aws::Utils::Json::JsonView jsonValue)
bool ErrorMessageHasBeenSet() const
Definition State.h:70
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue