<?php

declare (strict_types=1);
/*
 * PaypalServerSdkLib
 *
 * This file was automatically generated by APIMATIC v3.0 ( https://www.apimatic.io ).
 */
namespace FormGent\PaypalServerSdkLib\Models\Builders;

use FormGent\Core\Utils\CoreHelper;
use FormGent\PaypalServerSdkLib\Models\ApplePayPaymentObject;
use FormGent\PaypalServerSdkLib\Models\BancontactPaymentObject;
use FormGent\PaypalServerSdkLib\Models\BlikPaymentObject;
use FormGent\PaypalServerSdkLib\Models\CardResponse;
use FormGent\PaypalServerSdkLib\Models\EpsPaymentObject;
use FormGent\PaypalServerSdkLib\Models\GiropayPaymentObject;
use FormGent\PaypalServerSdkLib\Models\GooglePayWalletResponse;
use FormGent\PaypalServerSdkLib\Models\IdealPaymentObject;
use FormGent\PaypalServerSdkLib\Models\MybankPaymentObject;
use FormGent\PaypalServerSdkLib\Models\P24PaymentObject;
use FormGent\PaypalServerSdkLib\Models\PaymentSourceResponse;
use FormGent\PaypalServerSdkLib\Models\PaypalWalletResponse;
use FormGent\PaypalServerSdkLib\Models\SofortPaymentObject;
use FormGent\PaypalServerSdkLib\Models\TrustlyPaymentObject;
use FormGent\PaypalServerSdkLib\Models\VenmoWalletResponse;
/**
 * Builder for model PaymentSourceResponse
 *
 * @see PaymentSourceResponse
 */
class PaymentSourceResponseBuilder
{
    /**
     * @var PaymentSourceResponse
     */
    private $instance;
    private function __construct(PaymentSourceResponse $instance)
    {
        $this->instance = $instance;
    }
    /**
     * Initializes a new Payment Source Response Builder object.
     */
    public static function init() : self
    {
        return new self(new PaymentSourceResponse());
    }
    /**
     * Sets card field.
     *
     * @param CardResponse|null $value
     */
    public function card(?CardResponse $value) : self
    {
        $this->instance->setCard($value);
        return $this;
    }
    /**
     * Sets paypal field.
     *
     * @param PaypalWalletResponse|null $value
     */
    public function paypal(?PaypalWalletResponse $value) : self
    {
        $this->instance->setPaypal($value);
        return $this;
    }
    /**
     * Sets bancontact field.
     *
     * @param BancontactPaymentObject|null $value
     */
    public function bancontact(?BancontactPaymentObject $value) : self
    {
        $this->instance->setBancontact($value);
        return $this;
    }
    /**
     * Sets blik field.
     *
     * @param BlikPaymentObject|null $value
     */
    public function blik(?BlikPaymentObject $value) : self
    {
        $this->instance->setBlik($value);
        return $this;
    }
    /**
     * Sets eps field.
     *
     * @param EpsPaymentObject|null $value
     */
    public function eps(?EpsPaymentObject $value) : self
    {
        $this->instance->setEps($value);
        return $this;
    }
    /**
     * Sets giropay field.
     *
     * @param GiropayPaymentObject|null $value
     */
    public function giropay(?GiropayPaymentObject $value) : self
    {
        $this->instance->setGiropay($value);
        return $this;
    }
    /**
     * Sets ideal field.
     *
     * @param IdealPaymentObject|null $value
     */
    public function ideal(?IdealPaymentObject $value) : self
    {
        $this->instance->setIdeal($value);
        return $this;
    }
    /**
     * Sets mybank field.
     *
     * @param MybankPaymentObject|null $value
     */
    public function mybank(?MybankPaymentObject $value) : self
    {
        $this->instance->setMybank($value);
        return $this;
    }
    /**
     * Sets p 24 field.
     *
     * @param P24PaymentObject|null $value
     */
    public function p24(?P24PaymentObject $value) : self
    {
        $this->instance->setP24($value);
        return $this;
    }
    /**
     * Sets sofort field.
     *
     * @param SofortPaymentObject|null $value
     */
    public function sofort(?SofortPaymentObject $value) : self
    {
        $this->instance->setSofort($value);
        return $this;
    }
    /**
     * Sets trustly field.
     *
     * @param TrustlyPaymentObject|null $value
     */
    public function trustly(?TrustlyPaymentObject $value) : self
    {
        $this->instance->setTrustly($value);
        return $this;
    }
    /**
     * Sets apple pay field.
     *
     * @param ApplePayPaymentObject|null $value
     */
    public function applePay(?ApplePayPaymentObject $value) : self
    {
        $this->instance->setApplePay($value);
        return $this;
    }
    /**
     * Sets google pay field.
     *
     * @param GooglePayWalletResponse|null $value
     */
    public function googlePay(?GooglePayWalletResponse $value) : self
    {
        $this->instance->setGooglePay($value);
        return $this;
    }
    /**
     * Sets venmo field.
     *
     * @param VenmoWalletResponse|null $value
     */
    public function venmo(?VenmoWalletResponse $value) : self
    {
        $this->instance->setVenmo($value);
        return $this;
    }
    /**
     * Initializes a new Payment Source Response object.
     */
    public function build() : PaymentSourceResponse
    {
        return CoreHelper::clone($this->instance);
    }
}
