<?php

namespace App\Download\Action\Input;

use App\Download\Action\Command\PauseDownloadCommand;
use OneToMany\RichBundle\Attribute\SourceRoute;
use OneToMany\RichBundle\Contract\CommandInterface;
use OneToMany\RichBundle\Contract\InputInterface;

/** @implements InputInterface<PauseDownloadInput, PauseDownloadCommand> */
class PauseDownloadInput implements InputInterface
{
    public function __construct(
        #[SourceRoute('downloadId')]
        public int $downloadId,
    ) {}

    public function toCommand(): CommandInterface
    {
        return new PauseDownloadCommand(
            $this->downloadId,
        );
    }
}