AWS SDK for C++

AWS SDK for C++ Version 1.11.759

Loading...
Searching...
No Matches
IdleRecommendation.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/compute-optimizer/model/IdleFinding.h>
9#include <aws/compute-optimizer/model/IdleRecommendationResourceType.h>
10#include <aws/compute-optimizer/model/IdleSavingsOpportunity.h>
11#include <aws/compute-optimizer/model/IdleSavingsOpportunityAfterDiscounts.h>
12#include <aws/compute-optimizer/model/IdleUtilizationMetric.h>
13#include <aws/compute-optimizer/model/Tag.h>
14#include <aws/core/utils/DateTime.h>
15#include <aws/core/utils/memory/stl/AWSString.h>
16#include <aws/core/utils/memory/stl/AWSVector.h>
17
18#include <utility>
19
20namespace Aws {
21namespace Utils {
22namespace Json {
23class JsonValue;
24class JsonView;
25} // namespace Json
26} // namespace Utils
27namespace ComputeOptimizer {
28namespace Model {
29
36 public:
37 AWS_COMPUTEOPTIMIZER_API IdleRecommendation() = default;
38 AWS_COMPUTEOPTIMIZER_API IdleRecommendation(Aws::Utils::Json::JsonView jsonValue);
39 AWS_COMPUTEOPTIMIZER_API IdleRecommendation& operator=(Aws::Utils::Json::JsonView jsonValue);
40 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
41
43
46 inline const Aws::String& GetResourceArn() const { return m_resourceArn; }
47 inline bool ResourceArnHasBeenSet() const { return m_resourceArnHasBeenSet; }
48 template <typename ResourceArnT = Aws::String>
49 void SetResourceArn(ResourceArnT&& value) {
50 m_resourceArnHasBeenSet = true;
51 m_resourceArn = std::forward<ResourceArnT>(value);
52 }
53 template <typename ResourceArnT = Aws::String>
54 IdleRecommendation& WithResourceArn(ResourceArnT&& value) {
55 SetResourceArn(std::forward<ResourceArnT>(value));
56 return *this;
57 }
59
61
64 inline const Aws::String& GetResourceId() const { return m_resourceId; }
65 inline bool ResourceIdHasBeenSet() const { return m_resourceIdHasBeenSet; }
66 template <typename ResourceIdT = Aws::String>
67 void SetResourceId(ResourceIdT&& value) {
68 m_resourceIdHasBeenSet = true;
69 m_resourceId = std::forward<ResourceIdT>(value);
70 }
71 template <typename ResourceIdT = Aws::String>
72 IdleRecommendation& WithResourceId(ResourceIdT&& value) {
73 SetResourceId(std::forward<ResourceIdT>(value));
74 return *this;
75 }
77
79
82 inline IdleRecommendationResourceType GetResourceType() const { return m_resourceType; }
83 inline bool ResourceTypeHasBeenSet() const { return m_resourceTypeHasBeenSet; }
85 m_resourceTypeHasBeenSet = true;
86 m_resourceType = value;
87 }
89 SetResourceType(value);
90 return *this;
91 }
93
95
98 inline const Aws::String& GetAccountId() const { return m_accountId; }
99 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
100 template <typename AccountIdT = Aws::String>
101 void SetAccountId(AccountIdT&& value) {
102 m_accountIdHasBeenSet = true;
103 m_accountId = std::forward<AccountIdT>(value);
104 }
105 template <typename AccountIdT = Aws::String>
106 IdleRecommendation& WithAccountId(AccountIdT&& value) {
107 SetAccountId(std::forward<AccountIdT>(value));
108 return *this;
109 }
111
113
116 inline IdleFinding GetFinding() const { return m_finding; }
117 inline bool FindingHasBeenSet() const { return m_findingHasBeenSet; }
118 inline void SetFinding(IdleFinding value) {
119 m_findingHasBeenSet = true;
120 m_finding = value;
121 }
123 SetFinding(value);
124 return *this;
125 }
127
129
132 inline const Aws::String& GetFindingDescription() const { return m_findingDescription; }
133 inline bool FindingDescriptionHasBeenSet() const { return m_findingDescriptionHasBeenSet; }
134 template <typename FindingDescriptionT = Aws::String>
135 void SetFindingDescription(FindingDescriptionT&& value) {
136 m_findingDescriptionHasBeenSet = true;
137 m_findingDescription = std::forward<FindingDescriptionT>(value);
138 }
139 template <typename FindingDescriptionT = Aws::String>
140 IdleRecommendation& WithFindingDescription(FindingDescriptionT&& value) {
141 SetFindingDescription(std::forward<FindingDescriptionT>(value));
142 return *this;
143 }
145
147
150 inline const IdleSavingsOpportunity& GetSavingsOpportunity() const { return m_savingsOpportunity; }
151 inline bool SavingsOpportunityHasBeenSet() const { return m_savingsOpportunityHasBeenSet; }
152 template <typename SavingsOpportunityT = IdleSavingsOpportunity>
153 void SetSavingsOpportunity(SavingsOpportunityT&& value) {
154 m_savingsOpportunityHasBeenSet = true;
155 m_savingsOpportunity = std::forward<SavingsOpportunityT>(value);
156 }
157 template <typename SavingsOpportunityT = IdleSavingsOpportunity>
158 IdleRecommendation& WithSavingsOpportunity(SavingsOpportunityT&& value) {
159 SetSavingsOpportunity(std::forward<SavingsOpportunityT>(value));
160 return *this;
161 }
163
165
170 return m_savingsOpportunityAfterDiscounts;
171 }
172 inline bool SavingsOpportunityAfterDiscountsHasBeenSet() const { return m_savingsOpportunityAfterDiscountsHasBeenSet; }
173 template <typename SavingsOpportunityAfterDiscountsT = IdleSavingsOpportunityAfterDiscounts>
174 void SetSavingsOpportunityAfterDiscounts(SavingsOpportunityAfterDiscountsT&& value) {
175 m_savingsOpportunityAfterDiscountsHasBeenSet = true;
176 m_savingsOpportunityAfterDiscounts = std::forward<SavingsOpportunityAfterDiscountsT>(value);
177 }
178 template <typename SavingsOpportunityAfterDiscountsT = IdleSavingsOpportunityAfterDiscounts>
179 IdleRecommendation& WithSavingsOpportunityAfterDiscounts(SavingsOpportunityAfterDiscountsT&& value) {
180 SetSavingsOpportunityAfterDiscounts(std::forward<SavingsOpportunityAfterDiscountsT>(value));
181 return *this;
182 }
184
186
190 inline const Aws::Vector<IdleUtilizationMetric>& GetUtilizationMetrics() const { return m_utilizationMetrics; }
191 inline bool UtilizationMetricsHasBeenSet() const { return m_utilizationMetricsHasBeenSet; }
192 template <typename UtilizationMetricsT = Aws::Vector<IdleUtilizationMetric>>
193 void SetUtilizationMetrics(UtilizationMetricsT&& value) {
194 m_utilizationMetricsHasBeenSet = true;
195 m_utilizationMetrics = std::forward<UtilizationMetricsT>(value);
196 }
197 template <typename UtilizationMetricsT = Aws::Vector<IdleUtilizationMetric>>
198 IdleRecommendation& WithUtilizationMetrics(UtilizationMetricsT&& value) {
199 SetUtilizationMetrics(std::forward<UtilizationMetricsT>(value));
200 return *this;
201 }
202 template <typename UtilizationMetricsT = IdleUtilizationMetric>
203 IdleRecommendation& AddUtilizationMetrics(UtilizationMetricsT&& value) {
204 m_utilizationMetricsHasBeenSet = true;
205 m_utilizationMetrics.emplace_back(std::forward<UtilizationMetricsT>(value));
206 return *this;
207 }
209
211
214 inline double GetLookBackPeriodInDays() const { return m_lookBackPeriodInDays; }
215 inline bool LookBackPeriodInDaysHasBeenSet() const { return m_lookBackPeriodInDaysHasBeenSet; }
216 inline void SetLookBackPeriodInDays(double value) {
217 m_lookBackPeriodInDaysHasBeenSet = true;
218 m_lookBackPeriodInDays = value;
219 }
222 return *this;
223 }
225
227
231 inline const Aws::Utils::DateTime& GetLastRefreshTimestamp() const { return m_lastRefreshTimestamp; }
232 inline bool LastRefreshTimestampHasBeenSet() const { return m_lastRefreshTimestampHasBeenSet; }
233 template <typename LastRefreshTimestampT = Aws::Utils::DateTime>
234 void SetLastRefreshTimestamp(LastRefreshTimestampT&& value) {
235 m_lastRefreshTimestampHasBeenSet = true;
236 m_lastRefreshTimestamp = std::forward<LastRefreshTimestampT>(value);
237 }
238 template <typename LastRefreshTimestampT = Aws::Utils::DateTime>
239 IdleRecommendation& WithLastRefreshTimestamp(LastRefreshTimestampT&& value) {
240 SetLastRefreshTimestamp(std::forward<LastRefreshTimestampT>(value));
241 return *this;
242 }
244
246
249 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
250 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
251 template <typename TagsT = Aws::Vector<Tag>>
252 void SetTags(TagsT&& value) {
253 m_tagsHasBeenSet = true;
254 m_tags = std::forward<TagsT>(value);
255 }
256 template <typename TagsT = Aws::Vector<Tag>>
257 IdleRecommendation& WithTags(TagsT&& value) {
258 SetTags(std::forward<TagsT>(value));
259 return *this;
260 }
261 template <typename TagsT = Tag>
262 IdleRecommendation& AddTags(TagsT&& value) {
263 m_tagsHasBeenSet = true;
264 m_tags.emplace_back(std::forward<TagsT>(value));
265 return *this;
266 }
268 private:
269 Aws::String m_resourceArn;
270
271 Aws::String m_resourceId;
272
274
275 Aws::String m_accountId;
276
278
279 Aws::String m_findingDescription;
280
281 IdleSavingsOpportunity m_savingsOpportunity;
282
283 IdleSavingsOpportunityAfterDiscounts m_savingsOpportunityAfterDiscounts;
284
285 Aws::Vector<IdleUtilizationMetric> m_utilizationMetrics;
286
287 double m_lookBackPeriodInDays{0.0};
288
289 Aws::Utils::DateTime m_lastRefreshTimestamp{};
290
291 Aws::Vector<Tag> m_tags;
292 bool m_resourceArnHasBeenSet = false;
293 bool m_resourceIdHasBeenSet = false;
294 bool m_resourceTypeHasBeenSet = false;
295 bool m_accountIdHasBeenSet = false;
296 bool m_findingHasBeenSet = false;
297 bool m_findingDescriptionHasBeenSet = false;
298 bool m_savingsOpportunityHasBeenSet = false;
299 bool m_savingsOpportunityAfterDiscountsHasBeenSet = false;
300 bool m_utilizationMetricsHasBeenSet = false;
301 bool m_lookBackPeriodInDaysHasBeenSet = false;
302 bool m_lastRefreshTimestampHasBeenSet = false;
303 bool m_tagsHasBeenSet = false;
304};
305
306} // namespace Model
307} // namespace ComputeOptimizer
308} // namespace Aws
AWS_COMPUTEOPTIMIZER_API IdleRecommendation()=default
void SetUtilizationMetrics(UtilizationMetricsT &&value)
IdleRecommendation & AddUtilizationMetrics(UtilizationMetricsT &&value)
void SetResourceType(IdleRecommendationResourceType value)
void SetSavingsOpportunityAfterDiscounts(SavingsOpportunityAfterDiscountsT &&value)
IdleRecommendation & WithResourceId(ResourceIdT &&value)
IdleRecommendation & WithAccountId(AccountIdT &&value)
AWS_COMPUTEOPTIMIZER_API IdleRecommendation(Aws::Utils::Json::JsonView jsonValue)
const IdleSavingsOpportunity & GetSavingsOpportunity() const
IdleRecommendation & WithFinding(IdleFinding value)
AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_COMPUTEOPTIMIZER_API IdleRecommendation & operator=(Aws::Utils::Json::JsonView jsonValue)
IdleRecommendation & WithLookBackPeriodInDays(double value)
IdleRecommendation & WithFindingDescription(FindingDescriptionT &&value)
IdleRecommendationResourceType GetResourceType() const
IdleRecommendation & WithSavingsOpportunityAfterDiscounts(SavingsOpportunityAfterDiscountsT &&value)
IdleRecommendation & WithUtilizationMetrics(UtilizationMetricsT &&value)
void SetFindingDescription(FindingDescriptionT &&value)
IdleRecommendation & WithLastRefreshTimestamp(LastRefreshTimestampT &&value)
IdleRecommendation & WithSavingsOpportunity(SavingsOpportunityT &&value)
IdleRecommendation & WithResourceArn(ResourceArnT &&value)
void SetSavingsOpportunity(SavingsOpportunityT &&value)
const IdleSavingsOpportunityAfterDiscounts & GetSavingsOpportunityAfterDiscounts() const
IdleRecommendation & WithResourceType(IdleRecommendationResourceType value)
void SetLastRefreshTimestamp(LastRefreshTimestampT &&value)
const Aws::Utils::DateTime & GetLastRefreshTimestamp() const
IdleRecommendation & WithTags(TagsT &&value)
IdleRecommendation & AddTags(TagsT &&value)
const Aws::Vector< IdleUtilizationMetric > & GetUtilizationMetrics() const
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue