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

/**
 * Builder for model VaultInstructionBase
 *
 * @see VaultInstructionBase
 */
class VaultInstructionBaseBuilder
{
    /**
     * @var VaultInstructionBase
     */
    private $instance;

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

    /**
     * Initializes a new vault instruction base Builder object.
     */
    public static function init(): self
    {
        return new self(new VaultInstructionBase());
    }

    /**
     * Sets store in vault field.
     */
    public function storeInVault(?string $value): self
    {
        $this->instance->setStoreInVault($value);
        return $this;
    }

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