AWS SDK for C++

AWS SDK for C++ Version 1.11.751

Loading...
Searching...
No Matches
Event.h
1
6#pragma once
7#include <aws/core/utils/memory/stl/AWSString.h>
8#include <aws/core/utils/memory/stl/AWSVector.h>
9#include <aws/iotevents/IoTEvents_EXPORTS.h>
10#include <aws/iotevents/model/Action.h>
11
12#include <utility>
13
14namespace Aws {
15namespace Utils {
16namespace Json {
17class JsonValue;
18class JsonView;
19} // namespace Json
20} // namespace Utils
21namespace IoTEvents {
22namespace Model {
23
30class Event {
31 public:
32 AWS_IOTEVENTS_API Event() = default;
33 AWS_IOTEVENTS_API Event(Aws::Utils::Json::JsonView jsonValue);
34 AWS_IOTEVENTS_API Event& operator=(Aws::Utils::Json::JsonView jsonValue);
35 AWS_IOTEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const;
36
38
41 inline const Aws::String& GetEventName() const { return m_eventName; }
42 inline bool EventNameHasBeenSet() const { return m_eventNameHasBeenSet; }
43 template <typename EventNameT = Aws::String>
44 void SetEventName(EventNameT&& value) {
45 m_eventNameHasBeenSet = true;
46 m_eventName = std::forward<EventNameT>(value);
47 }
48 template <typename EventNameT = Aws::String>
49 Event& WithEventName(EventNameT&& value) {
50 SetEventName(std::forward<EventNameT>(value));
51 return *this;
52 }
54
56
62 inline const Aws::String& GetCondition() const { return m_condition; }
63 inline bool ConditionHasBeenSet() const { return m_conditionHasBeenSet; }
64 template <typename ConditionT = Aws::String>
65 void SetCondition(ConditionT&& value) {
66 m_conditionHasBeenSet = true;
67 m_condition = std::forward<ConditionT>(value);
68 }
69 template <typename ConditionT = Aws::String>
70 Event& WithCondition(ConditionT&& value) {
71 SetCondition(std::forward<ConditionT>(value));
72 return *this;
73 }
75
77
80 inline const Aws::Vector<Action>& GetActions() const { return m_actions; }
81 inline bool ActionsHasBeenSet() const { return m_actionsHasBeenSet; }
82 template <typename ActionsT = Aws::Vector<Action>>
83 void SetActions(ActionsT&& value) {
84 m_actionsHasBeenSet = true;
85 m_actions = std::forward<ActionsT>(value);
86 }
87 template <typename ActionsT = Aws::Vector<Action>>
88 Event& WithActions(ActionsT&& value) {
89 SetActions(std::forward<ActionsT>(value));
90 return *this;
91 }
92 template <typename ActionsT = Action>
93 Event& AddActions(ActionsT&& value) {
94 m_actionsHasBeenSet = true;
95 m_actions.emplace_back(std::forward<ActionsT>(value));
96 return *this;
97 }
99 private:
100 Aws::String m_eventName;
101
102 Aws::String m_condition;
103
104 Aws::Vector<Action> m_actions;
105 bool m_eventNameHasBeenSet = false;
106 bool m_conditionHasBeenSet = false;
107 bool m_actionsHasBeenSet = false;
108};
109
110} // namespace Model
111} // namespace IoTEvents
112} // namespace Aws
Event & WithCondition(ConditionT &&value)
Definition Event.h:70
AWS_IOTEVENTS_API Event(Aws::Utils::Json::JsonView jsonValue)
void SetEventName(EventNameT &&value)
Definition Event.h:44
void SetActions(ActionsT &&value)
Definition Event.h:83
const Aws::String & GetEventName() const
Definition Event.h:41
Event & WithEventName(EventNameT &&value)
Definition Event.h:49
const Aws::String & GetCondition() const
Definition Event.h:62
void SetCondition(ConditionT &&value)
Definition Event.h:65
AWS_IOTEVENTS_API Aws::Utils::Json::JsonValue Jsonize() const
bool ActionsHasBeenSet() const
Definition Event.h:81
AWS_IOTEVENTS_API Event()=default
bool EventNameHasBeenSet() const
Definition Event.h:42
Event & AddActions(ActionsT &&value)
Definition Event.h:93
Event & WithActions(ActionsT &&value)
Definition Event.h:88
bool ConditionHasBeenSet() const
Definition Event.h:63
const Aws::Vector< Action > & GetActions() const
Definition Event.h:80
AWS_IOTEVENTS_API Event & operator=(Aws::Utils::Json::JsonView jsonValue)
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
std::vector< T, Aws::Allocator< T > > Vector
Aws::Utils::Json::JsonValue JsonValue