1
0
Fork 0
mirror of synced 2024-06-02 10:54:44 +12:00
appwrite/src/Appwrite/Utopia/Response/Model/Metric.php
2022-05-23 14:54:50 +00:00

48 lines
1,012 B
PHP

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Metric extends Model
{
public function __construct()
{
$this
->addRule('value', [
'type' => self::TYPE_INTEGER,
'description' => 'The value of this metric at the timestamp.',
'default' => -1,
'example' => 1,
])
->addRule('timestamp', [
'type' => self::TYPE_INTEGER,
'description' => 'The UNIX timestamp at which this metric was aggregated.',
'default' => 0,
'example' => 1592981250
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName(): string
{
return 'Metric';
}
/**
* Get Collection
*
* @return string
*/
public function getType(): string
{
return Response::MODEL_METRIC;
}
}