<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_Occupancy StructType
 * @subpackage Structs
 */
class JPSOAP_Occupancy extends AbstractStructBase
{
    /**
     * The MinAdult
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MinAdult;
    /**
     * The MaxAdult
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MaxAdult;
    /**
     * The MinChild
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $MinChild;
    /**
     * The MaxChild
     * Meta information 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_int($minAdult) || ctype_digit($minAdult))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($minAdult, true), 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_int($maxAdult) || ctype_digit($maxAdult))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxAdult, true), 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_int($minChild) || ctype_digit($minChild))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($minChild, true), 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_int($maxChild) || ctype_digit($maxChild))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxChild, true), gettype($maxChild)), __LINE__);
        }
        $this->MaxChild = $maxChild;
        return $this;
    }
}
