AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
CreateAccessGrantRequest.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/s3control/S3ControlRequest.h>
10#include <aws/s3control/S3Control_EXPORTS.h>
11#include <aws/s3control/model/AccessGrantsLocationConfiguration.h>
12#include <aws/s3control/model/Grantee.h>
13#include <aws/s3control/model/Permission.h>
14#include <aws/s3control/model/S3PrefixType.h>
15#include <aws/s3control/model/Tag.h>
16
17#include <utility>
18
19namespace Aws {
20namespace S3Control {
21namespace Model {
22
26 public:
27 AWS_S3CONTROL_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_S3CONTROL_API Aws::String SerializePayload() const override;
36
38
39 AWS_S3CONTROL_API inline bool ShouldComputeContentMd5() const override { return true; }
40
44 AWS_S3CONTROL_API EndpointParameters GetEndpointContextParams() const override;
45
47
50 inline const Aws::String& GetAccountId() const { return m_accountId; }
51 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
52 template <typename AccountIdT = Aws::String>
53 void SetAccountId(AccountIdT&& value) {
54 m_accountIdHasBeenSet = true;
55 m_accountId = std::forward<AccountIdT>(value);
56 }
57 template <typename AccountIdT = Aws::String>
59 SetAccountId(std::forward<AccountIdT>(value));
60 return *this;
61 }
63
65
74 inline const Aws::String& GetAccessGrantsLocationId() const { return m_accessGrantsLocationId; }
75 inline bool AccessGrantsLocationIdHasBeenSet() const { return m_accessGrantsLocationIdHasBeenSet; }
76 template <typename AccessGrantsLocationIdT = Aws::String>
77 void SetAccessGrantsLocationId(AccessGrantsLocationIdT&& value) {
78 m_accessGrantsLocationIdHasBeenSet = true;
79 m_accessGrantsLocationId = std::forward<AccessGrantsLocationIdT>(value);
80 }
81 template <typename AccessGrantsLocationIdT = Aws::String>
82 CreateAccessGrantRequest& WithAccessGrantsLocationId(AccessGrantsLocationIdT&& value) {
83 SetAccessGrantsLocationId(std::forward<AccessGrantsLocationIdT>(value));
84 return *this;
85 }
87
89
96 return m_accessGrantsLocationConfiguration;
97 }
98 inline bool AccessGrantsLocationConfigurationHasBeenSet() const { return m_accessGrantsLocationConfigurationHasBeenSet; }
99 template <typename AccessGrantsLocationConfigurationT = AccessGrantsLocationConfiguration>
100 void SetAccessGrantsLocationConfiguration(AccessGrantsLocationConfigurationT&& value) {
101 m_accessGrantsLocationConfigurationHasBeenSet = true;
102 m_accessGrantsLocationConfiguration = std::forward<AccessGrantsLocationConfigurationT>(value);
103 }
104 template <typename AccessGrantsLocationConfigurationT = AccessGrantsLocationConfiguration>
105 CreateAccessGrantRequest& WithAccessGrantsLocationConfiguration(AccessGrantsLocationConfigurationT&& value) {
106 SetAccessGrantsLocationConfiguration(std::forward<AccessGrantsLocationConfigurationT>(value));
107 return *this;
108 }
110
112
119 inline const Grantee& GetGrantee() const { return m_grantee; }
120 inline bool GranteeHasBeenSet() const { return m_granteeHasBeenSet; }
121 template <typename GranteeT = Grantee>
122 void SetGrantee(GranteeT&& value) {
123 m_granteeHasBeenSet = true;
124 m_grantee = std::forward<GranteeT>(value);
125 }
126 template <typename GranteeT = Grantee>
128 SetGrantee(std::forward<GranteeT>(value));
129 return *this;
130 }
132
134
141 inline Permission GetPermission() const { return m_permission; }
142 inline bool PermissionHasBeenSet() const { return m_permissionHasBeenSet; }
143 inline void SetPermission(Permission value) {
144 m_permissionHasBeenSet = true;
145 m_permission = value;
146 }
148 SetPermission(value);
149 return *this;
150 }
152
154
160 inline const Aws::String& GetApplicationArn() const { return m_applicationArn; }
161 inline bool ApplicationArnHasBeenSet() const { return m_applicationArnHasBeenSet; }
162 template <typename ApplicationArnT = Aws::String>
163 void SetApplicationArn(ApplicationArnT&& value) {
164 m_applicationArnHasBeenSet = true;
165 m_applicationArn = std::forward<ApplicationArnT>(value);
166 }
167 template <typename ApplicationArnT = Aws::String>
169 SetApplicationArn(std::forward<ApplicationArnT>(value));
170 return *this;
171 }
173
175
181 inline S3PrefixType GetS3PrefixType() const { return m_s3PrefixType; }
182 inline bool S3PrefixTypeHasBeenSet() const { return m_s3PrefixTypeHasBeenSet; }
183 inline void SetS3PrefixType(S3PrefixType value) {
184 m_s3PrefixTypeHasBeenSet = true;
185 m_s3PrefixType = value;
186 }
188 SetS3PrefixType(value);
189 return *this;
190 }
192
194
199 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
200 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
201 template <typename TagsT = Aws::Vector<Tag>>
202 void SetTags(TagsT&& value) {
203 m_tagsHasBeenSet = true;
204 m_tags = std::forward<TagsT>(value);
205 }
206 template <typename TagsT = Aws::Vector<Tag>>
208 SetTags(std::forward<TagsT>(value));
209 return *this;
210 }
211 template <typename TagsT = Tag>
213 m_tagsHasBeenSet = true;
214 m_tags.emplace_back(std::forward<TagsT>(value));
215 return *this;
216 }
218 private:
219 Aws::String m_accountId;
220
221 Aws::String m_accessGrantsLocationId;
222
223 AccessGrantsLocationConfiguration m_accessGrantsLocationConfiguration;
224
225 Grantee m_grantee;
226
227 Permission m_permission{Permission::NOT_SET};
228
229 Aws::String m_applicationArn;
230
231 S3PrefixType m_s3PrefixType{S3PrefixType::NOT_SET};
232
233 Aws::Vector<Tag> m_tags;
234 bool m_accountIdHasBeenSet = false;
235 bool m_accessGrantsLocationIdHasBeenSet = false;
236 bool m_accessGrantsLocationConfigurationHasBeenSet = false;
237 bool m_granteeHasBeenSet = false;
238 bool m_permissionHasBeenSet = false;
239 bool m_applicationArnHasBeenSet = false;
240 bool m_s3PrefixTypeHasBeenSet = false;
241 bool m_tagsHasBeenSet = false;
242};
243
244} // namespace Model
245} // namespace S3Control
246} // namespace Aws
AWS_S3CONTROL_API Aws::Http::HeaderValueCollection GetRequestSpecificHeaders() const override
AWS_S3CONTROL_API EndpointParameters GetEndpointContextParams() const override
CreateAccessGrantRequest & AddTags(TagsT &&value)
CreateAccessGrantRequest & WithApplicationArn(ApplicationArnT &&value)
AWS_S3CONTROL_API CreateAccessGrantRequest()=default
CreateAccessGrantRequest & WithS3PrefixType(S3PrefixType value)
CreateAccessGrantRequest & WithAccountId(AccountIdT &&value)
CreateAccessGrantRequest & WithGrantee(GranteeT &&value)
CreateAccessGrantRequest & WithTags(TagsT &&value)
CreateAccessGrantRequest & WithPermission(Permission value)
virtual const char * GetServiceRequestName() const override
CreateAccessGrantRequest & WithAccessGrantsLocationConfiguration(AccessGrantsLocationConfigurationT &&value)
void SetAccessGrantsLocationConfiguration(AccessGrantsLocationConfigurationT &&value)
const AccessGrantsLocationConfiguration & GetAccessGrantsLocationConfiguration() const
AWS_S3CONTROL_API Aws::String SerializePayload() const override
CreateAccessGrantRequest & WithAccessGrantsLocationId(AccessGrantsLocationIdT &&value)
AWS_S3CONTROL_API bool ShouldComputeContentMd5() const override
void SetAccessGrantsLocationId(AccessGrantsLocationIdT &&value)
Aws::Endpoint::EndpointParameters EndpointParameters
Aws::Map< Aws::String, Aws::String > HeaderValueCollection
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector