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

#include <AVSMessageHeader.h>

Public Member Functions

 AVSMessageHeader (const std::string &avsNamespace, const std::string &avsName, const std::string &avsMessageId, const std::string &avsDialogRequestId="", const std::string &correlationToken="", const std::string &eventCorrelationToken="", const std::string &payloadVersion="", const std::string &instance="")
 
std::string getNamespace () const
 
std::string getName () const
 
std::string getMessageId () const
 
std::string getDialogRequestId () const
 
std::string getCorrelationToken () const
 
std::string getEventCorrelationToken () const
 
std::string getPayloadVersion () const
 
std::string getInstance () const
 
std::string getAsString () const
 
std::string toJson () const
 

Static Public Member Functions

static AVSMessageHeader createAVSEventHeader (const std::string &avsNamespace, const std::string &avsName, const std::string &avsDialogRequestId="", const std::string &correlationToken="", const std::string &payloadVersion="", const std::string &instance="")
 

Detailed Description

The AVS message header, which contains the common fields required for an AVS message.

Constructor & Destructor Documentation

◆ AVSMessageHeader()

alexaClientSDK::avsCommon::avs::AVSMessageHeader::AVSMessageHeader ( const std::string &  avsNamespace,
const std::string &  avsName,
const std::string &  avsMessageId,
const std::string &  avsDialogRequestId = "",
const std::string &  correlationToken = "",
const std::string &  eventCorrelationToken = "",
const std::string &  payloadVersion = "",
const std::string &  instance = "" 
)

Constructor used when all fields are known.

Parameters
avsNamespaceThe namespace of an AVS message.
avsNameThe name within the namespace of an AVS message.
avsMessageIdThe message ID of an AVS message.
avsDialogRequestIdThe dialog request ID of an AVS message, which is optional.
correlationTokenOptional correlation token used to identify a directive.
eventCorrelationTokenOptional event token used to identify an event.
payloadVersionOptional parameter used to identify the payload version.
instanceOptional parameter used to identify the target capability instance.

Member Function Documentation

◆ createAVSEventHeader()

AVSMessageHeader alexaClientSDK::avsCommon::avs::AVSMessageHeader::createAVSEventHeader ( const std::string &  avsNamespace,
const std::string &  avsName,
const std::string &  avsDialogRequestId = "",
const std::string &  correlationToken = "",
const std::string &  payloadVersion = "",
const std::string &  instance = "" 
)
static

Function that builds a header for a new avs message, and it generates an event correlation token and message id.

Parameters
avsNamespaceThe namespace of an AVS message.
avsNameThe name within the namespace of an AVS message.
avsDialogRequestIdThe dialog request ID of an AVS message, which is optional.
correlationTokenOptional correlation token used to identify a directive.
payloadVersionOptional parameter used to identify the payload version.
instanceOptional parameter used to identify the target capability instance.
Returns
A new object representing the event header.

◆ getAsString()

std::string alexaClientSDK::avsCommon::avs::AVSMessageHeader::getAsString ( ) const

Return a string representation of this AVSMessage's header.

Returns
A string representation of this AVSMessage's header.

◆ getCorrelationToken()

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

Return the correlation token in an AVS message.

Returns
The correlation token if present or an empty string if this field is not available.

◆ getDialogRequestId()

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

Returns the dialog request ID in an AVS message.

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

◆ getEventCorrelationToken()

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

Return the event correlation token in an AVS message.

Returns
The event correlation token if present or an empty string if this field is not available.

◆ getInstance()

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

Return the instance in an AVS message.

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

◆ getMessageId()

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

Returns the message ID in an AVS message.

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

◆ getName()

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

Returns the name in an AVS message, which describes the intent of the message.

Returns
The name.

◆ getNamespace()

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

Returns the namespace in an AVS message.

Returns
The namespace.

◆ getPayloadVersion()

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

Return the payload version in an AVS message.

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

◆ toJson()

std::string alexaClientSDK::avsCommon::avs::AVSMessageHeader::toJson ( ) const

Convert this object into a stringified json object.

Returns
A stringified json object.

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

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