AWS SDK for C++

AWS SDK for C++ Version 1.11.687

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/cloudtrail/CloudTrail_EXPORTS.h>
8#include <aws/cloudtrail/model/Resource.h>
9#include <aws/core/utils/DateTime.h>
10#include <aws/core/utils/memory/stl/AWSString.h>
11#include <aws/core/utils/memory/stl/AWSVector.h>
12
13#include <utility>
14
15namespace Aws {
16namespace Utils {
17namespace Json {
18class JsonValue;
19class JsonView;
20} // namespace Json
21} // namespace Utils
22namespace CloudTrail {
23namespace Model {
24
32class Event {
33 public:
34 AWS_CLOUDTRAIL_API Event() = default;
35 AWS_CLOUDTRAIL_API Event(Aws::Utils::Json::JsonView jsonValue);
36 AWS_CLOUDTRAIL_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_CLOUDTRAIL_API Aws::Utils::Json::JsonValue Jsonize() const;
38
40
43 inline const Aws::String& GetEventId() const { return m_eventId; }
44 inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; }
45 template <typename EventIdT = Aws::String>
46 void SetEventId(EventIdT&& value) {
47 m_eventIdHasBeenSet = true;
48 m_eventId = std::forward<EventIdT>(value);
49 }
50 template <typename EventIdT = Aws::String>
51 Event& WithEventId(EventIdT&& value) {
52 SetEventId(std::forward<EventIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::String& GetEventName() const { return m_eventName; }
62 inline bool EventNameHasBeenSet() const { return m_eventNameHasBeenSet; }
63 template <typename EventNameT = Aws::String>
64 void SetEventName(EventNameT&& value) {
65 m_eventNameHasBeenSet = true;
66 m_eventName = std::forward<EventNameT>(value);
67 }
68 template <typename EventNameT = Aws::String>
69 Event& WithEventName(EventNameT&& value) {
70 SetEventName(std::forward<EventNameT>(value));
71 return *this;
72 }
74
76
79 inline const Aws::String& GetReadOnly() const { return m_readOnly; }
80 inline bool ReadOnlyHasBeenSet() const { return m_readOnlyHasBeenSet; }
81 template <typename ReadOnlyT = Aws::String>
82 void SetReadOnly(ReadOnlyT&& value) {
83 m_readOnlyHasBeenSet = true;
84 m_readOnly = std::forward<ReadOnlyT>(value);
85 }
86 template <typename ReadOnlyT = Aws::String>
87 Event& WithReadOnly(ReadOnlyT&& value) {
88 SetReadOnly(std::forward<ReadOnlyT>(value));
89 return *this;
90 }
92
94
99 inline const Aws::String& GetAccessKeyId() const { return m_accessKeyId; }
100 inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; }
101 template <typename AccessKeyIdT = Aws::String>
102 void SetAccessKeyId(AccessKeyIdT&& value) {
103 m_accessKeyIdHasBeenSet = true;
104 m_accessKeyId = std::forward<AccessKeyIdT>(value);
105 }
106 template <typename AccessKeyIdT = Aws::String>
107 Event& WithAccessKeyId(AccessKeyIdT&& value) {
108 SetAccessKeyId(std::forward<AccessKeyIdT>(value));
109 return *this;
110 }
112
114
117 inline const Aws::Utils::DateTime& GetEventTime() const { return m_eventTime; }
118 inline bool EventTimeHasBeenSet() const { return m_eventTimeHasBeenSet; }
119 template <typename EventTimeT = Aws::Utils::DateTime>
120 void SetEventTime(EventTimeT&& value) {
121 m_eventTimeHasBeenSet = true;
122 m_eventTime = std::forward<EventTimeT>(value);
123 }
124 template <typename EventTimeT = Aws::Utils::DateTime>
125 Event& WithEventTime(EventTimeT&& value) {
126 SetEventTime(std::forward<EventTimeT>(value));
127 return *this;
128 }
130
132
135 inline const Aws::String& GetEventSource() const { return m_eventSource; }
136 inline bool EventSourceHasBeenSet() const { return m_eventSourceHasBeenSet; }
137 template <typename EventSourceT = Aws::String>
138 void SetEventSource(EventSourceT&& value) {
139 m_eventSourceHasBeenSet = true;
140 m_eventSource = std::forward<EventSourceT>(value);
141 }
142 template <typename EventSourceT = Aws::String>
143 Event& WithEventSource(EventSourceT&& value) {
144 SetEventSource(std::forward<EventSourceT>(value));
145 return *this;
146 }
148
150
154 inline const Aws::String& GetUsername() const { return m_username; }
155 inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; }
156 template <typename UsernameT = Aws::String>
157 void SetUsername(UsernameT&& value) {
158 m_usernameHasBeenSet = true;
159 m_username = std::forward<UsernameT>(value);
160 }
161 template <typename UsernameT = Aws::String>
162 Event& WithUsername(UsernameT&& value) {
163 SetUsername(std::forward<UsernameT>(value));
164 return *this;
165 }
167
169
172 inline const Aws::Vector<Resource>& GetResources() const { return m_resources; }
173 inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; }
174 template <typename ResourcesT = Aws::Vector<Resource>>
175 void SetResources(ResourcesT&& value) {
176 m_resourcesHasBeenSet = true;
177 m_resources = std::forward<ResourcesT>(value);
178 }
179 template <typename ResourcesT = Aws::Vector<Resource>>
180 Event& WithResources(ResourcesT&& value) {
181 SetResources(std::forward<ResourcesT>(value));
182 return *this;
183 }
184 template <typename ResourcesT = Resource>
185 Event& AddResources(ResourcesT&& value) {
186 m_resourcesHasBeenSet = true;
187 m_resources.emplace_back(std::forward<ResourcesT>(value));
188 return *this;
189 }
191
193
196 inline const Aws::String& GetCloudTrailEvent() const { return m_cloudTrailEvent; }
197 inline bool CloudTrailEventHasBeenSet() const { return m_cloudTrailEventHasBeenSet; }
198 template <typename CloudTrailEventT = Aws::String>
199 void SetCloudTrailEvent(CloudTrailEventT&& value) {
200 m_cloudTrailEventHasBeenSet = true;
201 m_cloudTrailEvent = std::forward<CloudTrailEventT>(value);
202 }
203 template <typename CloudTrailEventT = Aws::String>
204 Event& WithCloudTrailEvent(CloudTrailEventT&& value) {
205 SetCloudTrailEvent(std::forward<CloudTrailEventT>(value));
206 return *this;
207 }
209 private:
210 Aws::String m_eventId;
211 bool m_eventIdHasBeenSet = false;
212
213 Aws::String m_eventName;
214 bool m_eventNameHasBeenSet = false;
215
216 Aws::String m_readOnly;
217 bool m_readOnlyHasBeenSet = false;
218
219 Aws::String m_accessKeyId;
220 bool m_accessKeyIdHasBeenSet = false;
221
222 Aws::Utils::DateTime m_eventTime{};
223 bool m_eventTimeHasBeenSet = false;
224
225 Aws::String m_eventSource;
226 bool m_eventSourceHasBeenSet = false;
227
228 Aws::String m_username;
229 bool m_usernameHasBeenSet = false;
230
231 Aws::Vector<Resource> m_resources;
232 bool m_resourcesHasBeenSet = false;
233
234 Aws::String m_cloudTrailEvent;
235 bool m_cloudTrailEventHasBeenSet = false;
236};
237
238} // namespace Model
239} // namespace CloudTrail
240} // namespace Aws
void SetUsername(UsernameT &&value)
Definition Event.h:157
void SetResources(ResourcesT &&value)
Definition Event.h:175
bool EventSourceHasBeenSet() const
Definition Event.h:136
AWS_CLOUDTRAIL_API Aws::Utils::Json::JsonValue Jsonize() const
bool EventTimeHasBeenSet() const
Definition Event.h:118
Event & WithEventSource(EventSourceT &&value)
Definition Event.h:143
bool CloudTrailEventHasBeenSet() const
Definition Event.h:197
const Aws::String & GetEventSource() const
Definition Event.h:135
Event & WithAccessKeyId(AccessKeyIdT &&value)
Definition Event.h:107
const Aws::Utils::DateTime & GetEventTime() const
Definition Event.h:117
bool AccessKeyIdHasBeenSet() const
Definition Event.h:100
const Aws::String & GetReadOnly() const
Definition Event.h:79
void SetEventId(EventIdT &&value)
Definition Event.h:46
const Aws::String & GetUsername() const
Definition Event.h:154
const Aws::String & GetEventName() const
Definition Event.h:61
AWS_CLOUDTRAIL_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
void SetEventTime(EventTimeT &&value)
Definition Event.h:120
Event & WithEventName(EventNameT &&value)
Definition Event.h:69
void SetEventSource(EventSourceT &&value)
Definition Event.h:138
Event & WithResources(ResourcesT &&value)
Definition Event.h:180
Event & WithReadOnly(ReadOnlyT &&value)
Definition Event.h:87
AWS_CLOUDTRAIL_API Event(Aws::Utils::Json::JsonView jsonValue)
Event & WithEventTime(EventTimeT &&value)
Definition Event.h:125
void SetEventName(EventNameT &&value)
Definition Event.h:64
AWS_CLOUDTRAIL_API Event()=default
const Aws::String & GetAccessKeyId() const
Definition Event.h:99
void SetCloudTrailEvent(CloudTrailEventT &&value)
Definition Event.h:199
bool ReadOnlyHasBeenSet() const
Definition Event.h:80
Event & WithUsername(UsernameT &&value)
Definition Event.h:162
const Aws::String & GetEventId() const
Definition Event.h:43
Event & AddResources(ResourcesT &&value)
Definition Event.h:185
const Aws::String & GetCloudTrailEvent() const
Definition Event.h:196
bool EventIdHasBeenSet() const
Definition Event.h:44
void SetAccessKeyId(AccessKeyIdT &&value)
Definition Event.h:102
bool ResourcesHasBeenSet() const
Definition Event.h:173
bool EventNameHasBeenSet() const
Definition Event.h:62
Event & WithCloudTrailEvent(CloudTrailEventT &&value)
Definition Event.h:204
void SetReadOnly(ReadOnlyT &&value)
Definition Event.h:82
const Aws::Vector< Resource > & GetResources() const
Definition Event.h:172
bool UsernameHasBeenSet() const
Definition Event.h:155
Event & WithEventId(EventIdT &&value)
Definition Event.h:51
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue