<?php

declare(strict_types=1);

/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */

namespace PaypalServerSdkLib\Models\Builders;

use Core\Utils\CoreHelper;
use PaypalServerSdkLib\Models\CobrandedCard;
use PaypalServerSdkLib\Models\PaypalWalletAttributesResponse;
use PaypalServerSdkLib\Models\PaypalWalletVaultResponse;

/**
 * Builder for model PaypalWalletAttributesResponse
 *
 * @see PaypalWalletAttributesResponse
 */
class PaypalWalletAttributesResponseBuilder
{
    /**
     * @var PaypalWalletAttributesResponse
     */
    private $instance;

    private function __construct(PaypalWalletAttributesResponse $instance)
    {
        $this->instance = $instance;
    }

    /**
     * Initializes a new Paypal Wallet Attributes Response Builder object.
     */
    public static function init(): self
    {
        return new self(new PaypalWalletAttributesResponse());
    }

    /**
     * Sets vault field.
     *
     * @param PaypalWalletVaultResponse|null $value
     */
    public function vault(?PaypalWalletVaultResponse $value): self
    {
        $this->instance->setVault($value);
        return $this;
    }

    /**
     * Sets cobranded cards field.
     *
     * @param CobrandedCard[]|null $value
     */
    public function cobrandedCards(?array $value): self
    {
        $this->instance->setCobrandedCards($value);
        return $this;
    }

    /**
     * Initializes a new Paypal Wallet Attributes Response object.
     */
    public function build(): PaypalWalletAttributesResponse
    {
        return CoreHelper::clone($this->instance);
    }
}
