AWS SDK for C++  1.9.74
AWS SDK for C++
ModifySnapshotAttributeRequest.h
Go to the documentation of this file.
1 
6 #pragma once
7 #include <aws/ec2/EC2_EXPORTS.h>
8 #include <aws/ec2/EC2Request.h>
14 #include <utility>
15 
16 namespace Aws
17 {
18 namespace EC2
19 {
20 namespace Model
21 {
22 
26  {
27  public:
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 "ModifySnapshotAttribute"; }
35 
36  Aws::String SerializePayload() const override;
37 
38  protected:
39  void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40 
41  public:
42 
47  inline const SnapshotAttributeName& GetAttribute() const{ return m_attribute; }
48 
53  inline bool AttributeHasBeenSet() const { return m_attributeHasBeenSet; }
54 
59  inline void SetAttribute(const SnapshotAttributeName& value) { m_attributeHasBeenSet = true; m_attribute = value; }
60 
65  inline void SetAttribute(SnapshotAttributeName&& value) { m_attributeHasBeenSet = true; m_attribute = std::move(value); }
66 
71  inline ModifySnapshotAttributeRequest& WithAttribute(const SnapshotAttributeName& value) { SetAttribute(value); return *this;}
72 
77  inline ModifySnapshotAttributeRequest& WithAttribute(SnapshotAttributeName&& value) { SetAttribute(std::move(value)); return *this;}
78 
79 
83  inline const CreateVolumePermissionModifications& GetCreateVolumePermission() const{ return m_createVolumePermission; }
84 
88  inline bool CreateVolumePermissionHasBeenSet() const { return m_createVolumePermissionHasBeenSet; }
89 
93  inline void SetCreateVolumePermission(const CreateVolumePermissionModifications& value) { m_createVolumePermissionHasBeenSet = true; m_createVolumePermission = value; }
94 
98  inline void SetCreateVolumePermission(CreateVolumePermissionModifications&& value) { m_createVolumePermissionHasBeenSet = true; m_createVolumePermission = std::move(value); }
99 
103  inline ModifySnapshotAttributeRequest& WithCreateVolumePermission(const CreateVolumePermissionModifications& value) { SetCreateVolumePermission(value); return *this;}
104 
108  inline ModifySnapshotAttributeRequest& WithCreateVolumePermission(CreateVolumePermissionModifications&& value) { SetCreateVolumePermission(std::move(value)); return *this;}
109 
110 
114  inline const Aws::Vector<Aws::String>& GetGroupNames() const{ return m_groupNames; }
115 
119  inline bool GroupNamesHasBeenSet() const { return m_groupNamesHasBeenSet; }
120 
124  inline void SetGroupNames(const Aws::Vector<Aws::String>& value) { m_groupNamesHasBeenSet = true; m_groupNames = value; }
125 
129  inline void SetGroupNames(Aws::Vector<Aws::String>&& value) { m_groupNamesHasBeenSet = true; m_groupNames = std::move(value); }
130 
134  inline ModifySnapshotAttributeRequest& WithGroupNames(const Aws::Vector<Aws::String>& value) { SetGroupNames(value); return *this;}
135 
139  inline ModifySnapshotAttributeRequest& WithGroupNames(Aws::Vector<Aws::String>&& value) { SetGroupNames(std::move(value)); return *this;}
140 
144  inline ModifySnapshotAttributeRequest& AddGroupNames(const Aws::String& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
145 
149  inline ModifySnapshotAttributeRequest& AddGroupNames(Aws::String&& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(std::move(value)); return *this; }
150 
154  inline ModifySnapshotAttributeRequest& AddGroupNames(const char* value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
155 
156 
160  inline const OperationType& GetOperationType() const{ return m_operationType; }
161 
165  inline bool OperationTypeHasBeenSet() const { return m_operationTypeHasBeenSet; }
166 
170  inline void SetOperationType(const OperationType& value) { m_operationTypeHasBeenSet = true; m_operationType = value; }
171 
175  inline void SetOperationType(OperationType&& value) { m_operationTypeHasBeenSet = true; m_operationType = std::move(value); }
176 
180  inline ModifySnapshotAttributeRequest& WithOperationType(const OperationType& value) { SetOperationType(value); return *this;}
181 
185  inline ModifySnapshotAttributeRequest& WithOperationType(OperationType&& value) { SetOperationType(std::move(value)); return *this;}
186 
187 
191  inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
192 
196  inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
197 
201  inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
202 
206  inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); }
207 
211  inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
212 
216  inline ModifySnapshotAttributeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
217 
221  inline ModifySnapshotAttributeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;}
222 
226  inline ModifySnapshotAttributeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
227 
228 
232  inline const Aws::Vector<Aws::String>& GetUserIds() const{ return m_userIds; }
233 
237  inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; }
238 
242  inline void SetUserIds(const Aws::Vector<Aws::String>& value) { m_userIdsHasBeenSet = true; m_userIds = value; }
243 
247  inline void SetUserIds(Aws::Vector<Aws::String>&& value) { m_userIdsHasBeenSet = true; m_userIds = std::move(value); }
248 
252  inline ModifySnapshotAttributeRequest& WithUserIds(const Aws::Vector<Aws::String>& value) { SetUserIds(value); return *this;}
253 
257  inline ModifySnapshotAttributeRequest& WithUserIds(Aws::Vector<Aws::String>&& value) { SetUserIds(std::move(value)); return *this;}
258 
262  inline ModifySnapshotAttributeRequest& AddUserIds(const Aws::String& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
263 
267  inline ModifySnapshotAttributeRequest& AddUserIds(Aws::String&& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(std::move(value)); return *this; }
268 
272  inline ModifySnapshotAttributeRequest& AddUserIds(const char* value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
273 
274 
281  inline bool GetDryRun() const{ return m_dryRun; }
282 
289  inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
290 
297  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
298 
305  inline ModifySnapshotAttributeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
306 
307  private:
308 
309  SnapshotAttributeName m_attribute;
310  bool m_attributeHasBeenSet;
311 
312  CreateVolumePermissionModifications m_createVolumePermission;
313  bool m_createVolumePermissionHasBeenSet;
314 
315  Aws::Vector<Aws::String> m_groupNames;
316  bool m_groupNamesHasBeenSet;
317 
318  OperationType m_operationType;
319  bool m_operationTypeHasBeenSet;
320 
321  Aws::String m_snapshotId;
322  bool m_snapshotIdHasBeenSet;
323 
324  Aws::Vector<Aws::String> m_userIds;
325  bool m_userIdsHasBeenSet;
326 
327  bool m_dryRun;
328  bool m_dryRunHasBeenSet;
329  };
330 
331 } // namespace Model
332 } // namespace EC2
333 } // namespace Aws
Aws::EC2::Model::CreateVolumePermissionModifications
Definition: CreateVolumePermissionModifications.h:34
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetServiceRequestName
virtual const char * GetServiceRequestName() const override
Definition: ModifySnapshotAttributeRequest.h:34
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetUserIds
void SetUserIds(Aws::Vector< Aws::String > &&value)
Definition: ModifySnapshotAttributeRequest.h:247
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetGroupNames
void SetGroupNames(const Aws::Vector< Aws::String > &value)
Definition: ModifySnapshotAttributeRequest.h:124
Aws::Http::URI
Definition: URI.h:32
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetCreateVolumePermission
void SetCreateVolumePermission(CreateVolumePermissionModifications &&value)
Definition: ModifySnapshotAttributeRequest.h:98
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithUserIds
ModifySnapshotAttributeRequest & WithUserIds(const Aws::Vector< Aws::String > &value)
Definition: ModifySnapshotAttributeRequest.h:252
Aws::EC2::Model::ModifySnapshotAttributeRequest::AddGroupNames
ModifySnapshotAttributeRequest & AddGroupNames(Aws::String &&value)
Definition: ModifySnapshotAttributeRequest.h:149
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetGroupNames
void SetGroupNames(Aws::Vector< Aws::String > &&value)
Definition: ModifySnapshotAttributeRequest.h:129
Aws::EC2::Model::ModifySnapshotAttributeRequest::AddUserIds
ModifySnapshotAttributeRequest & AddUserIds(const char *value)
Definition: ModifySnapshotAttributeRequest.h:272
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithOperationType
ModifySnapshotAttributeRequest & WithOperationType(const OperationType &value)
Definition: ModifySnapshotAttributeRequest.h:180
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithCreateVolumePermission
ModifySnapshotAttributeRequest & WithCreateVolumePermission(CreateVolumePermissionModifications &&value)
Definition: ModifySnapshotAttributeRequest.h:108
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetUserIds
const Aws::Vector< Aws::String > & GetUserIds() const
Definition: ModifySnapshotAttributeRequest.h:232
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetCreateVolumePermission
const CreateVolumePermissionModifications & GetCreateVolumePermission() const
Definition: ModifySnapshotAttributeRequest.h:83
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetAttribute
void SetAttribute(const SnapshotAttributeName &value)
Definition: ModifySnapshotAttributeRequest.h:59
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetDryRun
void SetDryRun(bool value)
Definition: ModifySnapshotAttributeRequest.h:297
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithAttribute
ModifySnapshotAttributeRequest & WithAttribute(SnapshotAttributeName &&value)
Definition: ModifySnapshotAttributeRequest.h:77
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithAttribute
ModifySnapshotAttributeRequest & WithAttribute(const SnapshotAttributeName &value)
Definition: ModifySnapshotAttributeRequest.h:71
SnapshotAttributeName.h
Aws::EC2::Model::ModifySnapshotAttributeRequest::DryRunHasBeenSet
bool DryRunHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:289
AWS_EC2_API
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:28
Aws::EC2::Model::ModifySnapshotAttributeRequest::AttributeHasBeenSet
bool AttributeHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:53
Aws::EC2::Model::OperationType
OperationType
Definition: OperationType.h:17
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetUserIds
void SetUserIds(const Aws::Vector< Aws::String > &value)
Definition: ModifySnapshotAttributeRequest.h:242
Aws::EC2::Model::ModifySnapshotAttributeRequest::AddGroupNames
ModifySnapshotAttributeRequest & AddGroupNames(const Aws::String &value)
Definition: ModifySnapshotAttributeRequest.h:144
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithSnapshotId
ModifySnapshotAttributeRequest & WithSnapshotId(Aws::String &&value)
Definition: ModifySnapshotAttributeRequest.h:221
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithGroupNames
ModifySnapshotAttributeRequest & WithGroupNames(const Aws::Vector< Aws::String > &value)
Definition: ModifySnapshotAttributeRequest.h:134
Aws::Vector
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:17
Aws::EC2::Model::SnapshotAttributeName
SnapshotAttributeName
Definition: SnapshotAttributeName.h:17
OperationType.h
AWSVector.h
CreateVolumePermissionModifications.h
Aws::EC2::Model::ModifySnapshotAttributeRequest::CreateVolumePermissionHasBeenSet
bool CreateVolumePermissionHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:88
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetSnapshotId
void SetSnapshotId(const char *value)
Definition: ModifySnapshotAttributeRequest.h:211
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetOperationType
void SetOperationType(const OperationType &value)
Definition: ModifySnapshotAttributeRequest.h:170
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetCreateVolumePermission
void SetCreateVolumePermission(const CreateVolumePermissionModifications &value)
Definition: ModifySnapshotAttributeRequest.h:93
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetDryRun
bool GetDryRun() const
Definition: ModifySnapshotAttributeRequest.h:281
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetAttribute
void SetAttribute(SnapshotAttributeName &&value)
Definition: ModifySnapshotAttributeRequest.h:65
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetOperationType
const OperationType & GetOperationType() const
Definition: ModifySnapshotAttributeRequest.h:160
Aws::EC2::Model::ModifySnapshotAttributeRequest::SerializePayload
Aws::String SerializePayload() const override
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithSnapshotId
ModifySnapshotAttributeRequest & WithSnapshotId(const Aws::String &value)
Definition: ModifySnapshotAttributeRequest.h:216
EC2Request.h
AWSString.h
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithDryRun
ModifySnapshotAttributeRequest & WithDryRun(bool value)
Definition: ModifySnapshotAttributeRequest.h:305
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithOperationType
ModifySnapshotAttributeRequest & WithOperationType(OperationType &&value)
Definition: ModifySnapshotAttributeRequest.h:185
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetSnapshotId
void SetSnapshotId(const Aws::String &value)
Definition: ModifySnapshotAttributeRequest.h:201
Aws::EC2::Model::ModifySnapshotAttributeRequest::DumpBodyToUrl
void DumpBodyToUrl(Aws::Http::URI &uri) const override
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetSnapshotId
const Aws::String & GetSnapshotId() const
Definition: ModifySnapshotAttributeRequest.h:191
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetGroupNames
const Aws::Vector< Aws::String > & GetGroupNames() const
Definition: ModifySnapshotAttributeRequest.h:114
Aws::EC2::Model::ModifySnapshotAttributeRequest::GetAttribute
const SnapshotAttributeName & GetAttribute() const
Definition: ModifySnapshotAttributeRequest.h:47
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetSnapshotId
void SetSnapshotId(Aws::String &&value)
Definition: ModifySnapshotAttributeRequest.h:206
Aws
Definition: AccessManagementClient.h:15
Aws::EC2::Model::ModifySnapshotAttributeRequest::GroupNamesHasBeenSet
bool GroupNamesHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:119
Aws::EC2::Model::ModifySnapshotAttributeRequest::AddGroupNames
ModifySnapshotAttributeRequest & AddGroupNames(const char *value)
Definition: ModifySnapshotAttributeRequest.h:154
Aws::EC2::Model::ModifySnapshotAttributeRequest::AddUserIds
ModifySnapshotAttributeRequest & AddUserIds(const Aws::String &value)
Definition: ModifySnapshotAttributeRequest.h:262
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithCreateVolumePermission
ModifySnapshotAttributeRequest & WithCreateVolumePermission(const CreateVolumePermissionModifications &value)
Definition: ModifySnapshotAttributeRequest.h:103
Aws::EC2::Model::ModifySnapshotAttributeRequest::UserIdsHasBeenSet
bool UserIdsHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:237
Aws::String
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Aws::EC2::Model::ModifySnapshotAttributeRequest
Definition: ModifySnapshotAttributeRequest.h:26
Aws::EC2::EC2Request
Definition: EC2Request.h:17
Aws::EC2::Model::ModifySnapshotAttributeRequest::OperationTypeHasBeenSet
bool OperationTypeHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:165
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithUserIds
ModifySnapshotAttributeRequest & WithUserIds(Aws::Vector< Aws::String > &&value)
Definition: ModifySnapshotAttributeRequest.h:257
Aws::EC2::Model::ModifySnapshotAttributeRequest::SnapshotIdHasBeenSet
bool SnapshotIdHasBeenSet() const
Definition: ModifySnapshotAttributeRequest.h:196
Aws::EC2::Model::ModifySnapshotAttributeRequest::ModifySnapshotAttributeRequest
ModifySnapshotAttributeRequest()
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithSnapshotId
ModifySnapshotAttributeRequest & WithSnapshotId(const char *value)
Definition: ModifySnapshotAttributeRequest.h:226
EC2_EXPORTS.h
Aws::EC2::Model::ModifySnapshotAttributeRequest::SetOperationType
void SetOperationType(OperationType &&value)
Definition: ModifySnapshotAttributeRequest.h:175
Aws::EC2::Model::ModifySnapshotAttributeRequest::WithGroupNames
ModifySnapshotAttributeRequest & WithGroupNames(Aws::Vector< Aws::String > &&value)
Definition: ModifySnapshotAttributeRequest.h:139
Aws::EC2::Model::ModifySnapshotAttributeRequest::AddUserIds
ModifySnapshotAttributeRequest & AddUserIds(Aws::String &&value)
Definition: ModifySnapshotAttributeRequest.h:267