AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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:
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 inline void SetResourceArn(const Aws::String& value) { m_resourceArnHasBeenSet = true; m_resourceArn = value; }
53 inline void SetResourceArn(Aws::String&& value) { m_resourceArnHasBeenSet = true; m_resourceArn = std::move(value); }
54 inline void SetResourceArn(const char* value) { m_resourceArnHasBeenSet = true; m_resourceArn.assign(value); }
56 inline CreateResourcePolicyStatementRequest& WithResourceArn(Aws::String&& value) { SetResourceArn(std::move(value)); return *this;}
57 inline CreateResourcePolicyStatementRequest& WithResourceArn(const char* value) { SetResourceArn(value); return *this;}
59
61
68 inline const Aws::String& GetStatementId() const{ return m_statementId; }
69 inline bool StatementIdHasBeenSet() const { return m_statementIdHasBeenSet; }
70 inline void SetStatementId(const Aws::String& value) { m_statementIdHasBeenSet = true; m_statementId = value; }
71 inline void SetStatementId(Aws::String&& value) { m_statementIdHasBeenSet = true; m_statementId = std::move(value); }
72 inline void SetStatementId(const char* value) { m_statementIdHasBeenSet = true; m_statementId.assign(value); }
74 inline CreateResourcePolicyStatementRequest& WithStatementId(Aws::String&& value) { SetStatementId(std::move(value)); return *this;}
75 inline CreateResourcePolicyStatementRequest& WithStatementId(const char* value) { SetStatementId(value); return *this;}
77
79
82 inline const Effect& GetEffect() const{ return m_effect; }
83 inline bool EffectHasBeenSet() const { return m_effectHasBeenSet; }
84 inline void SetEffect(const Effect& value) { m_effectHasBeenSet = true; m_effect = value; }
85 inline void SetEffect(Effect&& value) { m_effectHasBeenSet = true; m_effect = std::move(value); }
86 inline CreateResourcePolicyStatementRequest& WithEffect(const Effect& value) { SetEffect(value); return *this;}
87 inline CreateResourcePolicyStatementRequest& WithEffect(Effect&& value) { SetEffect(std::move(value)); return *this;}
89
91
98 inline const Aws::Vector<Principal>& GetPrincipal() const{ return m_principal; }
99 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
100 inline void SetPrincipal(const Aws::Vector<Principal>& value) { m_principalHasBeenSet = true; m_principal = value; }
101 inline void SetPrincipal(Aws::Vector<Principal>&& value) { m_principalHasBeenSet = true; m_principal = std::move(value); }
104 inline CreateResourcePolicyStatementRequest& AddPrincipal(const Principal& value) { m_principalHasBeenSet = true; m_principal.push_back(value); return *this; }
105 inline CreateResourcePolicyStatementRequest& AddPrincipal(Principal&& value) { m_principalHasBeenSet = true; m_principal.push_back(std::move(value)); return *this; }
107
109
116 inline const Aws::Vector<Aws::String>& GetAction() const{ return m_action; }
117 inline bool ActionHasBeenSet() const { return m_actionHasBeenSet; }
118 inline void SetAction(const Aws::Vector<Aws::String>& value) { m_actionHasBeenSet = true; m_action = value; }
119 inline void SetAction(Aws::Vector<Aws::String>&& value) { m_actionHasBeenSet = true; m_action = std::move(value); }
121 inline CreateResourcePolicyStatementRequest& WithAction(Aws::Vector<Aws::String>&& value) { SetAction(std::move(value)); return *this;}
122 inline CreateResourcePolicyStatementRequest& AddAction(const Aws::String& value) { m_actionHasBeenSet = true; m_action.push_back(value); return *this; }
123 inline CreateResourcePolicyStatementRequest& AddAction(Aws::String&& value) { m_actionHasBeenSet = true; m_action.push_back(std::move(value)); return *this; }
124 inline CreateResourcePolicyStatementRequest& AddAction(const char* value) { m_actionHasBeenSet = true; m_action.push_back(value); return *this; }
126
128
136 inline const Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>& GetCondition() const{ return m_condition; }
137 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
138 inline void SetCondition(const Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>& value) { m_conditionHasBeenSet = true; m_condition = value; }
139 inline void SetCondition(Aws::Map<Aws::String, Aws::Map<Aws::String, Aws::String>>&& value) { m_conditionHasBeenSet = true; m_condition = std::move(value); }
142 inline CreateResourcePolicyStatementRequest& AddCondition(const Aws::String& key, const Aws::Map<Aws::String, Aws::String>& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, value); return *this; }
143 inline CreateResourcePolicyStatementRequest& AddCondition(Aws::String&& key, const Aws::Map<Aws::String, Aws::String>& value) { m_conditionHasBeenSet = true; m_condition.emplace(std::move(key), value); return *this; }
144 inline CreateResourcePolicyStatementRequest& AddCondition(const Aws::String& key, Aws::Map<Aws::String, Aws::String>&& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, std::move(value)); return *this; }
145 inline CreateResourcePolicyStatementRequest& AddCondition(Aws::String&& key, Aws::Map<Aws::String, Aws::String>&& value) { m_conditionHasBeenSet = true; m_condition.emplace(std::move(key), std::move(value)); return *this; }
146 inline CreateResourcePolicyStatementRequest& AddCondition(const char* key, Aws::Map<Aws::String, Aws::String>&& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, std::move(value)); return *this; }
147 inline CreateResourcePolicyStatementRequest& AddCondition(const char* key, const Aws::Map<Aws::String, Aws::String>& value) { m_conditionHasBeenSet = true; m_condition.emplace(key, value); return *this; }
149
151
157 inline const Aws::String& GetExpectedRevisionId() const{ return m_expectedRevisionId; }
158 inline bool ExpectedRevisionIdHasBeenSet() const { return m_expectedRevisionIdHasBeenSet; }
159 inline void SetExpectedRevisionId(const Aws::String& value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId = value; }
160 inline void SetExpectedRevisionId(Aws::String&& value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId = std::move(value); }
161 inline void SetExpectedRevisionId(const char* value) { m_expectedRevisionIdHasBeenSet = true; m_expectedRevisionId.assign(value); }
166 private:
167
168 Aws::String m_resourceArn;
169 bool m_resourceArnHasBeenSet = false;
170
171 Aws::String m_statementId;
172 bool m_statementIdHasBeenSet = false;
173
174 Effect m_effect;
175 bool m_effectHasBeenSet = false;
176
177 Aws::Vector<Principal> m_principal;
178 bool m_principalHasBeenSet = false;
179
181 bool m_actionHasBeenSet = false;
182
184 bool m_conditionHasBeenSet = false;
185
186 Aws::String m_expectedRevisionId;
187 bool m_expectedRevisionIdHasBeenSet = false;
188 };
189
190} // namespace Model
191} // namespace LexModelsV2
192} // namespace Aws
CreateResourcePolicyStatementRequest & AddCondition(const Aws::String &key, const Aws::Map< Aws::String, Aws::String > &value)
CreateResourcePolicyStatementRequest & WithStatementId(const char *value)
CreateResourcePolicyStatementRequest & WithResourceArn(const char *value)
CreateResourcePolicyStatementRequest & WithStatementId(const Aws::String &value)
CreateResourcePolicyStatementRequest & AddCondition(const char *key, Aws::Map< Aws::String, Aws::String > &&value)
CreateResourcePolicyStatementRequest & WithCondition(Aws::Map< Aws::String, Aws::Map< Aws::String, Aws::String > > &&value)
CreateResourcePolicyStatementRequest & WithPrincipal(Aws::Vector< Principal > &&value)
CreateResourcePolicyStatementRequest & AddAction(const char *value)
CreateResourcePolicyStatementRequest & WithResourceArn(Aws::String &&value)
CreateResourcePolicyStatementRequest & AddAction(Aws::String &&value)
CreateResourcePolicyStatementRequest & WithStatementId(Aws::String &&value)
CreateResourcePolicyStatementRequest & AddPrincipal(const Principal &value)
CreateResourcePolicyStatementRequest & AddCondition(Aws::String &&key, const Aws::Map< Aws::String, Aws::String > &value)
const Aws::Map< Aws::String, Aws::Map< Aws::String, Aws::String > > & GetCondition() const
CreateResourcePolicyStatementRequest & AddCondition(const Aws::String &key, Aws::Map< Aws::String, Aws::String > &&value)
CreateResourcePolicyStatementRequest & WithAction(const Aws::Vector< Aws::String > &value)
CreateResourcePolicyStatementRequest & WithExpectedRevisionId(Aws::String &&value)
CreateResourcePolicyStatementRequest & AddCondition(Aws::String &&key, Aws::Map< Aws::String, Aws::String > &&value)
CreateResourcePolicyStatementRequest & AddAction(const Aws::String &value)
CreateResourcePolicyStatementRequest & WithCondition(const Aws::Map< Aws::String, Aws::Map< Aws::String, Aws::String > > &value)
CreateResourcePolicyStatementRequest & AddPrincipal(Principal &&value)
CreateResourcePolicyStatementRequest & WithPrincipal(const Aws::Vector< Principal > &value)
CreateResourcePolicyStatementRequest & AddCondition(const char *key, const Aws::Map< Aws::String, Aws::String > &value)
CreateResourcePolicyStatementRequest & WithAction(Aws::Vector< Aws::String > &&value)
AWS_LEXMODELSV2_API void AddQueryStringParameters(Aws::Http::URI &uri) const override
CreateResourcePolicyStatementRequest & WithEffect(Effect &&value)
CreateResourcePolicyStatementRequest & WithExpectedRevisionId(const Aws::String &value)
CreateResourcePolicyStatementRequest & WithEffect(const Effect &value)
CreateResourcePolicyStatementRequest & WithResourceArn(const Aws::String &value)
void SetCondition(Aws::Map< Aws::String, Aws::Map< Aws::String, Aws::String > > &&value)
AWS_LEXMODELSV2_API Aws::String SerializePayload() const override
void SetCondition(const Aws::Map< Aws::String, Aws::Map< Aws::String, Aws::String > > &value)
CreateResourcePolicyStatementRequest & WithExpectedRevisionId(const char *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