<?php

declare(strict_types=1);

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

namespace PayPalRESTAPIsLib\Models\Builders;

use Core\Utils\CoreHelper;
use PayPalRESTAPIsLib\Models\ApplePayAttributesResponse;
use PayPalRESTAPIsLib\Models\VaultResponse;

/**
 * Builder for model ApplePayAttributesResponse
 *
 * @see ApplePayAttributesResponse
 */
class ApplePayAttributesResponseBuilder
{
    /**
     * @var ApplePayAttributesResponse
     */
    private $instance;

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

    /**
     * Initializes a new apple pay attributes response Builder object.
     */
    public static function init(): self
    {
        return new self(new ApplePayAttributesResponse());
    }

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

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