AWS SDK for C++

AWS SDK for C++ Version 1.11.941

Loading...
Searching...
No Matches
CreateMetricRequest.h
1
6#pragma once
7#include <aws/appmonetization/AppMonetizationRequest.h>
8#include <aws/appmonetization/AppMonetization_EXPORTS.h>
9#include <aws/appmonetization/model/MetricDefinition.h>
10#include <aws/core/utils/UUID.h>
11#include <aws/core/utils/memory/stl/AWSMap.h>
12#include <aws/core/utils/memory/stl/AWSString.h>
13
14#include <utility>
15
16namespace Aws {
17namespace AppMonetization {
18namespace Model {
19
29 public:
30 AWS_APPMONETIZATION_API CreateMetricRequest() = default;
31
32 // Service request name is the Operation name which will send this request out,
33 // each operation should has unique request name, so that we can get operation's name from this request.
34 // Note: this is not true for response, multiple operations may have the same response name,
35 // so we can not get operation's name from response.
36 inline virtual const char* GetServiceRequestName() const override { return "CreateMetric"; }
37
38 AWS_APPMONETIZATION_API Aws::String SerializePayload() const override;
39
41
44 inline const Aws::String& GetAppId() const { return m_appId; }
45 inline bool AppIdHasBeenSet() const { return m_appIdHasBeenSet; }
46 template <typename AppIdT = Aws::String>
47 void SetAppId(AppIdT&& value) {
48 m_appIdHasBeenSet = true;
49 m_appId = std::forward<AppIdT>(value);
50 }
51 template <typename AppIdT = Aws::String>
52 CreateMetricRequest& WithAppId(AppIdT&& value) {
53 SetAppId(std::forward<AppIdT>(value));
54 return *this;
55 }
57
59
63 inline const Aws::String& GetName() const { return m_name; }
64 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
65 template <typename NameT = Aws::String>
66 void SetName(NameT&& value) {
67 m_nameHasBeenSet = true;
68 m_name = std::forward<NameT>(value);
69 }
70 template <typename NameT = Aws::String>
71 CreateMetricRequest& WithName(NameT&& value) {
72 SetName(std::forward<NameT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::String& GetDescription() const { return m_description; }
82 inline bool DescriptionHasBeenSet() const { return m_descriptionHasBeenSet; }
83 template <typename DescriptionT = Aws::String>
84 void SetDescription(DescriptionT&& value) {
85 m_descriptionHasBeenSet = true;
86 m_description = std::forward<DescriptionT>(value);
87 }
88 template <typename DescriptionT = Aws::String>
89 CreateMetricRequest& WithDescription(DescriptionT&& value) {
90 SetDescription(std::forward<DescriptionT>(value));
91 return *this;
92 }
94
96
100 inline const Aws::String& GetEventType() const { return m_eventType; }
101 inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; }
102 template <typename EventTypeT = Aws::String>
103 void SetEventType(EventTypeT&& value) {
104 m_eventTypeHasBeenSet = true;
105 m_eventType = std::forward<EventTypeT>(value);
106 }
107 template <typename EventTypeT = Aws::String>
108 CreateMetricRequest& WithEventType(EventTypeT&& value) {
109 SetEventType(std::forward<EventTypeT>(value));
110 return *this;
111 }
113
115
119 inline const Aws::String& GetUnitName() const { return m_unitName; }
120 inline bool UnitNameHasBeenSet() const { return m_unitNameHasBeenSet; }
121 template <typename UnitNameT = Aws::String>
122 void SetUnitName(UnitNameT&& value) {
123 m_unitNameHasBeenSet = true;
124 m_unitName = std::forward<UnitNameT>(value);
125 }
126 template <typename UnitNameT = Aws::String>
127 CreateMetricRequest& WithUnitName(UnitNameT&& value) {
128 SetUnitName(std::forward<UnitNameT>(value));
129 return *this;
130 }
132
134
138 inline const MetricDefinition& GetDefinition() const { return m_definition; }
139 inline bool DefinitionHasBeenSet() const { return m_definitionHasBeenSet; }
140 template <typename DefinitionT = MetricDefinition>
141 void SetDefinition(DefinitionT&& value) {
142 m_definitionHasBeenSet = true;
143 m_definition = std::forward<DefinitionT>(value);
144 }
145 template <typename DefinitionT = MetricDefinition>
146 CreateMetricRequest& WithDefinition(DefinitionT&& value) {
147 SetDefinition(std::forward<DefinitionT>(value));
148 return *this;
149 }
151
153
158 inline const Aws::String& GetClientToken() const { return m_clientToken; }
159 inline bool ClientTokenHasBeenSet() const { return m_clientTokenHasBeenSet; }
160 template <typename ClientTokenT = Aws::String>
161 void SetClientToken(ClientTokenT&& value) {
162 m_clientTokenHasBeenSet = true;
163 m_clientToken = std::forward<ClientTokenT>(value);
164 }
165 template <typename ClientTokenT = Aws::String>
166 CreateMetricRequest& WithClientToken(ClientTokenT&& value) {
167 SetClientToken(std::forward<ClientTokenT>(value));
168 return *this;
169 }
171
173
177 inline const Aws::Map<Aws::String, Aws::String>& GetTags() const { return m_tags; }
178 inline bool TagsHasBeenSet() const { return m_tagsHasBeenSet; }
179 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
180 void SetTags(TagsT&& value) {
181 m_tagsHasBeenSet = true;
182 m_tags = std::forward<TagsT>(value);
183 }
184 template <typename TagsT = Aws::Map<Aws::String, Aws::String>>
186 SetTags(std::forward<TagsT>(value));
187 return *this;
188 }
189 template <typename TagsKeyT = Aws::String, typename TagsValueT = Aws::String>
190 CreateMetricRequest& AddTags(TagsKeyT&& key, TagsValueT&& value) {
191 m_tagsHasBeenSet = true;
192 m_tags.emplace(std::forward<TagsKeyT>(key), std::forward<TagsValueT>(value));
193 return *this;
194 }
196 private:
197 Aws::String m_appId;
198
199 Aws::String m_name;
200
201 Aws::String m_description;
202
203 Aws::String m_eventType;
204
205 Aws::String m_unitName;
206
207 MetricDefinition m_definition;
208
210
212 bool m_appIdHasBeenSet = false;
213 bool m_nameHasBeenSet = false;
214 bool m_descriptionHasBeenSet = false;
215 bool m_eventTypeHasBeenSet = false;
216 bool m_unitNameHasBeenSet = false;
217 bool m_definitionHasBeenSet = false;
218 bool m_clientTokenHasBeenSet = true;
219 bool m_tagsHasBeenSet = false;
220};
221
222} // namespace Model
223} // namespace AppMonetization
224} // namespace Aws
CreateMetricRequest & WithEventType(EventTypeT &&value)
CreateMetricRequest & WithDescription(DescriptionT &&value)
CreateMetricRequest & WithDefinition(DefinitionT &&value)
CreateMetricRequest & WithTags(TagsT &&value)
AWS_APPMONETIZATION_API Aws::String SerializePayload() const override
const Aws::Map< Aws::String, Aws::String > & GetTags() const
CreateMetricRequest & WithName(NameT &&value)
CreateMetricRequest & AddTags(TagsKeyT &&key, TagsValueT &&value)
CreateMetricRequest & WithClientToken(ClientTokenT &&value)
CreateMetricRequest & WithUnitName(UnitNameT &&value)
virtual const char * GetServiceRequestName() const override
AWS_APPMONETIZATION_API CreateMetricRequest()=default
CreateMetricRequest & WithAppId(AppIdT &&value)
static Aws::Utils::UUID PseudoRandomUUID()
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String