<?php

declare(strict_types=1);

namespace Gls\GlsPoland\AdePlus\Type;

use Gls\GlsPoland\Soap\Client\Type\RequestInterface;
use JsonSerializable;

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

    /**
     * @var int
     */
    private $id;

    /**
     * @var int
     */
    private $id_start;

    public function __construct(string $session, int $id, int $id_start)
    {
        $this->session = $session;
        $this->id = $id;
        $this->id_start = $id_start;
    }

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

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

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

        return $new;
    }

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

    public function withId(int $id): AdePickupGetConsignIDs
    {
        $new = clone $this;
        $new->id = $id;

        return $new;
    }

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

    public function withId_start(int $id_start): AdePickupGetConsignIDs
    {
        $new = clone $this;
        $new->id_start = $id_start;

        return $new;
    }
}
