AWS SDK for C++  0.14.3
AWS SDK for C++
Event.h
Go to the documentation of this file.
1 /*
2 * Copyright 2010-2016 Amazon.com, Inc. or its affiliates. All Rights Reserved.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License").
5 * You may not use this file except in compliance with the License.
6 * A copy of the License is located at
7 *
8 * http://aws.amazon.com/apache2.0
9 *
10 * or in the "license" file accompanying this file. This file is distributed
11 * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
12 * express or implied. See the License for the specific language governing
13 * permissions and limitations under the License.
14 */
15 #pragma once
20 
21 namespace Aws
22 {
23 namespace Utils
24 {
25 namespace Json
26 {
27  class JsonValue;
28 } // namespace Json
29 } // namespace Utils
30 namespace MobileAnalytics
31 {
32 namespace Model
33 {
34 
40  {
41  public:
42  Event();
43  Event(const Aws::Utils::Json::JsonValue& jsonValue);
44  Event& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
45  Aws::Utils::Json::JsonValue Jsonize() const;
46 
51  inline const Aws::String& GetEventType() const{ return m_eventType; }
52 
57  inline void SetEventType(const Aws::String& value) { m_eventTypeHasBeenSet = true; m_eventType = value; }
58 
63  inline void SetEventType(Aws::String&& value) { m_eventTypeHasBeenSet = true; m_eventType = value; }
64 
69  inline void SetEventType(const char* value) { m_eventTypeHasBeenSet = true; m_eventType.assign(value); }
70 
75  inline Event& WithEventType(const Aws::String& value) { SetEventType(value); return *this;}
76 
81  inline Event& WithEventType(Aws::String&& value) { SetEventType(value); return *this;}
82 
87  inline Event& WithEventType(const char* value) { SetEventType(value); return *this;}
88 
93  inline const Aws::String& GetTimestamp() const{ return m_timestamp; }
94 
99  inline void SetTimestamp(const Aws::String& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
100 
105  inline void SetTimestamp(Aws::String&& value) { m_timestampHasBeenSet = true; m_timestamp = value; }
106 
111  inline void SetTimestamp(const char* value) { m_timestampHasBeenSet = true; m_timestamp.assign(value); }
112 
117  inline Event& WithTimestamp(const Aws::String& value) { SetTimestamp(value); return *this;}
118 
123  inline Event& WithTimestamp(Aws::String&& value) { SetTimestamp(value); return *this;}
124 
129  inline Event& WithTimestamp(const char* value) { SetTimestamp(value); return *this;}
130 
134  inline const Session& GetSession() const{ return m_session; }
135 
139  inline void SetSession(const Session& value) { m_sessionHasBeenSet = true; m_session = value; }
140 
144  inline void SetSession(Session&& value) { m_sessionHasBeenSet = true; m_session = value; }
145 
149  inline Event& WithSession(const Session& value) { SetSession(value); return *this;}
150 
154  inline Event& WithSession(Session&& value) { SetSession(value); return *this;}
155 
159  inline const Aws::String& GetVersion() const{ return m_version; }
160 
164  inline void SetVersion(const Aws::String& value) { m_versionHasBeenSet = true; m_version = value; }
165 
169  inline void SetVersion(Aws::String&& value) { m_versionHasBeenSet = true; m_version = value; }
170 
174  inline void SetVersion(const char* value) { m_versionHasBeenSet = true; m_version.assign(value); }
175 
179  inline Event& WithVersion(const Aws::String& value) { SetVersion(value); return *this;}
180 
184  inline Event& WithVersion(Aws::String&& value) { SetVersion(value); return *this;}
185 
189  inline Event& WithVersion(const char* value) { SetVersion(value); return *this;}
190 
196  inline const Aws::Map<Aws::String, Aws::String>& GetAttributes() const{ return m_attributes; }
197 
203  inline void SetAttributes(const Aws::Map<Aws::String, Aws::String>& value) { m_attributesHasBeenSet = true; m_attributes = value; }
204 
210  inline void SetAttributes(Aws::Map<Aws::String, Aws::String>&& value) { m_attributesHasBeenSet = true; m_attributes = value; }
211 
217  inline Event& WithAttributes(const Aws::Map<Aws::String, Aws::String>& value) { SetAttributes(value); return *this;}
218 
224  inline Event& WithAttributes(Aws::Map<Aws::String, Aws::String>&& value) { SetAttributes(value); return *this;}
225 
231  inline Event& AddAttributes(const Aws::String& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
232 
238  inline Event& AddAttributes(Aws::String&& key, const Aws::String& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
239 
245  inline Event& AddAttributes(const Aws::String& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
246 
252  inline Event& AddAttributes(Aws::String&& key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
253 
259  inline Event& AddAttributes(const char* key, Aws::String&& value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
260 
266  inline Event& AddAttributes(Aws::String&& key, const char* value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
267 
273  inline Event& AddAttributes(const char* key, const char* value) { m_attributesHasBeenSet = true; m_attributes[key] = value; return *this; }
274 
280  inline const Aws::Map<Aws::String, double>& GetMetrics() const{ return m_metrics; }
281 
287  inline void SetMetrics(const Aws::Map<Aws::String, double>& value) { m_metricsHasBeenSet = true; m_metrics = value; }
288 
294  inline void SetMetrics(Aws::Map<Aws::String, double>&& value) { m_metricsHasBeenSet = true; m_metrics = value; }
295 
301  inline Event& WithMetrics(const Aws::Map<Aws::String, double>& value) { SetMetrics(value); return *this;}
302 
308  inline Event& WithMetrics(Aws::Map<Aws::String, double>&& value) { SetMetrics(value); return *this;}
309 
315  inline Event& AddMetrics(const Aws::String& key, double value) { m_metricsHasBeenSet = true; m_metrics[key] = value; return *this; }
316 
322  inline Event& AddMetrics(Aws::String&& key, double value) { m_metricsHasBeenSet = true; m_metrics[key] = value; return *this; }
323 
329  inline Event& AddMetrics(const char* key, double value) { m_metricsHasBeenSet = true; m_metrics[key] = value; return *this; }
330 
331  private:
332  Aws::String m_eventType;
333  bool m_eventTypeHasBeenSet;
334  Aws::String m_timestamp;
335  bool m_timestampHasBeenSet;
336  Session m_session;
337  bool m_sessionHasBeenSet;
338  Aws::String m_version;
339  bool m_versionHasBeenSet;
341  bool m_attributesHasBeenSet;
343  bool m_metricsHasBeenSet;
344  };
345 
346 } // namespace Model
347 } // namespace MobileAnalytics
348 } // namespace Aws
Event & WithMetrics(const Aws::Map< Aws::String, double > &value)
Definition: Event.h:301
Event & AddAttributes(const char *key, Aws::String &&value)
Definition: Event.h:259
Event & WithEventType(const char *value)
Definition: Event.h:87
Event & WithVersion(Aws::String &&value)
Definition: Event.h:184
void SetVersion(Aws::String &&value)
Definition: Event.h:169
const Aws::String & GetVersion() const
Definition: Event.h:159
Event & WithTimestamp(Aws::String &&value)
Definition: Event.h:123
void SetAttributes(const Aws::Map< Aws::String, Aws::String > &value)
Definition: Event.h:203
Event & AddMetrics(const Aws::String &key, double value)
Definition: Event.h:315
Event & WithVersion(const Aws::String &value)
Definition: Event.h:179
Event & AddAttributes(Aws::String &&key, const Aws::String &value)
Definition: Event.h:238
const Aws::String & GetEventType() const
Definition: Event.h:51
std::map< K, V, std::less< K >, Aws::Allocator< std::pair< const K, V > > > Map
Definition: AWSMap.h:28
void SetTimestamp(Aws::String &&value)
Definition: Event.h:105
#define AWS_MOBILEANALYTICS_API
Event & WithEventType(const Aws::String &value)
Definition: Event.h:75
void SetMetrics(Aws::Map< Aws::String, double > &&value)
Definition: Event.h:294
void SetVersion(const Aws::String &value)
Definition: Event.h:164
Event & WithSession(Session &&value)
Definition: Event.h:154
Event & WithTimestamp(const Aws::String &value)
Definition: Event.h:117
void SetMetrics(const Aws::Map< Aws::String, double > &value)
Definition: Event.h:287
void SetEventType(const Aws::String &value)
Definition: Event.h:57
void SetTimestamp(const char *value)
Definition: Event.h:111
Event & AddAttributes(Aws::String &&key, const char *value)
Definition: Event.h:266
const Aws::String & GetTimestamp() const
Definition: Event.h:93
const Session & GetSession() const
Definition: Event.h:134
Event & AddAttributes(const char *key, const char *value)
Definition: Event.h:273
Event & AddMetrics(Aws::String &&key, double value)
Definition: Event.h:322
const Aws::Map< Aws::String, double > & GetMetrics() const
Definition: Event.h:280
void SetVersion(const char *value)
Definition: Event.h:174
void SetEventType(Aws::String &&value)
Definition: Event.h:63
void SetTimestamp(const Aws::String &value)
Definition: Event.h:99
Event & WithEventType(Aws::String &&value)
Definition: Event.h:81
Event & WithSession(const Session &value)
Definition: Event.h:149
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
Event & WithAttributes(Aws::Map< Aws::String, Aws::String > &&value)
Definition: Event.h:224
void SetAttributes(Aws::Map< Aws::String, Aws::String > &&value)
Definition: Event.h:210
Event & AddAttributes(const Aws::String &key, const Aws::String &value)
Definition: Event.h:231
Event & AddMetrics(const char *key, double value)
Definition: Event.h:329
Event & AddAttributes(const Aws::String &key, Aws::String &&value)
Definition: Event.h:245
void SetSession(const Session &value)
Definition: Event.h:139
void SetEventType(const char *value)
Definition: Event.h:69
Event & AddAttributes(Aws::String &&key, Aws::String &&value)
Definition: Event.h:252
Event & WithVersion(const char *value)
Definition: Event.h:189
const Aws::Map< Aws::String, Aws::String > & GetAttributes() const
Definition: Event.h:196
Event & WithTimestamp(const char *value)
Definition: Event.h:129
Event & WithMetrics(Aws::Map< Aws::String, double > &&value)
Definition: Event.h:308
JSON (JavaScript Object Notation).
void SetSession(Session &&value)
Definition: Event.h:144
Event & WithAttributes(const Aws::Map< Aws::String, Aws::String > &value)
Definition: Event.h:217