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

48 lines
1 KiB
PHP
Raw Normal View History

2021-12-14 14:17:55 +00:00
<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class HealthStatus extends Model
{
public function __construct()
{
$this
->addRule('ping', [
2021-12-14 14:17:55 +00:00
'type' => self::TYPE_INTEGER,
'description' => 'Duration in milliseconds how long the health check took.',
'default' => 0,
'example' => 128,
])
->addRule('status', [
'type' => self::TYPE_STRING,
'description' => 'Service status. Possible values can are: `pass`, `fail`',
'default' => '',
'example' => 'pass',
])
;
}
/**
* Get Name
*
* @return string
*/
2022-05-23 14:54:50 +00:00
public function getName(): string
2021-12-14 14:17:55 +00:00
{
return 'Health Status';
}
/**
2021-12-15 10:19:29 +00:00
* Get Type
2021-12-14 14:17:55 +00:00
*
* @return string
*/
2022-05-23 14:54:50 +00:00
public function getType(): string
2021-12-14 14:17:55 +00:00
{
return Response::MODEL_HEALTH_STATUS;
}
}