<?php

declare(strict_types=1);

namespace Gls\GlsPoland\AdePlus\Type;

use Gls\GlsPoland\AdePlus\Consignment\ConsignmentIdsCollection;
use Gls\GlsPoland\Soap\Client\Type\RequestInterface;
use JsonSerializable;

final class AdePreparingBoxGetConsignsLabels implements RequestInterface, JsonSerializable
{
    /**
     * @var string
     */
    private $session;

    /**
     * @var \Gls\GlsPoland\AdePlus\Consignment\ConsignmentIdsCollection
     */
    private $consigns_ids;

    /**
     * @var string
     */
    private $mode;

    public function __construct(string $session, ConsignmentIdsCollection $consigns_ids, string $mode)
    {
        $this->session = $session;
        $this->consigns_ids = $consigns_ids;
        $this->mode = $mode;
    }

    public function jsonSerialize(): array
    {
        return [
            'session' => $this->session,
            'consigns_ids' => $this->consigns_ids,
            'mode' => $this->mode,
        ];
    }

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

    public function withSession(string $session): AdePreparingBoxGetConsignsLabels
    {
        $new = clone $this;
        $new->session = $session;

        return $new;
    }

    public function getConsigns_ids(): ConsignmentIdsCollection
    {
        return $this->consigns_ids;
    }

    public function withConsigns_ids(ConsignmentIdsCollection $consigns_ids): AdePreparingBoxGetConsignsLabels
    {
        $new = clone $this;
        $new->consigns_ids = $consigns_ids;

        return $new;
    }

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

    public function withMode(string $mode): AdePreparingBoxGetConsignsLabels
    {
        $new = clone $this;
        $new->mode = $mode;

        return $new;
    }
}
