AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
CreateResourcePolicyStatementRequest.h
1
6#pragma once
7#include <aws/lexv2-models/LexModelsV2_EXPORTS.h>
8#include <aws/lexv2-models/LexModelsV2Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/lexv2-models/model/Effect.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/core/utils/memory/stl/AWSMap.h>
13#include <aws/lexv2-models/model/Principal.h>
14#include <utility>
15
16namespace Aws
17{
18namespace Http
19{
20 class URI;
21} //namespace Http
22namespace LexModelsV2
23{
24namespace Model
25{
26
30 {
31 public:
32 AWS_LEXMODELSV2_API CreateResourcePolicyStatementRequest() = default;
33
34 // Service request name is the Operation name which will send this request out,
35 // each operation should has unique request name, so that we can get operation's name from this request.
36 // Note: this is not true for response, multiple operations may have the same response name,
37 // so we can not get operation's name from response.
38 inline virtual const char* GetServiceRequestName() const override { return "CreateResourcePolicyStatement"; }
39
40 AWS_LEXMODELSV2_API Aws::String SerializePayload() const override;
41
42 AWS_LEXMODELSV2_API void AddQueryStringParameters(Aws::Http::URI& uri) const override;
43
44
46
50 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
51 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
52 template<typename ResourceArnT = Aws::String>
53 void SetResourceArn(ResourceArnT&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::forward<ResourceArnT>(value); }
54 template<typename ResourceArnT = Aws::String>
55 CreateResourcePolicyStatementRequest& WithResourceArn(ResourceArnT&& value) { SetResourceArn(std::forward<ResourceArnT>(value)); return *this;}
57
59
66 inline const Aws::String& GetStatementId() const { return m_statementId; }
67 inline bool StatementIdHasBeenSet() const { return m_statementIdHasBeenSet; }
68 template<typename StatementIdT = Aws::String>
69 void SetStatementId(StatementIdT&& value) { m_statementIdHasBeenSet = true; m_statementId = std::forward<StatementIdT>(value); }
70 template<typename StatementIdT = Aws::String>
71 CreateResourcePolicyStatementRequest& WithStatementId(StatementIdT&& value) { SetStatementId(std::forward<StatementIdT>(value)); return *this;}
73
75
78 inline Effect GetEffect() const { return m_effect; }
79 inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; }
80 inline void SetEffect(Effect value) { m_effectHasBeenSet = true; m_effect = value; }
81 inline CreateResourcePolicyStatementRequest& WithEffect(Effect value) { SetEffect(value); return *this;}
83
85
92 inline const Aws::Vector<Principal>& GetPrincipal() const { return m_principal; }
93 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
94 template<typename PrincipalT = Aws::Vector<Principal>>
95 void SetPrincipal(PrincipalT&& value) { m_principalHasBeenSet = true; m_principal = std::forward<PrincipalT>(value); }
96 template<typename PrincipalT = Aws::Vector<Principal>>
97 CreateResourcePolicyStatementRequest& WithPrincipal(PrincipalT&& value) { SetPrincipal(std::forward<PrincipalT>(value)); return *this;}
98 template<typename PrincipalT = Principal>
99 CreateResourcePolicyStatementRequest& AddPrincipal(PrincipalT&& value) { m_principalHasBeenSet = true; m_principal.emplace_back(std::forward<PrincipalT>(value)); return *this; }
101
103
110 inline const Aws::Vector<Aws::String>& GetAction() const { return m_action; }
111 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
112 template<typename ActionT = Aws::Vector<Aws::String>>
113 void SetAction(ActionT&& value) { m_actionHasBeenSet = true; m_action = std::forward<ActionT>(value); }
114 template<typename ActionT = Aws::Vector<Aws::String>>
115 CreateResourcePolicyStatementRequest& WithAction(ActionT&& value) { SetAction(std::forward<ActionT>(value)); return *this;}
116 template<typename ActionT = Aws::String>
117 CreateResourcePolicyStatementRequest& AddAction(ActionT&& value) { m_actionHasBeenSet = true; m_action.emplace_back(std::forward<ActionT>(value)); return *this; }
119
121
129 inline const Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>& GetCondition() const { return m_condition; }
130 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
131 template<typename ConditionT = Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>>
132 void SetCondition(ConditionT&& value) { m_conditionHasBeenSet = true; m_condition = std::forward<ConditionT>(value); }
133 template<typename ConditionT = Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>>
134 CreateResourcePolicyStatementRequest& WithCondition(ConditionT&& value) { SetCondition(std::forward<ConditionT>(value)); return *this;}
135 template<typename ConditionKeyT = Aws::String, typename ConditionValueT = Aws::Map<Aws::String, Aws::String>>
136 CreateResourcePolicyStatementRequest& AddCondition(ConditionKeyT&& key, ConditionValueT&& value) {
137 m_conditionHasBeenSet = true; m_condition.emplace(std::forward<ConditionKeyT>(key), std::forward<ConditionValueT>(value)); return *this;
138 }
140
142
148 inline const Aws::String& GetExpectedRevisionId() const { return m_expectedRevisionId; }
149 inline bool ExpectedRevisionIdHasBeenSet() const { return m_expectedRevisionIdHasBeenSet; }
150 template<typename ExpectedRevisionIdT = Aws::String>
151 void SetExpectedRevisionId(ExpectedRevisionIdT&& value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId = std::forward<ExpectedRevisionIdT>(value); }
152 template<typename ExpectedRevisionIdT = Aws::String>
153 CreateResourcePolicyStatementRequest& WithExpectedRevisionId(ExpectedRevisionIdT&& value) { SetExpectedRevisionId(std::forward<ExpectedRevisionIdT>(value)); return *this;}
155 private:
156
157 Aws::String m_resourceArn;
158 bool m_resourceArnHasBeenSet = false;
159
160 Aws::String m_statementId;
161 bool m_statementIdHasBeenSet = false;
162
163 Effect m_effect{Effect::NOT_SET};
164 bool m_effectHasBeenSet = false;
165
166 Aws::Vector<Principal> m_principal;
167 bool m_principalHasBeenSet = false;
168
170 bool m_actionHasBeenSet = false;
171
173 bool m_conditionHasBeenSet = false;
174
175 Aws::String m_expectedRevisionId;
176 bool m_expectedRevisionIdHasBeenSet = false;
177 };
178
179} // namespace Model
180} // namespace LexModelsV2
181} // 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