AWS SDK for C++

AWS SDK for C++ Version 1.11.811

Loading...
Searching...
No Matches
IdleSavingsOpportunity.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/compute-optimizer/model/IdleEstimatedMonthlySavings.h>
9#include <aws/crt/cbor/Cbor.h>
10
11#include <utility>
12
13namespace Aws {
14namespace Utils {
15namespace Cbor {
16class CborValue;
17} // namespace Cbor
18} // namespace Utils
19namespace ComputeOptimizer {
20namespace Model {
21
29 public:
30 AWS_COMPUTEOPTIMIZER_API IdleSavingsOpportunity() = default;
31 AWS_COMPUTEOPTIMIZER_API IdleSavingsOpportunity(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
32 AWS_COMPUTEOPTIMIZER_API IdleSavingsOpportunity& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
33 AWS_COMPUTEOPTIMIZER_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
34
36
40 inline double GetSavingsOpportunityPercentage() const { return m_savingsOpportunityPercentage; }
41 inline bool SavingsOpportunityPercentageHasBeenSet() const { return m_savingsOpportunityPercentageHasBeenSet; }
42 inline void SetSavingsOpportunityPercentage(double value) {
43 m_savingsOpportunityPercentageHasBeenSet = true;
44 m_savingsOpportunityPercentage = value;
45 }
48 return *this;
49 }
51
53
57 inline const IdleEstimatedMonthlySavings& GetEstimatedMonthlySavings() const { return m_estimatedMonthlySavings; }
58 inline bool EstimatedMonthlySavingsHasBeenSet() const { return m_estimatedMonthlySavingsHasBeenSet; }
59 template <typename EstimatedMonthlySavingsT = IdleEstimatedMonthlySavings>
60 void SetEstimatedMonthlySavings(EstimatedMonthlySavingsT&& value) {
61 m_estimatedMonthlySavingsHasBeenSet = true;
62 m_estimatedMonthlySavings = std::forward<EstimatedMonthlySavingsT>(value);
63 }
64 template <typename EstimatedMonthlySavingsT = IdleEstimatedMonthlySavings>
65 IdleSavingsOpportunity& WithEstimatedMonthlySavings(EstimatedMonthlySavingsT&& value) {
66 SetEstimatedMonthlySavings(std::forward<EstimatedMonthlySavingsT>(value));
67 return *this;
68 }
70 private:
71 double m_savingsOpportunityPercentage{0.0};
72
73 IdleEstimatedMonthlySavings m_estimatedMonthlySavings;
74 bool m_savingsOpportunityPercentageHasBeenSet = false;
75 bool m_estimatedMonthlySavingsHasBeenSet = false;
76};
77
78} // namespace Model
79} // namespace ComputeOptimizer
80} // namespace Aws
AWS_COMPUTEOPTIMIZER_API IdleSavingsOpportunity()=default
void SetEstimatedMonthlySavings(EstimatedMonthlySavingsT &&value)
AWS_COMPUTEOPTIMIZER_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const IdleEstimatedMonthlySavings & GetEstimatedMonthlySavings() const
AWS_COMPUTEOPTIMIZER_API IdleSavingsOpportunity(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_COMPUTEOPTIMIZER_API IdleSavingsOpportunity & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
IdleSavingsOpportunity & WithSavingsOpportunityPercentage(double value)
IdleSavingsOpportunity & WithEstimatedMonthlySavings(EstimatedMonthlySavingsT &&value)