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

71 lines
1.5 KiB
PHP
Raw Normal View History

<?php
namespace Appwrite\Utopia\Response\Model;
use Appwrite\Utopia\Response;
use Appwrite\Utopia\Response\Model;
class Target extends Model
{
/**
* @var bool
*/
2023-08-07 15:31:25 +00:00
protected bool $public = false;
2023-08-07 15:31:25 +00:00
public function __construct()
{
$this
->addRule('$id', [
'type' => self::TYPE_STRING,
'description' => 'Target ID.',
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
])
->addRule('userId', [
'type' => self::TYPE_STRING,
'description' => 'User ID.',
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
])
->addRule('providerId', [
'type' => self::TYPE_STRING,
'description' => 'Provider ID.',
'required' => false,
'default' => '',
'example' => '259125845563242502',
2023-08-07 15:31:25 +00:00
])
->addRule('providerType', [
'type' => self::TYPE_STRING,
'description' => 'The type of provider supported by this target.',
'default' => '',
'example' => 'sms',
2023-08-07 15:31:25 +00:00
])
->addRule('identifier', [
'type' => self::TYPE_STRING,
'description' => 'The target identifier.',
'default' => '',
'example' => 'token',
2023-08-07 15:31:25 +00:00
]);
}
/**
* Get Name
*
* @return string
*/
2023-08-07 15:31:25 +00:00
public function getName(): string
{
return 'Target';
}
/**
* Get Type
*
* @return string
*/
2023-08-07 15:31:25 +00:00
public function getType(): string
{
return Response::MODEL_TARGET;
}
}