<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_OccupanciesRules StructType
 * @subpackage Structs
 */
class JPSOAP_OccupanciesRules extends JPSOAP_Occupancies
{
    /**
     * The MinPaxes
     * @var int
     */
    public $MinPaxes;
    /**
     * The MaxPaxes
     * @var int
     */
    public $MaxPaxes;
    /**
     * The Infants
     * @var bool
     */
    public $Infants;
    /**
     * Constructor method for JPSOAP_OccupanciesRules
     * @uses JPSOAP_OccupanciesRules::setMinPaxes()
     * @uses JPSOAP_OccupanciesRules::setMaxPaxes()
     * @uses JPSOAP_OccupanciesRules::setInfants()
     * @param int $minPaxes
     * @param int $maxPaxes
     * @param bool $infants
     */
    public function __construct($minPaxes = null, $maxPaxes = null, $infants = null)
    {
        $this
            ->setMinPaxes($minPaxes)
            ->setMaxPaxes($maxPaxes)
            ->setInfants($infants);
    }
    /**
     * Get MinPaxes value
     * @return int|null
     */
    public function getMinPaxes()
    {
        return $this->MinPaxes;
    }
    /**
     * Set MinPaxes value
     * @param int $minPaxes
     * @return \StructType\JPSOAP_OccupanciesRules
     */
    public function setMinPaxes($minPaxes = null)
    {
        // validation for constraint: int
        if (!is_null($minPaxes) && !(is_int($minPaxes) || ctype_digit($minPaxes))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($minPaxes, true), gettype($minPaxes)), __LINE__);
        }
        $this->MinPaxes = $minPaxes;
        return $this;
    }
    /**
     * Get MaxPaxes value
     * @return int|null
     */
    public function getMaxPaxes()
    {
        return $this->MaxPaxes;
    }
    /**
     * Set MaxPaxes value
     * @param int $maxPaxes
     * @return \StructType\JPSOAP_OccupanciesRules
     */
    public function setMaxPaxes($maxPaxes = null)
    {
        // validation for constraint: int
        if (!is_null($maxPaxes) && !(is_int($maxPaxes) || ctype_digit($maxPaxes))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($maxPaxes, true), gettype($maxPaxes)), __LINE__);
        }
        $this->MaxPaxes = $maxPaxes;
        return $this;
    }
    /**
     * Get Infants value
     * @return bool|null
     */
    public function getInfants()
    {
        return $this->Infants;
    }
    /**
     * Set Infants value
     * @param bool $infants
     * @return \StructType\JPSOAP_OccupanciesRules
     */
    public function setInfants($infants = null)
    {
        // validation for constraint: boolean
        if (!is_null($infants) && !is_bool($infants)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($infants, true), gettype($infants)), __LINE__);
        }
        $this->Infants = $infants;
        return $this;
    }
}
