<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SuggestRefundOptionsRequest StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:SuggestRefundOptionsRequest
 * @subpackage Structs
 */
class SuggestRefundOptionsRequest extends AbstractStructBase
{
    /**
     * The IsUserInteractionSupported
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var bool
     */
    public $IsUserInteractionSupported;
    /**
     * The TransactionGuid
     * Meta information extracted from the WSDL
     * - base: xs:string
     * - minOccurs: 0
     * - nillable: true
     * - pattern: [\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}
     * - type: tns:guid
     * @var string
     */
    public $TransactionGuid;
    /**
     * Constructor method for SuggestRefundOptionsRequest
     * @uses SuggestRefundOptionsRequest::setIsUserInteractionSupported()
     * @uses SuggestRefundOptionsRequest::setTransactionGuid()
     * @param bool $isUserInteractionSupported
     * @param string $transactionGuid
     */
    public function __construct($isUserInteractionSupported = null, $transactionGuid = null)
    {
        $this
            ->setIsUserInteractionSupported($isUserInteractionSupported)
            ->setTransactionGuid($transactionGuid);
    }
    /**
     * Get IsUserInteractionSupported value
     * @return bool|null
     */
    public function getIsUserInteractionSupported()
    {
        return $this->IsUserInteractionSupported;
    }
    /**
     * Set IsUserInteractionSupported value
     * @param bool $isUserInteractionSupported
     * @return \patest\StructType\SuggestRefundOptionsRequest
     */
    public function setIsUserInteractionSupported($isUserInteractionSupported = null)
    {
        // validation for constraint: boolean
        if (!is_null($isUserInteractionSupported) && !is_bool($isUserInteractionSupported)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($isUserInteractionSupported, true), gettype($isUserInteractionSupported)), __LINE__);
        }
        $this->IsUserInteractionSupported = $isUserInteractionSupported;
        return $this;
    }
    /**
     * Get TransactionGuid value
     * @return string|null
     */
    public function getTransactionGuid()
    {
        return $this->TransactionGuid;
    }
    /**
     * Set TransactionGuid value
     * @param string $transactionGuid
     * @return \patest\StructType\SuggestRefundOptionsRequest
     */
    public function setTransactionGuid($transactionGuid = null)
    {
        // validation for constraint: string
        if (!is_null($transactionGuid) && !is_string($transactionGuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($transactionGuid, true), gettype($transactionGuid)), __LINE__);
        }
        // validation for constraint: pattern([\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12})
        if (!is_null($transactionGuid) && !preg_match('/[\\da-fA-F]{8}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{4}-[\\da-fA-F]{12}/', $transactionGuid)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a literal that is among the set of character sequences denoted by the regular expression [\da-fA-F]{8}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{4}-[\da-fA-F]{12}', var_export($transactionGuid, true)), __LINE__);
        }
        $this->TransactionGuid = $transactionGuid;
        return $this;
    }
}
