AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
LambdaFunctionRecommendation.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/LambdaEffectiveRecommendationPreferences.h>
10#include <aws/compute-optimizer/model/LambdaFunctionMemoryRecommendationOption.h>
11#include <aws/compute-optimizer/model/LambdaFunctionRecommendationFinding.h>
12#include <aws/compute-optimizer/model/LambdaFunctionRecommendationFindingReasonCode.h>
13#include <aws/compute-optimizer/model/LambdaFunctionUtilizationMetric.h>
14#include <aws/compute-optimizer/model/Tag.h>
15#include <aws/core/utils/DateTime.h>
16#include <aws/core/utils/memory/stl/AWSString.h>
17#include <aws/core/utils/memory/stl/AWSVector.h>
18
19#include <utility>
20
21namespace Aws {
22namespace Utils {
23namespace Json {
24class JsonValue;
25class JsonView;
26} // namespace Json
27} // namespace Utils
28namespace ComputeOptimizer {
29namespace Model {
30
37 public:
38 AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation() = default;
39 AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation(Aws::Utils::Json::JsonView jsonValue);
41 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
47 inline const Aws::String& GetFunctionArn() const { return m_functionArn; }
48 inline bool FunctionArnHasBeenSet() const { return m_functionArnHasBeenSet; }
49 template <typename FunctionArnT = Aws::String>
50 void SetFunctionArn(FunctionArnT&& value) {
51 m_functionArnHasBeenSet = true;
52 m_functionArn = std::forward<FunctionArnT>(value);
53 }
54 template <typename FunctionArnT = Aws::String>
56 SetFunctionArn(std::forward<FunctionArnT>(value));
57 return *this;
58 }
60
62
65 inline const Aws::String& GetFunctionVersion() const { return m_functionVersion; }
66 inline bool FunctionVersionHasBeenSet() const { return m_functionVersionHasBeenSet; }
67 template <typename FunctionVersionT = Aws::String>
68 void SetFunctionVersion(FunctionVersionT&& value) {
69 m_functionVersionHasBeenSet = true;
70 m_functionVersion = std::forward<FunctionVersionT>(value);
71 }
72 template <typename FunctionVersionT = Aws::String>
74 SetFunctionVersion(std::forward<FunctionVersionT>(value));
75 return *this;
76 }
78
80
83 inline const Aws::String& GetAccountId() const { return m_accountId; }
84 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
85 template <typename AccountIdT = Aws::String>
86 void SetAccountId(AccountIdT&& value) {
87 m_accountIdHasBeenSet = true;
88 m_accountId = std::forward<AccountIdT>(value);
89 }
90 template <typename AccountIdT = Aws::String>
92 SetAccountId(std::forward<AccountIdT>(value));
93 return *this;
94 }
96
98
101 inline int GetCurrentMemorySize() const { return m_currentMemorySize; }
102 inline bool CurrentMemorySizeHasBeenSet() const { return m_currentMemorySizeHasBeenSet; }
103 inline void SetCurrentMemorySize(int value) {
104 m_currentMemorySizeHasBeenSet = true;
105 m_currentMemorySize = value;
106 }
109 return *this;
110 }
112
114
118 inline long long GetNumberOfInvocations() const { return m_numberOfInvocations; }
119 inline bool NumberOfInvocationsHasBeenSet() const { return m_numberOfInvocationsHasBeenSet; }
120 inline void SetNumberOfInvocations(long long value) {
121 m_numberOfInvocationsHasBeenSet = true;
122 m_numberOfInvocations = value;
123 }
126 return *this;
127 }
129
131
135 inline const Aws::Vector<LambdaFunctionUtilizationMetric>& GetUtilizationMetrics() const { return m_utilizationMetrics; }
136 inline bool UtilizationMetricsHasBeenSet() const { return m_utilizationMetricsHasBeenSet; }
137 template <typename UtilizationMetricsT = Aws::Vector<LambdaFunctionUtilizationMetric>>
138 void SetUtilizationMetrics(UtilizationMetricsT&& value) {
139 m_utilizationMetricsHasBeenSet = true;
140 m_utilizationMetrics = std::forward<UtilizationMetricsT>(value);
141 }
142 template <typename UtilizationMetricsT = Aws::Vector<LambdaFunctionUtilizationMetric>>
144 SetUtilizationMetrics(std::forward<UtilizationMetricsT>(value));
145 return *this;
146 }
147 template <typename UtilizationMetricsT = LambdaFunctionUtilizationMetric>
149 m_utilizationMetricsHasBeenSet = true;
150 m_utilizationMetrics.emplace_back(std::forward<UtilizationMetricsT>(value));
151 return *this;
152 }
154
156
160 inline double GetLookbackPeriodInDays() const { return m_lookbackPeriodInDays; }
161 inline bool LookbackPeriodInDaysHasBeenSet() const { return m_lookbackPeriodInDaysHasBeenSet; }
162 inline void SetLookbackPeriodInDays(double value) {
163 m_lookbackPeriodInDaysHasBeenSet = true;
164 m_lookbackPeriodInDays = value;
165 }
168 return *this;
169 }
171
173
176 inline const Aws::Utils::DateTime& GetLastRefreshTimestamp() const { return m_lastRefreshTimestamp; }
177 inline bool LastRefreshTimestampHasBeenSet() const { return m_lastRefreshTimestampHasBeenSet; }
178 template <typename LastRefreshTimestampT = Aws::Utils::DateTime>
179 void SetLastRefreshTimestamp(LastRefreshTimestampT&& value) {
180 m_lastRefreshTimestampHasBeenSet = true;
181 m_lastRefreshTimestamp = std::forward<LastRefreshTimestampT>(value);
182 }
183 template <typename LastRefreshTimestampT = Aws::Utils::DateTime>
185 SetLastRefreshTimestamp(std::forward<LastRefreshTimestampT>(value));
186 return *this;
187 }
189
191
213 inline LambdaFunctionRecommendationFinding GetFinding() const { return m_finding; }
214 inline bool FindingHasBeenSet() const { return m_findingHasBeenSet; }
216 m_findingHasBeenSet = true;
217 m_finding = value;
218 }
220 SetFinding(value);
221 return *this;
222 }
224
226
252 inline const Aws::Vector<LambdaFunctionRecommendationFindingReasonCode>& GetFindingReasonCodes() const { return m_findingReasonCodes; }
253 inline bool FindingReasonCodesHasBeenSet() const { return m_findingReasonCodesHasBeenSet; }
254 template <typename FindingReasonCodesT = Aws::Vector<LambdaFunctionRecommendationFindingReasonCode>>
255 void SetFindingReasonCodes(FindingReasonCodesT&& value) {
256 m_findingReasonCodesHasBeenSet = true;
257 m_findingReasonCodes = std::forward<FindingReasonCodesT>(value);
258 }
259 template <typename FindingReasonCodesT = Aws::Vector<LambdaFunctionRecommendationFindingReasonCode>>
261 SetFindingReasonCodes(std::forward<FindingReasonCodesT>(value));
262 return *this;
263 }
265 m_findingReasonCodesHasBeenSet = true;
266 m_findingReasonCodes.push_back(value);
267 return *this;
268 }
270
272
277 return m_memorySizeRecommendationOptions;
278 }
279 inline bool MemorySizeRecommendationOptionsHasBeenSet() const { return m_memorySizeRecommendationOptionsHasBeenSet; }
280 template <typename MemorySizeRecommendationOptionsT = Aws::Vector<LambdaFunctionMemoryRecommendationOption>>
281 void SetMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT&& value) {
282 m_memorySizeRecommendationOptionsHasBeenSet = true;
283 m_memorySizeRecommendationOptions = std::forward<MemorySizeRecommendationOptionsT>(value);
284 }
285 template <typename MemorySizeRecommendationOptionsT = Aws::Vector<LambdaFunctionMemoryRecommendationOption>>
286 LambdaFunctionRecommendation& WithMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT&& value) {
287 SetMemorySizeRecommendationOptions(std::forward<MemorySizeRecommendationOptionsT>(value));
288 return *this;
289 }
290 template <typename MemorySizeRecommendationOptionsT = LambdaFunctionMemoryRecommendationOption>
291 LambdaFunctionRecommendation& AddMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT&& value) {
292 m_memorySizeRecommendationOptionsHasBeenSet = true;
293 m_memorySizeRecommendationOptions.emplace_back(std::forward<MemorySizeRecommendationOptionsT>(value));
294 return *this;
295 }
297
299
304 inline CurrentPerformanceRisk GetCurrentPerformanceRisk() const { return m_currentPerformanceRisk; }
305 inline bool CurrentPerformanceRiskHasBeenSet() const { return m_currentPerformanceRiskHasBeenSet; }
307 m_currentPerformanceRiskHasBeenSet = true;
308 m_currentPerformanceRisk = value;
309 }
312 return *this;
313 }
315
317
322 return m_effectiveRecommendationPreferences;
323 }
324 inline bool EffectiveRecommendationPreferencesHasBeenSet() const { return m_effectiveRecommendationPreferencesHasBeenSet; }
325 template <typename EffectiveRecommendationPreferencesT = LambdaEffectiveRecommendationPreferences>
326 void SetEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT&& value) {
327 m_effectiveRecommendationPreferencesHasBeenSet = true;
328 m_effectiveRecommendationPreferences = std::forward<EffectiveRecommendationPreferencesT>(value);
329 }
330 template <typename EffectiveRecommendationPreferencesT = LambdaEffectiveRecommendationPreferences>
331 LambdaFunctionRecommendation& WithEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT&& value) {
332 SetEffectiveRecommendationPreferences(std::forward<EffectiveRecommendationPreferencesT>(value));
333 return *this;
334 }
336
338
341 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
342 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
343 template <typename TagsT = Aws::Vector<Tag>>
344 void SetTags(TagsT&& value) {
345 m_tagsHasBeenSet = true;
346 m_tags = std::forward<TagsT>(value);
347 }
348 template <typename TagsT = Aws::Vector<Tag>>
350 SetTags(std::forward<TagsT>(value));
351 return *this;
352 }
353 template <typename TagsT = Tag>
355 m_tagsHasBeenSet = true;
356 m_tags.emplace_back(std::forward<TagsT>(value));
357 return *this;
358 }
360 private:
361 Aws::String m_functionArn;
362
363 Aws::String m_functionVersion;
364
365 Aws::String m_accountId;
366
367 int m_currentMemorySize{0};
368
369 long long m_numberOfInvocations{0};
370
372
373 double m_lookbackPeriodInDays{0.0};
374
375 Aws::Utils::DateTime m_lastRefreshTimestamp{};
376
378
380
381 Aws::Vector<LambdaFunctionMemoryRecommendationOption> m_memorySizeRecommendationOptions;
382
384
385 LambdaEffectiveRecommendationPreferences m_effectiveRecommendationPreferences;
386
387 Aws::Vector<Tag> m_tags;
388 bool m_functionArnHasBeenSet = false;
389 bool m_functionVersionHasBeenSet = false;
390 bool m_accountIdHasBeenSet = false;
391 bool m_currentMemorySizeHasBeenSet = false;
392 bool m_numberOfInvocationsHasBeenSet = false;
393 bool m_utilizationMetricsHasBeenSet = false;
394 bool m_lookbackPeriodInDaysHasBeenSet = false;
395 bool m_lastRefreshTimestampHasBeenSet = false;
396 bool m_findingHasBeenSet = false;
397 bool m_findingReasonCodesHasBeenSet = false;
398 bool m_memorySizeRecommendationOptionsHasBeenSet = false;
399 bool m_currentPerformanceRiskHasBeenSet = false;
400 bool m_effectiveRecommendationPreferencesHasBeenSet = false;
401 bool m_tagsHasBeenSet = false;
402};
403
404} // namespace Model
405} // namespace ComputeOptimizer
406} // namespace Aws
LambdaFunctionRecommendation & WithFindingReasonCodes(FindingReasonCodesT &&value)
void SetMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT &&value)
LambdaFunctionRecommendation & WithMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT &&value)
LambdaFunctionRecommendation & WithCurrentPerformanceRisk(CurrentPerformanceRisk value)
LambdaFunctionRecommendation & WithFinding(LambdaFunctionRecommendationFinding value)
void SetEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT &&value)
LambdaFunctionRecommendation & AddFindingReasonCodes(LambdaFunctionRecommendationFindingReasonCode value)
LambdaFunctionRecommendation & WithFunctionArn(FunctionArnT &&value)
LambdaFunctionRecommendation & WithFunctionVersion(FunctionVersionT &&value)
LambdaFunctionRecommendation & AddUtilizationMetrics(UtilizationMetricsT &&value)
LambdaFunctionRecommendation & WithEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT &&value)
const Aws::Vector< LambdaFunctionMemoryRecommendationOption > & GetMemorySizeRecommendationOptions() const
LambdaFunctionRecommendation & WithUtilizationMetrics(UtilizationMetricsT &&value)
LambdaFunctionRecommendation & WithLookbackPeriodInDays(double value)
AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation()=default
LambdaFunctionRecommendation & WithAccountId(AccountIdT &&value)
const Aws::Vector< LambdaFunctionRecommendationFindingReasonCode > & GetFindingReasonCodes() const
LambdaFunctionRecommendation & WithLastRefreshTimestamp(LastRefreshTimestampT &&value)
AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation & operator=(Aws::Utils::Json::JsonView jsonValue)
LambdaFunctionRecommendation & AddMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT &&value)
const Aws::Vector< LambdaFunctionUtilizationMetric > & GetUtilizationMetrics() const
const LambdaEffectiveRecommendationPreferences & GetEffectiveRecommendationPreferences() const
AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const
LambdaFunctionRecommendation & WithNumberOfInvocations(long long value)
AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue