1
0
Fork 0
mirror of synced 2024-09-21 20:11:15 +12:00
appwrite/src/Appwrite/Utopia/Response/Model/Build.php
2022-01-10 14:01:50 +00:00

76 lines
2.2 KiB
PHP

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Build extends Model
{
public function __construct()
{
$this
->addRule('$id', [
'type' => self::TYPE_STRING,
'description' => 'Build ID.',
'default' => '',
'example' => '5e5ea5c16897e',
])
->addRule('dateCreated', [
'type' => self::TYPE_INTEGER,
'description' => 'The tag creation date in Unix timestamp.',
'default' => 0,
'example' => 1592981250,
])
// Build Status
// Failed - The tag build has failed. More details can usually be found in buildStderr
// Ready - The tag build was successful and the tag is ready to be deployed
// Processing - The tag is currently waiting to have a build triggered
// Building - The tag is currently being built
->addRule('status', [
'type' => self::TYPE_STRING,
'description' => 'The build status.',
'default' => '',
'example' => 'ready',
])
->addRule('stdout', [
'type' => self::TYPE_STRING,
'description' => 'The stdout of the build.',
'default' => '',
'example' => '',
])
->addRule('stderr', [
'type' => self::TYPE_STRING,
'description' => 'The stderr of the build.',
'default' => '',
'example' => '',
])
->addRule('buildTime', [
'type' => self::TYPE_INTEGER,
'description' => 'The build time in seconds.',
'default' => 0,
'example' => 0,
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Build';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_BUILD;
}
}