AWS SDK for C++

AWS SDK for C++ Version 1.11.440

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();
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 inline void SetSnapshotId(const Aws::String& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = value; }
48 inline void SetSnapshotId(Aws::String&& value) { m_snapshotIdHasBeenSet = true; m_snapshotId = std::move(value); }
49 inline void SetSnapshotId(const char* value) { m_snapshotIdHasBeenSet = true; m_snapshotId.assign(value); }
50 inline LockSnapshotRequest& WithSnapshotId(const Aws::String& value) { SetSnapshotId(value); return *this;}
51 inline LockSnapshotRequest& WithSnapshotId(Aws::String&& value) { SetSnapshotId(std::move(value)); return *this;}
52 inline LockSnapshotRequest& WithSnapshotId(const char* value) { SetSnapshotId(value); return *this;}
54
56
62 inline bool GetDryRun() const{ return m_dryRun; }
63 inline bool DryRunHasBeenSet() const { return m_dryRunHasBeenSet; }
64 inline void SetDryRun(bool value) { m_dryRunHasBeenSet = true; m_dryRun = value; }
65 inline LockSnapshotRequest& WithDryRun(bool value) { SetDryRun(value); return *this;}
67
69
87 inline const LockMode& GetLockMode() const{ return m_lockMode; }
88 inline bool LockModeHasBeenSet() const { return m_lockModeHasBeenSet; }
89 inline void SetLockMode(const LockMode& value) { m_lockModeHasBeenSet = true; m_lockMode = value; }
90 inline void SetLockMode(LockMode&& value) { m_lockModeHasBeenSet = true; m_lockMode = std::move(value); }
91 inline LockSnapshotRequest& WithLockMode(const LockMode& value) { SetLockMode(value); return *this;}
92 inline LockSnapshotRequest& WithLockMode(LockMode&& value) { SetLockMode(std::move(value)); return *this;}
94
96
110 inline int GetCoolOffPeriod() const{ return m_coolOffPeriod; }
111 inline bool CoolOffPeriodHasBeenSet() const { return m_coolOffPeriodHasBeenSet; }
112 inline void SetCoolOffPeriod(int value) { m_coolOffPeriodHasBeenSet = true; m_coolOffPeriod = value; }
113 inline LockSnapshotRequest& WithCoolOffPeriod(int value) { SetCoolOffPeriod(value); return *this;}
115
117
123 inline int GetLockDuration() const{ return m_lockDuration; }
124 inline bool LockDurationHasBeenSet() const { return m_lockDurationHasBeenSet; }
125 inline void SetLockDuration(int value) { m_lockDurationHasBeenSet = true; m_lockDuration = value; }
126 inline LockSnapshotRequest& WithLockDuration(int value) { SetLockDuration(value); return *this;}
128
130
135 inline const Aws::Utils::DateTime& GetExpirationDate() const{ return m_expirationDate; }
136 inline bool ExpirationDateHasBeenSet() const { return m_expirationDateHasBeenSet; }
137 inline void SetExpirationDate(const Aws::Utils::DateTime& value) { m_expirationDateHasBeenSet = true; m_expirationDate = value; }
138 inline void SetExpirationDate(Aws::Utils::DateTime&& value) { m_expirationDateHasBeenSet = true; m_expirationDate = std::move(value); }
140 inline LockSnapshotRequest& WithExpirationDate(Aws::Utils::DateTime&& value) { SetExpirationDate(std::move(value)); return *this;}
142 private:
143
144 Aws::String m_snapshotId;
145 bool m_snapshotIdHasBeenSet = false;
146
147 bool m_dryRun;
148 bool m_dryRunHasBeenSet = false;
149
150 LockMode m_lockMode;
151 bool m_lockModeHasBeenSet = false;
152
153 int m_coolOffPeriod;
154 bool m_coolOffPeriodHasBeenSet = false;
155
156 int m_lockDuration;
157 bool m_lockDurationHasBeenSet = false;
158
159 Aws::Utils::DateTime m_expirationDate;
160 bool m_expirationDateHasBeenSet = false;
161 };
162
163} // namespace Model
164} // namespace EC2
165} // namespace Aws
LockSnapshotRequest & WithCoolOffPeriod(int value)
const Aws::String & GetSnapshotId() const
const Aws::Utils::DateTime & GetExpirationDate() const
void SetSnapshotId(Aws::String &&value)
LockSnapshotRequest & WithSnapshotId(Aws::String &&value)
LockSnapshotRequest & WithSnapshotId(const char *value)
AWS_EC2_API void DumpBodyToUrl(Aws::Http::URI &uri) const override
LockSnapshotRequest & WithSnapshotId(const Aws::String &value)
LockSnapshotRequest & WithDryRun(bool value)
LockSnapshotRequest & WithLockMode(LockMode &&value)
LockSnapshotRequest & WithLockDuration(int value)
virtual const char * GetServiceRequestName() const override
void SetExpirationDate(const Aws::Utils::DateTime &value)
LockSnapshotRequest & WithExpirationDate(Aws::Utils::DateTime &&value)
void SetLockMode(const LockMode &value)
LockSnapshotRequest & WithExpirationDate(const Aws::Utils::DateTime &value)
LockSnapshotRequest & WithLockMode(const LockMode &value)
void SetExpirationDate(Aws::Utils::DateTime &&value)
void SetSnapshotId(const Aws::String &value)
AWS_EC2_API Aws::String SerializePayload() const override
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String