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

79 lines
2.1 KiB
PHP
Raw Normal View History

2021-12-09 13:02:12 +00:00
<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Runtime extends Model
{
public function __construct()
{
$this
->addRule('$id', [
'type' => self::TYPE_STRING,
'description' => 'Runtime ID.',
'default' => '',
'example' => 'python-3.8',
])
->addRule('name', [
'type' => self::TYPE_STRING,
'description' => 'Runtime Name.',
'default' => '',
'example' => 'Python'
])
->addRule('version', [
'type' => self::TYPE_STRING,
'description' => 'Runtime version.',
'default' => '',
'example' => '3.8',
])
->addRule('base', [
'type' => self::TYPE_STRING,
'description' => 'Base Docker image used to build the runtime.',
'default' => '',
'example' => 'python:3.8-alpine',
])
->addRule('image', [
'type' => self::TYPE_STRING,
'description' => 'Image name of Docker Hub.',
'default' => '',
'example' => 'appwrite\/runtime-for-python:3.8',
])
->addRule('logo', [
'type' => self::TYPE_STRING,
'description' => 'Name of the logo image.',
'default' => '',
'example' => 'python.png',
])
->addRule('supports', [
'type' => self::TYPE_STRING,
'description' => 'List of supported architectures.',
'default' => '',
'example' => 'amd64',
'array' => true,
])
;
}
/**
* Get Name
*
* @return string
*/
2022-05-23 14:54:50 +00:00
public function getName(): string
2021-12-09 13:02:12 +00:00
{
return 'Runtime';
}
/**
* Get Type
*
* @return string
*/
2022-05-23 14:54:50 +00:00
public function getType(): string
2021-12-09 13:02:12 +00:00
{
return Response::MODEL_RUNTIME;
}
}