<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_DateIntervalsGroupsCheckInDates StructType
 * @subpackage Structs
 */
class JPSOAP_DateIntervalsGroupsCheckInDates extends JPSOAP_DateIntervalsGroupsStayDates
{
    /**
     * The ApplyToCheckInAndOutToo
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $ApplyToCheckInAndOutToo;
    /**
     * Constructor method for JPSOAP_DateIntervalsGroupsCheckInDates
     * @uses JPSOAP_DateIntervalsGroupsCheckInDates::setApplyToCheckInAndOutToo()
     * @param bool $applyToCheckInAndOutToo
     */
    public function __construct($applyToCheckInAndOutToo = null)
    {
        $this
            ->setApplyToCheckInAndOutToo($applyToCheckInAndOutToo);
    }
    /**
     * Get ApplyToCheckInAndOutToo value
     * @return bool
     */
    public function getApplyToCheckInAndOutToo()
    {
        return $this->ApplyToCheckInAndOutToo;
    }
    /**
     * Set ApplyToCheckInAndOutToo value
     * @param bool $applyToCheckInAndOutToo
     * @return \StructType\JPSOAP_DateIntervalsGroupsCheckInDates
     */
    public function setApplyToCheckInAndOutToo($applyToCheckInAndOutToo = null)
    {
        // validation for constraint: boolean
        if (!is_null($applyToCheckInAndOutToo) && !is_bool($applyToCheckInAndOutToo)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($applyToCheckInAndOutToo, true), gettype($applyToCheckInAndOutToo)), __LINE__);
        }
        $this->ApplyToCheckInAndOutToo = $applyToCheckInAndOutToo;
        return $this;
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see AbstractStructBase::__set_state()
     * @uses AbstractStructBase::__set_state()
     * @param array $array the exported values
     * @return \StructType\JPSOAP_DateIntervalsGroupsCheckInDates
     */
    public static function __set_state(array $array)
    {
        return parent::__set_state($array);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
