![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <AVSMessage.h>
Public Member Functions | |
AVSMessage (std::shared_ptr< AVSMessageHeader > avsMessageHeader, std::string payload, const utils::Optional< AVSMessageEndpoint > &endpoint=utils::Optional< AVSMessageEndpoint >()) | |
virtual | ~AVSMessage ()=default |
std::string | getNamespace () const |
std::string | getName () const |
std::string | getMessageId () const |
std::string | getCorrelationToken () const |
std::string | getEventCorrelationToken () const |
std::string | getPayloadVersion () const |
std::string | getInstance () const |
std::string | getDialogRequestId () const |
std::string | getPayload () const |
std::shared_ptr< const AVSMessageHeader > | getHeader () const |
std::string | getHeaderAsString () const |
utils::Optional< AVSMessageEndpoint > | getEndpoint () const |
This is a base class which allows us to represent a message sent or received from AVS. This class encapsulates the common data elements for all such messages.
alexaClientSDK::avsCommon::avs::AVSMessage::AVSMessage | ( | std::shared_ptr< AVSMessageHeader > | avsMessageHeader, |
std::string | payload, | ||
const utils::Optional< AVSMessageEndpoint > & | endpoint = utils::Optional< AVSMessageEndpoint >() |
||
) |
Constructor.
avsMessageHeader | An object that contains the necessary header fields of an AVS message. NOTE: This parameter MUST NOT be null. |
payload | The payload associated with an AVS message. This is expected to be in the JSON format. |
endpoint | The attributes for the target endpoint if available. |
|
virtualdefault |
Destructor.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getCorrelationToken | ( | ) | const |
Returns the correlation token of the message.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getDialogRequestId | ( | ) | const |
Returns The dialog request ID of the message.
utils::Optional<AVSMessageEndpoint> alexaClientSDK::avsCommon::avs::AVSMessage::getEndpoint | ( | ) | const |
Return the endpoint attributes included in this message.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getEventCorrelationToken | ( | ) | const |
Returns the event correlation token of the message.
std::shared_ptr<const AVSMessageHeader> alexaClientSDK::avsCommon::avs::AVSMessage::getHeader | ( | ) | const |
Return a pointer to its header.
AVSMessage's
header. std::string alexaClientSDK::avsCommon::avs::AVSMessage::getHeaderAsString | ( | ) | const |
Return a string representation of this AVSMessage's
header.
AVSMessage's
header. std::string alexaClientSDK::avsCommon::avs::AVSMessage::getInstance | ( | ) | const |
Return the instance in an AVS message.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getMessageId | ( | ) | const |
Returns The message ID of the message.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getName | ( | ) | const |
Returns The name of the message, which describes the intent.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getNamespace | ( | ) | const |
Returns The namespace of the message.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getPayload | ( | ) | const |
Returns the payload of the message.
std::string alexaClientSDK::avsCommon::avs::AVSMessage::getPayloadVersion | ( | ) | const |
Return the payload version in an AVS message.
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0