<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_Ocuppancy StructType
 * @subpackage Structs
 */
class JP_Ocuppancy extends AbstractStructBase
{
    /**
     * The Children
     * @var bool
     */
    public $Children;
    /**
     * Constructor method for JP_Ocuppancy
     * @uses JP_Ocuppancy::setChildren()
     * @param bool $children
     */
    public function __construct($children = null)
    {
        $this
            ->setChildren($children);
    }
    /**
     * Get Children value
     * @return bool|null
     */
    public function getChildren()
    {
        return $this->Children;
    }
    /**
     * Set Children value
     * @param bool $children
     * @return \StructType\JP_Ocuppancy
     */
    public function setChildren($children = null)
    {
        // validation for constraint: boolean
        if (!is_null($children) && !is_bool($children)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($children)), __LINE__);
        }
        $this->Children = $children;
        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\JP_Ocuppancy
     */
    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__;
    }
}
