chirpstack/api/php/generated/Chirpstack/Api/IftttIntegration.php
2024-06-25 12:27:28 +01:00

270 lines
8.4 KiB
PHP
Vendored

<?php
# Generated by the protocol buffer compiler. DO NOT EDIT!
# source: api/application.proto
namespace Chirpstack\Api;
use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;
/**
* Generated from protobuf message <code>api.IftttIntegration</code>
*/
class IftttIntegration extends \Google\Protobuf\Internal\Message
{
/**
* Application ID (UUID).
*
* Generated from protobuf field <code>string application_id = 1;</code>
*/
protected $application_id = '';
/**
* Key.
* This key can be obtained from the IFTTT Webhooks documentation page.
*
* Generated from protobuf field <code>string key = 2;</code>
*/
protected $key = '';
/**
* Values.
* Up to 2 values can be forwarded to IFTTT. These values must map to the
* decoded payload keys. For example:
* {
* "batteryLevel": 75.3,
* "buttons": [{"pressed": false}, {"pressed": true}]
* }
* You would specify the following fields:
* uplink_values = ["batteryLevel", "buttons_0_pressed"]
* Notes: The first value is always used for the DevEUI.
* Ignored if arbitrary_json is set to true.
*
* Generated from protobuf field <code>repeated string uplink_values = 3;</code>
*/
private $uplink_values;
/**
* Arbitrary JSON.
* If set to true, ChirpStack events will be sent as-is as arbitrary JSON
* payload. If set to false (default), the 3 JSON values format will be used.
*
* Generated from protobuf field <code>bool arbitrary_json = 4;</code>
*/
protected $arbitrary_json = false;
/**
* Event prefix.
* If set, the event name will be PREFIX_EVENT. For example if event_prefix
* is set to weatherstation, and uplink event will be sent as
* weatherstation_up to the IFTTT webhook.
* Note: Only characters in the A-Z, a-z and 0-9 range are allowed.
*
* Generated from protobuf field <code>string event_prefix = 5;</code>
*/
protected $event_prefix = '';
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $application_id
* Application ID (UUID).
* @type string $key
* Key.
* This key can be obtained from the IFTTT Webhooks documentation page.
* @type array<string>|\Google\Protobuf\Internal\RepeatedField $uplink_values
* Values.
* Up to 2 values can be forwarded to IFTTT. These values must map to the
* decoded payload keys. For example:
* {
* "batteryLevel": 75.3,
* "buttons": [{"pressed": false}, {"pressed": true}]
* }
* You would specify the following fields:
* uplink_values = ["batteryLevel", "buttons_0_pressed"]
* Notes: The first value is always used for the DevEUI.
* Ignored if arbitrary_json is set to true.
* @type bool $arbitrary_json
* Arbitrary JSON.
* If set to true, ChirpStack events will be sent as-is as arbitrary JSON
* payload. If set to false (default), the 3 JSON values format will be used.
* @type string $event_prefix
* Event prefix.
* If set, the event name will be PREFIX_EVENT. For example if event_prefix
* is set to weatherstation, and uplink event will be sent as
* weatherstation_up to the IFTTT webhook.
* Note: Only characters in the A-Z, a-z and 0-9 range are allowed.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Chirpstack\Api\Application::initOnce();
parent::__construct($data);
}
/**
* Application ID (UUID).
*
* Generated from protobuf field <code>string application_id = 1;</code>
* @return string
*/
public function getApplicationId()
{
return $this->application_id;
}
/**
* Application ID (UUID).
*
* Generated from protobuf field <code>string application_id = 1;</code>
* @param string $var
* @return $this
*/
public function setApplicationId($var)
{
GPBUtil::checkString($var, True);
$this->application_id = $var;
return $this;
}
/**
* Key.
* This key can be obtained from the IFTTT Webhooks documentation page.
*
* Generated from protobuf field <code>string key = 2;</code>
* @return string
*/
public function getKey()
{
return $this->key;
}
/**
* Key.
* This key can be obtained from the IFTTT Webhooks documentation page.
*
* Generated from protobuf field <code>string key = 2;</code>
* @param string $var
* @return $this
*/
public function setKey($var)
{
GPBUtil::checkString($var, True);
$this->key = $var;
return $this;
}
/**
* Values.
* Up to 2 values can be forwarded to IFTTT. These values must map to the
* decoded payload keys. For example:
* {
* "batteryLevel": 75.3,
* "buttons": [{"pressed": false}, {"pressed": true}]
* }
* You would specify the following fields:
* uplink_values = ["batteryLevel", "buttons_0_pressed"]
* Notes: The first value is always used for the DevEUI.
* Ignored if arbitrary_json is set to true.
*
* Generated from protobuf field <code>repeated string uplink_values = 3;</code>
* @return \Google\Protobuf\Internal\RepeatedField
*/
public function getUplinkValues()
{
return $this->uplink_values;
}
/**
* Values.
* Up to 2 values can be forwarded to IFTTT. These values must map to the
* decoded payload keys. For example:
* {
* "batteryLevel": 75.3,
* "buttons": [{"pressed": false}, {"pressed": true}]
* }
* You would specify the following fields:
* uplink_values = ["batteryLevel", "buttons_0_pressed"]
* Notes: The first value is always used for the DevEUI.
* Ignored if arbitrary_json is set to true.
*
* Generated from protobuf field <code>repeated string uplink_values = 3;</code>
* @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
* @return $this
*/
public function setUplinkValues($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
$this->uplink_values = $arr;
return $this;
}
/**
* Arbitrary JSON.
* If set to true, ChirpStack events will be sent as-is as arbitrary JSON
* payload. If set to false (default), the 3 JSON values format will be used.
*
* Generated from protobuf field <code>bool arbitrary_json = 4;</code>
* @return bool
*/
public function getArbitraryJson()
{
return $this->arbitrary_json;
}
/**
* Arbitrary JSON.
* If set to true, ChirpStack events will be sent as-is as arbitrary JSON
* payload. If set to false (default), the 3 JSON values format will be used.
*
* Generated from protobuf field <code>bool arbitrary_json = 4;</code>
* @param bool $var
* @return $this
*/
public function setArbitraryJson($var)
{
GPBUtil::checkBool($var);
$this->arbitrary_json = $var;
return $this;
}
/**
* Event prefix.
* If set, the event name will be PREFIX_EVENT. For example if event_prefix
* is set to weatherstation, and uplink event will be sent as
* weatherstation_up to the IFTTT webhook.
* Note: Only characters in the A-Z, a-z and 0-9 range are allowed.
*
* Generated from protobuf field <code>string event_prefix = 5;</code>
* @return string
*/
public function getEventPrefix()
{
return $this->event_prefix;
}
/**
* Event prefix.
* If set, the event name will be PREFIX_EVENT. For example if event_prefix
* is set to weatherstation, and uplink event will be sent as
* weatherstation_up to the IFTTT webhook.
* Note: Only characters in the A-Z, a-z and 0-9 range are allowed.
*
* Generated from protobuf field <code>string event_prefix = 5;</code>
* @param string $var
* @return $this
*/
public function setEventPrefix($var)
{
GPBUtil::checkString($var, True);
$this->event_prefix = $var;
return $this;
}
}