<?php

namespace patest\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for BizResource.CalendarDailyView StructType
 * @subpackage Structs
 */
class BizResource_CalendarDailyView extends BizResource_CalendarView
{
    /**
     * The DayHours
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \patest\StructType\RecordSetOfBizResource_CalendarDayHour
     */
    public $DayHours;
    /**
     * Constructor method for BizResource.CalendarDailyView
     * @uses BizResource_CalendarDailyView::setDayHours()
     * @param \patest\StructType\RecordSetOfBizResource_CalendarDayHour $dayHours
     */
    public function __construct(\patest\StructType\RecordSetOfBizResource_CalendarDayHour $dayHours = null)
    {
        $this
            ->setDayHours($dayHours);
    }
    /**
     * Get DayHours 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_CalendarDayHour|null
     */
    public function getDayHours()
    {
        return isset($this->DayHours) ? $this->DayHours : null;
    }
    /**
     * Set DayHours 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_CalendarDayHour $dayHours
     * @return \patest\StructType\BizResource_CalendarDailyView
     */
    public function setDayHours(\patest\StructType\RecordSetOfBizResource_CalendarDayHour $dayHours = null)
    {
        if (is_null($dayHours) || (is_array($dayHours) && empty($dayHours))) {
            unset($this->DayHours);
        } else {
            $this->DayHours = $dayHours;
        }
        return $this;
    }
}
