/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace CloudTrail { namespace Model { /** *

Contains information about an event that was returned by a lookup request. * The result includes a representation of a CloudTrail event.

See * Also:

AWS * API Reference

*/ class Event { public: AWS_CLOUDTRAIL_API Event(); AWS_CLOUDTRAIL_API Event(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDTRAIL_API Event& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_CLOUDTRAIL_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

The CloudTrail ID of the event returned.

*/ inline const Aws::String& GetEventId() const{ return m_eventId; } /** *

The CloudTrail ID of the event returned.

*/ inline bool EventIdHasBeenSet() const { return m_eventIdHasBeenSet; } /** *

The CloudTrail ID of the event returned.

*/ inline void SetEventId(const Aws::String& value) { m_eventIdHasBeenSet = true; m_eventId = value; } /** *

The CloudTrail ID of the event returned.

*/ inline void SetEventId(Aws::String&& value) { m_eventIdHasBeenSet = true; m_eventId = std::move(value); } /** *

The CloudTrail ID of the event returned.

*/ inline void SetEventId(const char* value) { m_eventIdHasBeenSet = true; m_eventId.assign(value); } /** *

The CloudTrail ID of the event returned.

*/ inline Event& WithEventId(const Aws::String& value) { SetEventId(value); return *this;} /** *

The CloudTrail ID of the event returned.

*/ inline Event& WithEventId(Aws::String&& value) { SetEventId(std::move(value)); return *this;} /** *

The CloudTrail ID of the event returned.

*/ inline Event& WithEventId(const char* value) { SetEventId(value); return *this;} /** *

The name of the event returned.

*/ inline const Aws::String& GetEventName() const{ return m_eventName; } /** *

The name of the event returned.

*/ inline bool EventNameHasBeenSet() const { return m_eventNameHasBeenSet; } /** *

The name of the event returned.

*/ inline void SetEventName(const Aws::String& value) { m_eventNameHasBeenSet = true; m_eventName = value; } /** *

The name of the event returned.

*/ inline void SetEventName(Aws::String&& value) { m_eventNameHasBeenSet = true; m_eventName = std::move(value); } /** *

The name of the event returned.

*/ inline void SetEventName(const char* value) { m_eventNameHasBeenSet = true; m_eventName.assign(value); } /** *

The name of the event returned.

*/ inline Event& WithEventName(const Aws::String& value) { SetEventName(value); return *this;} /** *

The name of the event returned.

*/ inline Event& WithEventName(Aws::String&& value) { SetEventName(std::move(value)); return *this;} /** *

The name of the event returned.

*/ inline Event& WithEventName(const char* value) { SetEventName(value); return *this;} /** *

Information about whether the event is a write event or a read event.

*/ inline const Aws::String& GetReadOnly() const{ return m_readOnly; } /** *

Information about whether the event is a write event or a read event.

*/ inline bool ReadOnlyHasBeenSet() const { return m_readOnlyHasBeenSet; } /** *

Information about whether the event is a write event or a read event.

*/ inline void SetReadOnly(const Aws::String& value) { m_readOnlyHasBeenSet = true; m_readOnly = value; } /** *

Information about whether the event is a write event or a read event.

*/ inline void SetReadOnly(Aws::String&& value) { m_readOnlyHasBeenSet = true; m_readOnly = std::move(value); } /** *

Information about whether the event is a write event or a read event.

*/ inline void SetReadOnly(const char* value) { m_readOnlyHasBeenSet = true; m_readOnly.assign(value); } /** *

Information about whether the event is a write event or a read event.

*/ inline Event& WithReadOnly(const Aws::String& value) { SetReadOnly(value); return *this;} /** *

Information about whether the event is a write event or a read event.

*/ inline Event& WithReadOnly(Aws::String&& value) { SetReadOnly(std::move(value)); return *this;} /** *

Information about whether the event is a write event or a read event.

*/ inline Event& WithReadOnly(const char* value) { SetReadOnly(value); return *this;} /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline const Aws::String& GetAccessKeyId() const{ return m_accessKeyId; } /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline bool AccessKeyIdHasBeenSet() const { return m_accessKeyIdHasBeenSet; } /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline void SetAccessKeyId(const Aws::String& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = value; } /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline void SetAccessKeyId(Aws::String&& value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId = std::move(value); } /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline void SetAccessKeyId(const char* value) { m_accessKeyIdHasBeenSet = true; m_accessKeyId.assign(value); } /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline Event& WithAccessKeyId(const Aws::String& value) { SetAccessKeyId(value); return *this;} /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline Event& WithAccessKeyId(Aws::String&& value) { SetAccessKeyId(std::move(value)); return *this;} /** *

The Amazon Web Services access key ID that was used to sign the request. If * the request was made with temporary security credentials, this is the access key * ID of the temporary credentials.

*/ inline Event& WithAccessKeyId(const char* value) { SetAccessKeyId(value); return *this;} /** *

The date and time of the event returned.

*/ inline const Aws::Utils::DateTime& GetEventTime() const{ return m_eventTime; } /** *

The date and time of the event returned.

*/ inline bool EventTimeHasBeenSet() const { return m_eventTimeHasBeenSet; } /** *

The date and time of the event returned.

*/ inline void SetEventTime(const Aws::Utils::DateTime& value) { m_eventTimeHasBeenSet = true; m_eventTime = value; } /** *

The date and time of the event returned.

*/ inline void SetEventTime(Aws::Utils::DateTime&& value) { m_eventTimeHasBeenSet = true; m_eventTime = std::move(value); } /** *

The date and time of the event returned.

*/ inline Event& WithEventTime(const Aws::Utils::DateTime& value) { SetEventTime(value); return *this;} /** *

The date and time of the event returned.

*/ inline Event& WithEventTime(Aws::Utils::DateTime&& value) { SetEventTime(std::move(value)); return *this;} /** *

The Amazon Web Services service to which the request was made.

*/ inline const Aws::String& GetEventSource() const{ return m_eventSource; } /** *

The Amazon Web Services service to which the request was made.

*/ inline bool EventSourceHasBeenSet() const { return m_eventSourceHasBeenSet; } /** *

The Amazon Web Services service to which the request was made.

*/ inline void SetEventSource(const Aws::String& value) { m_eventSourceHasBeenSet = true; m_eventSource = value; } /** *

The Amazon Web Services service to which the request was made.

*/ inline void SetEventSource(Aws::String&& value) { m_eventSourceHasBeenSet = true; m_eventSource = std::move(value); } /** *

The Amazon Web Services service to which the request was made.

*/ inline void SetEventSource(const char* value) { m_eventSourceHasBeenSet = true; m_eventSource.assign(value); } /** *

The Amazon Web Services service to which the request was made.

*/ inline Event& WithEventSource(const Aws::String& value) { SetEventSource(value); return *this;} /** *

The Amazon Web Services service to which the request was made.

*/ inline Event& WithEventSource(Aws::String&& value) { SetEventSource(std::move(value)); return *this;} /** *

The Amazon Web Services service to which the request was made.

*/ inline Event& WithEventSource(const char* value) { SetEventSource(value); return *this;} /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline const Aws::String& GetUsername() const{ return m_username; } /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline bool UsernameHasBeenSet() const { return m_usernameHasBeenSet; } /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline void SetUsername(const Aws::String& value) { m_usernameHasBeenSet = true; m_username = value; } /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline void SetUsername(Aws::String&& value) { m_usernameHasBeenSet = true; m_username = std::move(value); } /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline void SetUsername(const char* value) { m_usernameHasBeenSet = true; m_username.assign(value); } /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline Event& WithUsername(const Aws::String& value) { SetUsername(value); return *this;} /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline Event& WithUsername(Aws::String&& value) { SetUsername(std::move(value)); return *this;} /** *

A user name or role name of the requester that called the API in the event * returned.

*/ inline Event& WithUsername(const char* value) { SetUsername(value); return *this;} /** *

A list of resources referenced by the event returned.

*/ inline const Aws::Vector& GetResources() const{ return m_resources; } /** *

A list of resources referenced by the event returned.

*/ inline bool ResourcesHasBeenSet() const { return m_resourcesHasBeenSet; } /** *

A list of resources referenced by the event returned.

*/ inline void SetResources(const Aws::Vector& value) { m_resourcesHasBeenSet = true; m_resources = value; } /** *

A list of resources referenced by the event returned.

*/ inline void SetResources(Aws::Vector&& value) { m_resourcesHasBeenSet = true; m_resources = std::move(value); } /** *

A list of resources referenced by the event returned.

*/ inline Event& WithResources(const Aws::Vector& value) { SetResources(value); return *this;} /** *

A list of resources referenced by the event returned.

*/ inline Event& WithResources(Aws::Vector&& value) { SetResources(std::move(value)); return *this;} /** *

A list of resources referenced by the event returned.

*/ inline Event& AddResources(const Resource& value) { m_resourcesHasBeenSet = true; m_resources.push_back(value); return *this; } /** *

A list of resources referenced by the event returned.

*/ inline Event& AddResources(Resource&& value) { m_resourcesHasBeenSet = true; m_resources.push_back(std::move(value)); return *this; } /** *

A JSON string that contains a representation of the event returned.

*/ inline const Aws::String& GetCloudTrailEvent() const{ return m_cloudTrailEvent; } /** *

A JSON string that contains a representation of the event returned.

*/ inline bool CloudTrailEventHasBeenSet() const { return m_cloudTrailEventHasBeenSet; } /** *

A JSON string that contains a representation of the event returned.

*/ inline void SetCloudTrailEvent(const Aws::String& value) { m_cloudTrailEventHasBeenSet = true; m_cloudTrailEvent = value; } /** *

A JSON string that contains a representation of the event returned.

*/ inline void SetCloudTrailEvent(Aws::String&& value) { m_cloudTrailEventHasBeenSet = true; m_cloudTrailEvent = std::move(value); } /** *

A JSON string that contains a representation of the event returned.

*/ inline void SetCloudTrailEvent(const char* value) { m_cloudTrailEventHasBeenSet = true; m_cloudTrailEvent.assign(value); } /** *

A JSON string that contains a representation of the event returned.

*/ inline Event& WithCloudTrailEvent(const Aws::String& value) { SetCloudTrailEvent(value); return *this;} /** *

A JSON string that contains a representation of the event returned.

*/ inline Event& WithCloudTrailEvent(Aws::String&& value) { SetCloudTrailEvent(std::move(value)); return *this;} /** *

A JSON string that contains a representation of the event returned.

*/ inline Event& WithCloudTrailEvent(const char* value) { SetCloudTrailEvent(value); return *this;} private: Aws::String m_eventId; bool m_eventIdHasBeenSet = false; Aws::String m_eventName; bool m_eventNameHasBeenSet = false; Aws::String m_readOnly; bool m_readOnlyHasBeenSet = false; Aws::String m_accessKeyId; bool m_accessKeyIdHasBeenSet = false; Aws::Utils::DateTime m_eventTime; bool m_eventTimeHasBeenSet = false; Aws::String m_eventSource; bool m_eventSourceHasBeenSet = false; Aws::String m_username; bool m_usernameHasBeenSet = false; Aws::Vector m_resources; bool m_resourcesHasBeenSet = false; Aws::String m_cloudTrailEvent; bool m_cloudTrailEventHasBeenSet = false; }; } // namespace Model } // namespace CloudTrail } // namespace Aws