integration.StatusEvent
*/
class StatusEvent extends \Google\Protobuf\Internal\Message
{
/**
* Deduplication ID (UUID).
*
* Generated from protobuf field string deduplication_id = 1;
*/
protected $deduplication_id = '';
/**
* Timestamp.
*
* Generated from protobuf field .google.protobuf.Timestamp time = 2;
*/
protected $time = null;
/**
* Device info.
*
* Generated from protobuf field .integration.DeviceInfo device_info = 3;
*/
protected $device_info = null;
/**
* The demodulation signal-to-noise ratio in dB for the last successfully
* received device-status request by the Network Server.
*
* Generated from protobuf field int32 margin = 5;
*/
protected $margin = 0;
/**
* Device is connected to an external power source.
*
* Generated from protobuf field bool external_power_source = 6;
*/
protected $external_power_source = false;
/**
* Battery level is not available.
*
* Generated from protobuf field bool battery_level_unavailable = 7;
*/
protected $battery_level_unavailable = false;
/**
* Battery level.
*
* Generated from protobuf field float battery_level = 8;
*/
protected $battery_level = 0.0;
/**
* Constructor.
*
* @param array $data {
* Optional. Data for populating the Message object.
*
* @type string $deduplication_id
* Deduplication ID (UUID).
* @type \Google\Protobuf\Timestamp $time
* Timestamp.
* @type \Chirpstack\Integration\DeviceInfo $device_info
* Device info.
* @type int $margin
* The demodulation signal-to-noise ratio in dB for the last successfully
* received device-status request by the Network Server.
* @type bool $external_power_source
* Device is connected to an external power source.
* @type bool $battery_level_unavailable
* Battery level is not available.
* @type float $battery_level
* Battery level.
* }
*/
public function __construct($data = NULL) {
\GPBMetadata\Chirpstack\Integration\Integration::initOnce();
parent::__construct($data);
}
/**
* Deduplication ID (UUID).
*
* Generated from protobuf field string deduplication_id = 1;
* @return string
*/
public function getDeduplicationId()
{
return $this->deduplication_id;
}
/**
* Deduplication ID (UUID).
*
* Generated from protobuf field string deduplication_id = 1;
* @param string $var
* @return $this
*/
public function setDeduplicationId($var)
{
GPBUtil::checkString($var, True);
$this->deduplication_id = $var;
return $this;
}
/**
* Timestamp.
*
* Generated from protobuf field .google.protobuf.Timestamp time = 2;
* @return \Google\Protobuf\Timestamp|null
*/
public function getTime()
{
return $this->time;
}
public function hasTime()
{
return isset($this->time);
}
public function clearTime()
{
unset($this->time);
}
/**
* Timestamp.
*
* Generated from protobuf field .google.protobuf.Timestamp time = 2;
* @param \Google\Protobuf\Timestamp $var
* @return $this
*/
public function setTime($var)
{
GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
$this->time = $var;
return $this;
}
/**
* Device info.
*
* Generated from protobuf field .integration.DeviceInfo device_info = 3;
* @return \Chirpstack\Integration\DeviceInfo|null
*/
public function getDeviceInfo()
{
return $this->device_info;
}
public function hasDeviceInfo()
{
return isset($this->device_info);
}
public function clearDeviceInfo()
{
unset($this->device_info);
}
/**
* Device info.
*
* Generated from protobuf field .integration.DeviceInfo device_info = 3;
* @param \Chirpstack\Integration\DeviceInfo $var
* @return $this
*/
public function setDeviceInfo($var)
{
GPBUtil::checkMessage($var, \Chirpstack\Integration\DeviceInfo::class);
$this->device_info = $var;
return $this;
}
/**
* The demodulation signal-to-noise ratio in dB for the last successfully
* received device-status request by the Network Server.
*
* Generated from protobuf field int32 margin = 5;
* @return int
*/
public function getMargin()
{
return $this->margin;
}
/**
* The demodulation signal-to-noise ratio in dB for the last successfully
* received device-status request by the Network Server.
*
* Generated from protobuf field int32 margin = 5;
* @param int $var
* @return $this
*/
public function setMargin($var)
{
GPBUtil::checkInt32($var);
$this->margin = $var;
return $this;
}
/**
* Device is connected to an external power source.
*
* Generated from protobuf field bool external_power_source = 6;
* @return bool
*/
public function getExternalPowerSource()
{
return $this->external_power_source;
}
/**
* Device is connected to an external power source.
*
* Generated from protobuf field bool external_power_source = 6;
* @param bool $var
* @return $this
*/
public function setExternalPowerSource($var)
{
GPBUtil::checkBool($var);
$this->external_power_source = $var;
return $this;
}
/**
* Battery level is not available.
*
* Generated from protobuf field bool battery_level_unavailable = 7;
* @return bool
*/
public function getBatteryLevelUnavailable()
{
return $this->battery_level_unavailable;
}
/**
* Battery level is not available.
*
* Generated from protobuf field bool battery_level_unavailable = 7;
* @param bool $var
* @return $this
*/
public function setBatteryLevelUnavailable($var)
{
GPBUtil::checkBool($var);
$this->battery_level_unavailable = $var;
return $this;
}
/**
* Battery level.
*
* Generated from protobuf field float battery_level = 8;
* @return float
*/
public function getBatteryLevel()
{
return $this->battery_level;
}
/**
* Battery level.
*
* Generated from protobuf field float battery_level = 8;
* @param float $var
* @return $this
*/
public function setBatteryLevel($var)
{
GPBUtil::checkFloat($var);
$this->battery_level = $var;
return $this;
}
}