AWS SDK for C++

AWS SDK for C++ Version 1.11.717

Loading...
Searching...
No Matches
ImageUsageReport.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSStreamFwd.h>
9#include <aws/core/utils/memory/stl/AWSString.h>
10#include <aws/core/utils/memory/stl/AWSVector.h>
11#include <aws/ec2/EC2_EXPORTS.h>
12#include <aws/ec2/model/ImageUsageResourceType.h>
13#include <aws/ec2/model/Tag.h>
14
15#include <utility>
16
17namespace Aws {
18namespace Utils {
19namespace Xml {
20class XmlNode;
21} // namespace Xml
22} // namespace Utils
23namespace EC2 {
24namespace Model {
25
33 public:
34 AWS_EC2_API ImageUsageReport() = default;
35 AWS_EC2_API ImageUsageReport(const Aws::Utils::Xml::XmlNode& xmlNode);
37
38 AWS_EC2_API void OutputToStream(Aws::OStream& ostream, const char* location, unsigned index, const char* locationValue) const;
39 AWS_EC2_API void OutputToStream(Aws::OStream& oStream, const char* location) const;
40
42
45 inline const Aws::String& GetImageId() const { return m_imageId; }
46 inline bool ImageIdHasBeenSet() const { return m_imageIdHasBeenSet; }
47 template <typename ImageIdT = Aws::String>
48 void SetImageId(ImageIdT&& value) {
49 m_imageIdHasBeenSet = true;
50 m_imageId = std::forward<ImageIdT>(value);
51 }
52 template <typename ImageIdT = Aws::String>
53 ImageUsageReport& WithImageId(ImageIdT&& value) {
54 SetImageId(std::forward<ImageIdT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetReportId() const { return m_reportId; }
64 inline bool ReportIdHasBeenSet() const { return m_reportIdHasBeenSet; }
65 template <typename ReportIdT = Aws::String>
66 void SetReportId(ReportIdT&& value) {
67 m_reportIdHasBeenSet = true;
68 m_reportId = std::forward<ReportIdT>(value);
69 }
70 template <typename ReportIdT = Aws::String>
71 ImageUsageReport& WithReportId(ReportIdT&& value) {
72 SetReportId(std::forward<ReportIdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::Vector<ImageUsageResourceType>& GetResourceTypes() const { return m_resourceTypes; }
82 inline bool ResourceTypesHasBeenSet() const { return m_resourceTypesHasBeenSet; }
83 template <typename ResourceTypesT = Aws::Vector<ImageUsageResourceType>>
84 void SetResourceTypes(ResourceTypesT&& value) {
85 m_resourceTypesHasBeenSet = true;
86 m_resourceTypes = std::forward<ResourceTypesT>(value);
87 }
88 template <typename ResourceTypesT = Aws::Vector<ImageUsageResourceType>>
89 ImageUsageReport& WithResourceTypes(ResourceTypesT&& value) {
90 SetResourceTypes(std::forward<ResourceTypesT>(value));
91 return *this;
92 }
93 template <typename ResourceTypesT = ImageUsageResourceType>
94 ImageUsageReport& AddResourceTypes(ResourceTypesT&& value) {
95 m_resourceTypesHasBeenSet = true;
96 m_resourceTypes.emplace_back(std::forward<ResourceTypesT>(value));
97 return *this;
98 }
100
102
106 inline const Aws::Vector<Aws::String>& GetAccountIds() const { return m_accountIds; }
107 inline bool AccountIdsHasBeenSet() const { return m_accountIdsHasBeenSet; }
108 template <typename AccountIdsT = Aws::Vector<Aws::String>>
109 void SetAccountIds(AccountIdsT&& value) {
110 m_accountIdsHasBeenSet = true;
111 m_accountIds = std::forward<AccountIdsT>(value);
112 }
113 template <typename AccountIdsT = Aws::Vector<Aws::String>>
114 ImageUsageReport& WithAccountIds(AccountIdsT&& value) {
115 SetAccountIds(std::forward<AccountIdsT>(value));
116 return *this;
117 }
118 template <typename AccountIdsT = Aws::String>
119 ImageUsageReport& AddAccountIds(AccountIdsT&& value) {
120 m_accountIdsHasBeenSet = true;
121 m_accountIds.emplace_back(std::forward<AccountIdsT>(value));
122 return *this;
123 }
125
127
134 inline const Aws::String& GetState() const { return m_state; }
135 inline bool StateHasBeenSet() const { return m_stateHasBeenSet; }
136 template <typename StateT = Aws::String>
137 void SetState(StateT&& value) {
138 m_stateHasBeenSet = true;
139 m_state = std::forward<StateT>(value);
140 }
141 template <typename StateT = Aws::String>
142 ImageUsageReport& WithState(StateT&& value) {
143 SetState(std::forward<StateT>(value));
144 return *this;
145 }
147
149
153 inline const Aws::String& GetStateReason() const { return m_stateReason; }
154 inline bool StateReasonHasBeenSet() const { return m_stateReasonHasBeenSet; }
155 template <typename StateReasonT = Aws::String>
156 void SetStateReason(StateReasonT&& value) {
157 m_stateReasonHasBeenSet = true;
158 m_stateReason = std::forward<StateReasonT>(value);
159 }
160 template <typename StateReasonT = Aws::String>
161 ImageUsageReport& WithStateReason(StateReasonT&& value) {
162 SetStateReason(std::forward<StateReasonT>(value));
163 return *this;
164 }
166
168
171 inline const Aws::Utils::DateTime& GetCreationTime() const { return m_creationTime; }
172 inline bool CreationTimeHasBeenSet() const { return m_creationTimeHasBeenSet; }
173 template <typename CreationTimeT = Aws::Utils::DateTime>
174 void SetCreationTime(CreationTimeT&& value) {
175 m_creationTimeHasBeenSet = true;
176 m_creationTime = std::forward<CreationTimeT>(value);
177 }
178 template <typename CreationTimeT = Aws::Utils::DateTime>
179 ImageUsageReport& WithCreationTime(CreationTimeT&& value) {
180 SetCreationTime(std::forward<CreationTimeT>(value));
181 return *this;
182 }
184
186
190 inline const Aws::Utils::DateTime& GetExpirationTime() const { return m_expirationTime; }
191 inline bool ExpirationTimeHasBeenSet() const { return m_expirationTimeHasBeenSet; }
192 template <typename ExpirationTimeT = Aws::Utils::DateTime>
193 void SetExpirationTime(ExpirationTimeT&& value) {
194 m_expirationTimeHasBeenSet = true;
195 m_expirationTime = std::forward<ExpirationTimeT>(value);
196 }
197 template <typename ExpirationTimeT = Aws::Utils::DateTime>
198 ImageUsageReport& WithExpirationTime(ExpirationTimeT&& value) {
199 SetExpirationTime(std::forward<ExpirationTimeT>(value));
200 return *this;
201 }
203
205
208 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
209 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
210 template <typename TagsT = Aws::Vector<Tag>>
211 void SetTags(TagsT&& value) {
212 m_tagsHasBeenSet = true;
213 m_tags = std::forward<TagsT>(value);
214 }
215 template <typename TagsT = Aws::Vector<Tag>>
216 ImageUsageReport& WithTags(TagsT&& value) {
217 SetTags(std::forward<TagsT>(value));
218 return *this;
219 }
220 template <typename TagsT = Tag>
221 ImageUsageReport& AddTags(TagsT&& value) {
222 m_tagsHasBeenSet = true;
223 m_tags.emplace_back(std::forward<TagsT>(value));
224 return *this;
225 }
227 private:
228 Aws::String m_imageId;
229
230 Aws::String m_reportId;
231
233
234 Aws::Vector<Aws::String> m_accountIds;
235
236 Aws::String m_state;
237
238 Aws::String m_stateReason;
239
240 Aws::Utils::DateTime m_creationTime{};
241
242 Aws::Utils::DateTime m_expirationTime{};
243
244 Aws::Vector<Tag> m_tags;
245 bool m_imageIdHasBeenSet = false;
246 bool m_reportIdHasBeenSet = false;
247 bool m_resourceTypesHasBeenSet = false;
248 bool m_accountIdsHasBeenSet = false;
249 bool m_stateHasBeenSet = false;
250 bool m_stateReasonHasBeenSet = false;
251 bool m_creationTimeHasBeenSet = false;
252 bool m_expirationTimeHasBeenSet = false;
253 bool m_tagsHasBeenSet = false;
254};
255
256} // namespace Model
257} // namespace EC2
258} // namespace Aws
AWS_EC2_API void OutputToStream(Aws::OStream &ostream, const char *location, unsigned index, const char *locationValue) const
const Aws::Utils::DateTime & GetExpirationTime() const
const Aws::Utils::DateTime & GetCreationTime() const
AWS_EC2_API void OutputToStream(Aws::OStream &oStream, const char *location) const
ImageUsageReport & WithCreationTime(CreationTimeT &&value)
ImageUsageReport & AddTags(TagsT &&value)
void SetImageId(ImageIdT &&value)
ImageUsageReport & WithResourceTypes(ResourceTypesT &&value)
ImageUsageReport & WithExpirationTime(ExpirationTimeT &&value)
const Aws::String & GetReportId() const
void SetResourceTypes(ResourceTypesT &&value)
ImageUsageReport & WithImageId(ImageIdT &&value)
void SetReportId(ReportIdT &&value)
const Aws::String & GetState() const
void SetCreationTime(CreationTimeT &&value)
ImageUsageReport & WithAccountIds(AccountIdsT &&value)
ImageUsageReport & WithStateReason(StateReasonT &&value)
AWS_EC2_API ImageUsageReport()=default
void SetAccountIds(AccountIdsT &&value)
AWS_EC2_API ImageUsageReport(const Aws::Utils::Xml::XmlNode &xmlNode)
AWS_EC2_API ImageUsageReport & operator=(const Aws::Utils::Xml::XmlNode &xmlNode)
const Aws::Vector< Aws::String > & GetAccountIds() const
ImageUsageReport & WithReportId(ReportIdT &&value)
const Aws::Vector< ImageUsageResourceType > & GetResourceTypes() const
void SetExpirationTime(ExpirationTimeT &&value)
ImageUsageReport & WithState(StateT &&value)
void SetStateReason(StateReasonT &&value)
const Aws::String & GetImageId() const
ImageUsageReport & AddResourceTypes(ResourceTypesT &&value)
ImageUsageReport & WithTags(TagsT &&value)
const Aws::Vector< Tag > & GetTags() const
ImageUsageReport & AddAccountIds(AccountIdsT &&value)
const Aws::String & GetStateReason() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
std::basic_ostream< char, std::char_traits< char > > OStream