<?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\VenmoVaultResponse;
use PaypalServerSdkLib\Models\VenmoWalletAttributesResponse;

/**
 * Builder for model VenmoWalletAttributesResponse
 *
 * @see VenmoWalletAttributesResponse
 */
class VenmoWalletAttributesResponseBuilder
{
    /**
     * @var VenmoWalletAttributesResponse
     */
    private $instance;

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

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

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

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