<?php

declare(strict_types=1);

namespace Ost\OstCapabilityDataExport\Service;

final class ExportRequest
{
    /**
     * @param string[] $fields
     * @param string[] $ids
     * @param array<string, scalar> $filters
     */
    public function __construct(
        private readonly string $entity,
        private readonly array $fields,
        private readonly int $limit,
        private readonly int $offset,
        private readonly array $ids,
        private readonly array $filters,
        private readonly ?string $sortField,
        private readonly string $sortDirection,
        private readonly ?string $delimiter,
        private readonly ?bool $includeBom,
        private readonly ?bool $includeHeader,
        private readonly ?string $fileName,
        private readonly ?int $maxRows,
        private readonly ?int $batchSize
    ) {
    }

    public function entity(): string
    {
        return $this->entity;
    }

    /** @return string[] */
    public function fields(): array
    {
        return $this->fields;
    }

    public function limit(): int
    {
        return $this->limit;
    }

    public function offset(): int
    {
        return $this->offset;
    }

    /** @return string[] */
    public function ids(): array
    {
        return $this->ids;
    }

    /** @return array<string, scalar> */
    public function filters(): array
    {
        return $this->filters;
    }

    public function sortField(): ?string
    {
        return $this->sortField;
    }

    public function sortDirection(): string
    {
        return $this->sortDirection;
    }

    public function delimiter(): ?string
    {
        return $this->delimiter;
    }

    public function includeBom(): ?bool
    {
        return $this->includeBom;
    }

    public function includeHeader(): ?bool
    {
        return $this->includeHeader;
    }

    public function fileName(): ?string
    {
        return $this->fileName;
    }

    public function maxRows(): ?int
    {
        return $this->maxRows;
    }

    public function batchSize(): ?int
    {
        return $this->batchSize;
    }
}
