AWS SDK for C++

AWS SDK for C++ Version 1.11.606

Loading...
Searching...
No Matches
LockSnapshotRequest.h
1
6#pragma once
7#include <aws/ec2/EC2_EXPORTS.h>
8#include <aws/ec2/EC2Request.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/ec2/model/LockMode.h>
11#include <aws/core/utils/DateTime.h>
12#include <utility>
13
14namespace Aws
15{
16namespace EC2
17{
18namespace Model
19{
20
24 {
25 public:
26 AWS_EC2_API LockSnapshotRequest() = default;
27
28 // Service request name is the Operation name which will send this request out,
29 // each operation should has unique request name, so that we can get operation's name from this request.
30 // Note: this is not true for response, multiple operations may have the same response name,
31 // so we can not get operation's name from response.
32 inline virtual const char* GetServiceRequestName() const override { return "LockSnapshot"; }
33
34 AWS_EC2_API Aws::String SerializePayload() const override;
35
36 protected:
37 AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI& uri ) const override;
38
39 public:
40
42
45 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
46 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
47 template<typename SnapshotIdT = Aws::String>
48 void SetSnapshotId(SnapshotIdT&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::forward<SnapshotIdT>(value); }
49 template<typename SnapshotIdT = Aws::String>
50 LockSnapshotRequest& WithSnapshotId(SnapshotIdT&& value) { SetSnapshotId(std::forward<SnapshotIdT>(value)); return *this;}
52
54
60 inline bool GetDryRun() const { return m_dryRun; }
61 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
62 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
63 inline LockSnapshotRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
65
67
85 inline LockMode GetLockMode() const { return m_lockMode; }
86 inline bool LockModeHasBeenSet() const { return m_lockModeHasBeenSet; }
87 inline void SetLockMode(LockMode value) { m_lockModeHasBeenSet = true; m_lockMode = value; }
88 inline LockSnapshotRequest& WithLockMode(LockMode value) { SetLockMode(value); return *this;}
90
92
106 inline int GetCoolOffPeriod() const { return m_coolOffPeriod; }
107 inline bool CoolOffPeriodHasBeenSet() const { return m_coolOffPeriodHasBeenSet; }
108 inline void SetCoolOffPeriod(int value) { m_coolOffPeriodHasBeenSet = true; m_coolOffPeriod = value; }
109 inline LockSnapshotRequest& WithCoolOffPeriod(int value) { SetCoolOffPeriod(value); return *this;}
111
113
119 inline int GetLockDuration() const { return m_lockDuration; }
120 inline bool LockDurationHasBeenSet() const { return m_lockDurationHasBeenSet; }
121 inline void SetLockDuration(int value) { m_lockDurationHasBeenSet = true; m_lockDuration = value; }
122 inline LockSnapshotRequest& WithLockDuration(int value) { SetLockDuration(value); return *this;}
124
126
131 inline const Aws::Utils::DateTime& GetExpirationDate() const { return m_expirationDate; }
132 inline bool ExpirationDateHasBeenSet() const { return m_expirationDateHasBeenSet; }
133 template<typename ExpirationDateT = Aws::Utils::DateTime>
134 void SetExpirationDate(ExpirationDateT&& value) { m_expirationDateHasBeenSet = true; m_expirationDate = std::forward<ExpirationDateT>(value); }
135 template<typename ExpirationDateT = Aws::Utils::DateTime>
136 LockSnapshotRequest& WithExpirationDate(ExpirationDateT&& value) { SetExpirationDate(std::forward<ExpirationDateT>(value)); return *this;}
138 private:
139
140 Aws::String m_snapshotId;
141 bool m_snapshotIdHasBeenSet = false;
142
143 bool m_dryRun{false};
144 bool m_dryRunHasBeenSet = false;
145
146 LockMode m_lockMode{LockMode::NOT_SET};
147 bool m_lockModeHasBeenSet = false;
148
149 int m_coolOffPeriod{0};
150 bool m_coolOffPeriodHasBeenSet = false;
151
152 int m_lockDuration{0};
153 bool m_lockDurationHasBeenSet = false;
154
155 Aws::Utils::DateTime m_expirationDate{};
156 bool m_expirationDateHasBeenSet = false;
157 };
158
159} // namespace Model
160} // namespace EC2
161} // 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