1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 6 #pragma once 7 #include <aws/ce/CostExplorer_EXPORTS.h> 8 #include <aws/core/utils/memory/stl/AWSVector.h> 9 #include <aws/core/utils/memory/stl/AWSMap.h> 10 #include <aws/core/utils/memory/stl/AWSString.h> 11 #include <aws/ce/model/MetricValue.h> 12 #include <utility> 13 14 namespace Aws 15 { 16 namespace Utils 17 { 18 namespace Json 19 { 20 class JsonValue; 21 class JsonView; 22 } // namespace Json 23 } // namespace Utils 24 namespace CostExplorer 25 { 26 namespace Model 27 { 28 29 /** 30 * <p>One level of grouped data in the results.</p><p><h3>See Also:</h3> <a 31 * href="http://docs.aws.amazon.com/goto/WebAPI/ce-2017-10-25/Group">AWS API 32 * Reference</a></p> 33 */ 34 class AWS_COSTEXPLORER_API Group 35 { 36 public: 37 Group(); 38 Group(Aws::Utils::Json::JsonView jsonValue); 39 Group& operator=(Aws::Utils::Json::JsonView jsonValue); 40 Aws::Utils::Json::JsonValue Jsonize() const; 41 42 43 /** 44 * <p>The keys that are included in this group.</p> 45 */ GetKeys()46 inline const Aws::Vector<Aws::String>& GetKeys() const{ return m_keys; } 47 48 /** 49 * <p>The keys that are included in this group.</p> 50 */ KeysHasBeenSet()51 inline bool KeysHasBeenSet() const { return m_keysHasBeenSet; } 52 53 /** 54 * <p>The keys that are included in this group.</p> 55 */ SetKeys(const Aws::Vector<Aws::String> & value)56 inline void SetKeys(const Aws::Vector<Aws::String>& value) { m_keysHasBeenSet = true; m_keys = value; } 57 58 /** 59 * <p>The keys that are included in this group.</p> 60 */ SetKeys(Aws::Vector<Aws::String> && value)61 inline void SetKeys(Aws::Vector<Aws::String>&& value) { m_keysHasBeenSet = true; m_keys = std::move(value); } 62 63 /** 64 * <p>The keys that are included in this group.</p> 65 */ WithKeys(const Aws::Vector<Aws::String> & value)66 inline Group& WithKeys(const Aws::Vector<Aws::String>& value) { SetKeys(value); return *this;} 67 68 /** 69 * <p>The keys that are included in this group.</p> 70 */ WithKeys(Aws::Vector<Aws::String> && value)71 inline Group& WithKeys(Aws::Vector<Aws::String>&& value) { SetKeys(std::move(value)); return *this;} 72 73 /** 74 * <p>The keys that are included in this group.</p> 75 */ AddKeys(const Aws::String & value)76 inline Group& AddKeys(const Aws::String& value) { m_keysHasBeenSet = true; m_keys.push_back(value); return *this; } 77 78 /** 79 * <p>The keys that are included in this group.</p> 80 */ AddKeys(Aws::String && value)81 inline Group& AddKeys(Aws::String&& value) { m_keysHasBeenSet = true; m_keys.push_back(std::move(value)); return *this; } 82 83 /** 84 * <p>The keys that are included in this group.</p> 85 */ AddKeys(const char * value)86 inline Group& AddKeys(const char* value) { m_keysHasBeenSet = true; m_keys.push_back(value); return *this; } 87 88 89 /** 90 * <p>The metrics that are included in this group.</p> 91 */ GetMetrics()92 inline const Aws::Map<Aws::String, MetricValue>& GetMetrics() const{ return m_metrics; } 93 94 /** 95 * <p>The metrics that are included in this group.</p> 96 */ MetricsHasBeenSet()97 inline bool MetricsHasBeenSet() const { return m_metricsHasBeenSet; } 98 99 /** 100 * <p>The metrics that are included in this group.</p> 101 */ SetMetrics(const Aws::Map<Aws::String,MetricValue> & value)102 inline void SetMetrics(const Aws::Map<Aws::String, MetricValue>& value) { m_metricsHasBeenSet = true; m_metrics = value; } 103 104 /** 105 * <p>The metrics that are included in this group.</p> 106 */ SetMetrics(Aws::Map<Aws::String,MetricValue> && value)107 inline void SetMetrics(Aws::Map<Aws::String, MetricValue>&& value) { m_metricsHasBeenSet = true; m_metrics = std::move(value); } 108 109 /** 110 * <p>The metrics that are included in this group.</p> 111 */ WithMetrics(const Aws::Map<Aws::String,MetricValue> & value)112 inline Group& WithMetrics(const Aws::Map<Aws::String, MetricValue>& value) { SetMetrics(value); return *this;} 113 114 /** 115 * <p>The metrics that are included in this group.</p> 116 */ WithMetrics(Aws::Map<Aws::String,MetricValue> && value)117 inline Group& WithMetrics(Aws::Map<Aws::String, MetricValue>&& value) { SetMetrics(std::move(value)); return *this;} 118 119 /** 120 * <p>The metrics that are included in this group.</p> 121 */ AddMetrics(const Aws::String & key,const MetricValue & value)122 inline Group& AddMetrics(const Aws::String& key, const MetricValue& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } 123 124 /** 125 * <p>The metrics that are included in this group.</p> 126 */ AddMetrics(Aws::String && key,const MetricValue & value)127 inline Group& AddMetrics(Aws::String&& key, const MetricValue& value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), value); return *this; } 128 129 /** 130 * <p>The metrics that are included in this group.</p> 131 */ AddMetrics(const Aws::String & key,MetricValue && value)132 inline Group& AddMetrics(const Aws::String& key, MetricValue&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, std::move(value)); return *this; } 133 134 /** 135 * <p>The metrics that are included in this group.</p> 136 */ AddMetrics(Aws::String && key,MetricValue && value)137 inline Group& AddMetrics(Aws::String&& key, MetricValue&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(std::move(key), std::move(value)); return *this; } 138 139 /** 140 * <p>The metrics that are included in this group.</p> 141 */ AddMetrics(const char * key,MetricValue && value)142 inline Group& AddMetrics(const char* key, MetricValue&& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, std::move(value)); return *this; } 143 144 /** 145 * <p>The metrics that are included in this group.</p> 146 */ AddMetrics(const char * key,const MetricValue & value)147 inline Group& AddMetrics(const char* key, const MetricValue& value) { m_metricsHasBeenSet = true; m_metrics.emplace(key, value); return *this; } 148 149 private: 150 151 Aws::Vector<Aws::String> m_keys; 152 bool m_keysHasBeenSet; 153 154 Aws::Map<Aws::String, MetricValue> m_metrics; 155 bool m_metricsHasBeenSet; 156 }; 157 158 } // namespace Model 159 } // namespace CostExplorer 160 } // namespace Aws 161