<?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\CardAttributesResponse;
use PayPalRESTAPIsLib\Models\VaultResponse;

/**
 * Builder for model CardAttributesResponse
 *
 * @see CardAttributesResponse
 */
class CardAttributesResponseBuilder
{
    /**
     * @var CardAttributesResponse
     */
    private $instance;

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

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

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

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