<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Put_Assign_Supplier_to_Contingent_Worker_RequestType
 * StructType
 * Meta information extracted from the WSDL
 * - documentation: Element containing Contingent Worker reference for update and corresponding Supplier
 * @subpackage Structs
 */
class Put_Assign_Supplier_to_Contingent_Worker_RequestType extends AbstractStructBase
{
    /**
     * The Contingent_Worker_Data
     * @var \StructType\Contingent_Workers_DataType
     */
    public $Contingent_Worker_Data;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Put_Assign_Supplier_to_Contingent_Worker_RequestType
     * @uses Put_Assign_Supplier_to_Contingent_Worker_RequestType::setContingent_Worker_Data()
     * @uses Put_Assign_Supplier_to_Contingent_Worker_RequestType::setVersion()
     * @param \StructType\Contingent_Workers_DataType $contingent_Worker_Data
     * @param string $version
     */
    public function __construct(\StructType\Contingent_Workers_DataType $contingent_Worker_Data = null, $version = null)
    {
        $this
            ->setContingent_Worker_Data($contingent_Worker_Data)
            ->setVersion($version);
    }
    /**
     * Get Contingent_Worker_Data value
     * @return \StructType\Contingent_Workers_DataType|null
     */
    public function getContingent_Worker_Data()
    {
        return $this->Contingent_Worker_Data;
    }
    /**
     * Set Contingent_Worker_Data value
     * @param \StructType\Contingent_Workers_DataType $contingent_Worker_Data
     * @return \StructType\Put_Assign_Supplier_to_Contingent_Worker_RequestType
     */
    public function setContingent_Worker_Data(\StructType\Contingent_Workers_DataType $contingent_Worker_Data = null)
    {
        $this->Contingent_Worker_Data = $contingent_Worker_Data;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Put_Assign_Supplier_to_Contingent_Worker_RequestType
     */
    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;
    }
}
