<?php

namespace App\Dto\Input;

use ApiPlatform\Metadata\ApiProperty;
use App\Dto\Output\ClientOutput;
use Symfony\Component\Serializer\Annotation\Groups;
use Symfony\Component\Validator\Constraints as Assert;

final class CommandExecuteInput
{
    /**
     * @var ClientOutput[]
     */
    #[Assert\NotNull]
    #[Groups(['command:write'])]
    #[ApiProperty(
        description: 'Los clientes donde ejecutar el comando',
        example: []
    )]
    public array $clients = [];

    #[Assert\NotNull]
    #[Groups(['command:write'])]
    #[ApiProperty(
        description: 'El script a ejecutar',
        example: 'echo "Hello World"'
    )]
    public string $script = '';

    #[Groups(['command:write'])]
    #[ApiProperty(
        description: 'Si encolar la ejecución del comando',
        example: false
    )]
    public bool $queue = false;
}