1
0
Fork 0
mirror of synced 2024-06-03 03:14:50 +12:00
appwrite/src/Appwrite/Utopia/Response/Model/Platform.php

82 lines
2.3 KiB
PHP

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Platform extends Model
{
/**
* @var bool
*/
protected $public = false;
public function __construct()
{
$this
->addRule('$id', [
'type' => self::TYPE_STRING,
'description' => 'Platform ID.',
'example' => '5e5ea5c16897e',
])
->addRule('name', [
'type' => self::TYPE_STRING,
'description' => 'Platform name.',
'example' => 'My Web App',
])
->addRule('type', [
'type' => self::TYPE_STRING,
'description' => 'Platform type. Possible values are: web, flutter-ios, flutter-android, ios, android, and unity.',
'example' => 'My Web App',
])
->addRule('key', [
'type' => self::TYPE_STRING,
'description' => 'Platform Key. iOS bundle ID or Android package name. Empty string for other platforms.',
'example' => 'com.company.appname',
])
// ->addRule('store', [
// 'type' => self::TYPE_STRING,
// 'description' => 'Link to platform store.',
// 'example' => '',
// ])
->addRule('hostname', [
'type' => self::TYPE_STRING,
'description' => 'Web app hostname. Empty string for other platforms.',
'example' => true,
])
->addRule('httpUser', [
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication username.',
'default' => '',
'example' => 'username',
])
->addRule('httpPass', [
'type' => self::TYPE_STRING,
'description' => 'HTTP basic authentication password.',
'default' => '',
'example' => 'password',
])
;
}
/**
* Get Name
*
* @return string
*/
public function getName():string
{
return 'Platform';
}
/**
* Get Collection
*
* @return string
*/
public function getType():string
{
return Response::MODEL_PLATFORM;
}
}