<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for StayRestrictionsType StructType
 * @package Dg
 * @subpackage Structs
 */
class DgStayRestrictionsType extends AbstractStructBase
{
    /**
     * The MinimumStay
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgMinimumStay
     */
    public $MinimumStay;
    /**
     * The MaximumStay
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgMaximumStay
     */
    public $MaximumStay;
    /**
     * The StayRestrictionsInd
     * @var bool
     */
    public $StayRestrictionsInd;
    /**
     * Constructor method for StayRestrictionsType
     * @uses DgStayRestrictionsType::setMinimumStay()
     * @uses DgStayRestrictionsType::setMaximumStay()
     * @uses DgStayRestrictionsType::setStayRestrictionsInd()
     * @param \dgsoft\StructType\DgMinimumStay $minimumStay
     * @param \dgsoft\StructType\DgMaximumStay $maximumStay
     * @param bool $stayRestrictionsInd
     */
    public function __construct(\dgsoft\StructType\DgMinimumStay $minimumStay = null, \dgsoft\StructType\DgMaximumStay $maximumStay = null, $stayRestrictionsInd = null)
    {
        $this
            ->setMinimumStay($minimumStay)
            ->setMaximumStay($maximumStay)
            ->setStayRestrictionsInd($stayRestrictionsInd);
    }
    /**
     * Get MinimumStay value
     * @return \dgsoft\StructType\DgMinimumStay|null
     */
    public function getMinimumStay()
    {
        return $this->MinimumStay;
    }
    /**
     * Set MinimumStay value
     * @param \dgsoft\StructType\DgMinimumStay $minimumStay
     * @return \dgsoft\StructType\DgStayRestrictionsType
     */
    public function setMinimumStay(\dgsoft\StructType\DgMinimumStay $minimumStay = null)
    {
        $this->MinimumStay = $minimumStay;
        return $this;
    }
    /**
     * Get MaximumStay value
     * @return \dgsoft\StructType\DgMaximumStay|null
     */
    public function getMaximumStay()
    {
        return $this->MaximumStay;
    }
    /**
     * Set MaximumStay value
     * @param \dgsoft\StructType\DgMaximumStay $maximumStay
     * @return \dgsoft\StructType\DgStayRestrictionsType
     */
    public function setMaximumStay(\dgsoft\StructType\DgMaximumStay $maximumStay = null)
    {
        $this->MaximumStay = $maximumStay;
        return $this;
    }
    /**
     * Get StayRestrictionsInd value
     * @return bool|null
     */
    public function getStayRestrictionsInd()
    {
        return $this->StayRestrictionsInd;
    }
    /**
     * Set StayRestrictionsInd value
     * @param bool $stayRestrictionsInd
     * @return \dgsoft\StructType\DgStayRestrictionsType
     */
    public function setStayRestrictionsInd($stayRestrictionsInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($stayRestrictionsInd) && !is_bool($stayRestrictionsInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($stayRestrictionsInd)), __LINE__);
        }
        $this->StayRestrictionsInd = $stayRestrictionsInd;
        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 \dgsoft\StructType\DgStayRestrictionsType
     */
    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__;
    }
}
