AWS SDK for C++

AWS SDK for C++ Version 1.11.899

Loading...
Searching...
No Matches
PolicyEvent.h
1
6#pragma once
7#include <aws/core/utils/DateTime.h>
8#include <aws/core/utils/memory/stl/AWSString.h>
9#include <aws/resiliencehubv2/Resiliencehubv2_EXPORTS.h>
10#include <aws/resiliencehubv2/model/EventActor.h>
11#include <aws/resiliencehubv2/model/PolicyEventDetails.h>
12#include <aws/resiliencehubv2/model/PolicyEventType.h>
13
14#include <utility>
15
16namespace Aws {
17namespace Utils {
18namespace Json {
19class JsonValue;
20class JsonView;
21} // namespace Json
22} // namespace Utils
23namespace resiliencehubv2 {
24namespace Model {
25
33 public:
34 AWS_RESILIENCEHUBV2_API PolicyEvent() = default;
35 AWS_RESILIENCEHUBV2_API PolicyEvent(Aws::Utils::Json::JsonView jsonValue);
36 AWS_RESILIENCEHUBV2_API PolicyEvent& operator=(Aws::Utils::Json::JsonView jsonValue);
37 AWS_RESILIENCEHUBV2_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 PolicyEvent& WithEventId(EventIdT&& value) {
52 SetEventId(std::forward<EventIdT>(value));
53 return *this;
54 }
56
58
61 inline const Aws::Utils::DateTime& GetTimestamp() const { return m_timestamp; }
62 inline bool TimestampHasBeenSet() const { return m_timestampHasBeenSet; }
63 template <typename TimestampT = Aws::Utils::DateTime>
64 void SetTimestamp(TimestampT&& value) {
65 m_timestampHasBeenSet = true;
66 m_timestamp = std::forward<TimestampT>(value);
67 }
68 template <typename TimestampT = Aws::Utils::DateTime>
69 PolicyEvent& WithTimestamp(TimestampT&& value) {
70 SetTimestamp(std::forward<TimestampT>(value));
71 return *this;
72 }
74
76
79 inline PolicyEventType GetEventType() const { return m_eventType; }
80 inline bool EventTypeHasBeenSet() const { return m_eventTypeHasBeenSet; }
81 inline void SetEventType(PolicyEventType value) {
82 m_eventTypeHasBeenSet = true;
83 m_eventType = value;
84 }
86 SetEventType(value);
87 return *this;
88 }
90
92
93 inline const Aws::String& GetPolicyArn() const { return m_policyArn; }
94 inline bool PolicyArnHasBeenSet() const { return m_policyArnHasBeenSet; }
95 template <typename PolicyArnT = Aws::String>
96 void SetPolicyArn(PolicyArnT&& value) {
97 m_policyArnHasBeenSet = true;
98 m_policyArn = std::forward<PolicyArnT>(value);
99 }
100 template <typename PolicyArnT = Aws::String>
101 PolicyEvent& WithPolicyArn(PolicyArnT&& value) {
102 SetPolicyArn(std::forward<PolicyArnT>(value));
103 return *this;
104 }
106
108
109 inline const EventActor& GetActor() const { return m_actor; }
110 inline bool ActorHasBeenSet() const { return m_actorHasBeenSet; }
111 template <typename ActorT = EventActor>
112 void SetActor(ActorT&& value) {
113 m_actorHasBeenSet = true;
114 m_actor = std::forward<ActorT>(value);
115 }
116 template <typename ActorT = EventActor>
117 PolicyEvent& WithActor(ActorT&& value) {
118 SetActor(std::forward<ActorT>(value));
119 return *this;
120 }
122
124
127 inline const PolicyEventDetails& GetEventDetails() const { return m_eventDetails; }
128 inline bool EventDetailsHasBeenSet() const { return m_eventDetailsHasBeenSet; }
129 template <typename EventDetailsT = PolicyEventDetails>
130 void SetEventDetails(EventDetailsT&& value) {
131 m_eventDetailsHasBeenSet = true;
132 m_eventDetails = std::forward<EventDetailsT>(value);
133 }
134 template <typename EventDetailsT = PolicyEventDetails>
135 PolicyEvent& WithEventDetails(EventDetailsT&& value) {
136 SetEventDetails(std::forward<EventDetailsT>(value));
137 return *this;
138 }
140 private:
141 Aws::String m_eventId;
142
143 Aws::Utils::DateTime m_timestamp{};
144
146
147 Aws::String m_policyArn;
148
149 EventActor m_actor;
150
151 PolicyEventDetails m_eventDetails;
152 bool m_eventIdHasBeenSet = false;
153 bool m_timestampHasBeenSet = false;
154 bool m_eventTypeHasBeenSet = false;
155 bool m_policyArnHasBeenSet = false;
156 bool m_actorHasBeenSet = false;
157 bool m_eventDetailsHasBeenSet = false;
158};
159
160} // namespace Model
161} // namespace resiliencehubv2
162} // namespace Aws
void SetEventDetails(EventDetailsT &&value)
PolicyEvent & WithActor(ActorT &&value)
void SetPolicyArn(PolicyArnT &&value)
Definition PolicyEvent.h:96
AWS_RESILIENCEHUBV2_API PolicyEvent()=default
AWS_RESILIENCEHUBV2_API PolicyEvent & operator=(Aws::Utils::Json::JsonView jsonValue)
PolicyEventType GetEventType() const
Definition PolicyEvent.h:79
const Aws::String & GetPolicyArn() const
Definition PolicyEvent.h:93
void SetEventType(PolicyEventType value)
Definition PolicyEvent.h:81
AWS_RESILIENCEHUBV2_API Aws::Utils::Json::JsonValue Jsonize() const
AWS_RESILIENCEHUBV2_API PolicyEvent(Aws::Utils::Json::JsonView jsonValue)
const Aws::Utils::DateTime & GetTimestamp() const
Definition PolicyEvent.h:61
const Aws::String & GetEventId() const
Definition PolicyEvent.h:43
void SetTimestamp(TimestampT &&value)
Definition PolicyEvent.h:64
PolicyEvent & WithTimestamp(TimestampT &&value)
Definition PolicyEvent.h:69
const EventActor & GetActor() const
PolicyEvent & WithEventType(PolicyEventType value)
Definition PolicyEvent.h:85
PolicyEvent & WithPolicyArn(PolicyArnT &&value)
PolicyEvent & WithEventDetails(EventDetailsT &&value)
const PolicyEventDetails & GetEventDetails() const
PolicyEvent & WithEventId(EventIdT &&value)
Definition PolicyEvent.h:51
std::basic_string< char, std::char_traits< char >, Aws::Allocator< char > > String
Aws::Utils::Json::JsonValue JsonValue