AWS SDK for C++

AWS SDK for C++ Version 1.11.810

Loading...
Searching...
No Matches
SavingsOpportunity.h
1
6#pragma once
7#include <aws/compute-optimizer/ComputeOptimizer_EXPORTS.h>
8#include <aws/compute-optimizer/model/EstimatedMonthlySavings.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
44 public:
45 AWS_COMPUTEOPTIMIZER_API SavingsOpportunity() = default;
46 AWS_COMPUTEOPTIMIZER_API SavingsOpportunity(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
47 AWS_COMPUTEOPTIMIZER_API SavingsOpportunity& operator=(const std::shared_ptr<Aws::Crt::Cbor::CborDecoder>& decoder);
48 AWS_COMPUTEOPTIMIZER_API void CborEncode(Aws::Crt::Cbor::CborEncoder& encoder) const;
49
51
55 inline double GetSavingsOpportunityPercentage() const { return m_savingsOpportunityPercentage; }
56 inline bool SavingsOpportunityPercentageHasBeenSet() const { return m_savingsOpportunityPercentageHasBeenSet; }
57 inline void SetSavingsOpportunityPercentage(double value) {
58 m_savingsOpportunityPercentageHasBeenSet = true;
59 m_savingsOpportunityPercentage = value;
60 }
63 return *this;
64 }
66
68
73 inline const EstimatedMonthlySavings& GetEstimatedMonthlySavings() const { return m_estimatedMonthlySavings; }
74 inline bool EstimatedMonthlySavingsHasBeenSet() const { return m_estimatedMonthlySavingsHasBeenSet; }
75 template <typename EstimatedMonthlySavingsT = EstimatedMonthlySavings>
76 void SetEstimatedMonthlySavings(EstimatedMonthlySavingsT&& value) {
77 m_estimatedMonthlySavingsHasBeenSet = true;
78 m_estimatedMonthlySavings = std::forward<EstimatedMonthlySavingsT>(value);
79 }
80 template <typename EstimatedMonthlySavingsT = EstimatedMonthlySavings>
81 SavingsOpportunity& WithEstimatedMonthlySavings(EstimatedMonthlySavingsT&& value) {
82 SetEstimatedMonthlySavings(std::forward<EstimatedMonthlySavingsT>(value));
83 return *this;
84 }
86 private:
87 double m_savingsOpportunityPercentage{0.0};
88
89 EstimatedMonthlySavings m_estimatedMonthlySavings;
90 bool m_savingsOpportunityPercentageHasBeenSet = false;
91 bool m_estimatedMonthlySavingsHasBeenSet = false;
92};
93
94} // namespace Model
95} // namespace ComputeOptimizer
96} // namespace Aws
SavingsOpportunity & WithSavingsOpportunityPercentage(double value)
SavingsOpportunity & WithEstimatedMonthlySavings(EstimatedMonthlySavingsT &&value)
void SetEstimatedMonthlySavings(EstimatedMonthlySavingsT &&value)
AWS_COMPUTEOPTIMIZER_API void CborEncode(Aws::Crt::Cbor::CborEncoder &encoder) const
const EstimatedMonthlySavings & GetEstimatedMonthlySavings() const
AWS_COMPUTEOPTIMIZER_API SavingsOpportunity(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)
AWS_COMPUTEOPTIMIZER_API SavingsOpportunity()=default
AWS_COMPUTEOPTIMIZER_API SavingsOpportunity & operator=(const std::shared_ptr< Aws::Crt::Cbor::CborDecoder > &decoder)