<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Cancel_Timesheet_ResponseType StructType
 * Meta information extracted from the WSDL
 * - documentation: Cancel Timesheet Response
 * @subpackage Structs
 */
class Cancel_Timesheet_ResponseType extends AbstractStructBase
{
    /**
     * The Timesheet_Reference
     * Meta information extracted from the WSDL
     * - documentation: Reference to the Canceled Timesheet
     * - minOccurs: 0
     * @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_ResponseType
     * @uses Cancel_Timesheet_ResponseType::setTimesheet_Reference()
     * @uses Cancel_Timesheet_ResponseType::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_ResponseType
     */
    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_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;
    }
}
