<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_BookingInAdvance StructType
 * @subpackage Structs
 */
class JPSOAP_BookingInAdvance extends AbstractStructBase
{
    /**
     * The MinDays
     * @var int
     */
    public $MinDays;
    /**
     * The MaxDays
     * @var int
     */
    public $MaxDays;
    /**
     * Constructor method for JPSOAP_BookingInAdvance
     * @uses JPSOAP_BookingInAdvance::setMinDays()
     * @uses JPSOAP_BookingInAdvance::setMaxDays()
     * @param int $minDays
     * @param int $maxDays
     */
    public function __construct($minDays = null, $maxDays = null)
    {
        $this
            ->setMinDays($minDays)
            ->setMaxDays($maxDays);
    }
    /**
     * Get MinDays value
     * @return int|null
     */
    public function getMinDays()
    {
        return $this->MinDays;
    }
    /**
     * Set MinDays value
     * @param int $minDays
     * @return \StructType\JPSOAP_BookingInAdvance
     */
    public function setMinDays($minDays = null)
    {
        // validation for constraint: int
        if (!is_null($minDays) && !is_numeric($minDays)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($minDays)), __LINE__);
        }
        $this->MinDays = $minDays;
        return $this;
    }
    /**
     * Get MaxDays value
     * @return int|null
     */
    public function getMaxDays()
    {
        return $this->MaxDays;
    }
    /**
     * Set MaxDays value
     * @param int $maxDays
     * @return \StructType\JPSOAP_BookingInAdvance
     */
    public function setMaxDays($maxDays = null)
    {
        // validation for constraint: int
        if (!is_null($maxDays) && !is_numeric($maxDays)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($maxDays)), __LINE__);
        }
        $this->MaxDays = $maxDays;
        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_BookingInAdvance
     */
    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__;
    }
}
