<?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\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 pay pal wallet attributes response Builder object.
     */
    public static function init(): self
    {
        return new self(new PayPalWalletAttributesResponse());
    }

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

    /**
     * Sets cobranded cards field.
     */
    public function cobrandedCards(?array $value): self
    {
        $this->instance->setCobrandedCards($value);
        return $this;
    }

    /**
     * Initializes a new pay pal wallet attributes response object.
     */
    public function build(): PayPalWalletAttributesResponse
    {
        return CoreHelper::clone($this->instance);
    }
}
