hueplusplus
1.0.0
|
Parameters for creating a new Rule. More...
#include <hueplusplus/Rule.h>
Public Member Functions | |
CreateRule (const std::vector< Condition > &conditions, const std::vector< Action > &actions) | |
Construct with necessary parameters. More... | |
CreateRule & | setName (const std::string &name) |
Set name. More... | |
CreateRule & | setStatus (bool enabled) |
Set status. More... | |
nlohmann::json | getRequest () const |
Get request to create the rule. More... | |
Parameters for creating a new Rule.
Can be used like a builder object with chained calls.
hueplusplus::CreateRule::CreateRule | ( | const std::vector< Condition > & | conditions, |
const std::vector< Action > & | actions | ||
) |
Construct with necessary parameters.
conditions | Conditions for the rule. Must not be empty |
actions | Actions for the rule. Must not be empty |
nlohmann::json hueplusplus::CreateRule::getRequest | ( | ) | const |
Get request to create the rule.
CreateRule & hueplusplus::CreateRule::setName | ( | const std::string & | name | ) |
Set name.
CreateRule & hueplusplus::CreateRule::setStatus | ( | bool | enabled | ) |
Set status.