<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for QueryTransactionState-Response StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:QueryTransactionState-Response
 * @subpackage Structs
 */
class QueryTransactionState_Response extends ExtensibleDataContract
{
    /**
     * The TransactionState
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $TransactionState;
    /**
     * Constructor method for QueryTransactionState-Response
     * @uses QueryTransactionState_Response::setTransactionState()
     * @param string $transactionState
     */
    public function __construct($transactionState = null)
    {
        $this
            ->setTransactionState($transactionState);
    }
    /**
     * Get TransactionState value
     * @return string|null
     */
    public function getTransactionState()
    {
        return $this->TransactionState;
    }
    /**
     * Set TransactionState value
     * @uses \patest\EnumType\TransactionState::valueIsValid()
     * @uses \patest\EnumType\TransactionState::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $transactionState
     * @return \patest\StructType\QueryTransactionState_Response
     */
    public function setTransactionState($transactionState = null)
    {
        // validation for constraint: enumeration
        if (!\patest\EnumType\TransactionState::valueIsValid($transactionState)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \patest\EnumType\TransactionState', is_array($transactionState) ? implode(', ', $transactionState) : var_export($transactionState, true), implode(', ', \patest\EnumType\TransactionState::getValidValues())), __LINE__);
        }
        $this->TransactionState = $transactionState;
        return $this;
    }
}
