/** * 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 ivsrealtime { namespace Model { /** *

An occurrence during a stage session.

See Also:

AWS * API Reference

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

If the event is an error event, the error code is provided to give insight * into the specific error that occurred. If the event is not an error event, this * field is null. INSUFFICIENT_CAPABILITIES indicates that the * participant tried to take an action that the participant’s token is not allowed * to do. For more information about participant capabilities, see the * capabilities field in CreateParticipantToken.

*/ inline const EventErrorCode& GetErrorCode() const{ return m_errorCode; } /** *

If the event is an error event, the error code is provided to give insight * into the specific error that occurred. If the event is not an error event, this * field is null. INSUFFICIENT_CAPABILITIES indicates that the * participant tried to take an action that the participant’s token is not allowed * to do. For more information about participant capabilities, see the * capabilities field in CreateParticipantToken.

*/ inline bool ErrorCodeHasBeenSet() const { return m_errorCodeHasBeenSet; } /** *

If the event is an error event, the error code is provided to give insight * into the specific error that occurred. If the event is not an error event, this * field is null. INSUFFICIENT_CAPABILITIES indicates that the * participant tried to take an action that the participant’s token is not allowed * to do. For more information about participant capabilities, see the * capabilities field in CreateParticipantToken.

*/ inline void SetErrorCode(const EventErrorCode& value) { m_errorCodeHasBeenSet = true; m_errorCode = value; } /** *

If the event is an error event, the error code is provided to give insight * into the specific error that occurred. If the event is not an error event, this * field is null. INSUFFICIENT_CAPABILITIES indicates that the * participant tried to take an action that the participant’s token is not allowed * to do. For more information about participant capabilities, see the * capabilities field in CreateParticipantToken.

*/ inline void SetErrorCode(EventErrorCode&& value) { m_errorCodeHasBeenSet = true; m_errorCode = std::move(value); } /** *

If the event is an error event, the error code is provided to give insight * into the specific error that occurred. If the event is not an error event, this * field is null. INSUFFICIENT_CAPABILITIES indicates that the * participant tried to take an action that the participant’s token is not allowed * to do. For more information about participant capabilities, see the * capabilities field in CreateParticipantToken.

*/ inline Event& WithErrorCode(const EventErrorCode& value) { SetErrorCode(value); return *this;} /** *

If the event is an error event, the error code is provided to give insight * into the specific error that occurred. If the event is not an error event, this * field is null. INSUFFICIENT_CAPABILITIES indicates that the * participant tried to take an action that the participant’s token is not allowed * to do. For more information about participant capabilities, see the * capabilities field in CreateParticipantToken.

*/ inline Event& WithErrorCode(EventErrorCode&& value) { SetErrorCode(std::move(value)); return *this;} /** *

ISO 8601 timestamp (returned as a string) for when the event occurred.

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

ISO 8601 timestamp (returned as a string) for when the event occurred.

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

ISO 8601 timestamp (returned as a string) for when the event occurred.

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

ISO 8601 timestamp (returned as a string) for when the event occurred.

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

ISO 8601 timestamp (returned as a string) for when the event occurred.

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

ISO 8601 timestamp (returned as a string) for when the event occurred.

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

The name of the event.

*/ inline const EventName& GetName() const{ return m_name; } /** *

The name of the event.

*/ inline bool NameHasBeenSet() const { return m_nameHasBeenSet; } /** *

The name of the event.

*/ inline void SetName(const EventName& value) { m_nameHasBeenSet = true; m_name = value; } /** *

The name of the event.

*/ inline void SetName(EventName&& value) { m_nameHasBeenSet = true; m_name = std::move(value); } /** *

The name of the event.

*/ inline Event& WithName(const EventName& value) { SetName(value); return *this;} /** *

The name of the event.

*/ inline Event& WithName(EventName&& value) { SetName(std::move(value)); return *this;} /** *

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

*/ inline const Aws::String& GetParticipantId() const{ return m_participantId; } /** *

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

*/ inline bool ParticipantIdHasBeenSet() const { return m_participantIdHasBeenSet; } /** *

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

*/ inline void SetParticipantId(const Aws::String& value) { m_participantIdHasBeenSet = true; m_participantId = value; } /** *

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

*/ inline void SetParticipantId(Aws::String&& value) { m_participantIdHasBeenSet = true; m_participantId = std::move(value); } /** *

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

*/ inline void SetParticipantId(const char* value) { m_participantIdHasBeenSet = true; m_participantId.assign(value); } /** *

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

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

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

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

Unique identifier for the participant who triggered the event. This is * assigned by IVS.

*/ inline Event& WithParticipantId(const char* value) { SetParticipantId(value); return *this;} /** *

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

*/ inline const Aws::String& GetRemoteParticipantId() const{ return m_remoteParticipantId; } /** *

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

*/ inline bool RemoteParticipantIdHasBeenSet() const { return m_remoteParticipantIdHasBeenSet; } /** *

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

*/ inline void SetRemoteParticipantId(const Aws::String& value) { m_remoteParticipantIdHasBeenSet = true; m_remoteParticipantId = value; } /** *

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

*/ inline void SetRemoteParticipantId(Aws::String&& value) { m_remoteParticipantIdHasBeenSet = true; m_remoteParticipantId = std::move(value); } /** *

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

*/ inline void SetRemoteParticipantId(const char* value) { m_remoteParticipantIdHasBeenSet = true; m_remoteParticipantId.assign(value); } /** *

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

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

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

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

Unique identifier for the remote participant. For a subscribe event, this is * the publisher. For a publish or join event, this is null. This is assigned by * IVS.

*/ inline Event& WithRemoteParticipantId(const char* value) { SetRemoteParticipantId(value); return *this;} private: EventErrorCode m_errorCode; bool m_errorCodeHasBeenSet = false; Aws::Utils::DateTime m_eventTime; bool m_eventTimeHasBeenSet = false; EventName m_name; bool m_nameHasBeenSet = false; Aws::String m_participantId; bool m_participantIdHasBeenSet = false; Aws::String m_remoteParticipantId; bool m_remoteParticipantIdHasBeenSet = false; }; } // namespace Model } // namespace ivsrealtime } // namespace Aws