AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
LockSnapshotRequest.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/ec2/EC2Request.h>
10#include <aws/ec2/EC2_EXPORTS.h>
11#include <aws/ec2/model/LockMode.h>
12
13#include <utility>
14
15namespace Aws {
16namespace EC2 {
17namespace Model {
18
22 public:
23 AWS_EC2_API LockSnapshotRequest() = default;
24
25 // Service request name is the Operation name which will send this request out,
26 // each operation should has unique request name, so that we can get operation's name from this request.
27 // Note: this is not true for response, multiple operations may have the same response name,
28 // so we can not get operation's name from response.
29 inline virtual const char* GetServiceRequestName() const override { return "LockSnapshot"; }
30
31 AWS_EC2_API Aws::String SerializePayload() const override;
32
33 protected:
34 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri) const override;
35
36 public:
38
41 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
42 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
43 template <typename SnapshotIdT = Aws::String>
44 void SetSnapshotId(SnapshotIdT&& value) {
45 m_snapshotIdHasBeenSet = true;
46 m_snapshotId = std::forward<SnapshotIdT>(value);
47 }
48 template <typename SnapshotIdT = Aws::String>
49 LockSnapshotRequest& WithSnapshotId(SnapshotIdT&& value) {
50 SetSnapshotId(std::forward<SnapshotIdT>(value));
51 return *this;
52 }
54
56
62 inline bool GetDryRun() const { return m_dryRun; }
63 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
64 inline void SetDryRun(bool value) {
65 m_dryRunHasBeenSet = true;
66 m_dryRun = value;
67 }
68 inline LockSnapshotRequest& WithDryRun(bool value) {
69 SetDryRun(value);
70 return *this;
71 }
73
75
93 inline LockMode GetLockMode() const { return m_lockMode; }
94 inline bool LockModeHasBeenSet() const { return m_lockModeHasBeenSet; }
95 inline void SetLockMode(LockMode value) {
96 m_lockModeHasBeenSet = true;
97 m_lockMode = value;
98 }
100 SetLockMode(value);
101 return *this;
102 }
104
106
120 inline int GetCoolOffPeriod() const { return m_coolOffPeriod; }
121 inline bool CoolOffPeriodHasBeenSet() const { return m_coolOffPeriodHasBeenSet; }
122 inline void SetCoolOffPeriod(int value) {
123 m_coolOffPeriodHasBeenSet = true;
124 m_coolOffPeriod = value;
125 }
127 SetCoolOffPeriod(value);
128 return *this;
129 }
131
133
139 inline int GetLockDuration() const { return m_lockDuration; }
140 inline bool LockDurationHasBeenSet() const { return m_lockDurationHasBeenSet; }
141 inline void SetLockDuration(int value) {
142 m_lockDurationHasBeenSet = true;
143 m_lockDuration = value;
144 }
146 SetLockDuration(value);
147 return *this;
148 }
150
152
157 inline const Aws::Utils::DateTime& GetExpirationDate() const { return m_expirationDate; }
158 inline bool ExpirationDateHasBeenSet() const { return m_expirationDateHasBeenSet; }
159 template <typename ExpirationDateT = Aws::Utils::DateTime>
160 void SetExpirationDate(ExpirationDateT&& value) {
161 m_expirationDateHasBeenSet = true;
162 m_expirationDate = std::forward<ExpirationDateT>(value);
163 }
164 template <typename ExpirationDateT = Aws::Utils::DateTime>
165 LockSnapshotRequest& WithExpirationDate(ExpirationDateT&& value) {
166 SetExpirationDate(std::forward<ExpirationDateT>(value));
167 return *this;
168 }
170 private:
171 Aws::String m_snapshotId;
172
173 bool m_dryRun{false};
174
175 LockMode m_lockMode{LockMode::NOT_SET};
176
177 int m_coolOffPeriod{0};
178
179 int m_lockDuration{0};
180
181 Aws::Utils::DateTime m_expirationDate{};
182 bool m_snapshotIdHasBeenSet = false;
183 bool m_dryRunHasBeenSet = false;
184 bool m_lockModeHasBeenSet = false;
185 bool m_coolOffPeriodHasBeenSet = false;
186 bool m_lockDurationHasBeenSet = false;
187 bool m_expirationDateHasBeenSet = false;
188};
189
190} // namespace Model
191} // namespace EC2
192} // namespace Aws
LockSnapshotRequest & WithCoolOffPeriod(int value)
const Aws::String & GetSnapshotId() const
void SetSnapshotId(SnapshotIdT &&value)
const Aws::Utils::DateTime & GetExpirationDate() const
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
LockSnapshotRequest & WithDryRun(bool value)
void SetExpirationDate(ExpirationDateT &&value)
LockSnapshotRequest & WithLockDuration(int value)
LockSnapshotRequest & WithExpirationDate(ExpirationDateT &&value)
LockSnapshotRequest & WithLockMode(LockMode value)
virtual const char * GetServiceRequestName() const override
AWS_EC2_API LockSnapshotRequest()=default
LockSnapshotRequest & WithSnapshotId(SnapshotIdT &&value)
AWS_EC2_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String