AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
State.h
1
6#pragma once
7#include <aws/inspector2/Inspector2_EXPORTS.h>
8#include <aws/inspector2/model/ErrorCode.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/inspector2/model/Status.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
48 inline ErrorCode GetErrorCode() const { return m_errorCode; }
49 inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; }
50 inline void SetErrorCode(ErrorCode value) { m_errorCodeHasBeenSet = true; m_errorCode = value; }
51 inline State& WithErrorCode(ErrorCode value) { SetErrorCode(value); return *this;}
53
55
59 inline const Aws::String& GetErrorMessage() const { return m_errorMessage; }
60 inline bool ErrorMessageHasBeenSet() const { return m_errorMessageHasBeenSet; }
61 template<typename ErrorMessageT = Aws::String>
62 void SetErrorMessage(ErrorMessageT&& value) { m_errorMessageHasBeenSet = true; m_errorMessage = std::forward<ErrorMessageT>(value); }
63 template<typename ErrorMessageT = Aws::String>
64 State& WithErrorMessage(ErrorMessageT&& value) { SetErrorMessage(std::forward<ErrorMessageT>(value)); return *this;}
66
68
71 inline Status GetStatus() const { return m_status; }
72 inline bool StatusHasBeenSet() const { return m_statusHasBeenSet; }
73 inline void SetStatus(Status value) { m_statusHasBeenSet = true; m_status = value; }
74 inline State& WithStatus(Status value) { SetStatus(value); return *this;}
76 private:
77
78 ErrorCode m_errorCode{ErrorCode::NOT_SET};
79 bool m_errorCodeHasBeenSet = false;
80
81 Aws::String m_errorMessage;
82 bool m_errorMessageHasBeenSet = false;
83
84 Status m_status{Status::NOT_SET};
85 bool m_statusHasBeenSet = false;
86 };
87
88} // namespace Model
89} // namespace Inspector2
90} // namespace Aws
ErrorCode GetErrorCode() const
Definition State.h:48
State & WithStatus(Status value)
Definition State.h:74
bool StatusHasBeenSet() const
Definition State.h:72
void SetErrorCode(ErrorCode value)
Definition State.h:50
State & WithErrorMessage(ErrorMessageT &&value)
Definition State.h:64
AWS_INSPECTOR2_API State(Aws::Utils::Json::JsonView jsonValue)
State & WithErrorCode(ErrorCode value)
Definition State.h:51
bool ErrorCodeHasBeenSet() const
Definition State.h:49
AWS_INSPECTOR2_API Aws::Utils::Json::JsonValue Jsonize() const
void SetStatus(Status value)
Definition State.h:73
void SetErrorMessage(ErrorMessageT &&value)
Definition State.h:62
AWS_INSPECTOR2_API State()=default
const Aws::String & GetErrorMessage() const
Definition State.h:59
Status GetStatus() const
Definition State.h:71
AWS_INSPECTOR2_API State & operator=(Aws::Utils::Json::JsonView jsonValue)
bool ErrorMessageHasBeenSet() const
Definition State.h:60
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue