<?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\ApplePayAttributesResponse;
use PaypalServerSdkLib\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.
     *
     * @param VaultResponse|null $value
     */
    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);
    }
}
