AWS SDK for C++  0.12.9
AWS SDK for C++
ModifySnapshotAttributeRequest.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
16 #include <aws/ec2/EC2_EXPORTS.h>
17 #include <aws/ec2/EC2Request.h>
23 
24 namespace Aws
25 {
26 namespace EC2
27 {
28 namespace Model
29 {
30 
35  {
36  public:
38  Aws::String SerializePayload() const override;
39 
46  inline bool GetDryRun() const{ return m_dryRun; }
47 
54  inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
55 
62  inline ModifySnapshotAttributeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
63 
67  inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
68 
72  inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
73 
77  inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
78 
82  inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
83 
87  inline ModifySnapshotAttributeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
88 
92  inline ModifySnapshotAttributeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(value); return *this;}
93 
97  inline ModifySnapshotAttributeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
98 
103  inline const SnapshotAttributeName& GetAttribute() const{ return m_attribute; }
104 
109  inline void SetAttribute(const SnapshotAttributeName& value) { m_attributeHasBeenSet = true; m_attribute = value; }
110 
115  inline void SetAttribute(SnapshotAttributeName&& value) { m_attributeHasBeenSet = true; m_attribute = value; }
116 
121  inline ModifySnapshotAttributeRequest& WithAttribute(const SnapshotAttributeName& value) { SetAttribute(value); return *this;}
122 
127  inline ModifySnapshotAttributeRequest& WithAttribute(SnapshotAttributeName&& value) { SetAttribute(value); return *this;}
128 
132  inline const OperationType& GetOperationType() const{ return m_operationType; }
133 
137  inline void SetOperationType(const OperationType& value) { m_operationTypeHasBeenSet = true; m_operationType = value; }
138 
142  inline void SetOperationType(OperationType&& value) { m_operationTypeHasBeenSet = true; m_operationType = value; }
143 
147  inline ModifySnapshotAttributeRequest& WithOperationType(const OperationType& value) { SetOperationType(value); return *this;}
148 
152  inline ModifySnapshotAttributeRequest& WithOperationType(OperationType&& value) { SetOperationType(value); return *this;}
153 
157  inline const Aws::Vector<Aws::String>& GetUserIds() const{ return m_userIds; }
158 
162  inline void SetUserIds(const Aws::Vector<Aws::String>& value) { m_userIdsHasBeenSet = true; m_userIds = value; }
163 
167  inline void SetUserIds(Aws::Vector<Aws::String>&& value) { m_userIdsHasBeenSet = true; m_userIds = value; }
168 
172  inline ModifySnapshotAttributeRequest& WithUserIds(const Aws::Vector<Aws::String>& value) { SetUserIds(value); return *this;}
173 
177  inline ModifySnapshotAttributeRequest& WithUserIds(Aws::Vector<Aws::String>&& value) { SetUserIds(value); return *this;}
178 
182  inline ModifySnapshotAttributeRequest& AddUserIds(const Aws::String& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
183 
187  inline ModifySnapshotAttributeRequest& AddUserIds(Aws::String&& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
188 
192  inline ModifySnapshotAttributeRequest& AddUserIds(const char* value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
193 
197  inline const Aws::Vector<Aws::String>& GetGroupNames() const{ return m_groupNames; }
198 
202  inline void SetGroupNames(const Aws::Vector<Aws::String>& value) { m_groupNamesHasBeenSet = true; m_groupNames = value; }
203 
207  inline void SetGroupNames(Aws::Vector<Aws::String>&& value) { m_groupNamesHasBeenSet = true; m_groupNames = value; }
208 
212  inline ModifySnapshotAttributeRequest& WithGroupNames(const Aws::Vector<Aws::String>& value) { SetGroupNames(value); return *this;}
213 
217  inline ModifySnapshotAttributeRequest& WithGroupNames(Aws::Vector<Aws::String>&& value) { SetGroupNames(value); return *this;}
218 
222  inline ModifySnapshotAttributeRequest& AddGroupNames(const Aws::String& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
223 
227  inline ModifySnapshotAttributeRequest& AddGroupNames(Aws::String&& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
228 
232  inline ModifySnapshotAttributeRequest& AddGroupNames(const char* value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
233 
237  inline const CreateVolumePermissionModifications& GetCreateVolumePermission() const{ return m_createVolumePermission; }
238 
242  inline void SetCreateVolumePermission(const CreateVolumePermissionModifications& value) { m_createVolumePermissionHasBeenSet = true; m_createVolumePermission = value; }
243 
247  inline void SetCreateVolumePermission(CreateVolumePermissionModifications&& value) { m_createVolumePermissionHasBeenSet = true; m_createVolumePermission = value; }
248 
252  inline ModifySnapshotAttributeRequest& WithCreateVolumePermission(const CreateVolumePermissionModifications& value) { SetCreateVolumePermission(value); return *this;}
253 
257  inline ModifySnapshotAttributeRequest& WithCreateVolumePermission(CreateVolumePermissionModifications&& value) { SetCreateVolumePermission(value); return *this;}
258 
259  private:
260  bool m_dryRun;
261  bool m_dryRunHasBeenSet;
262  Aws::String m_snapshotId;
263  bool m_snapshotIdHasBeenSet;
264  SnapshotAttributeName m_attribute;
265  bool m_attributeHasBeenSet;
266  OperationType m_operationType;
267  bool m_operationTypeHasBeenSet;
268  Aws::Vector<Aws::String> m_userIds;
269  bool m_userIdsHasBeenSet;
270  Aws::Vector<Aws::String> m_groupNames;
271  bool m_groupNamesHasBeenSet;
272  CreateVolumePermissionModifications m_createVolumePermission;
273  bool m_createVolumePermissionHasBeenSet;
274  };
275 
276 } // namespace Model
277 } // namespace EC2
278 } // namespace Aws
ModifySnapshotAttributeRequest & AddUserIds(const char *value)
ModifySnapshotAttributeRequest & WithAttribute(const SnapshotAttributeName &value)
ModifySnapshotAttributeRequest & WithAttribute(SnapshotAttributeName &&value)
ModifySnapshotAttributeRequest & WithSnapshotId(const char *value)
ModifySnapshotAttributeRequest & AddGroupNames(Aws::String &&value)
void SetGroupNames(Aws::Vector< Aws::String > &&value)
void SetUserIds(const Aws::Vector< Aws::String > &value)
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetGroupNames(const Aws::Vector< Aws::String > &value)
ModifySnapshotAttributeRequest & WithCreateVolumePermission(CreateVolumePermissionModifications &&value)
const Aws::Vector< Aws::String > & GetGroupNames() const
ModifySnapshotAttributeRequest & WithGroupNames(const Aws::Vector< Aws::String > &value)
ModifySnapshotAttributeRequest & AddUserIds(const Aws::String &value)
void SetCreateVolumePermission(const CreateVolumePermissionModifications &value)
ModifySnapshotAttributeRequest & WithCreateVolumePermission(const CreateVolumePermissionModifications &value)
ModifySnapshotAttributeRequest & AddUserIds(Aws::String &&value)
ModifySnapshotAttributeRequest & WithUserIds(Aws::Vector< Aws::String > &&value)
void SetAttribute(const SnapshotAttributeName &value)
ModifySnapshotAttributeRequest & WithUserIds(const Aws::Vector< Aws::String > &value)
ModifySnapshotAttributeRequest & WithOperationType(const OperationType &value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const CreateVolumePermissionModifications & GetCreateVolumePermission() const
void SetCreateVolumePermission(CreateVolumePermissionModifications &&value)
ModifySnapshotAttributeRequest & WithSnapshotId(Aws::String &&value)
ModifySnapshotAttributeRequest & WithGroupNames(Aws::Vector< Aws::String > &&value)
#define AWS_EC2_API
Definition: EC2_EXPORTS.h:34
ModifySnapshotAttributeRequest & WithOperationType(OperationType &&value)
ModifySnapshotAttributeRequest & WithDryRun(bool value)
ModifySnapshotAttributeRequest & AddGroupNames(const Aws::String &value)
const Aws::Vector< Aws::String > & GetUserIds() const
ModifySnapshotAttributeRequest & AddGroupNames(const char *value)
ModifySnapshotAttributeRequest & WithSnapshotId(const Aws::String &value)
JSON (JavaScript Object Notation).