AWS SDK for C++

AWS SDK for C++ Version 1.11.899

Loading...
Searching...
No Matches
CreateAccessGrantRequest.h
1
6#pragma once
7#include <aws/cloudwatchomni/CloudWatchOmniRequest.h>
8#include <aws/cloudwatchomni/CloudWatchOmni_EXPORTS.h>
9#include <aws/cloudwatchomni/model/AccessGrantPermission.h>
10#include <aws/cloudwatchomni/model/AccessGrantPrincipal.h>
11#include <aws/cloudwatchomni/model/ScopedActions.h>
12#include <aws/core/utils/UUID.h>
13#include <aws/core/utils/memory/stl/AWSMap.h>
14#include <aws/core/utils/memory/stl/AWSString.h>
15#include <aws/core/utils/memory/stl/AWSVector.h>
16
17#include <utility>
18
19namespace Aws {
20namespace CloudWatchOmni {
21namespace Model {
22
26 public:
27 AWS_CLOUDWATCHOMNI_API CreateAccessGrantRequest() = default;
28
29 // Service request name is the Operation name which will send this request out,
30 // each operation should has unique request name, so that we can get operation's name from this request.
31 // Note: this is not true for response, multiple operations may have the same response name,
32 // so we can not get operation's name from response.
33 inline virtual const char* GetServiceRequestName() const override { return "CreateAccessGrant"; }
34
35 AWS_CLOUDWATCHOMNI_API Aws::String SerializePayload() const override;
36
37 AWS_CLOUDWATCHOMNI_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override;
38
40
43 inline const Aws::String& GetDomainId() const { return m_domainId; }
44 inline bool DomainIdHasBeenSet() const { return m_domainIdHasBeenSet; }
45 template <typename DomainIdT = Aws::String>
46 void SetDomainId(DomainIdT&& value) {
47 m_domainIdHasBeenSet = true;
48 m_domainId = std::forward<DomainIdT>(value);
49 }
50 template <typename DomainIdT = Aws::String>
52 SetDomainId(std::forward<DomainIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetSpaceId() const { return m_spaceId; }
62 inline bool SpaceIdHasBeenSet() const { return m_spaceIdHasBeenSet; }
63 template <typename SpaceIdT = Aws::String>
64 void SetSpaceId(SpaceIdT&& value) {
65 m_spaceIdHasBeenSet = true;
66 m_spaceId = std::forward<SpaceIdT>(value);
67 }
68 template <typename SpaceIdT = Aws::String>
70 SetSpaceId(std::forward<SpaceIdT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetName() const { return m_name; }
80 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
81 template <typename NameT = Aws::String>
82 void SetName(NameT&& value) {
83 m_nameHasBeenSet = true;
84 m_name = std::forward<NameT>(value);
85 }
86 template <typename NameT = Aws::String>
88 SetName(std::forward<NameT>(value));
89 return *this;
90 }
92
94
97 inline const AccessGrantPrincipal& GetPrincipal() const { return m_principal; }
98 inline bool PrincipalHasBeenSet() const { return m_principalHasBeenSet; }
99 template <typename PrincipalT = AccessGrantPrincipal>
100 void SetPrincipal(PrincipalT&& value) {
101 m_principalHasBeenSet = true;
102 m_principal = std::forward<PrincipalT>(value);
103 }
104 template <typename PrincipalT = AccessGrantPrincipal>
106 SetPrincipal(std::forward<PrincipalT>(value));
107 return *this;
108 }
110
112
115 inline AccessGrantPermission GetPermission() const { return m_permission; }
116 inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; }
118 m_permissionHasBeenSet = true;
119 m_permission = value;
120 }
122 SetPermission(value);
123 return *this;
124 }
126
128
132 inline const Aws::Vector<ScopedActions>& GetScopedActions() const { return m_scopedActions; }
133 inline bool ScopedActionsHasBeenSet() const { return m_scopedActionsHasBeenSet; }
134 template <typename ScopedActionsT = Aws::Vector<ScopedActions>>
135 void SetScopedActions(ScopedActionsT&& value) {
136 m_scopedActionsHasBeenSet = true;
137 m_scopedActions = std::forward<ScopedActionsT>(value);
138 }
139 template <typename ScopedActionsT = Aws::Vector<ScopedActions>>
141 SetScopedActions(std::forward<ScopedActionsT>(value));
142 return *this;
143 }
144 template <typename ScopedActionsT = ScopedActions>
146 m_scopedActionsHasBeenSet = true;
147 m_scopedActions.emplace_back(std::forward<ScopedActionsT>(value));
148 return *this;
149 }
151
153
156 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
157 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
158 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
159 void SetTags(TagsT&& value) {
160 m_tagsHasBeenSet = true;
161 m_tags = std::forward<TagsT>(value);
162 }
163 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
165 SetTags(std::forward<TagsT>(value));
166 return *this;
167 }
168 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
169 CreateAccessGrantRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
170 m_tagsHasBeenSet = true;
171 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
172 return *this;
173 }
175
177
181 inline const Aws::String& GetClientToken() const { return m_clientToken; }
182 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
183 template <typename ClientTokenT = Aws::String>
184 void SetClientToken(ClientTokenT&& value) {
185 m_clientTokenHasBeenSet = true;
186 m_clientToken = std::forward<ClientTokenT>(value);
187 }
188 template <typename ClientTokenT = Aws::String>
190 SetClientToken(std::forward<ClientTokenT>(value));
191 return *this;
192 }
194 private:
195 Aws::String m_domainId;
196
197 Aws::String m_spaceId;
198
199 Aws::String m_name;
200
201 AccessGrantPrincipal m_principal;
202
204
205 Aws::Vector<ScopedActions> m_scopedActions;
206
208
210 bool m_domainIdHasBeenSet = false;
211 bool m_spaceIdHasBeenSet = false;
212 bool m_nameHasBeenSet = false;
213 bool m_principalHasBeenSet = false;
214 bool m_permissionHasBeenSet = false;
215 bool m_scopedActionsHasBeenSet = false;
216 bool m_tagsHasBeenSet = false;
217 bool m_clientTokenHasBeenSet = true;
218};
219
220} // namespace Model
221} // namespace CloudWatchOmni
222} // namespace Aws
AWS_CLOUDWATCHOMNI_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
virtual const char * GetServiceRequestName() const override
CreateAccessGrantRequest & WithName(NameT &&value)
CreateAccessGrantRequest & WithPrincipal(PrincipalT &&value)
CreateAccessGrantRequest & WithDomainId(DomainIdT &&value)
CreateAccessGrantRequest & WithPermission(AccessGrantPermission value)
CreateAccessGrantRequest & WithScopedActions(ScopedActionsT &&value)
AWS_CLOUDWATCHOMNI_API Aws::String SerializePayload() const override
CreateAccessGrantRequest & WithClientToken(ClientTokenT &&value)
CreateAccessGrantRequest & WithSpaceId(SpaceIdT &&value)
const Aws::Vector< ScopedActions > & GetScopedActions() const
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateAccessGrantRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
AWS_CLOUDWATCHOMNI_API CreateAccessGrantRequest()=default
CreateAccessGrantRequest & AddScopedActions(ScopedActionsT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
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