1
0
Fork 0
mirror of synced 2024-06-27 02:31:04 +12:00
appwrite/src/Appwrite/Utopia/Response/Model/Deployment.php

84 lines
2.4 KiB
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Deployment extends Model
{
public function __construct()
{
$this
->addRule('$id', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'Deployment ID.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => '5e5ea5c16897e',
])
->addRule('resourceId', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'Resource ID.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => '5e5ea6g16897e',
])
->addRule('resourceType', [
'type' => self::TYPE_STRING,
'description' => 'Resource type.',
'default' => '',
'example' => 'functions',
])
->addRule('dateCreated', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_INTEGER,
'description' => 'The deployment creation date in Unix timestamp.',
2021-01-14 04:06:36 +13:00
'default' => 0,
'example' => 1592981250,
])
2021-09-01 21:48:56 +12:00
->addRule('entrypoint', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'The entrypoint file to use to execute the deployment code.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => 'enabled',
])
->addRule('size', [
'type' => self::TYPE_INTEGER,
'description' => 'The code size in bytes.',
'default' => 0,
'example' => 128,
])
->addRule('buildId', [
'type' => self::TYPE_STRING,
'description' => 'The current build ID.',
'default' => '',
'example' => '5e5ea5c16897e',
])
2022-01-24 22:37:14 +13:00
->addRule('deploy', [
'type' => self::TYPE_BOOLEAN,
'description' => 'Whether the deployment should be automatically deployed.',
'default' => false,
'example' => true,
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Deployment';
}
/**
2021-12-15 23:19:29 +13:00
* Get Type
*
* @return string
*/
public function getType():string
{
return Response::MODEL_DEPLOYMENT;
}
}