<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Put_External_Transaction_Source_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Response Element for Put Task
 * @subpackage Structs
 */
class Put_External_Transaction_Source_ResponseType extends AbstractStructBase
{
    /**
     * The External_Transaction_Source_Reference
     * Meta information extracted from the WSDL
     * - documentation: The External Transaction Source created by the put task.
     * - minOccurs: 0
     * @var \StructType\External_Transaction_Source__All_ObjectType
     */
    public $External_Transaction_Source_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Put_External_Transaction_Source_ResponseType
     * @uses Put_External_Transaction_Source_ResponseType::setExternal_Transaction_Source_Reference()
     * @uses Put_External_Transaction_Source_ResponseType::setVersion()
     * @param \StructType\External_Transaction_Source__All_ObjectType $external_Transaction_Source_Reference
     * @param string $version
     */
    public function __construct(\StructType\External_Transaction_Source__All_ObjectType $external_Transaction_Source_Reference = null, $version = null)
    {
        $this
            ->setExternal_Transaction_Source_Reference($external_Transaction_Source_Reference)
            ->setVersion($version);
    }
    /**
     * Get External_Transaction_Source_Reference value
     * @return \StructType\External_Transaction_Source__All_ObjectType|null
     */
    public function getExternal_Transaction_Source_Reference()
    {
        return $this->External_Transaction_Source_Reference;
    }
    /**
     * Set External_Transaction_Source_Reference value
     * @param \StructType\External_Transaction_Source__All_ObjectType $external_Transaction_Source_Reference
     * @return \StructType\Put_External_Transaction_Source_ResponseType
     */
    public function setExternal_Transaction_Source_Reference(\StructType\External_Transaction_Source__All_ObjectType $external_Transaction_Source_Reference = null)
    {
        $this->External_Transaction_Source_Reference = $external_Transaction_Source_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Put_External_Transaction_Source_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;
    }
}
