AWS SDK for C++  0.12.9
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
21 
22 namespace Aws
23 {
24 namespace Utils
25 {
26 namespace Json
27 {
28  class JsonValue;
29 } // namespace Json
30 } // namespace Utils
31 namespace CloudTrail
32 {
33 namespace Model
34 {
35 
41  {
42  public:
43  Event();
44  Event(const Aws::Utils::Json::JsonValue& jsonValue);
45  Event& operator=(const Aws::Utils::Json::JsonValue& jsonValue);
46  Aws::Utils::Json::JsonValue Jsonize() const;
47 
51  inline const Aws::String& GetEventId() const{ return m_eventId; }
52 
56  inline void SetEventId(const Aws::String& value) { m_eventIdHasBeenSet = true; m_eventId = value; }
57 
61  inline void SetEventId(Aws::String&& value) { m_eventIdHasBeenSet = true; m_eventId = value; }
62 
66  inline void SetEventId(const char* value) { m_eventIdHasBeenSet = true; m_eventId.assign(value); }
67 
71  inline Event& WithEventId(const Aws::String& value) { SetEventId(value); return *this;}
72 
76  inline Event& WithEventId(Aws::String&& value) { SetEventId(value); return *this;}
77 
81  inline Event& WithEventId(const char* value) { SetEventId(value); return *this;}
82 
86  inline const Aws::String& GetEventName() const{ return m_eventName; }
87 
91  inline void SetEventName(const Aws::String& value) { m_eventNameHasBeenSet = true; m_eventName = value; }
92 
96  inline void SetEventName(Aws::String&& value) { m_eventNameHasBeenSet = true; m_eventName = value; }
97 
101  inline void SetEventName(const char* value) { m_eventNameHasBeenSet = true; m_eventName.assign(value); }
102 
106  inline Event& WithEventName(const Aws::String& value) { SetEventName(value); return *this;}
107 
111  inline Event& WithEventName(Aws::String&& value) { SetEventName(value); return *this;}
112 
116  inline Event& WithEventName(const char* value) { SetEventName(value); return *this;}
117 
121  inline const Aws::Utils::DateTime& GetEventTime() const{ return m_eventTime; }
122 
126  inline void SetEventTime(const Aws::Utils::DateTime& value) { m_eventTimeHasBeenSet = true; m_eventTime = value; }
127 
131  inline void SetEventTime(Aws::Utils::DateTime&& value) { m_eventTimeHasBeenSet = true; m_eventTime = value; }
132 
136  inline Event& WithEventTime(const Aws::Utils::DateTime& value) { SetEventTime(value); return *this;}
137 
141  inline Event& WithEventTime(Aws::Utils::DateTime&& value) { SetEventTime(value); return *this;}
142 
147  inline const Aws::String& GetUsername() const{ return m_username; }
148 
153  inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; }
154 
159  inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = value; }
160 
165  inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); }
166 
171  inline Event& WithUsername(const Aws::String& value) { SetUsername(value); return *this;}
172 
177  inline Event& WithUsername(Aws::String&& value) { SetUsername(value); return *this;}
178 
183  inline Event& WithUsername(const char* value) { SetUsername(value); return *this;}
184 
188  inline const Aws::Vector<Resource>& GetResources() const{ return m_resources; }
189 
193  inline void SetResources(const Aws::Vector<Resource>& value) { m_resourcesHasBeenSet = true; m_resources = value; }
194 
198  inline void SetResources(Aws::Vector<Resource>&& value) { m_resourcesHasBeenSet = true; m_resources = value; }
199 
203  inline Event& WithResources(const Aws::Vector<Resource>& value) { SetResources(value); return *this;}
204 
208  inline Event& WithResources(Aws::Vector<Resource>&& value) { SetResources(value); return *this;}
209 
213  inline Event& AddResources(const Resource& value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; }
214 
218  inline Event& AddResources(Resource&& value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; }
219 
223  inline const Aws::String& GetCloudTrailEvent() const{ return m_cloudTrailEvent; }
224 
228  inline void SetCloudTrailEvent(const Aws::String& value) { m_cloudTrailEventHasBeenSet = true; m_cloudTrailEvent = value; }
229 
233  inline void SetCloudTrailEvent(Aws::String&& value) { m_cloudTrailEventHasBeenSet = true; m_cloudTrailEvent = value; }
234 
238  inline void SetCloudTrailEvent(const char* value) { m_cloudTrailEventHasBeenSet = true; m_cloudTrailEvent.assign(value); }
239 
243  inline Event& WithCloudTrailEvent(const Aws::String& value) { SetCloudTrailEvent(value); return *this;}
244 
248  inline Event& WithCloudTrailEvent(Aws::String&& value) { SetCloudTrailEvent(value); return *this;}
249 
253  inline Event& WithCloudTrailEvent(const char* value) { SetCloudTrailEvent(value); return *this;}
254 
255  private:
256  Aws::String m_eventId;
257  bool m_eventIdHasBeenSet;
258  Aws::String m_eventName;
259  bool m_eventNameHasBeenSet;
260  Aws::Utils::DateTime m_eventTime;
261  bool m_eventTimeHasBeenSet;
262  Aws::String m_username;
263  bool m_usernameHasBeenSet;
264  Aws::Vector<Resource> m_resources;
265  bool m_resourcesHasBeenSet;
266  Aws::String m_cloudTrailEvent;
267  bool m_cloudTrailEventHasBeenSet;
268  };
269 
270 } // namespace Model
271 } // namespace CloudTrail
272 } // namespace Aws
const Aws::String & GetEventId() const
Definition: Event.h:51
const Aws::String & GetUsername() const
Definition: Event.h:147
void SetUsername(const char *value)
Definition: Event.h:165
void SetCloudTrailEvent(const Aws::String &value)
Definition: Event.h:228
void SetEventName(Aws::String &&value)
Definition: Event.h:96
Event & WithUsername(Aws::String &&value)
Definition: Event.h:177
Event & AddResources(Resource &&value)
Definition: Event.h:218
std::vector< T, Aws::Allocator< T > > Vector
Definition: AWSVector.h:27
void SetResources(const Aws::Vector< Resource > &value)
Definition: Event.h:193
void SetEventId(const Aws::String &value)
Definition: Event.h:56
Event & AddResources(const Resource &value)
Definition: Event.h:213
Event & WithEventTime(Aws::Utils::DateTime &&value)
Definition: Event.h:141
Event & WithUsername(const Aws::String &value)
Definition: Event.h:171
Event & WithCloudTrailEvent(const Aws::String &value)
Definition: Event.h:243
const Aws::Utils::DateTime & GetEventTime() const
Definition: Event.h:121
Event & WithCloudTrailEvent(const char *value)
Definition: Event.h:253
void SetEventId(Aws::String &&value)
Definition: Event.h:61
void SetEventName(const Aws::String &value)
Definition: Event.h:91
Event & WithEventName(const Aws::String &value)
Definition: Event.h:106
Event & WithResources(Aws::Vector< Resource > &&value)
Definition: Event.h:208
void SetEventName(const char *value)
Definition: Event.h:101
Event & WithEventId(const char *value)
Definition: Event.h:81
void SetCloudTrailEvent(Aws::String &&value)
Definition: Event.h:233
void SetEventTime(const Aws::Utils::DateTime &value)
Definition: Event.h:126
Event & WithCloudTrailEvent(Aws::String &&value)
Definition: Event.h:248
void SetResources(Aws::Vector< Resource > &&value)
Definition: Event.h:198
void SetEventTime(Aws::Utils::DateTime &&value)
Definition: Event.h:131
void SetUsername(Aws::String &&value)
Definition: Event.h:159
Event & WithEventId(Aws::String &&value)
Definition: Event.h:76
void SetEventId(const char *value)
Definition: Event.h:66
Event & WithEventName(const char *value)
Definition: Event.h:116
Event & WithUsername(const char *value)
Definition: Event.h:183
void SetCloudTrailEvent(const char *value)
Definition: Event.h:238
Event & WithResources(const Aws::Vector< Resource > &value)
Definition: Event.h:203
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Definition: AWSString.h:97
const Aws::Vector< Resource > & GetResources() const
Definition: Event.h:188
const Aws::String & GetEventName() const
Definition: Event.h:86
#define AWS_CLOUDTRAIL_API
const Aws::String & GetCloudTrailEvent() const
Definition: Event.h:223
void SetUsername(const Aws::String &value)
Definition: Event.h:153
Event & WithEventId(const Aws::String &value)
Definition: Event.h:71
Event & WithEventTime(const Aws::Utils::DateTime &value)
Definition: Event.h:136
Event & WithEventName(Aws::String &&value)
Definition: Event.h:111
JSON (JavaScript Object Notation).