<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Payment.OpsPaymentMethod StructType
 * @subpackage Structs
 */
class Payment_OpsPaymentMethod extends Payment_PaymentMethod
{
    /**
     * The IsEnforceTwoPhaseCommit
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsEnforceTwoPhaseCommit;
    /**
     * The IsSelfHosted
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsSelfHosted;
    /**
     * The IsSuppressAuthBeforeCommit
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsSuppressAuthBeforeCommit;
    /**
     * The IsSuppressTwoPhasePayment
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsSuppressTwoPhasePayment;
    /**
     * The IsTwoPhasePaymentSupported
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var bool
     */
    public $IsTwoPhasePaymentSupported;
    /**
     * The RedirectTimeoutMin
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $RedirectTimeoutMin;
    /**
     * The SelfHostedFormName
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $SelfHostedFormName;
    /**
     * The SyncOperationsTimeoutSeconds
     * Meta information extracted from the WSDL
     * - documentation: Calculated.
     * - minOccurs: 0
     * - nillable: true
     * @var int
     */
    public $SyncOperationsTimeoutSeconds;
    /**
     * Constructor method for Payment.OpsPaymentMethod
     * @uses Payment_OpsPaymentMethod::setIsEnforceTwoPhaseCommit()
     * @uses Payment_OpsPaymentMethod::setIsSelfHosted()
     * @uses Payment_OpsPaymentMethod::setIsSuppressAuthBeforeCommit()
     * @uses Payment_OpsPaymentMethod::setIsSuppressTwoPhasePayment()
     * @uses Payment_OpsPaymentMethod::setIsTwoPhasePaymentSupported()
     * @uses Payment_OpsPaymentMethod::setRedirectTimeoutMin()
     * @uses Payment_OpsPaymentMethod::setSelfHostedFormName()
     * @uses Payment_OpsPaymentMethod::setSyncOperationsTimeoutSeconds()
     * @param bool $isEnforceTwoPhaseCommit
     * @param bool $isSelfHosted
     * @param bool $isSuppressAuthBeforeCommit
     * @param bool $isSuppressTwoPhasePayment
     * @param bool $isTwoPhasePaymentSupported
     * @param int $redirectTimeoutMin
     * @param string $selfHostedFormName
     * @param int $syncOperationsTimeoutSeconds
     */
    public function __construct($isEnforceTwoPhaseCommit = null, $isSelfHosted = null, $isSuppressAuthBeforeCommit = null, $isSuppressTwoPhasePayment = null, $isTwoPhasePaymentSupported = null, $redirectTimeoutMin = null, $selfHostedFormName = null, $syncOperationsTimeoutSeconds = null)
    {
        $this
            ->setIsEnforceTwoPhaseCommit($isEnforceTwoPhaseCommit)
            ->setIsSelfHosted($isSelfHosted)
            ->setIsSuppressAuthBeforeCommit($isSuppressAuthBeforeCommit)
            ->setIsSuppressTwoPhasePayment($isSuppressTwoPhasePayment)
            ->setIsTwoPhasePaymentSupported($isTwoPhasePaymentSupported)
            ->setRedirectTimeoutMin($redirectTimeoutMin)
            ->setSelfHostedFormName($selfHostedFormName)
            ->setSyncOperationsTimeoutSeconds($syncOperationsTimeoutSeconds);
    }
    /**
     * Get IsEnforceTwoPhaseCommit value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getIsEnforceTwoPhaseCommit()
    {
        return isset($this->IsEnforceTwoPhaseCommit) ? $this->IsEnforceTwoPhaseCommit : null;
    }
    /**
     * Set IsEnforceTwoPhaseCommit value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $isEnforceTwoPhaseCommit
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setIsEnforceTwoPhaseCommit($isEnforceTwoPhaseCommit = null)
    {
        // validation for constraint: boolean
        if (!is_null($isEnforceTwoPhaseCommit) && !is_bool($isEnforceTwoPhaseCommit)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isEnforceTwoPhaseCommit, true), gettype($isEnforceTwoPhaseCommit)), __LINE__);
        }
        if (is_null($isEnforceTwoPhaseCommit) || (is_array($isEnforceTwoPhaseCommit) && empty($isEnforceTwoPhaseCommit))) {
            unset($this->IsEnforceTwoPhaseCommit);
        } else {
            $this->IsEnforceTwoPhaseCommit = $isEnforceTwoPhaseCommit;
        }
        return $this;
    }
    /**
     * Get IsSelfHosted value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getIsSelfHosted()
    {
        return isset($this->IsSelfHosted) ? $this->IsSelfHosted : null;
    }
    /**
     * Set IsSelfHosted value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $isSelfHosted
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setIsSelfHosted($isSelfHosted = null)
    {
        // validation for constraint: boolean
        if (!is_null($isSelfHosted) && !is_bool($isSelfHosted)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isSelfHosted, true), gettype($isSelfHosted)), __LINE__);
        }
        if (is_null($isSelfHosted) || (is_array($isSelfHosted) && empty($isSelfHosted))) {
            unset($this->IsSelfHosted);
        } else {
            $this->IsSelfHosted = $isSelfHosted;
        }
        return $this;
    }
    /**
     * Get IsSuppressAuthBeforeCommit value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getIsSuppressAuthBeforeCommit()
    {
        return isset($this->IsSuppressAuthBeforeCommit) ? $this->IsSuppressAuthBeforeCommit : null;
    }
    /**
     * Set IsSuppressAuthBeforeCommit value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $isSuppressAuthBeforeCommit
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setIsSuppressAuthBeforeCommit($isSuppressAuthBeforeCommit = null)
    {
        // validation for constraint: boolean
        if (!is_null($isSuppressAuthBeforeCommit) && !is_bool($isSuppressAuthBeforeCommit)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isSuppressAuthBeforeCommit, true), gettype($isSuppressAuthBeforeCommit)), __LINE__);
        }
        if (is_null($isSuppressAuthBeforeCommit) || (is_array($isSuppressAuthBeforeCommit) && empty($isSuppressAuthBeforeCommit))) {
            unset($this->IsSuppressAuthBeforeCommit);
        } else {
            $this->IsSuppressAuthBeforeCommit = $isSuppressAuthBeforeCommit;
        }
        return $this;
    }
    /**
     * Get IsSuppressTwoPhasePayment value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getIsSuppressTwoPhasePayment()
    {
        return isset($this->IsSuppressTwoPhasePayment) ? $this->IsSuppressTwoPhasePayment : null;
    }
    /**
     * Set IsSuppressTwoPhasePayment value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $isSuppressTwoPhasePayment
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setIsSuppressTwoPhasePayment($isSuppressTwoPhasePayment = null)
    {
        // validation for constraint: boolean
        if (!is_null($isSuppressTwoPhasePayment) && !is_bool($isSuppressTwoPhasePayment)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isSuppressTwoPhasePayment, true), gettype($isSuppressTwoPhasePayment)), __LINE__);
        }
        if (is_null($isSuppressTwoPhasePayment) || (is_array($isSuppressTwoPhasePayment) && empty($isSuppressTwoPhasePayment))) {
            unset($this->IsSuppressTwoPhasePayment);
        } else {
            $this->IsSuppressTwoPhasePayment = $isSuppressTwoPhasePayment;
        }
        return $this;
    }
    /**
     * Get IsTwoPhasePaymentSupported value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return bool|null
     */
    public function getIsTwoPhasePaymentSupported()
    {
        return isset($this->IsTwoPhasePaymentSupported) ? $this->IsTwoPhasePaymentSupported : null;
    }
    /**
     * Set IsTwoPhasePaymentSupported value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param bool $isTwoPhasePaymentSupported
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setIsTwoPhasePaymentSupported($isTwoPhasePaymentSupported = null)
    {
        // validation for constraint: boolean
        if (!is_null($isTwoPhasePaymentSupported) && !is_bool($isTwoPhasePaymentSupported)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isTwoPhasePaymentSupported, true), gettype($isTwoPhasePaymentSupported)), __LINE__);
        }
        if (is_null($isTwoPhasePaymentSupported) || (is_array($isTwoPhasePaymentSupported) && empty($isTwoPhasePaymentSupported))) {
            unset($this->IsTwoPhasePaymentSupported);
        } else {
            $this->IsTwoPhasePaymentSupported = $isTwoPhasePaymentSupported;
        }
        return $this;
    }
    /**
     * Get RedirectTimeoutMin value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return int|null
     */
    public function getRedirectTimeoutMin()
    {
        return isset($this->RedirectTimeoutMin) ? $this->RedirectTimeoutMin : null;
    }
    /**
     * Set RedirectTimeoutMin value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param int $redirectTimeoutMin
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setRedirectTimeoutMin($redirectTimeoutMin = null)
    {
        // validation for constraint: int
        if (!is_null($redirectTimeoutMin) && !(is_int($redirectTimeoutMin) || ctype_digit($redirectTimeoutMin))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($redirectTimeoutMin, true), gettype($redirectTimeoutMin)), __LINE__);
        }
        if (is_null($redirectTimeoutMin) || (is_array($redirectTimeoutMin) && empty($redirectTimeoutMin))) {
            unset($this->RedirectTimeoutMin);
        } else {
            $this->RedirectTimeoutMin = $redirectTimeoutMin;
        }
        return $this;
    }
    /**
     * Get SelfHostedFormName value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getSelfHostedFormName()
    {
        return isset($this->SelfHostedFormName) ? $this->SelfHostedFormName : null;
    }
    /**
     * Set SelfHostedFormName value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $selfHostedFormName
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setSelfHostedFormName($selfHostedFormName = null)
    {
        // validation for constraint: string
        if (!is_null($selfHostedFormName) && !is_string($selfHostedFormName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($selfHostedFormName, true), gettype($selfHostedFormName)), __LINE__);
        }
        if (is_null($selfHostedFormName) || (is_array($selfHostedFormName) && empty($selfHostedFormName))) {
            unset($this->SelfHostedFormName);
        } else {
            $this->SelfHostedFormName = $selfHostedFormName;
        }
        return $this;
    }
    /**
     * Get SyncOperationsTimeoutSeconds value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return int|null
     */
    public function getSyncOperationsTimeoutSeconds()
    {
        return isset($this->SyncOperationsTimeoutSeconds) ? $this->SyncOperationsTimeoutSeconds : null;
    }
    /**
     * Set SyncOperationsTimeoutSeconds value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param int $syncOperationsTimeoutSeconds
     * @return \patest\StructType\Payment_OpsPaymentMethod
     */
    public function setSyncOperationsTimeoutSeconds($syncOperationsTimeoutSeconds = null)
    {
        // validation for constraint: int
        if (!is_null($syncOperationsTimeoutSeconds) && !(is_int($syncOperationsTimeoutSeconds) || ctype_digit($syncOperationsTimeoutSeconds))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($syncOperationsTimeoutSeconds, true), gettype($syncOperationsTimeoutSeconds)), __LINE__);
        }
        if (is_null($syncOperationsTimeoutSeconds) || (is_array($syncOperationsTimeoutSeconds) && empty($syncOperationsTimeoutSeconds))) {
            unset($this->SyncOperationsTimeoutSeconds);
        } else {
            $this->SyncOperationsTimeoutSeconds = $syncOperationsTimeoutSeconds;
        }
        return $this;
    }
}
