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

#include <CapabilitySemantics.h>

Public Member Functions

 CapabilitySemantics ()=default
 
bool addActionsToDirectiveMapping (const ActionsToDirectiveMapping &mapping)
 
bool addStatesToValueMapping (const StatesToValueMapping &mapping)
 
bool addStatesToRangeMapping (const StatesToRangeMapping &mapping)
 
bool isValid () const
 
std::string toJson () const
 

Detailed Description

This class represents the 'semantics' object of a capability primitive definition.

See also
https://developer.amazon.com/en-US/docs/alexa/alexa-voice-service/capability-primitives.html#semantic-annotation

Constructor & Destructor Documentation

◆ CapabilitySemantics()

alexaClientSDK::avsCommon::avs::capabilitySemantics::CapabilitySemantics::CapabilitySemantics ( )
default

The default constructor.

Member Function Documentation

◆ addActionsToDirectiveMapping()

bool alexaClientSDK::avsCommon::avs::capabilitySemantics::CapabilitySemantics::addActionsToDirectiveMapping ( const ActionsToDirectiveMapping mapping)

Adds an ActionsToDirective type "actionMapping" to this semantics definition.

Note
A specific action ID may be used in only one 'actionMappings' object added with this method, but this method does not provide the validation.
Parameters
mappingThe ActionsToDirective mapping represented as an ActionsToDirectiveMapping.
Returns
true if adding the mapping was successful, else false.

◆ addStatesToRangeMapping()

bool alexaClientSDK::avsCommon::avs::capabilitySemantics::CapabilitySemantics::addStatesToRangeMapping ( const StatesToRangeMapping mapping)

Adds a StatesToRange type "stateMapping" to this semantics definition.

Note
A specific state ID may be used in only one 'stateMappings' object added with either this method or addStatesToValueMapping(), but this method does not provide the validation.
Parameters
mappingThe StatesToRange mapping represented as an StatesToRangeMapping.
Returns
true if adding the mapping was successful, else false.

◆ addStatesToValueMapping()

bool alexaClientSDK::avsCommon::avs::capabilitySemantics::CapabilitySemantics::addStatesToValueMapping ( const StatesToValueMapping mapping)

Adds a StatesToValue type "stateMapping" to this semantics definition.

Note
A specific state ID may be used in only one 'stateMappings' object added with either this method or addStatesToRangeMapping(), but this method does not provide the validation.
Parameters
mappingThe StatesToValue mapping represented as an StatesToValueMapping.
Returns
true if adding the mapping was successful, else false.

◆ isValid()

bool alexaClientSDK::avsCommon::avs::capabilitySemantics::CapabilitySemantics::isValid ( ) const

Checks if the CapabilitySemantics is valid.

Returns
true if valid, else false.

◆ toJson()

std::string alexaClientSDK::avsCommon::avs::capabilitySemantics::CapabilitySemantics::toJson ( ) const

Converts this semantics object to a JSON string.

Note
This follows the AVS discovery message format.
Returns
A JSON string representation of this CapabilitySemantics.

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

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