AlexaClientSDK  1.25.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
Public Member Functions | List of all members
alexaClientSDK::avsCommon::avs::AVSMessage Class Reference

#include <AVSMessage.h>

Inheritance diagram for alexaClientSDK::avsCommon::avs::AVSMessage:
Inheritance graph

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 AVSMessageHeadergetHeader () const
std::string getHeaderAsString () const
utils::Optional< AVSMessageEndpointgetEndpoint () const

Detailed Description

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.

Constructor & Destructor Documentation

◆ AVSMessage()

alexaClientSDK::avsCommon::avs::AVSMessage::AVSMessage ( std::shared_ptr< AVSMessageHeader avsMessageHeader,
std::string  payload,
const utils::Optional< AVSMessageEndpoint > &  endpoint = utils::Optional<AVSMessageEndpoint>() 


avsMessageHeaderAn object that contains the necessary header fields of an AVS message. NOTE: This parameter MUST NOT be null.
payloadThe payload associated with an AVS message. This is expected to be in the JSON format.
endpointThe attributes for the target endpoint if available.

◆ ~AVSMessage()

virtual alexaClientSDK::avsCommon::avs::AVSMessage::~AVSMessage ( )


Member Function Documentation

◆ getCorrelationToken()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getCorrelationToken ( ) const

Returns the correlation token of the message.

The correlation token string.

◆ getDialogRequestId()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getDialogRequestId ( ) const

Returns The dialog request ID of the message.

The dialog request ID, a unique ID for the messages that are part of the same dialog.

◆ getEndpoint()

utils::Optional< AVSMessageEndpoint > alexaClientSDK::avsCommon::avs::AVSMessage::getEndpoint ( ) const

Return the endpoint attributes included in this message.

The endpoint attributes if present; otherwise an empty object.

◆ getEventCorrelationToken()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getEventCorrelationToken ( ) const

Returns the event correlation token of the message.

The event correlation token string.

◆ getHeader()

std::shared_ptr< const AVSMessageHeader > alexaClientSDK::avsCommon::avs::AVSMessage::getHeader ( ) const

Return a pointer to its header.

A pointer to this AVSMessage's header.

◆ getHeaderAsString()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getHeaderAsString ( ) const

Return a string representation of this AVSMessage's header.

A string representation of this AVSMessage's header.

◆ getInstance()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getInstance ( ) const

Return the instance in an AVS message.

The target instance id if present or an empty string if this field is not available.

◆ getMessageId()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getMessageId ( ) const

Returns The message ID of the message.

The message ID, a unique ID used to identify a specific message.

◆ getName()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getName ( ) const

Returns The name of the message, which describes the intent.

The name.

◆ getNamespace()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getNamespace ( ) const

Returns The namespace of the message.

The namespace.

◆ getPayload()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getPayload ( ) const

Returns the payload of the message.

The payload.

◆ getPayloadVersion()

std::string alexaClientSDK::avsCommon::avs::AVSMessage::getPayloadVersion ( ) const

Return the payload version in an AVS message.

The payload version if present or an empty string if this field is not available.

The documentation for this class was generated from the following files:

AlexaClientSDK 1.25.0 - Copyright 2016-2021, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0