<?php

declare(strict_types=1);

namespace Gls\GlsPoland\AdePlus\Type;

use Gls\GlsPoland\AdePlus\Response;
use JsonSerializable;
use Gls\GlsPoland\Soap\Client\Type\ResultInterface;

final class AdeServicesGetCountriesCDXResponse extends Response implements ResultInterface, JsonSerializable
{
    /**
     * @var \Gls\GlsPoland\AdePlus\Type\CCountryCDXMaxArray
     */
    protected $return;

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

    public function getReturn(): CCountryCDXMaxArray
    {
        return $this->return;
    }

    public function withReturn(CCountryCDXMaxArray $return): AdeServicesGetCountriesCDXResponse
    {
        $new = clone $this;
        $new->return = $return;

        return $new;
    }
}
