![]() |
AlexaClientSDK
3.0.0
A cross-platform, modular SDK for interacting with the Alexa Voice Service
|
#include <ActionsToDirectiveMapping.h>
Public Member Functions | |
ActionsToDirectiveMapping () | |
bool | addAction (const std::string &actionId) |
bool | setDirective (const std::string &name, const std::string &payload="{}") |
bool | isValid () const |
std::string | toJson () const |
This class represents an "ActionsToDirective" type "actionMapping" in a semantic annotation for a capability primitive.
alexaClientSDK::avsCommon::avs::capabilitySemantics::ActionsToDirectiveMapping::ActionsToDirectiveMapping | ( | ) |
The constructor.
bool alexaClientSDK::avsCommon::avs::capabilitySemantics::ActionsToDirectiveMapping::addAction | ( | const std::string & | actionId | ) |
Adds the specified action identifier to the "actions" array of this mapping object. The action identifier represents utterances that should trigger the directive specified in setDirective()
.
action | The identifier of the action to add to the "actions" array. |
true
if the action was successfully added, else false
. bool alexaClientSDK::avsCommon::avs::capabilitySemantics::ActionsToDirectiveMapping::isValid | ( | ) | const |
Checks whether this ActionsToDirectiveMapping
is valid.
true
if valid, else false
. bool alexaClientSDK::avsCommon::avs::capabilitySemantics::ActionsToDirectiveMapping::setDirective | ( | const std::string & | name, |
const std::string & | payload = "{}" |
||
) |
Sets the "directive" field of this mapping object. The action IDs specified with calls to addAction()
correspond to this directive name and payload.
name | The name of the directive mapped to the action(s). Must be a valid directive of the capability interface to which the semantics object belongs. |
payload | The desired payload of the directive. |
true
if the directive was successfully set, else false
. std::string alexaClientSDK::avsCommon::avs::capabilitySemantics::ActionsToDirectiveMapping::toJson | ( | ) | const |
Converts this ActionsToDirectiveMapping
to a JSON string.
ActionsToDirectiveMapping
. AlexaClientSDK 3.0.0 - Copyright 2016-2022 Amazon.com, Inc. or its affiliates. All Rights Reserved. Licensed under the Apache License, Version 2.0