AWS SDK for C++

AWS SDK for C++ Version 1.11.716

Loading...
Searching...
No Matches
Snapshot.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/fsx/FSx_EXPORTS.h>
11#include <aws/fsx/model/AdministrativeAction.h>
12#include <aws/fsx/model/LifecycleTransitionReason.h>
13#include <aws/fsx/model/SnapshotLifecycle.h>
14#include <aws/fsx/model/Tag.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace FSx {
26namespace Model {
27class AdministrativeAction;
28
34class Snapshot {
35 public:
36 AWS_FSX_API Snapshot() = default;
37 AWS_FSX_API Snapshot(Aws::Utils::Json::JsonView jsonValue);
40
42
43 inline const Aws::String& GetResourceARN() const { return m_resourceARN; }
44 inline bool ResourceARNHasBeenSet() const { return m_resourceARNHasBeenSet; }
45 template <typename ResourceARNT = Aws::String>
46 void SetResourceARN(ResourceARNT&& value) {
47 m_resourceARNHasBeenSet = true;
48 m_resourceARN = std::forward<ResourceARNT>(value);
49 }
50 template <typename ResourceARNT = Aws::String>
51 Snapshot& WithResourceARN(ResourceARNT&& value) {
52 SetResourceARN(std::forward<ResourceARNT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetSnapshotId() const { return m_snapshotId; }
62 inline bool SnapshotIdHasBeenSet() const { return m_snapshotIdHasBeenSet; }
63 template <typename SnapshotIdT = Aws::String>
64 void SetSnapshotId(SnapshotIdT&& value) {
65 m_snapshotIdHasBeenSet = true;
66 m_snapshotId = std::forward<SnapshotIdT>(value);
67 }
68 template <typename SnapshotIdT = Aws::String>
69 Snapshot& WithSnapshotId(SnapshotIdT&& value) {
70 SetSnapshotId(std::forward<SnapshotIdT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetName() const { return m_name; }
80 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
81 template <typename NameT = Aws::String>
82 void SetName(NameT&& value) {
83 m_nameHasBeenSet = true;
84 m_name = std::forward<NameT>(value);
85 }
86 template <typename NameT = Aws::String>
87 Snapshot& WithName(NameT&& value) {
88 SetName(std::forward<NameT>(value));
89 return *this;
90 }
92
94
97 inline const Aws::String& GetVolumeId() const { return m_volumeId; }
98 inline bool VolumeIdHasBeenSet() const { return m_volumeIdHasBeenSet; }
99 template <typename VolumeIdT = Aws::String>
100 void SetVolumeId(VolumeIdT&& value) {
101 m_volumeIdHasBeenSet = true;
102 m_volumeId = std::forward<VolumeIdT>(value);
103 }
104 template <typename VolumeIdT = Aws::String>
105 Snapshot& WithVolumeId(VolumeIdT&& value) {
106 SetVolumeId(std::forward<VolumeIdT>(value));
107 return *this;
108 }
110
112
113 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
114 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
115 template <typename CreationTimeT = Aws::Utils::DateTime>
116 void SetCreationTime(CreationTimeT&& value) {
117 m_creationTimeHasBeenSet = true;
118 m_creationTime = std::forward<CreationTimeT>(value);
119 }
120 template <typename CreationTimeT = Aws::Utils::DateTime>
121 Snapshot& WithCreationTime(CreationTimeT&& value) {
122 SetCreationTime(std::forward<CreationTimeT>(value));
123 return *this;
124 }
126
128
135 inline SnapshotLifecycle GetLifecycle() const { return m_lifecycle; }
136 inline bool LifecycleHasBeenSet() const { return m_lifecycleHasBeenSet; }
137 inline void SetLifecycle(SnapshotLifecycle value) {
138 m_lifecycleHasBeenSet = true;
139 m_lifecycle = value;
140 }
142 SetLifecycle(value);
143 return *this;
144 }
146
148
149 inline const LifecycleTransitionReason& GetLifecycleTransitionReason() const { return m_lifecycleTransitionReason; }
150 inline bool LifecycleTransitionReasonHasBeenSet() const { return m_lifecycleTransitionReasonHasBeenSet; }
151 template <typename LifecycleTransitionReasonT = LifecycleTransitionReason>
152 void SetLifecycleTransitionReason(LifecycleTransitionReasonT&& value) {
153 m_lifecycleTransitionReasonHasBeenSet = true;
154 m_lifecycleTransitionReason = std::forward<LifecycleTransitionReasonT>(value);
155 }
156 template <typename LifecycleTransitionReasonT = LifecycleTransitionReason>
157 Snapshot& WithLifecycleTransitionReason(LifecycleTransitionReasonT&& value) {
158 SetLifecycleTransitionReason(std::forward<LifecycleTransitionReasonT>(value));
159 return *this;
160 }
162
164
165 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
166 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
167 template <typename TagsT = Aws::Vector<Tag>>
168 void SetTags(TagsT&& value) {
169 m_tagsHasBeenSet = true;
170 m_tags = std::forward<TagsT>(value);
171 }
172 template <typename TagsT = Aws::Vector<Tag>>
173 Snapshot& WithTags(TagsT&& value) {
174 SetTags(std::forward<TagsT>(value));
175 return *this;
176 }
177 template <typename TagsT = Tag>
178 Snapshot& AddTags(TagsT&& value) {
179 m_tagsHasBeenSet = true;
180 m_tags.emplace_back(std::forward<TagsT>(value));
181 return *this;
182 }
184
186
191 inline const Aws::Vector<AdministrativeAction>& GetAdministrativeActions() const { return m_administrativeActions; }
192 inline bool AdministrativeActionsHasBeenSet() const { return m_administrativeActionsHasBeenSet; }
193 template <typename AdministrativeActionsT = Aws::Vector<AdministrativeAction>>
194 void SetAdministrativeActions(AdministrativeActionsT&& value) {
195 m_administrativeActionsHasBeenSet = true;
196 m_administrativeActions = std::forward<AdministrativeActionsT>(value);
197 }
198 template <typename AdministrativeActionsT = Aws::Vector<AdministrativeAction>>
199 Snapshot& WithAdministrativeActions(AdministrativeActionsT&& value) {
200 SetAdministrativeActions(std::forward<AdministrativeActionsT>(value));
201 return *this;
202 }
203 template <typename AdministrativeActionsT = AdministrativeAction>
204 Snapshot& AddAdministrativeActions(AdministrativeActionsT&& value) {
205 m_administrativeActionsHasBeenSet = true;
206 m_administrativeActions.emplace_back(std::forward<AdministrativeActionsT>(value));
207 return *this;
208 }
210 private:
211 Aws::String m_resourceARN;
212
213 Aws::String m_snapshotId;
214
215 Aws::String m_name;
216
217 Aws::String m_volumeId;
218
219 Aws::Utils::DateTime m_creationTime{};
220
222
223 LifecycleTransitionReason m_lifecycleTransitionReason;
224
225 Aws::Vector<Tag> m_tags;
226
227 Aws::Vector<AdministrativeAction> m_administrativeActions;
228 bool m_resourceARNHasBeenSet = false;
229 bool m_snapshotIdHasBeenSet = false;
230 bool m_nameHasBeenSet = false;
231 bool m_volumeIdHasBeenSet = false;
232 bool m_creationTimeHasBeenSet = false;
233 bool m_lifecycleHasBeenSet = false;
234 bool m_lifecycleTransitionReasonHasBeenSet = false;
235 bool m_tagsHasBeenSet = false;
236 bool m_administrativeActionsHasBeenSet = false;
237};
238
239} // namespace Model
240} // namespace FSx
241} // namespace Aws
void SetLifecycle(SnapshotLifecycle value)
Definition Snapshot.h:137
const Aws::String & GetName() const
Definition Snapshot.h:79
bool TagsHasBeenSet() const
Definition Snapshot.h:166
AWS_FSX_API Snapshot(Aws::Utils::Json::JsonView jsonValue)
void SetSnapshotId(SnapshotIdT &&value)
Definition Snapshot.h:64
void SetCreationTime(CreationTimeT &&value)
Definition Snapshot.h:116
const Aws::Utils::DateTime & GetCreationTime() const
Definition Snapshot.h:113
const LifecycleTransitionReason & GetLifecycleTransitionReason() const
Definition Snapshot.h:149
void SetName(NameT &&value)
Definition Snapshot.h:82
const Aws::Vector< AdministrativeAction > & GetAdministrativeActions() const
Definition Snapshot.h:191
Snapshot & WithSnapshotId(SnapshotIdT &&value)
Definition Snapshot.h:69
bool AdministrativeActionsHasBeenSet() const
Definition Snapshot.h:192
void SetLifecycleTransitionReason(LifecycleTransitionReasonT &&value)
Definition Snapshot.h:152
bool SnapshotIdHasBeenSet() const
Definition Snapshot.h:62
void SetTags(TagsT &&value)
Definition Snapshot.h:168
Snapshot & AddTags(TagsT &&value)
Definition Snapshot.h:178
Snapshot & WithTags(TagsT &&value)
Definition Snapshot.h:173
Snapshot & WithName(NameT &&value)
Definition Snapshot.h:87
Snapshot & WithVolumeId(VolumeIdT &&value)
Definition Snapshot.h:105
Snapshot & WithLifecycle(SnapshotLifecycle value)
Definition Snapshot.h:141
SnapshotLifecycle GetLifecycle() const
Definition Snapshot.h:135
bool LifecycleHasBeenSet() const
Definition Snapshot.h:136
Snapshot & WithLifecycleTransitionReason(LifecycleTransitionReasonT &&value)
Definition Snapshot.h:157
bool VolumeIdHasBeenSet() const
Definition Snapshot.h:98
void SetResourceARN(ResourceARNT &&value)
Definition Snapshot.h:46
AWS_FSX_API Snapshot()=default
AWS_FSX_API Snapshot & operator=(Aws::Utils::Json::JsonView jsonValue)
const Aws::String & GetResourceARN() const
Definition Snapshot.h:43
Snapshot & WithCreationTime(CreationTimeT &&value)
Definition Snapshot.h:121
bool LifecycleTransitionReasonHasBeenSet() const
Definition Snapshot.h:150
bool CreationTimeHasBeenSet() const
Definition Snapshot.h:114
bool ResourceARNHasBeenSet() const
Definition Snapshot.h:44
const Aws::String & GetVolumeId() const
Definition Snapshot.h:97
void SetAdministrativeActions(AdministrativeActionsT &&value)
Definition Snapshot.h:194
bool NameHasBeenSet() const
Definition Snapshot.h:80
AWS_FSX_API Aws::Utils::Json::JsonValue Jsonize() const
Snapshot & AddAdministrativeActions(AdministrativeActionsT &&value)
Definition Snapshot.h:204
const Aws::String & GetSnapshotId() const
Definition Snapshot.h:61
const Aws::Vector< Tag > & GetTags() const
Definition Snapshot.h:165
Snapshot & WithAdministrativeActions(AdministrativeActionsT &&value)
Definition Snapshot.h:199
void SetVolumeId(VolumeIdT &&value)
Definition Snapshot.h:100
Snapshot & WithResourceARN(ResourceARNT &&value)
Definition Snapshot.h:51
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue