common.Location */ class Location extends \Google\Protobuf\Internal\Message { /** * Latitude. * * Generated from protobuf field double latitude = 1; */ protected $latitude = 0.0; /** * Longitude. * * Generated from protobuf field double longitude = 2; */ protected $longitude = 0.0; /** * Altitude. * * Generated from protobuf field double altitude = 3; */ protected $altitude = 0.0; /** * Location source. * * Generated from protobuf field .common.LocationSource source = 4; */ protected $source = 0; /** * Accuracy. * * Generated from protobuf field float accuracy = 5; */ protected $accuracy = 0.0; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type float $latitude * Latitude. * @type float $longitude * Longitude. * @type float $altitude * Altitude. * @type int $source * Location source. * @type float $accuracy * Accuracy. * } */ public function __construct($data = NULL) { \GPBMetadata\Chirpstack\Common\Common::initOnce(); parent::__construct($data); } /** * Latitude. * * Generated from protobuf field double latitude = 1; * @return float */ public function getLatitude() { return $this->latitude; } /** * Latitude. * * Generated from protobuf field double latitude = 1; * @param float $var * @return $this */ public function setLatitude($var) { GPBUtil::checkDouble($var); $this->latitude = $var; return $this; } /** * Longitude. * * Generated from protobuf field double longitude = 2; * @return float */ public function getLongitude() { return $this->longitude; } /** * Longitude. * * Generated from protobuf field double longitude = 2; * @param float $var * @return $this */ public function setLongitude($var) { GPBUtil::checkDouble($var); $this->longitude = $var; return $this; } /** * Altitude. * * Generated from protobuf field double altitude = 3; * @return float */ public function getAltitude() { return $this->altitude; } /** * Altitude. * * Generated from protobuf field double altitude = 3; * @param float $var * @return $this */ public function setAltitude($var) { GPBUtil::checkDouble($var); $this->altitude = $var; return $this; } /** * Location source. * * Generated from protobuf field .common.LocationSource source = 4; * @return int */ public function getSource() { return $this->source; } /** * Location source. * * Generated from protobuf field .common.LocationSource source = 4; * @param int $var * @return $this */ public function setSource($var) { GPBUtil::checkEnum($var, \Chirpstack\Common\LocationSource::class); $this->source = $var; return $this; } /** * Accuracy. * * Generated from protobuf field float accuracy = 5; * @return float */ public function getAccuracy() { return $this->accuracy; } /** * Accuracy. * * Generated from protobuf field float accuracy = 5; * @param float $var * @return $this */ public function setAccuracy($var) { GPBUtil::checkFloat($var); $this->accuracy = $var; return $this; } }