AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
ModifySnapshotAttributeRequest.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/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/CreateVolumePermissionModifications.h>
12#include <aws/ec2/model/OperationType.h>
13#include <aws/ec2/model/SnapshotAttributeName.h>
14
15#include <utility>
16
17namespace Aws {
18namespace EC2 {
19namespace Model {
20
24 public:
25 AWS_EC2_API ModifySnapshotAttributeRequest() = default;
26
27 // Service request name is the Operation name which will send this request out,
28 // each operation should has unique request name, so that we can get operation's name from this request.
29 // Note: this is not true for response, multiple operations may have the same response name,
30 // so we can not get operation's name from response.
31 inline virtual const char* GetServiceRequestName() const override { return "ModifySnapshotAttribute"; }
32
33 AWS_EC2_API Aws::String SerializePayload() const override;
34
35 protected:
36 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
37
38 public:
40
44 inline SnapshotAttributeName GetAttribute() const { return m_attribute; }
45 inline bool AttributeHasBeenSet() const { return m_attributeHasBeenSet; }
47 m_attributeHasBeenSet = true;
48 m_attribute = value;
49 }
51 SetAttribute(value);
52 return *this;
53 }
55
57
60 inline const CreateVolumePermissionModifications& GetCreateVolumePermission() const { return m_createVolumePermission; }
61 inline bool CreateVolumePermissionHasBeenSet() const { return m_createVolumePermissionHasBeenSet; }
62 template <typename CreateVolumePermissionT = CreateVolumePermissionModifications>
63 void SetCreateVolumePermission(CreateVolumePermissionT&& value) {
64 m_createVolumePermissionHasBeenSet = true;
65 m_createVolumePermission = std::forward<CreateVolumePermissionT>(value);
66 }
67 template <typename CreateVolumePermissionT = CreateVolumePermissionModifications>
69 SetCreateVolumePermission(std::forward<CreateVolumePermissionT>(value));
70 return *this;
71 }
73
75
78 inline const Aws::Vector<Aws::String>& GetGroupNames() const { return m_groupNames; }
79 inline bool GroupNamesHasBeenSet() const { return m_groupNamesHasBeenSet; }
80 template <typename GroupNamesT = Aws::Vector<Aws::String>>
81 void SetGroupNames(GroupNamesT&& value) {
82 m_groupNamesHasBeenSet = true;
83 m_groupNames = std::forward<GroupNamesT>(value);
84 }
85 template <typename GroupNamesT = Aws::Vector<Aws::String>>
87 SetGroupNames(std::forward<GroupNamesT>(value));
88 return *this;
89 }
90 template <typename GroupNamesT = Aws::String>
92 m_groupNamesHasBeenSet = true;
93 m_groupNames.emplace_back(std::forward<GroupNamesT>(value));
94 return *this;
95 }
97
99
102 inline OperationType GetOperationType() const { return m_operationType; }
103 inline bool OperationTypeHasBeenSet() const { return m_operationTypeHasBeenSet; }
104 inline void SetOperationType(OperationType value) {
105 m_operationTypeHasBeenSet = true;
106 m_operationType = value;
107 }
109 SetOperationType(value);
110 return *this;
111 }
113
115
118 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
119 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
120 template <typename SnapshotIdT = Aws::String>
121 void SetSnapshotId(SnapshotIdT&& value) {
122 m_snapshotIdHasBeenSet = true;
123 m_snapshotId = std::forward<SnapshotIdT>(value);
124 }
125 template <typename SnapshotIdT = Aws::String>
127 SetSnapshotId(std::forward<SnapshotIdT>(value));
128 return *this;
129 }
131
133
136 inline const Aws::Vector<Aws::String>& GetUserIds() const { return m_userIds; }
137 inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; }
138 template <typename UserIdsT = Aws::Vector<Aws::String>>
139 void SetUserIds(UserIdsT&& value) {
140 m_userIdsHasBeenSet = true;
141 m_userIds = std::forward<UserIdsT>(value);
142 }
143 template <typename UserIdsT = Aws::Vector<Aws::String>>
145 SetUserIds(std::forward<UserIdsT>(value));
146 return *this;
147 }
148 template <typename UserIdsT = Aws::String>
150 m_userIdsHasBeenSet = true;
151 m_userIds.emplace_back(std::forward<UserIdsT>(value));
152 return *this;
153 }
155
157
163 inline bool GetDryRun() const { return m_dryRun; }
164 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
165 inline void SetDryRun(bool value) {
166 m_dryRunHasBeenSet = true;
167 m_dryRun = value;
168 }
170 SetDryRun(value);
171 return *this;
172 }
174 private:
176
177 CreateVolumePermissionModifications m_createVolumePermission;
178
179 Aws::Vector<Aws::String> m_groupNames;
180
181 OperationType m_operationType{OperationType::NOT_SET};
182
183 Aws::String m_snapshotId;
184
185 Aws::Vector<Aws::String> m_userIds;
186
187 bool m_dryRun{false};
188 bool m_attributeHasBeenSet = false;
189 bool m_createVolumePermissionHasBeenSet = false;
190 bool m_groupNamesHasBeenSet = false;
191 bool m_operationTypeHasBeenSet = false;
192 bool m_snapshotIdHasBeenSet = false;
193 bool m_userIdsHasBeenSet = false;
194 bool m_dryRunHasBeenSet = false;
195};
196
197} // namespace Model
198} // namespace EC2
199} // namespace Aws
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Aws::String > & GetGroupNames() const
ModifySnapshotAttributeRequest & WithGroupNames(GroupNamesT &&value)
const Aws::Vector< Aws::String > & GetUserIds() const
ModifySnapshotAttributeRequest & WithUserIds(UserIdsT &&value)
const CreateVolumePermissionModifications & GetCreateVolumePermission() const
AWS_EC2_API Aws::String SerializePayload() const override
ModifySnapshotAttributeRequest & WithSnapshotId(SnapshotIdT &&value)
ModifySnapshotAttributeRequest & WithOperationType(OperationType value)
ModifySnapshotAttributeRequest & WithCreateVolumePermission(CreateVolumePermissionT &&value)
ModifySnapshotAttributeRequest & AddUserIds(UserIdsT &&value)
ModifySnapshotAttributeRequest & AddGroupNames(GroupNamesT &&value)
ModifySnapshotAttributeRequest & WithDryRun(bool value)
ModifySnapshotAttributeRequest & WithAttribute(SnapshotAttributeName value)
void SetCreateVolumePermission(CreateVolumePermissionT &&value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector