<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Submit_Spend_Authorization_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Wrapper Element that includes the Spend Authorization Instance
 * @subpackage Structs
 */
class Submit_Spend_Authorization_ResponseType extends AbstractStructBase
{
    /**
     * The Submit_Spend_Authorization_Reference
     * Meta information extracted from the WSDL
     * - documentation: Spend Authorization Reference
     * - minOccurs: 0
     * @var \StructType\Spend_AuthorizationObjectType
     */
    public $Submit_Spend_Authorization_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Submit_Spend_Authorization_ResponseType
     * @uses Submit_Spend_Authorization_ResponseType::setSubmit_Spend_Authorization_Reference()
     * @uses Submit_Spend_Authorization_ResponseType::setVersion()
     * @param \StructType\Spend_AuthorizationObjectType $submit_Spend_Authorization_Reference
     * @param string $version
     */
    public function __construct(\StructType\Spend_AuthorizationObjectType $submit_Spend_Authorization_Reference = null, $version = null)
    {
        $this
            ->setSubmit_Spend_Authorization_Reference($submit_Spend_Authorization_Reference)
            ->setVersion($version);
    }
    /**
     * Get Submit_Spend_Authorization_Reference value
     * @return \StructType\Spend_AuthorizationObjectType|null
     */
    public function getSubmit_Spend_Authorization_Reference()
    {
        return $this->Submit_Spend_Authorization_Reference;
    }
    /**
     * Set Submit_Spend_Authorization_Reference value
     * @param \StructType\Spend_AuthorizationObjectType $submit_Spend_Authorization_Reference
     * @return \StructType\Submit_Spend_Authorization_ResponseType
     */
    public function setSubmit_Spend_Authorization_Reference(\StructType\Spend_AuthorizationObjectType $submit_Spend_Authorization_Reference = null)
    {
        $this->Submit_Spend_Authorization_Reference = $submit_Spend_Authorization_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Submit_Spend_Authorization_ResponseType
     */
    public function setVersion($version = null)
    {
        // validation for constraint: string
        if (!is_null($version) && !is_string($version)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($version, true), gettype($version)), __LINE__);
        }
        $this->version = $version;
        return $this;
    }
}
