<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Get_AbsencesResult StructType
 * @subpackage Structs
 */
class Get_AbsencesResult extends ExecutionResult
{
    /**
     * The SynchronizedUntilDate
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var string
     */
    public $SynchronizedUntilDate;
    /**
     * The AbsenceItems
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \ArrayType\ArrayOfAbsenceItem_V2
     */
    public $AbsenceItems;
    /**
     * Constructor method for Get_AbsencesResult
     * @uses Get_AbsencesResult::setSynchronizedUntilDate()
     * @uses Get_AbsencesResult::setAbsenceItems()
     * @param string $synchronizedUntilDate
     * @param \ArrayType\ArrayOfAbsenceItem_V2 $absenceItems
     */
    public function __construct($synchronizedUntilDate = null, \ArrayType\ArrayOfAbsenceItem_V2 $absenceItems = null)
    {
        $this
            ->setSynchronizedUntilDate($synchronizedUntilDate)
            ->setAbsenceItems($absenceItems);
    }
    /**
     * Get SynchronizedUntilDate value
     * @return string
     */
    public function getSynchronizedUntilDate()
    {
        return $this->SynchronizedUntilDate;
    }
    /**
     * Set SynchronizedUntilDate value
     * @param string $synchronizedUntilDate
     * @return \StructType\Get_AbsencesResult
     */
    public function setSynchronizedUntilDate($synchronizedUntilDate = null)
    {
        // validation for constraint: string
        if (!is_null($synchronizedUntilDate) && !is_string($synchronizedUntilDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($synchronizedUntilDate, true), gettype($synchronizedUntilDate)), __LINE__);
        }
        $this->SynchronizedUntilDate = $synchronizedUntilDate;
        return $this;
    }
    /**
     * Get AbsenceItems value
     * @return \ArrayType\ArrayOfAbsenceItem_V2|null
     */
    public function getAbsenceItems()
    {
        return $this->AbsenceItems;
    }
    /**
     * Set AbsenceItems value
     * @param \ArrayType\ArrayOfAbsenceItem_V2 $absenceItems
     * @return \StructType\Get_AbsencesResult
     */
    public function setAbsenceItems(\ArrayType\ArrayOfAbsenceItem_V2 $absenceItems = null)
    {
        $this->AbsenceItems = $absenceItems;
        return $this;
    }
}
