<?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\VaultInstruction;

/**
 * Builder for model VaultInstruction
 *
 * @see VaultInstruction
 */
class VaultInstructionBuilder
{
    /**
     * @var VaultInstruction
     */
    private $instance;

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

    /**
     * Initializes a new vault instruction Builder object.
     */
    public static function init(string $storeInVault): self
    {
        return new self(new VaultInstruction($storeInVault));
    }

    /**
     * Initializes a new vault instruction object.
     */
    public function build(): VaultInstruction
    {
        return CoreHelper::clone($this->instance);
    }
}
