AWS SDK for C++

AWS SDK for C++ Version 1.11.764

Loading...
Searching...
No Matches
AuthResult.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/iot/IoT_EXPORTS.h>
10#include <aws/iot/model/Allowed.h>
11#include <aws/iot/model/AuthDecision.h>
12#include <aws/iot/model/AuthInfo.h>
13#include <aws/iot/model/Denied.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Json {
20class JsonValue;
21class JsonView;
22} // namespace Json
23} // namespace Utils
24namespace IoT {
25namespace Model {
26
33 public:
34 AWS_IOT_API AuthResult() = default;
35 AWS_IOT_API AuthResult(Aws::Utils::Json::JsonView jsonValue);
38
40
43 inline const AuthInfo& GetAuthInfo() const { return m_authInfo; }
44 inline bool AuthInfoHasBeenSet() const { return m_authInfoHasBeenSet; }
45 template <typename AuthInfoT = AuthInfo>
46 void SetAuthInfo(AuthInfoT&& value) {
47 m_authInfoHasBeenSet = true;
48 m_authInfo = std::forward<AuthInfoT>(value);
49 }
50 template <typename AuthInfoT = AuthInfo>
51 AuthResult& WithAuthInfo(AuthInfoT&& value) {
52 SetAuthInfo(std::forward<AuthInfoT>(value));
53 return *this;
54 }
56
58
61 inline const Allowed& GetAllowed() const { return m_allowed; }
62 inline bool AllowedHasBeenSet() const { return m_allowedHasBeenSet; }
63 template <typename AllowedT = Allowed>
64 void SetAllowed(AllowedT&& value) {
65 m_allowedHasBeenSet = true;
66 m_allowed = std::forward<AllowedT>(value);
67 }
68 template <typename AllowedT = Allowed>
69 AuthResult& WithAllowed(AllowedT&& value) {
70 SetAllowed(std::forward<AllowedT>(value));
71 return *this;
72 }
74
76
79 inline const Denied& GetDenied() const { return m_denied; }
80 inline bool DeniedHasBeenSet() const { return m_deniedHasBeenSet; }
81 template <typename DeniedT = Denied>
82 void SetDenied(DeniedT&& value) {
83 m_deniedHasBeenSet = true;
84 m_denied = std::forward<DeniedT>(value);
85 }
86 template <typename DeniedT = Denied>
87 AuthResult& WithDenied(DeniedT&& value) {
88 SetDenied(std::forward<DeniedT>(value));
89 return *this;
90 }
92
94
99 inline AuthDecision GetAuthDecision() const { return m_authDecision; }
100 inline bool AuthDecisionHasBeenSet() const { return m_authDecisionHasBeenSet; }
101 inline void SetAuthDecision(AuthDecision value) {
102 m_authDecisionHasBeenSet = true;
103 m_authDecision = value;
104 }
106 SetAuthDecision(value);
107 return *this;
108 }
110
112
115 inline const Aws::Vector<Aws::String>& GetMissingContextValues() const { return m_missingContextValues; }
116 inline bool MissingContextValuesHasBeenSet() const { return m_missingContextValuesHasBeenSet; }
117 template <typename MissingContextValuesT = Aws::Vector<Aws::String>>
118 void SetMissingContextValues(MissingContextValuesT&& value) {
119 m_missingContextValuesHasBeenSet = true;
120 m_missingContextValues = std::forward<MissingContextValuesT>(value);
121 }
122 template <typename MissingContextValuesT = Aws::Vector<Aws::String>>
123 AuthResult& WithMissingContextValues(MissingContextValuesT&& value) {
124 SetMissingContextValues(std::forward<MissingContextValuesT>(value));
125 return *this;
126 }
127 template <typename MissingContextValuesT = Aws::String>
128 AuthResult& AddMissingContextValues(MissingContextValuesT&& value) {
129 m_missingContextValuesHasBeenSet = true;
130 m_missingContextValues.emplace_back(std::forward<MissingContextValuesT>(value));
131 return *this;
132 }
134 private:
135 AuthInfo m_authInfo;
136
137 Allowed m_allowed;
138
139 Denied m_denied;
140
141 AuthDecision m_authDecision{AuthDecision::NOT_SET};
142
143 Aws::Vector<Aws::String> m_missingContextValues;
144 bool m_authInfoHasBeenSet = false;
145 bool m_allowedHasBeenSet = false;
146 bool m_deniedHasBeenSet = false;
147 bool m_authDecisionHasBeenSet = false;
148 bool m_missingContextValuesHasBeenSet = false;
149};
150
151} // namespace Model
152} // namespace IoT
153} // namespace Aws
void SetAuthInfo(AuthInfoT &&value)
Definition AuthResult.h:46
const Aws::Vector< Aws::String > & GetMissingContextValues() const
Definition AuthResult.h:115
bool AuthDecisionHasBeenSet() const
Definition AuthResult.h:100
AuthResult & WithMissingContextValues(MissingContextValuesT &&value)
Definition AuthResult.h:123
void SetMissingContextValues(MissingContextValuesT &&value)
Definition AuthResult.h:118
AuthResult & WithAllowed(AllowedT &&value)
Definition AuthResult.h:69
bool AllowedHasBeenSet() const
Definition AuthResult.h:62
bool AuthInfoHasBeenSet() const
Definition AuthResult.h:44
bool MissingContextValuesHasBeenSet() const
Definition AuthResult.h:116
AWS_IOT_API AuthResult & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_IOT_API AuthResult(Aws::Utils::Json::JsonView jsonValue)
bool DeniedHasBeenSet() const
Definition AuthResult.h:80
const AuthInfo & GetAuthInfo() const
Definition AuthResult.h:43
void SetAuthDecision(AuthDecision value)
Definition AuthResult.h:101
void SetAllowed(AllowedT &&value)
Definition AuthResult.h:64
AWS_IOT_API AuthResult()=default
const Denied & GetDenied() const
Definition AuthResult.h:79
const Allowed & GetAllowed() const
Definition AuthResult.h:61
AuthResult & WithAuthDecision(AuthDecision value)
Definition AuthResult.h:105
AuthResult & AddMissingContextValues(MissingContextValuesT &&value)
Definition AuthResult.h:128
AuthResult & WithDenied(DeniedT &&value)
Definition AuthResult.h:87
AuthResult & WithAuthInfo(AuthInfoT &&value)
Definition AuthResult.h:51
AuthDecision GetAuthDecision() const
Definition AuthResult.h:99
void SetDenied(DeniedT &&value)
Definition AuthResult.h:82
AWS_IOT_API Aws::Utils::Json::JsonValue Jsonize() const
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue