AWS SDK for C++

AWS SDK for C++ Version 1.11.749

Loading...
Searching...
No Matches
CostEstimate.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/lightsail/Lightsail_EXPORTS.h>
10#include <aws/lightsail/model/EstimateByTime.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace Lightsail {
22namespace Model {
23
31 public:
32 AWS_LIGHTSAIL_API CostEstimate() = default;
33 AWS_LIGHTSAIL_API CostEstimate(Aws::Utils::Json::JsonView jsonValue);
34 AWS_LIGHTSAIL_API CostEstimate& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
42 inline const Aws::String& GetUsageType() const { return m_usageType; }
43 inline bool UsageTypeHasBeenSet() const { return m_usageTypeHasBeenSet; }
44 template <typename UsageTypeT = Aws::String>
45 void SetUsageType(UsageTypeT&& value) {
46 m_usageTypeHasBeenSet = true;
47 m_usageType = std::forward<UsageTypeT>(value);
48 }
49 template <typename UsageTypeT = Aws::String>
50 CostEstimate& WithUsageType(UsageTypeT&& value) {
51 SetUsageType(std::forward<UsageTypeT>(value));
52 return *this;
53 }
55
57
60 inline const Aws::Vector<EstimateByTime>& GetResultsByTime() const { return m_resultsByTime; }
61 inline bool ResultsByTimeHasBeenSet() const { return m_resultsByTimeHasBeenSet; }
62 template <typename ResultsByTimeT = Aws::Vector<EstimateByTime>>
63 void SetResultsByTime(ResultsByTimeT&& value) {
64 m_resultsByTimeHasBeenSet = true;
65 m_resultsByTime = std::forward<ResultsByTimeT>(value);
66 }
67 template <typename ResultsByTimeT = Aws::Vector<EstimateByTime>>
68 CostEstimate& WithResultsByTime(ResultsByTimeT&& value) {
69 SetResultsByTime(std::forward<ResultsByTimeT>(value));
70 return *this;
71 }
72 template <typename ResultsByTimeT = EstimateByTime>
73 CostEstimate& AddResultsByTime(ResultsByTimeT&& value) {
74 m_resultsByTimeHasBeenSet = true;
75 m_resultsByTime.emplace_back(std::forward<ResultsByTimeT>(value));
76 return *this;
77 }
79 private:
80 Aws::String m_usageType;
81
82 Aws::Vector<EstimateByTime> m_resultsByTime;
83 bool m_usageTypeHasBeenSet = false;
84 bool m_resultsByTimeHasBeenSet = false;
85};
86
87} // namespace Model
88} // namespace Lightsail
89} // namespace Aws
CostEstimate & WithResultsByTime(ResultsByTimeT &&value)
const Aws::String & GetUsageType() const
const Aws::Vector< EstimateByTime > & GetResultsByTime() const
AWS_LIGHTSAIL_API CostEstimate()=default
void SetUsageType(UsageTypeT &&value)
AWS_LIGHTSAIL_API CostEstimate(Aws::Utils::Json::JsonView jsonValue)
CostEstimate & WithUsageType(UsageTypeT &&value)
AWS_LIGHTSAIL_API CostEstimate & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_LIGHTSAIL_API Aws::Utils::Json::JsonValue Jsonize() const
CostEstimate & AddResultsByTime(ResultsByTimeT &&value)
void SetResultsByTime(ResultsByTimeT &&value)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue