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

/**
 * Builder for model SetupTokenCardExperienceContext
 *
 * @see SetupTokenCardExperienceContext
 */
class SetupTokenCardExperienceContextBuilder
{
    /**
     * @var SetupTokenCardExperienceContext
     */
    private $instance;

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

    /**
     * Initializes a new setup token card experience context Builder object.
     */
    public static function init(): self
    {
        return new self(new SetupTokenCardExperienceContext());
    }

    /**
     * Sets brand name field.
     */
    public function brandName(?string $value): self
    {
        $this->instance->setBrandName($value);
        return $this;
    }

    /**
     * Sets locale field.
     */
    public function locale(?string $value): self
    {
        $this->instance->setLocale($value);
        return $this;
    }

    /**
     * Sets return url field.
     */
    public function returnUrl(?string $value): self
    {
        $this->instance->setReturnUrl($value);
        return $this;
    }

    /**
     * Sets cancel url field.
     */
    public function cancelUrl(?string $value): self
    {
        $this->instance->setCancelUrl($value);
        return $this;
    }

    /**
     * Sets vault instruction field.
     */
    public function vaultInstruction(?string $value): self
    {
        $this->instance->setVaultInstruction($value);
        return $this;
    }

    /**
     * Initializes a new setup token card experience context object.
     */
    public function build(): SetupTokenCardExperienceContext
    {
        return CoreHelper::clone($this->instance);
    }
}
