<?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\VenmoWalletAdditionalAttributes;
use PaypalServerSDKLib\Models\VenmoWalletExperienceContext;
use PaypalServerSDKLib\Models\VenmoWalletRequest;

/**
 * Builder for model VenmoWalletRequest
 *
 * @see VenmoWalletRequest
 */
class VenmoWalletRequestBuilder
{
    /**
     * @var VenmoWalletRequest
     */
    private $instance;

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

    /**
     * Initializes a new venmo wallet request Builder object.
     */
    public static function init(): self
    {
        return new self(new VenmoWalletRequest());
    }

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

    /**
     * Sets email address field.
     */
    public function emailAddress(?string $value): self
    {
        $this->instance->setEmailAddress($value);
        return $this;
    }

    /**
     * Sets experience context field.
     */
    public function experienceContext(?VenmoWalletExperienceContext $value): self
    {
        $this->instance->setExperienceContext($value);
        return $this;
    }

    /**
     * Sets attributes field.
     */
    public function attributes(?VenmoWalletAdditionalAttributes $value): self
    {
        $this->instance->setAttributes($value);
        return $this;
    }

    /**
     * Initializes a new venmo wallet request object.
     */
    public function build(): VenmoWalletRequest
    {
        return CoreHelper::clone($this->instance);
    }
}
