AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
CreateResourcePolicyStatementRequest.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSMap.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/lexv2-models/LexModelsV2Request.h>
11#include <aws/lexv2-models/LexModelsV2_EXPORTS.h>
12#include <aws/lexv2-models/model/Effect.h>
13#include <aws/lexv2-models/model/Principal.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Http {
19class URI;
20} // namespace Http
21namespace LexModelsV2 {
22namespace Model {
23
27 public:
28 AWS_LEXMODELSV2_API CreateResourcePolicyStatementRequest() = default;
29
30 // Service request name is the Operation name which will send this request out,
31 // each operation should has unique request name, so that we can get operation's name from this request.
32 // Note: this is not true for response, multiple operations may have the same response name,
33 // so we can not get operation's name from response.
34 inline virtual const char* GetServiceRequestName() const override { return "CreateResourcePolicyStatement"; }
35
36 AWS_LEXMODELSV2_API Aws::String SerializePayload() const override;
37
38 AWS_LEXMODELSV2_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
39
41
45 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
46 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
47 template <typename ResourceArnT = Aws::String>
48 void SetResourceArn(ResourceArnT&& value) {
49 m_resourceArnHasBeenSet = true;
50 m_resourceArn = std::forward<ResourceArnT>(value);
51 }
52 template <typename ResourceArnT = Aws::String>
54 SetResourceArn(std::forward<ResourceArnT>(value));
55 return *this;
56 }
58
60
67 inline const Aws::String& GetStatementId() const { return m_statementId; }
68 inline bool StatementIdHasBeenSet() const { return m_statementIdHasBeenSet; }
69 template <typename StatementIdT = Aws::String>
70 void SetStatementId(StatementIdT&& value) {
71 m_statementIdHasBeenSet = true;
72 m_statementId = std::forward<StatementIdT>(value);
73 }
74 template <typename StatementIdT = Aws::String>
76 SetStatementId(std::forward<StatementIdT>(value));
77 return *this;
78 }
80
82
85 inline Effect GetEffect() const { return m_effect; }
86 inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; }
87 inline void SetEffect(Effect value) {
88 m_effectHasBeenSet = true;
89 m_effect = value;
90 }
92 SetEffect(value);
93 return *this;
94 }
96
98
105 inline const Aws::Vector<Principal>& GetPrincipal() const { return m_principal; }
106 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
107 template <typename PrincipalT = Aws::Vector<Principal>>
108 void SetPrincipal(PrincipalT&& value) {
109 m_principalHasBeenSet = true;
110 m_principal = std::forward<PrincipalT>(value);
111 }
112 template <typename PrincipalT = Aws::Vector<Principal>>
114 SetPrincipal(std::forward<PrincipalT>(value));
115 return *this;
116 }
117 template <typename PrincipalT = Principal>
119 m_principalHasBeenSet = true;
120 m_principal.emplace_back(std::forward<PrincipalT>(value));
121 return *this;
122 }
124
126
133 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
134 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
135 template <typename ActionT = Aws::Vector<Aws::String>>
136 void SetAction(ActionT&& value) {
137 m_actionHasBeenSet = true;
138 m_action = std::forward<ActionT>(value);
139 }
140 template <typename ActionT = Aws::Vector<Aws::String>>
142 SetAction(std::forward<ActionT>(value));
143 return *this;
144 }
145 template <typename ActionT = Aws::String>
147 m_actionHasBeenSet = true;
148 m_action.emplace_back(std::forward<ActionT>(value));
149 return *this;
150 }
152
154
162 inline const Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>& GetCondition() const { return m_condition; }
163 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
164 template <typename ConditionT = Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>>
165 void SetCondition(ConditionT&& value) {
166 m_conditionHasBeenSet = true;
167 m_condition = std::forward<ConditionT>(value);
168 }
169 template <typename ConditionT = Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>>
171 SetCondition(std::forward<ConditionT>(value));
172 return *this;
173 }
174 template <typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::Map<Aws::String, Aws::String>>
175 CreateResourcePolicyStatementRequest& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
176 m_conditionHasBeenSet = true;
177 m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value));
178 return *this;
179 }
181
183
189 inline const Aws::String& GetExpectedRevisionId() const { return m_expectedRevisionId; }
190 inline bool ExpectedRevisionIdHasBeenSet() const { return m_expectedRevisionIdHasBeenSet; }
191 template <typename ExpectedRevisionIdT = Aws::String>
192 void SetExpectedRevisionId(ExpectedRevisionIdT&& value) {
193 m_expectedRevisionIdHasBeenSet = true;
194 m_expectedRevisionId = std::forward<ExpectedRevisionIdT>(value);
195 }
196 template <typename ExpectedRevisionIdT = Aws::String>
198 SetExpectedRevisionId(std::forward<ExpectedRevisionIdT>(value));
199 return *this;
200 }
202 private:
203 Aws::String m_resourceArn;
204
205 Aws::String m_statementId;
206
207 Effect m_effect{Effect::NOT_SET};
208
209 Aws::Vector<Principal> m_principal;
210
212
214
215 Aws::String m_expectedRevisionId;
216 bool m_resourceArnHasBeenSet = false;
217 bool m_statementIdHasBeenSet = false;
218 bool m_effectHasBeenSet = false;
219 bool m_principalHasBeenSet = false;
220 bool m_actionHasBeenSet = false;
221 bool m_conditionHasBeenSet = false;
222 bool m_expectedRevisionIdHasBeenSet = false;
223};
224
225} // namespace Model
226} // namespace LexModelsV2
227} // namespace Aws
AWS_LEXMODELSV2_API CreateResourcePolicyStatementRequest()=default
CreateResourcePolicyStatementRequest & WithStatementId(StatementIdT &&value)
CreateResourcePolicyStatementRequest & WithPrincipal(PrincipalT &&value)
CreateResourcePolicyStatementRequest & AddCondition(ConditionKeyT &&key, ConditionValueT &&value)
const Aws::Map< Aws::String, Aws::Map< Aws::String, Aws::String > > & GetCondition() const
CreateResourcePolicyStatementRequest & WithAction(ActionT &&value)
CreateResourcePolicyStatementRequest & WithResourceArn(ResourceArnT &&value)
CreateResourcePolicyStatementRequest & WithExpectedRevisionId(ExpectedRevisionIdT &&value)
AWS_LEXMODELSV2_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
CreateResourcePolicyStatementRequest & AddAction(ActionT &&value)
CreateResourcePolicyStatementRequest & AddPrincipal(PrincipalT &&value)
AWS_LEXMODELSV2_API Aws::String SerializePayload() const override
CreateResourcePolicyStatementRequest & WithCondition(ConditionT &&value)
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector