AWS SDK for C++

AWS SDK for C++ Version 1.11.743

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/core/utils/memory/stl/AWSVector.h>
10#include <aws/devops-guru/DevOpsGuru_EXPORTS.h>
11#include <aws/devops-guru/model/EventClass.h>
12#include <aws/devops-guru/model/EventDataSource.h>
13#include <aws/devops-guru/model/EventResource.h>
14#include <aws/devops-guru/model/ResourceCollection.h>
15
16#include <utility>
17
18namespace Aws {
19namespace Utils {
20namespace Json {
21class JsonValue;
22class JsonView;
23} // namespace Json
24} // namespace Utils
25namespace DevOpsGuru {
26namespace Model {
27
36class Event {
37 public:
38 AWS_DEVOPSGURU_API Event() = default;
39 AWS_DEVOPSGURU_API Event(Aws::Utils::Json::JsonView jsonValue);
40 AWS_DEVOPSGURU_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
41 AWS_DEVOPSGURU_API Aws::Utils::Json::JsonValue Jsonize() const;
42
44
45 inline const ResourceCollection& GetResourceCollection() const { return m_resourceCollection; }
46 inline bool ResourceCollectionHasBeenSet() const { return m_resourceCollectionHasBeenSet; }
47 template <typename ResourceCollectionT = ResourceCollection>
48 void SetResourceCollection(ResourceCollectionT&& value) {
49 m_resourceCollectionHasBeenSet = true;
50 m_resourceCollection = std::forward<ResourceCollectionT>(value);
51 }
52 template <typename ResourceCollectionT = ResourceCollection>
53 Event& WithResourceCollection(ResourceCollectionT&& value) {
54 SetResourceCollection(std::forward<ResourceCollectionT>(value));
55 return *this;
56 }
58
60
63 inline const Aws::String& GetId() const { return m_id; }
64 inline bool IdHasBeenSet() const { return m_idHasBeenSet; }
65 template <typename IdT = Aws::String>
66 void SetId(IdT&& value) {
67 m_idHasBeenSet = true;
68 m_id = std::forward<IdT>(value);
69 }
70 template <typename IdT = Aws::String>
71 Event& WithId(IdT&& value) {
72 SetId(std::forward<IdT>(value));
73 return *this;
74 }
76
78
81 inline const Aws::Utils::DateTime& GetTime() const { return m_time; }
82 inline bool TimeHasBeenSet() const { return m_timeHasBeenSet; }
83 template <typename TimeT = Aws::Utils::DateTime>
84 void SetTime(TimeT&& value) {
85 m_timeHasBeenSet = true;
86 m_time = std::forward<TimeT>(value);
87 }
88 template <typename TimeT = Aws::Utils::DateTime>
89 Event& WithTime(TimeT&& value) {
90 SetTime(std::forward<TimeT>(value));
91 return *this;
92 }
94
96
99 inline const Aws::String& GetEventSource() const { return m_eventSource; }
100 inline bool EventSourceHasBeenSet() const { return m_eventSourceHasBeenSet; }
101 template <typename EventSourceT = Aws::String>
102 void SetEventSource(EventSourceT&& value) {
103 m_eventSourceHasBeenSet = true;
104 m_eventSource = std::forward<EventSourceT>(value);
105 }
106 template <typename EventSourceT = Aws::String>
107 Event& WithEventSource(EventSourceT&& value) {
108 SetEventSource(std::forward<EventSourceT>(value));
109 return *this;
110 }
112
114
117 inline const Aws::String& GetName() const { return m_name; }
118 inline bool NameHasBeenSet() const { return m_nameHasBeenSet; }
119 template <typename NameT = Aws::String>
120 void SetName(NameT&& value) {
121 m_nameHasBeenSet = true;
122 m_name = std::forward<NameT>(value);
123 }
124 template <typename NameT = Aws::String>
125 Event& WithName(NameT&& value) {
126 SetName(std::forward<NameT>(value));
127 return *this;
128 }
130
132
136 inline EventDataSource GetDataSource() const { return m_dataSource; }
137 inline bool DataSourceHasBeenSet() const { return m_dataSourceHasBeenSet; }
138 inline void SetDataSource(EventDataSource value) {
139 m_dataSourceHasBeenSet = true;
140 m_dataSource = value;
141 }
143 SetDataSource(value);
144 return *this;
145 }
147
149
153 inline EventClass GetEventClass() const { return m_eventClass; }
154 inline bool EventClassHasBeenSet() const { return m_eventClassHasBeenSet; }
155 inline void SetEventClass(EventClass value) {
156 m_eventClassHasBeenSet = true;
157 m_eventClass = value;
158 }
160 SetEventClass(value);
161 return *this;
162 }
164
166
170 inline const Aws::Vector<EventResource>& GetResources() const { return m_resources; }
171 inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; }
172 template <typename ResourcesT = Aws::Vector<EventResource>>
173 void SetResources(ResourcesT&& value) {
174 m_resourcesHasBeenSet = true;
175 m_resources = std::forward<ResourcesT>(value);
176 }
177 template <typename ResourcesT = Aws::Vector<EventResource>>
178 Event& WithResources(ResourcesT&& value) {
179 SetResources(std::forward<ResourcesT>(value));
180 return *this;
181 }
182 template <typename ResourcesT = EventResource>
183 Event& AddResources(ResourcesT&& value) {
184 m_resourcesHasBeenSet = true;
185 m_resources.emplace_back(std::forward<ResourcesT>(value));
186 return *this;
187 }
189 private:
190 ResourceCollection m_resourceCollection;
191
192 Aws::String m_id;
193
194 Aws::Utils::DateTime m_time{};
195
196 Aws::String m_eventSource;
197
198 Aws::String m_name;
199
201
202 EventClass m_eventClass{EventClass::NOT_SET};
203
204 Aws::Vector<EventResource> m_resources;
205 bool m_resourceCollectionHasBeenSet = false;
206 bool m_idHasBeenSet = false;
207 bool m_timeHasBeenSet = false;
208 bool m_eventSourceHasBeenSet = false;
209 bool m_nameHasBeenSet = false;
210 bool m_dataSourceHasBeenSet = false;
211 bool m_eventClassHasBeenSet = false;
212 bool m_resourcesHasBeenSet = false;
213};
214
215} // namespace Model
216} // namespace DevOpsGuru
217} // namespace Aws
void SetResourceCollection(ResourceCollectionT &&value)
Definition Event.h:48
EventClass GetEventClass() const
Definition Event.h:153
Event & WithResources(ResourcesT &&value)
Definition Event.h:178
void SetResources(ResourcesT &&value)
Definition Event.h:173
bool NameHasBeenSet() const
Definition Event.h:118
void SetEventSource(EventSourceT &&value)
Definition Event.h:102
AWS_DEVOPSGURU_API Event(Aws::Utils::Json::JsonView jsonValue)
Event & WithDataSource(EventDataSource value)
Definition Event.h:142
bool IdHasBeenSet() const
Definition Event.h:64
Event & AddResources(ResourcesT &&value)
Definition Event.h:183
const ResourceCollection & GetResourceCollection() const
Definition Event.h:45
bool EventSourceHasBeenSet() const
Definition Event.h:100
bool ResourceCollectionHasBeenSet() const
Definition Event.h:46
Event & WithName(NameT &&value)
Definition Event.h:125
void SetName(NameT &&value)
Definition Event.h:120
void SetTime(TimeT &&value)
Definition Event.h:84
bool EventClassHasBeenSet() const
Definition Event.h:154
void SetDataSource(EventDataSource value)
Definition Event.h:138
const Aws::String & GetName() const
Definition Event.h:117
Event & WithEventClass(EventClass value)
Definition Event.h:159
const Aws::String & GetEventSource() const
Definition Event.h:99
const Aws::Vector< EventResource > & GetResources() const
Definition Event.h:170
bool ResourcesHasBeenSet() const
Definition Event.h:171
AWS_DEVOPSGURU_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
AWS_DEVOPSGURU_API Event()=default
bool TimeHasBeenSet() const
Definition Event.h:82
Event & WithEventSource(EventSourceT &&value)
Definition Event.h:107
Event & WithTime(TimeT &&value)
Definition Event.h:89
bool DataSourceHasBeenSet() const
Definition Event.h:137
const Aws::Utils::DateTime & GetTime() const
Definition Event.h:81
AWS_DEVOPSGURU_API Aws::Utils::Json::JsonValue Jsonize() const
void SetEventClass(EventClass value)
Definition Event.h:155
Event & WithResourceCollection(ResourceCollectionT &&value)
Definition Event.h:53
Event & WithId(IdT &&value)
Definition Event.h:71
EventDataSource GetDataSource() const
Definition Event.h:136
const Aws::String & GetId() const
Definition Event.h:63
void SetId(IdT &&value)
Definition Event.h:66
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue