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

66 lines
1.6 KiB
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Tag extends Model
{
public function __construct()
{
$this
->addRule('$id', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'Tag ID.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => '5e5ea5c16897e',
])
->addRule('functionId', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'Function ID.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => '5e5ea6g16897e',
])
->addRule('dateCreated', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_INTEGER,
'description' => 'The tag creation date in Unix timestamp.',
2021-01-14 04:06:36 +13:00
'default' => 0,
'example' => 1592981250,
])
->addRule('command', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'The entrypoint command in use to execute the tag code.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => 'enabled',
])
->addRule('size', [
2020-11-08 11:14:48 +13:00
'type' => self::TYPE_STRING,
'description' => 'The code size in bytes.',
2021-01-14 04:06:36 +13:00
'default' => '',
'example' => 'python-3.8',
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Tag';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_TAG;
}
}