AWS SDK for C++

AWS SDK for C++ Version 1.11.440

Loading...
Searching...
No Matches
ModifySnapshotAttributeRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/ec2/model/SnapshotAttributeName.h>
10#include <aws/ec2/model/CreateVolumePermissionModifications.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12#include <aws/ec2/model/OperationType.h>
13#include <aws/core/utils/memory/stl/AWSString.h>
14#include <utility>
15
16namespace Aws
17{
18namespace EC2
19{
20namespace 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_EC2_API Aws::String SerializePayload() const override;
37
38 protected:
39 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
40
41 public:
42
44
48 inline const SnapshotAttributeName& GetAttribute() const{ return m_attribute; }
49 inline bool AttributeHasBeenSet() const { return m_attributeHasBeenSet; }
50 inline void SetAttribute(const SnapshotAttributeName& value) { m_attributeHasBeenSet = true; m_attribute = value; }
51 inline void SetAttribute(SnapshotAttributeName&& value) { m_attributeHasBeenSet = true; m_attribute = std::move(value); }
53 inline ModifySnapshotAttributeRequest& WithAttribute(SnapshotAttributeName&& value) { SetAttribute(std::move(value)); return *this;}
55
57
60 inline const CreateVolumePermissionModifications& GetCreateVolumePermission() const{ return m_createVolumePermission; }
61 inline bool CreateVolumePermissionHasBeenSet() const { return m_createVolumePermissionHasBeenSet; }
62 inline void SetCreateVolumePermission(const CreateVolumePermissionModifications& value) { m_createVolumePermissionHasBeenSet = true; m_createVolumePermission = value; }
63 inline void SetCreateVolumePermission(CreateVolumePermissionModifications&& value) { m_createVolumePermissionHasBeenSet = true; m_createVolumePermission = std::move(value); }
67
69
72 inline const Aws::Vector<Aws::String>& GetGroupNames() const{ return m_groupNames; }
73 inline bool GroupNamesHasBeenSet() const { return m_groupNamesHasBeenSet; }
74 inline void SetGroupNames(const Aws::Vector<Aws::String>& value) { m_groupNamesHasBeenSet = true; m_groupNames = value; }
75 inline void SetGroupNames(Aws::Vector<Aws::String>&& value) { m_groupNamesHasBeenSet = true; m_groupNames = std::move(value); }
77 inline ModifySnapshotAttributeRequest& WithGroupNames(Aws::Vector<Aws::String>&& value) { SetGroupNames(std::move(value)); return *this;}
78 inline ModifySnapshotAttributeRequest& AddGroupNames(const Aws::String& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
79 inline ModifySnapshotAttributeRequest& AddGroupNames(Aws::String&& value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(std::move(value)); return *this; }
80 inline ModifySnapshotAttributeRequest& AddGroupNames(const char* value) { m_groupNamesHasBeenSet = true; m_groupNames.push_back(value); return *this; }
82
84
87 inline const OperationType& GetOperationType() const{ return m_operationType; }
88 inline bool OperationTypeHasBeenSet() const { return m_operationTypeHasBeenSet; }
89 inline void SetOperationType(const OperationType& value) { m_operationTypeHasBeenSet = true; m_operationType = value; }
90 inline void SetOperationType(OperationType&& value) { m_operationTypeHasBeenSet = true; m_operationType = std::move(value); }
92 inline ModifySnapshotAttributeRequest& WithOperationType(OperationType&& value) { SetOperationType(std::move(value)); return *this;}
94
96
99 inline const Aws::String& GetSnapshotId() const{ return m_snapshotId; }
100 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
101 inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
102 inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); }
103 inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
104 inline ModifySnapshotAttributeRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
105 inline ModifySnapshotAttributeRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;}
106 inline ModifySnapshotAttributeRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
108
110
113 inline const Aws::Vector<Aws::String>& GetUserIds() const{ return m_userIds; }
114 inline bool UserIdsHasBeenSet() const { return m_userIdsHasBeenSet; }
115 inline void SetUserIds(const Aws::Vector<Aws::String>& value) { m_userIdsHasBeenSet = true; m_userIds = value; }
116 inline void SetUserIds(Aws::Vector<Aws::String>&& value) { m_userIdsHasBeenSet = true; m_userIds = std::move(value); }
118 inline ModifySnapshotAttributeRequest& WithUserIds(Aws::Vector<Aws::String>&& value) { SetUserIds(std::move(value)); return *this;}
119 inline ModifySnapshotAttributeRequest& AddUserIds(const Aws::String& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
120 inline ModifySnapshotAttributeRequest& AddUserIds(Aws::String&& value) { m_userIdsHasBeenSet = true; m_userIds.push_back(std::move(value)); return *this; }
121 inline ModifySnapshotAttributeRequest& AddUserIds(const char* value) { m_userIdsHasBeenSet = true; m_userIds.push_back(value); return *this; }
123
125
131 inline bool GetDryRun() const{ return m_dryRun; }
132 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
133 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
134 inline ModifySnapshotAttributeRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
136 private:
137
138 SnapshotAttributeName m_attribute;
139 bool m_attributeHasBeenSet = false;
140
141 CreateVolumePermissionModifications m_createVolumePermission;
142 bool m_createVolumePermissionHasBeenSet = false;
143
144 Aws::Vector<Aws::String> m_groupNames;
145 bool m_groupNamesHasBeenSet = false;
146
147 OperationType m_operationType;
148 bool m_operationTypeHasBeenSet = false;
149
150 Aws::String m_snapshotId;
151 bool m_snapshotIdHasBeenSet = false;
152
153 Aws::Vector<Aws::String> m_userIds;
154 bool m_userIdsHasBeenSet = false;
155
156 bool m_dryRun;
157 bool m_dryRunHasBeenSet = false;
158 };
159
160} // namespace Model
161} // namespace EC2
162} // namespace Aws
ModifySnapshotAttributeRequest & AddUserIds(Aws::String &&value)
ModifySnapshotAttributeRequest & AddGroupNames(Aws::String &&value)
virtual const char * GetServiceRequestName() const override
const Aws::Vector< Aws::String > & GetGroupNames() const
ModifySnapshotAttributeRequest & WithSnapshotId(Aws::String &&value)
void SetGroupNames(Aws::Vector< Aws::String > &&value)
void SetCreateVolumePermission(const CreateVolumePermissionModifications &value)
ModifySnapshotAttributeRequest & WithGroupNames(Aws::Vector< Aws::String > &&value)
void SetCreateVolumePermission(CreateVolumePermissionModifications &&value)
ModifySnapshotAttributeRequest & WithGroupNames(const Aws::Vector< Aws::String > &value)
void SetGroupNames(const Aws::Vector< Aws::String > &value)
const Aws::Vector< Aws::String > & GetUserIds() const
void SetAttribute(const SnapshotAttributeName &value)
ModifySnapshotAttributeRequest & AddUserIds(const char *value)
ModifySnapshotAttributeRequest & WithCreateVolumePermission(CreateVolumePermissionModifications &&value)
ModifySnapshotAttributeRequest & AddUserIds(const Aws::String &value)
ModifySnapshotAttributeRequest & WithSnapshotId(const Aws::String &value)
ModifySnapshotAttributeRequest & WithUserIds(const Aws::Vector< Aws::String > &value)
const CreateVolumePermissionModifications & GetCreateVolumePermission() const
ModifySnapshotAttributeRequest & WithOperationType(const OperationType &value)
ModifySnapshotAttributeRequest & WithAttribute(const SnapshotAttributeName &value)
AWS_EC2_API Aws::String SerializePayload() const override
ModifySnapshotAttributeRequest & AddGroupNames(const char *value)
ModifySnapshotAttributeRequest & WithAttribute(SnapshotAttributeName &&value)
ModifySnapshotAttributeRequest & WithCreateVolumePermission(const CreateVolumePermissionModifications &value)
ModifySnapshotAttributeRequest & WithSnapshotId(const char *value)
void SetUserIds(const Aws::Vector< Aws::String > &value)
ModifySnapshotAttributeRequest & WithOperationType(OperationType &&value)
ModifySnapshotAttributeRequest & WithUserIds(Aws::Vector< Aws::String > &&value)
ModifySnapshotAttributeRequest & WithDryRun(bool value)
ModifySnapshotAttributeRequest & AddGroupNames(const Aws::String &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