<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizResource.CalendarWeeklyView StructType
 * @subpackage Structs
 */
class BizResource_CalendarWeeklyView extends BizResource_CalendarView
{
    /**
     * The WeekHours
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizResource_CalendarWeekHour
     */
    public $WeekHours;
    /**
     * Constructor method for BizResource.CalendarWeeklyView
     * @uses BizResource_CalendarWeeklyView::setWeekHours()
     * @param \patest\StructType\RecordSetOfBizResource_CalendarWeekHour $weekHours
     */
    public function __construct(\patest\StructType\RecordSetOfBizResource_CalendarWeekHour $weekHours = null)
    {
        $this
            ->setWeekHours($weekHours);
    }
    /**
     * Get WeekHours value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \patest\StructType\RecordSetOfBizResource_CalendarWeekHour|null
     */
    public function getWeekHours()
    {
        return isset($this->WeekHours) ? $this->WeekHours : null;
    }
    /**
     * Set WeekHours value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \patest\StructType\RecordSetOfBizResource_CalendarWeekHour $weekHours
     * @return \patest\StructType\BizResource_CalendarWeeklyView
     */
    public function setWeekHours(\patest\StructType\RecordSetOfBizResource_CalendarWeekHour $weekHours = null)
    {
        if (is_null($weekHours) || (is_array($weekHours) && empty($weekHours))) {
            unset($this->WeekHours);
        } else {
            $this->WeekHours = $weekHours;
        }
        return $this;
    }
}
