<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_Occupancy StructType
 * @subpackage Structs
 */
class JPSOAP_Occupancy extends AbstractStructBase
{
    /**
     * The MinAdult
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MinAdult;
    /**
     * The MaxAdult
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MaxAdult;
    /**
     * The MinChild
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MinChild;
    /**
     * The MaxChild
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MaxChild;
    /**
     * Constructor method for JPSOAP_Occupancy
     * @uses JPSOAP_Occupancy::setMinAdult()
     * @uses JPSOAP_Occupancy::setMaxAdult()
     * @uses JPSOAP_Occupancy::setMinChild()
     * @uses JPSOAP_Occupancy::setMaxChild()
     * @param int $minAdult
     * @param int $maxAdult
     * @param int $minChild
     * @param int $maxChild
     */
    public function __construct($minAdult = null, $maxAdult = null, $minChild = null, $maxChild = null)
    {
        $this
            ->setMinAdult($minAdult)
            ->setMaxAdult($maxAdult)
            ->setMinChild($minChild)
            ->setMaxChild($maxChild);
    }
    /**
     * Get MinAdult value
     * @return int
     */
    public function getMinAdult()
    {
        return $this->MinAdult;
    }
    /**
     * Set MinAdult value
     * @param int $minAdult
     * @return \StructType\JPSOAP_Occupancy
     */
    public function setMinAdult($minAdult = null)
    {
        // validation for constraint: int
        if (!is_null($minAdult) && !is_numeric($minAdult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($minAdult)), __LINE__);
        }
        $this->MinAdult = $minAdult;
        return $this;
    }
    /**
     * Get MaxAdult value
     * @return int
     */
    public function getMaxAdult()
    {
        return $this->MaxAdult;
    }
    /**
     * Set MaxAdult value
     * @param int $maxAdult
     * @return \StructType\JPSOAP_Occupancy
     */
    public function setMaxAdult($maxAdult = null)
    {
        // validation for constraint: int
        if (!is_null($maxAdult) && !is_numeric($maxAdult)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxAdult)), __LINE__);
        }
        $this->MaxAdult = $maxAdult;
        return $this;
    }
    /**
     * Get MinChild value
     * @return int
     */
    public function getMinChild()
    {
        return $this->MinChild;
    }
    /**
     * Set MinChild value
     * @param int $minChild
     * @return \StructType\JPSOAP_Occupancy
     */
    public function setMinChild($minChild = null)
    {
        // validation for constraint: int
        if (!is_null($minChild) && !is_numeric($minChild)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($minChild)), __LINE__);
        }
        $this->MinChild = $minChild;
        return $this;
    }
    /**
     * Get MaxChild value
     * @return int
     */
    public function getMaxChild()
    {
        return $this->MaxChild;
    }
    /**
     * Set MaxChild value
     * @param int $maxChild
     * @return \StructType\JPSOAP_Occupancy
     */
    public function setMaxChild($maxChild = null)
    {
        // validation for constraint: int
        if (!is_null($maxChild) && !is_numeric($maxChild)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxChild)), __LINE__);
        }
        $this->MaxChild = $maxChild;
        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_Occupancy
     */
    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__;
    }
}
