66 lines
1.7 KiB
PHP
66 lines
1.7 KiB
PHP
<?php
|
|
|
|
namespace App\Dto\Input;
|
|
|
|
use ApiPlatform\Metadata\ApiProperty;
|
|
use App\Dto\Output\ClientOutput;
|
|
use App\Dto\Output\ImageOutput;
|
|
use App\Dto\Output\PartitionOutput;
|
|
use App\Validator\Constraints\ClientsHaveSamePartitionCount;
|
|
use App\Validator\Constraints\OrganizationalUnitMulticastMode;
|
|
use App\Validator\Constraints\OrganizationalUnitMulticastPort;
|
|
use App\Validator\Constraints\OrganizationalUnitP2PMode;
|
|
use Symfony\Component\Serializer\Annotation\Groups;
|
|
|
|
#[ClientsHaveSamePartitionCount]
|
|
class DeployImageInput
|
|
{
|
|
#[Groups(['image:write'])]
|
|
#[ApiProperty(description: 'The type of the image deployment', example: "")]
|
|
public ?string $type = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
#[ApiProperty(description: 'The type of the image deployment', example: "")]
|
|
public ?string $method = null;
|
|
|
|
/**
|
|
* @var ClientOutput[]
|
|
*/
|
|
#[Groups(['image:write'])]
|
|
#[ApiProperty(description: 'The client to deploy the image')]
|
|
public ?array $clients = [];
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?int $diskNumber = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?int $partitionNumber = null;
|
|
|
|
#[OrganizationalUnitP2PMode]
|
|
#[Groups(['image:write'])]
|
|
public ?string $p2pMode = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?int $p2pTime = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?string $mcastIp = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?int $mcastSpeed = null;
|
|
|
|
#[OrganizationalUnitMulticastPort]
|
|
#[Groups(['image:write'])]
|
|
public ?int $mcastPort = null;
|
|
|
|
#[OrganizationalUnitMulticastMode]
|
|
#[Groups(['image:write'])]
|
|
public ?string $mcastMode = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?int $maxClients = null;
|
|
|
|
#[Groups(['image:write'])]
|
|
public ?int $maxTime = null;
|
|
|
|
} |