AWS SDK for C++

AWS SDK for C++ Version 1.11.755

Loading...
Searching...
No Matches
ECSServiceRecommendation.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/compute-optimizer/model/CurrentPerformanceRisk.h>
9#include <aws/compute-optimizer/model/ECSEffectiveRecommendationPreferences.h>
10#include <aws/compute-optimizer/model/ECSServiceLaunchType.h>
11#include <aws/compute-optimizer/model/ECSServiceRecommendationFinding.h>
12#include <aws/compute-optimizer/model/ECSServiceRecommendationFindingReasonCode.h>
13#include <aws/compute-optimizer/model/ECSServiceRecommendationOption.h>
14#include <aws/compute-optimizer/model/ECSServiceUtilizationMetric.h>
15#include <aws/compute-optimizer/model/ServiceConfiguration.h>
16#include <aws/compute-optimizer/model/Tag.h>
17#include <aws/core/utils/DateTime.h>
18#include <aws/core/utils/memory/stl/AWSString.h>
19#include <aws/core/utils/memory/stl/AWSVector.h>
20
21#include <utility>
22
23namespace Aws {
24namespace Utils {
25namespace Json {
26class JsonValue;
27class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace ComputeOptimizer {
31namespace Model {
32
40 public:
41 AWS_COMPUTEOPTIMIZER_API ECSServiceRecommendation() = default;
42 AWS_COMPUTEOPTIMIZER_API ECSServiceRecommendation(Aws::Utils::Json::JsonView jsonValue);
44 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
45
47
53 inline const Aws::String& GetServiceArn() const { return m_serviceArn; }
54 inline bool ServiceArnHasBeenSet() const { return m_serviceArnHasBeenSet; }
55 template <typename ServiceArnT = Aws::String>
56 void SetServiceArn(ServiceArnT&& value) {
57 m_serviceArnHasBeenSet = true;
58 m_serviceArn = std::forward<ServiceArnT>(value);
59 }
60 template <typename ServiceArnT = Aws::String>
62 SetServiceArn(std::forward<ServiceArnT>(value));
63 return *this;
64 }
66
68
71 inline const Aws::String& GetAccountId() const { return m_accountId; }
72 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
73 template <typename AccountIdT = Aws::String>
74 void SetAccountId(AccountIdT&& value) {
75 m_accountIdHasBeenSet = true;
76 m_accountId = std::forward<AccountIdT>(value);
77 }
78 template <typename AccountIdT = Aws::String>
80 SetAccountId(std::forward<AccountIdT>(value));
81 return *this;
82 }
84
86
89 inline const ServiceConfiguration& GetCurrentServiceConfiguration() const { return m_currentServiceConfiguration; }
90 inline bool CurrentServiceConfigurationHasBeenSet() const { return m_currentServiceConfigurationHasBeenSet; }
91 template <typename CurrentServiceConfigurationT = ServiceConfiguration>
92 void SetCurrentServiceConfiguration(CurrentServiceConfigurationT&& value) {
93 m_currentServiceConfigurationHasBeenSet = true;
94 m_currentServiceConfiguration = std::forward<CurrentServiceConfigurationT>(value);
95 }
96 template <typename CurrentServiceConfigurationT = ServiceConfiguration>
97 ECSServiceRecommendation& WithCurrentServiceConfiguration(CurrentServiceConfigurationT&& value) {
98 SetCurrentServiceConfiguration(std::forward<CurrentServiceConfigurationT>(value));
99 return *this;
100 }
102
104
108 inline const Aws::Vector<ECSServiceUtilizationMetric>& GetUtilizationMetrics() const { return m_utilizationMetrics; }
109 inline bool UtilizationMetricsHasBeenSet() const { return m_utilizationMetricsHasBeenSet; }
110 template <typename UtilizationMetricsT = Aws::Vector<ECSServiceUtilizationMetric>>
111 void SetUtilizationMetrics(UtilizationMetricsT&& value) {
112 m_utilizationMetricsHasBeenSet = true;
113 m_utilizationMetrics = std::forward<UtilizationMetricsT>(value);
114 }
115 template <typename UtilizationMetricsT = Aws::Vector<ECSServiceUtilizationMetric>>
116 ECSServiceRecommendation& WithUtilizationMetrics(UtilizationMetricsT&& value) {
117 SetUtilizationMetrics(std::forward<UtilizationMetricsT>(value));
118 return *this;
119 }
120 template <typename UtilizationMetricsT = ECSServiceUtilizationMetric>
121 ECSServiceRecommendation& AddUtilizationMetrics(UtilizationMetricsT&& value) {
122 m_utilizationMetricsHasBeenSet = true;
123 m_utilizationMetrics.emplace_back(std::forward<UtilizationMetricsT>(value));
124 return *this;
125 }
127
129
133 inline double GetLookbackPeriodInDays() const { return m_lookbackPeriodInDays; }
134 inline bool LookbackPeriodInDaysHasBeenSet() const { return m_lookbackPeriodInDaysHasBeenSet; }
135 inline void SetLookbackPeriodInDays(double value) {
136 m_lookbackPeriodInDaysHasBeenSet = true;
137 m_lookbackPeriodInDays = value;
138 }
141 return *this;
142 }
144
146
150 inline ECSServiceLaunchType GetLaunchType() const { return m_launchType; }
151 inline bool LaunchTypeHasBeenSet() const { return m_launchTypeHasBeenSet; }
153 m_launchTypeHasBeenSet = true;
154 m_launchType = value;
155 }
157 SetLaunchType(value);
158 return *this;
159 }
161
163
167 inline const Aws::Utils::DateTime& GetLastRefreshTimestamp() const { return m_lastRefreshTimestamp; }
168 inline bool LastRefreshTimestampHasBeenSet() const { return m_lastRefreshTimestampHasBeenSet; }
169 template <typename LastRefreshTimestampT = Aws::Utils::DateTime>
170 void SetLastRefreshTimestamp(LastRefreshTimestampT&& value) {
171 m_lastRefreshTimestampHasBeenSet = true;
172 m_lastRefreshTimestamp = std::forward<LastRefreshTimestampT>(value);
173 }
174 template <typename LastRefreshTimestampT = Aws::Utils::DateTime>
175 ECSServiceRecommendation& WithLastRefreshTimestamp(LastRefreshTimestampT&& value) {
176 SetLastRefreshTimestamp(std::forward<LastRefreshTimestampT>(value));
177 return *this;
178 }
180
182
195 inline ECSServiceRecommendationFinding GetFinding() const { return m_finding; }
196 inline bool FindingHasBeenSet() const { return m_findingHasBeenSet; }
198 m_findingHasBeenSet = true;
199 m_finding = value;
200 }
202 SetFinding(value);
203 return *this;
204 }
206
208
227 inline const Aws::Vector<ECSServiceRecommendationFindingReasonCode>& GetFindingReasonCodes() const { return m_findingReasonCodes; }
228 inline bool FindingReasonCodesHasBeenSet() const { return m_findingReasonCodesHasBeenSet; }
229 template <typename FindingReasonCodesT = Aws::Vector<ECSServiceRecommendationFindingReasonCode>>
230 void SetFindingReasonCodes(FindingReasonCodesT&& value) {
231 m_findingReasonCodesHasBeenSet = true;
232 m_findingReasonCodes = std::forward<FindingReasonCodesT>(value);
233 }
234 template <typename FindingReasonCodesT = Aws::Vector<ECSServiceRecommendationFindingReasonCode>>
235 ECSServiceRecommendation& WithFindingReasonCodes(FindingReasonCodesT&& value) {
236 SetFindingReasonCodes(std::forward<FindingReasonCodesT>(value));
237 return *this;
238 }
240 m_findingReasonCodesHasBeenSet = true;
241 m_findingReasonCodes.push_back(value);
242 return *this;
243 }
245
247
252 return m_serviceRecommendationOptions;
253 }
254 inline bool ServiceRecommendationOptionsHasBeenSet() const { return m_serviceRecommendationOptionsHasBeenSet; }
255 template <typename ServiceRecommendationOptionsT = Aws::Vector<ECSServiceRecommendationOption>>
256 void SetServiceRecommendationOptions(ServiceRecommendationOptionsT&& value) {
257 m_serviceRecommendationOptionsHasBeenSet = true;
258 m_serviceRecommendationOptions = std::forward<ServiceRecommendationOptionsT>(value);
259 }
260 template <typename ServiceRecommendationOptionsT = Aws::Vector<ECSServiceRecommendationOption>>
261 ECSServiceRecommendation& WithServiceRecommendationOptions(ServiceRecommendationOptionsT&& value) {
262 SetServiceRecommendationOptions(std::forward<ServiceRecommendationOptionsT>(value));
263 return *this;
264 }
265 template <typename ServiceRecommendationOptionsT = ECSServiceRecommendationOption>
266 ECSServiceRecommendation& AddServiceRecommendationOptions(ServiceRecommendationOptionsT&& value) {
267 m_serviceRecommendationOptionsHasBeenSet = true;
268 m_serviceRecommendationOptions.emplace_back(std::forward<ServiceRecommendationOptionsT>(value));
269 return *this;
270 }
272
274
279 inline CurrentPerformanceRisk GetCurrentPerformanceRisk() const { return m_currentPerformanceRisk; }
280 inline bool CurrentPerformanceRiskHasBeenSet() const { return m_currentPerformanceRiskHasBeenSet; }
282 m_currentPerformanceRiskHasBeenSet = true;
283 m_currentPerformanceRisk = value;
284 }
287 return *this;
288 }
290
292
297 return m_effectiveRecommendationPreferences;
298 }
299 inline bool EffectiveRecommendationPreferencesHasBeenSet() const { return m_effectiveRecommendationPreferencesHasBeenSet; }
300 template <typename EffectiveRecommendationPreferencesT = ECSEffectiveRecommendationPreferences>
301 void SetEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT&& value) {
302 m_effectiveRecommendationPreferencesHasBeenSet = true;
303 m_effectiveRecommendationPreferences = std::forward<EffectiveRecommendationPreferencesT>(value);
304 }
305 template <typename EffectiveRecommendationPreferencesT = ECSEffectiveRecommendationPreferences>
306 ECSServiceRecommendation& WithEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT&& value) {
307 SetEffectiveRecommendationPreferences(std::forward<EffectiveRecommendationPreferencesT>(value));
308 return *this;
309 }
311
313
316 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
317 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
318 template <typename TagsT = Aws::Vector<Tag>>
319 void SetTags(TagsT&& value) {
320 m_tagsHasBeenSet = true;
321 m_tags = std::forward<TagsT>(value);
322 }
323 template <typename TagsT = Aws::Vector<Tag>>
325 SetTags(std::forward<TagsT>(value));
326 return *this;
327 }
328 template <typename TagsT = Tag>
330 m_tagsHasBeenSet = true;
331 m_tags.emplace_back(std::forward<TagsT>(value));
332 return *this;
333 }
335 private:
336 Aws::String m_serviceArn;
337
338 Aws::String m_accountId;
339
340 ServiceConfiguration m_currentServiceConfiguration;
341
342 Aws::Vector<ECSServiceUtilizationMetric> m_utilizationMetrics;
343
344 double m_lookbackPeriodInDays{0.0};
345
347
348 Aws::Utils::DateTime m_lastRefreshTimestamp{};
349
351
353
354 Aws::Vector<ECSServiceRecommendationOption> m_serviceRecommendationOptions;
355
357
358 ECSEffectiveRecommendationPreferences m_effectiveRecommendationPreferences;
359
360 Aws::Vector<Tag> m_tags;
361 bool m_serviceArnHasBeenSet = false;
362 bool m_accountIdHasBeenSet = false;
363 bool m_currentServiceConfigurationHasBeenSet = false;
364 bool m_utilizationMetricsHasBeenSet = false;
365 bool m_lookbackPeriodInDaysHasBeenSet = false;
366 bool m_launchTypeHasBeenSet = false;
367 bool m_lastRefreshTimestampHasBeenSet = false;
368 bool m_findingHasBeenSet = false;
369 bool m_findingReasonCodesHasBeenSet = false;
370 bool m_serviceRecommendationOptionsHasBeenSet = false;
371 bool m_currentPerformanceRiskHasBeenSet = false;
372 bool m_effectiveRecommendationPreferencesHasBeenSet = false;
373 bool m_tagsHasBeenSet = false;
374};
375
376} // namespace Model
377} // namespace ComputeOptimizer
378} // namespace Aws
AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const
const Aws::Vector< ECSServiceUtilizationMetric > & GetUtilizationMetrics() const
const Aws::Vector< ECSServiceRecommendationFindingReasonCode > & GetFindingReasonCodes() const
ECSServiceRecommendation & WithServiceArn(ServiceArnT &&value)
ECSServiceRecommendation & AddUtilizationMetrics(UtilizationMetricsT &&value)
ECSServiceRecommendation & AddFindingReasonCodes(ECSServiceRecommendationFindingReasonCode value)
ECSServiceRecommendation & AddServiceRecommendationOptions(ServiceRecommendationOptionsT &&value)
void SetFinding(ECSServiceRecommendationFinding value)
void SetEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT &&value)
ECSServiceRecommendation & WithFinding(ECSServiceRecommendationFinding value)
ECSServiceRecommendation & WithFindingReasonCodes(FindingReasonCodesT &&value)
ECSServiceRecommendation & WithCurrentPerformanceRisk(CurrentPerformanceRisk value)
const Aws::Vector< ECSServiceRecommendationOption > & GetServiceRecommendationOptions() const
AWS_COMPUTEOPTIMIZER_API ECSServiceRecommendation & operator=(Aws::Utils::Json::JsonView jsonValue)
const ServiceConfiguration & GetCurrentServiceConfiguration() const
ECSServiceRecommendation & WithUtilizationMetrics(UtilizationMetricsT &&value)
AWS_COMPUTEOPTIMIZER_API ECSServiceRecommendation(Aws::Utils::Json::JsonView jsonValue)
ECSServiceRecommendation & WithLaunchType(ECSServiceLaunchType value)
void SetServiceRecommendationOptions(ServiceRecommendationOptionsT &&value)
ECSServiceRecommendation & WithLastRefreshTimestamp(LastRefreshTimestampT &&value)
ECSServiceRecommendation & WithLookbackPeriodInDays(double value)
ECSServiceRecommendation & WithEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT &&value)
ECSServiceRecommendation & WithServiceRecommendationOptions(ServiceRecommendationOptionsT &&value)
void SetCurrentServiceConfiguration(CurrentServiceConfigurationT &&value)
ECSServiceRecommendation & WithAccountId(AccountIdT &&value)
const ECSEffectiveRecommendationPreferences & GetEffectiveRecommendationPreferences() const
ECSServiceRecommendation & WithCurrentServiceConfiguration(CurrentServiceConfigurationT &&value)
AWS_COMPUTEOPTIMIZER_API ECSServiceRecommendation()=default
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue