common.Metric */ class Metric extends \Google\Protobuf\Internal\Message { /** * Name. * * Generated from protobuf field string name = 1; */ protected $name = ''; /** * Timestamps. * * Generated from protobuf field repeated .google.protobuf.Timestamp timestamps = 2; */ private $timestamps; /** * Datasets. * * Generated from protobuf field repeated .common.MetricDataset datasets = 3; */ private $datasets; /** * Kind. * * Generated from protobuf field .common.MetricKind kind = 4; */ protected $kind = 0; /** * Constructor. * * @param array $data { * Optional. Data for populating the Message object. * * @type string $name * Name. * @type array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $timestamps * Timestamps. * @type array<\Chirpstack\Common\MetricDataset>|\Google\Protobuf\Internal\RepeatedField $datasets * Datasets. * @type int $kind * Kind. * } */ public function __construct($data = NULL) { \GPBMetadata\Chirpstack\Common\Common::initOnce(); parent::__construct($data); } /** * Name. * * Generated from protobuf field string name = 1; * @return string */ public function getName() { return $this->name; } /** * Name. * * Generated from protobuf field string name = 1; * @param string $var * @return $this */ public function setName($var) { GPBUtil::checkString($var, True); $this->name = $var; return $this; } /** * Timestamps. * * Generated from protobuf field repeated .google.protobuf.Timestamp timestamps = 2; * @return \Google\Protobuf\Internal\RepeatedField */ public function getTimestamps() { return $this->timestamps; } /** * Timestamps. * * Generated from protobuf field repeated .google.protobuf.Timestamp timestamps = 2; * @param array<\Google\Protobuf\Timestamp>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setTimestamps($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Protobuf\Timestamp::class); $this->timestamps = $arr; return $this; } /** * Datasets. * * Generated from protobuf field repeated .common.MetricDataset datasets = 3; * @return \Google\Protobuf\Internal\RepeatedField */ public function getDatasets() { return $this->datasets; } /** * Datasets. * * Generated from protobuf field repeated .common.MetricDataset datasets = 3; * @param array<\Chirpstack\Common\MetricDataset>|\Google\Protobuf\Internal\RepeatedField $var * @return $this */ public function setDatasets($var) { $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Chirpstack\Common\MetricDataset::class); $this->datasets = $arr; return $this; } /** * Kind. * * Generated from protobuf field .common.MetricKind kind = 4; * @return int */ public function getKind() { return $this->kind; } /** * Kind. * * Generated from protobuf field .common.MetricKind kind = 4; * @param int $var * @return $this */ public function setKind($var) { GPBUtil::checkEnum($var, \Chirpstack\Common\MetricKind::class); $this->kind = $var; return $this; } }