appwrite/src/Appwrite/Utopia/Response/Model/UsageCollection.php

49 lines
1 KiB
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class UsageCollection extends Model
{
public function __construct()
{
$this
->addRule('range', [
'type' => self::TYPE_STRING,
'description' => 'The time range of the usage stats.',
'default' => '',
'example' => '30d',
])
2023-10-25 09:46:45 +00:00
->addRule('documentsTotal', [
2022-10-11 10:34:42 +00:00
'type' => Response::MODEL_METRIC,
'description' => 'Aggregated stats for total number of documents.',
'default' => [],
2022-10-11 10:34:42 +00:00
'example' => [],
2022-05-23 14:54:50 +00:00
'array' => true
])
;
}
/**
* Get Name
2022-05-23 14:54:50 +00:00
*
* @return string
*/
2022-05-23 14:54:50 +00:00
public function getName(): string
{
return 'UsageCollection';
}
/**
* Get Type
2022-05-23 14:54:50 +00:00
*
* @return string
*/
2022-05-23 14:54:50 +00:00
public function getType(): string
{
return Response::MODEL_USAGE_COLLECTION;
}
2022-05-23 14:54:50 +00:00
}