<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Cancel_Timesheet_RequestType StructType
 * Meta information extracted from the WSDL
 * - documentation: ancel Timesheet Request
 * @subpackage Structs
 */
class Cancel_Timesheet_RequestType extends AbstractStructBase
{
    /**
     * The Timesheet_Reference
     * Meta information extracted from the WSDL
     * - documentation: Reference to an existing Timesheet
     * @var \StructType\TimesheetObjectType
     */
    public $Timesheet_Reference;
    /**
     * The version
     * Meta information extracted from the WSDL
     * - ref: wd:version
     * @var string
     */
    public $version;
    /**
     * Constructor method for Cancel_Timesheet_RequestType
     * @uses Cancel_Timesheet_RequestType::setTimesheet_Reference()
     * @uses Cancel_Timesheet_RequestType::setVersion()
     * @param \StructType\TimesheetObjectType $timesheet_Reference
     * @param string $version
     */
    public function __construct(\StructType\TimesheetObjectType $timesheet_Reference = null, $version = null)
    {
        $this
            ->setTimesheet_Reference($timesheet_Reference)
            ->setVersion($version);
    }
    /**
     * Get Timesheet_Reference value
     * @return \StructType\TimesheetObjectType|null
     */
    public function getTimesheet_Reference()
    {
        return $this->Timesheet_Reference;
    }
    /**
     * Set Timesheet_Reference value
     * @param \StructType\TimesheetObjectType $timesheet_Reference
     * @return \StructType\Cancel_Timesheet_RequestType
     */
    public function setTimesheet_Reference(\StructType\TimesheetObjectType $timesheet_Reference = null)
    {
        $this->Timesheet_Reference = $timesheet_Reference;
        return $this;
    }
    /**
     * Get version value
     * @return string|null
     */
    public function getVersion()
    {
        return $this->version;
    }
    /**
     * Set version value
     * @param string $version
     * @return \StructType\Cancel_Timesheet_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;
    }
}
