AWS SDK for C++

AWS SDK for C++ Version 1.11.607

Loading...
Searching...
No Matches
LambdaFunctionRecommendation.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/core/utils/DateTime.h>
11#include <aws/compute-optimizer/model/LambdaFunctionRecommendationFinding.h>
12#include <aws/compute-optimizer/model/CurrentPerformanceRisk.h>
13#include <aws/compute-optimizer/model/LambdaEffectiveRecommendationPreferences.h>
14#include <aws/compute-optimizer/model/LambdaFunctionUtilizationMetric.h>
15#include <aws/compute-optimizer/model/LambdaFunctionRecommendationFindingReasonCode.h>
16#include <aws/compute-optimizer/model/LambdaFunctionMemoryRecommendationOption.h>
17#include <aws/compute-optimizer/model/Tag.h>
18#include <utility>
19
20namespace Aws
21{
22namespace Utils
23{
24namespace Json
25{
26 class JsonValue;
27 class JsonView;
28} // namespace Json
29} // namespace Utils
30namespace ComputeOptimizer
31{
32namespace Model
33{
34
41 {
42 public:
43 AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation() = default;
44 AWS_COMPUTEOPTIMIZER_API LambdaFunctionRecommendation(Aws::Utils::Json::JsonView jsonValue);
46 AWS_COMPUTEOPTIMIZER_API Aws::Utils::Json::JsonValue Jsonize() const;
47
48
50
53 inline const Aws::String& GetFunctionArn() const { return m_functionArn; }
54 inline bool FunctionArnHasBeenSet() const { return m_functionArnHasBeenSet; }
55 template<typename FunctionArnT = Aws::String>
56 void SetFunctionArn(FunctionArnT&& value) { m_functionArnHasBeenSet = true; m_functionArn = std::forward<FunctionArnT>(value); }
57 template<typename FunctionArnT = Aws::String>
58 LambdaFunctionRecommendation& WithFunctionArn(FunctionArnT&& value) { SetFunctionArn(std::forward<FunctionArnT>(value)); return *this;}
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) { m_functionVersionHasBeenSet = true; m_functionVersion = std::forward<FunctionVersionT>(value); }
69 template<typename FunctionVersionT = Aws::String>
70 LambdaFunctionRecommendation& WithFunctionVersion(FunctionVersionT&& value) { SetFunctionVersion(std::forward<FunctionVersionT>(value)); return *this;}
72
74
77 inline const Aws::String& GetAccountId() const { return m_accountId; }
78 inline bool AccountIdHasBeenSet() const { return m_accountIdHasBeenSet; }
79 template<typename AccountIdT = Aws::String>
80 void SetAccountId(AccountIdT&& value) { m_accountIdHasBeenSet = true; m_accountId = std::forward<AccountIdT>(value); }
81 template<typename AccountIdT = Aws::String>
82 LambdaFunctionRecommendation& WithAccountId(AccountIdT&& value) { SetAccountId(std::forward<AccountIdT>(value)); return *this;}
84
86
89 inline int GetCurrentMemorySize() const { return m_currentMemorySize; }
90 inline bool CurrentMemorySizeHasBeenSet() const { return m_currentMemorySizeHasBeenSet; }
91 inline void SetCurrentMemorySize(int value) { m_currentMemorySizeHasBeenSet = true; m_currentMemorySize = value; }
94
96
100 inline long long GetNumberOfInvocations() const { return m_numberOfInvocations; }
101 inline bool NumberOfInvocationsHasBeenSet() const { return m_numberOfInvocationsHasBeenSet; }
102 inline void SetNumberOfInvocations(long long value) { m_numberOfInvocationsHasBeenSet = true; m_numberOfInvocations = value; }
103 inline LambdaFunctionRecommendation& WithNumberOfInvocations(long long value) { SetNumberOfInvocations(value); return *this;}
105
107
111 inline const Aws::Vector<LambdaFunctionUtilizationMetric>& GetUtilizationMetrics() const { return m_utilizationMetrics; }
112 inline bool UtilizationMetricsHasBeenSet() const { return m_utilizationMetricsHasBeenSet; }
113 template<typename UtilizationMetricsT = Aws::Vector<LambdaFunctionUtilizationMetric>>
114 void SetUtilizationMetrics(UtilizationMetricsT&& value) { m_utilizationMetricsHasBeenSet = true; m_utilizationMetrics = std::forward<UtilizationMetricsT>(value); }
115 template<typename UtilizationMetricsT = Aws::Vector<LambdaFunctionUtilizationMetric>>
116 LambdaFunctionRecommendation& WithUtilizationMetrics(UtilizationMetricsT&& value) { SetUtilizationMetrics(std::forward<UtilizationMetricsT>(value)); return *this;}
117 template<typename UtilizationMetricsT = LambdaFunctionUtilizationMetric>
118 LambdaFunctionRecommendation& AddUtilizationMetrics(UtilizationMetricsT&& value) { m_utilizationMetricsHasBeenSet = true; m_utilizationMetrics.emplace_back(std::forward<UtilizationMetricsT>(value)); return *this; }
120
122
126 inline double GetLookbackPeriodInDays() const { return m_lookbackPeriodInDays; }
127 inline bool LookbackPeriodInDaysHasBeenSet() const { return m_lookbackPeriodInDaysHasBeenSet; }
128 inline void SetLookbackPeriodInDays(double value) { m_lookbackPeriodInDaysHasBeenSet = true; m_lookbackPeriodInDays = value; }
131
133
136 inline const Aws::Utils::DateTime& GetLastRefreshTimestamp() const { return m_lastRefreshTimestamp; }
137 inline bool LastRefreshTimestampHasBeenSet() const { return m_lastRefreshTimestampHasBeenSet; }
138 template<typename LastRefreshTimestampT = Aws::Utils::DateTime>
139 void SetLastRefreshTimestamp(LastRefreshTimestampT&& value) { m_lastRefreshTimestampHasBeenSet = true; m_lastRefreshTimestamp = std::forward<LastRefreshTimestampT>(value); }
140 template<typename LastRefreshTimestampT = Aws::Utils::DateTime>
141 LambdaFunctionRecommendation& WithLastRefreshTimestamp(LastRefreshTimestampT&& value) { SetLastRefreshTimestamp(std::forward<LastRefreshTimestampT>(value)); return *this;}
143
145
167 inline LambdaFunctionRecommendationFinding GetFinding() const { return m_finding; }
168 inline bool FindingHasBeenSet() const { return m_findingHasBeenSet; }
169 inline void SetFinding(LambdaFunctionRecommendationFinding value) { m_findingHasBeenSet = true; m_finding = value; }
172
174
200 inline const Aws::Vector<LambdaFunctionRecommendationFindingReasonCode>& GetFindingReasonCodes() const { return m_findingReasonCodes; }
201 inline bool FindingReasonCodesHasBeenSet() const { return m_findingReasonCodesHasBeenSet; }
202 template<typename FindingReasonCodesT = Aws::Vector<LambdaFunctionRecommendationFindingReasonCode>>
203 void SetFindingReasonCodes(FindingReasonCodesT&& value) { m_findingReasonCodesHasBeenSet = true; m_findingReasonCodes = std::forward<FindingReasonCodesT>(value); }
204 template<typename FindingReasonCodesT = Aws::Vector<LambdaFunctionRecommendationFindingReasonCode>>
205 LambdaFunctionRecommendation& WithFindingReasonCodes(FindingReasonCodesT&& value) { SetFindingReasonCodes(std::forward<FindingReasonCodesT>(value)); return *this;}
206 inline LambdaFunctionRecommendation& AddFindingReasonCodes(LambdaFunctionRecommendationFindingReasonCode value) { m_findingReasonCodesHasBeenSet = true; m_findingReasonCodes.push_back(value); return *this; }
208
210
214 inline const Aws::Vector<LambdaFunctionMemoryRecommendationOption>& GetMemorySizeRecommendationOptions() const { return m_memorySizeRecommendationOptions; }
215 inline bool MemorySizeRecommendationOptionsHasBeenSet() const { return m_memorySizeRecommendationOptionsHasBeenSet; }
216 template<typename MemorySizeRecommendationOptionsT = Aws::Vector<LambdaFunctionMemoryRecommendationOption>>
217 void SetMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT&& value) { m_memorySizeRecommendationOptionsHasBeenSet = true; m_memorySizeRecommendationOptions = std::forward<MemorySizeRecommendationOptionsT>(value); }
218 template<typename MemorySizeRecommendationOptionsT = Aws::Vector<LambdaFunctionMemoryRecommendationOption>>
219 LambdaFunctionRecommendation& WithMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT&& value) { SetMemorySizeRecommendationOptions(std::forward<MemorySizeRecommendationOptionsT>(value)); return *this;}
220 template<typename MemorySizeRecommendationOptionsT = LambdaFunctionMemoryRecommendationOption>
221 LambdaFunctionRecommendation& AddMemorySizeRecommendationOptions(MemorySizeRecommendationOptionsT&& value) { m_memorySizeRecommendationOptionsHasBeenSet = true; m_memorySizeRecommendationOptions.emplace_back(std::forward<MemorySizeRecommendationOptionsT>(value)); return *this; }
223
225
230 inline CurrentPerformanceRisk GetCurrentPerformanceRisk() const { return m_currentPerformanceRisk; }
231 inline bool CurrentPerformanceRiskHasBeenSet() const { return m_currentPerformanceRiskHasBeenSet; }
232 inline void SetCurrentPerformanceRisk(CurrentPerformanceRisk value) { m_currentPerformanceRiskHasBeenSet = true; m_currentPerformanceRisk = value; }
235
237
241 inline const LambdaEffectiveRecommendationPreferences& GetEffectiveRecommendationPreferences() const { return m_effectiveRecommendationPreferences; }
242 inline bool EffectiveRecommendationPreferencesHasBeenSet() const { return m_effectiveRecommendationPreferencesHasBeenSet; }
243 template<typename EffectiveRecommendationPreferencesT = LambdaEffectiveRecommendationPreferences>
244 void SetEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT&& value) { m_effectiveRecommendationPreferencesHasBeenSet = true; m_effectiveRecommendationPreferences = std::forward<EffectiveRecommendationPreferencesT>(value); }
245 template<typename EffectiveRecommendationPreferencesT = LambdaEffectiveRecommendationPreferences>
246 LambdaFunctionRecommendation& WithEffectiveRecommendationPreferences(EffectiveRecommendationPreferencesT&& value) { SetEffectiveRecommendationPreferences(std::forward<EffectiveRecommendationPreferencesT>(value)); return *this;}
248
250
253 inline const Aws::Vector<Tag>& GetTags() const { return m_tags; }
254 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
255 template<typename TagsT = Aws::Vector<Tag>>
256 void SetTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags = std::forward<TagsT>(value); }
257 template<typename TagsT = Aws::Vector<Tag>>
258 LambdaFunctionRecommendation& WithTags(TagsT&& value) { SetTags(std::forward<TagsT>(value)); return *this;}
259 template<typename TagsT = Tag>
260 LambdaFunctionRecommendation& AddTags(TagsT&& value) { m_tagsHasBeenSet = true; m_tags.emplace_back(std::forward<TagsT>(value)); return *this; }
262 private:
263
264 Aws::String m_functionArn;
265 bool m_functionArnHasBeenSet = false;
266
267 Aws::String m_functionVersion;
268 bool m_functionVersionHasBeenSet = false;
269
270 Aws::String m_accountId;
271 bool m_accountIdHasBeenSet = false;
272
273 int m_currentMemorySize{0};
274 bool m_currentMemorySizeHasBeenSet = false;
275
276 long long m_numberOfInvocations{0};
277 bool m_numberOfInvocationsHasBeenSet = false;
278
280 bool m_utilizationMetricsHasBeenSet = false;
281
282 double m_lookbackPeriodInDays{0.0};
283 bool m_lookbackPeriodInDaysHasBeenSet = false;
284
285 Aws::Utils::DateTime m_lastRefreshTimestamp{};
286 bool m_lastRefreshTimestampHasBeenSet = false;
287
289 bool m_findingHasBeenSet = false;
290
292 bool m_findingReasonCodesHasBeenSet = false;
293
294 Aws::Vector<LambdaFunctionMemoryRecommendationOption> m_memorySizeRecommendationOptions;
295 bool m_memorySizeRecommendationOptionsHasBeenSet = false;
296
298 bool m_currentPerformanceRiskHasBeenSet = false;
299
300 LambdaEffectiveRecommendationPreferences m_effectiveRecommendationPreferences;
301 bool m_effectiveRecommendationPreferencesHasBeenSet = false;
302
303 Aws::Vector<Tag> m_tags;
304 bool m_tagsHasBeenSet = false;
305 };
306
307} // namespace Model
308} // namespace ComputeOptimizer
309} // 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