#include <AVSMessageHeader.h>
|
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="") |
|
The AVS message header, which contains the common fields required for an AVS message.
◆ 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
-
avsNamespace | The namespace of an AVS message. |
avsName | The name within the namespace of an AVS message. |
avsMessageId | The message ID of an AVS message. |
avsDialogRequestId | The dialog request ID of an AVS message, which is optional. |
correlationToken | Optional correlation token used to identify a directive. |
eventCorrelationToken | Optional event token used to identify an event. |
payloadVersion | Optional parameter used to identify the payload version. |
instance | Optional parameter used to identify the target capability instance. |
◆ createAVSEventHeader()
static 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
-
avsNamespace | The namespace of an AVS message. |
avsName | The name within the namespace of an AVS message. |
avsDialogRequestId | The dialog request ID of an AVS message, which is optional. |
correlationToken | Optional correlation token used to identify a directive. |
payloadVersion | Optional parameter used to identify the payload version. |
instance | Optional 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 file:
AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
Licensed under the Apache License, Version 2.0