<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_HotelAvailStopSale StructType
 * @subpackage Structs
 */
class JPSOAP_HotelAvailStopSale extends AbstractStructBase
{
    /**
     * The From
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $From;
    /**
     * The To
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $To;
    /**
     * The OnRequest
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $OnRequest;
    /**
     * The LastUpdated
     * Meta informations extracted from the WSDL
     * - use: required
     * @var string
     */
    public $LastUpdated;
    /**
     * The RoomTypeCode
     * @var int
     */
    public $RoomTypeCode;
    /**
     * The ApplyToCheckInDate
     * @var bool
     */
    public $ApplyToCheckInDate;
    /**
     * Constructor method for JPSOAP_HotelAvailStopSale
     * @uses JPSOAP_HotelAvailStopSale::setFrom()
     * @uses JPSOAP_HotelAvailStopSale::setTo()
     * @uses JPSOAP_HotelAvailStopSale::setOnRequest()
     * @uses JPSOAP_HotelAvailStopSale::setLastUpdated()
     * @uses JPSOAP_HotelAvailStopSale::setRoomTypeCode()
     * @uses JPSOAP_HotelAvailStopSale::setApplyToCheckInDate()
     * @param string $from
     * @param string $to
     * @param bool $onRequest
     * @param string $lastUpdated
     * @param int $roomTypeCode
     * @param bool $applyToCheckInDate
     */
    public function __construct($from = null, $to = null, $onRequest = null, $lastUpdated = null, $roomTypeCode = null, $applyToCheckInDate = null)
    {
        $this
            ->setFrom($from)
            ->setTo($to)
            ->setOnRequest($onRequest)
            ->setLastUpdated($lastUpdated)
            ->setRoomTypeCode($roomTypeCode)
            ->setApplyToCheckInDate($applyToCheckInDate);
    }
    /**
     * Get From value
     * @return string
     */
    public function getFrom()
    {
        return $this->From;
    }
    /**
     * Set From value
     * @param string $from
     * @return \StructType\JPSOAP_HotelAvailStopSale
     */
    public function setFrom($from = null)
    {
        // validation for constraint: string
        if (!is_null($from) && !is_string($from)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($from)), __LINE__);
        }
        $this->From = $from;
        return $this;
    }
    /**
     * Get To value
     * @return string
     */
    public function getTo()
    {
        return $this->To;
    }
    /**
     * Set To value
     * @param string $to
     * @return \StructType\JPSOAP_HotelAvailStopSale
     */
    public function setTo($to = null)
    {
        // validation for constraint: string
        if (!is_null($to) && !is_string($to)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($to)), __LINE__);
        }
        $this->To = $to;
        return $this;
    }
    /**
     * Get OnRequest value
     * @return bool
     */
    public function getOnRequest()
    {
        return $this->OnRequest;
    }
    /**
     * Set OnRequest value
     * @param bool $onRequest
     * @return \StructType\JPSOAP_HotelAvailStopSale
     */
    public function setOnRequest($onRequest = null)
    {
        // validation for constraint: boolean
        if (!is_null($onRequest) && !is_bool($onRequest)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($onRequest)), __LINE__);
        }
        $this->OnRequest = $onRequest;
        return $this;
    }
    /**
     * Get LastUpdated value
     * @return string
     */
    public function getLastUpdated()
    {
        return $this->LastUpdated;
    }
    /**
     * Set LastUpdated value
     * @param string $lastUpdated
     * @return \StructType\JPSOAP_HotelAvailStopSale
     */
    public function setLastUpdated($lastUpdated = null)
    {
        // validation for constraint: string
        if (!is_null($lastUpdated) && !is_string($lastUpdated)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($lastUpdated)), __LINE__);
        }
        $this->LastUpdated = $lastUpdated;
        return $this;
    }
    /**
     * Get RoomTypeCode value
     * @return int|null
     */
    public function getRoomTypeCode()
    {
        return $this->RoomTypeCode;
    }
    /**
     * Set RoomTypeCode value
     * @param int $roomTypeCode
     * @return \StructType\JPSOAP_HotelAvailStopSale
     */
    public function setRoomTypeCode($roomTypeCode = null)
    {
        // validation for constraint: int
        if (!is_null($roomTypeCode) && !is_numeric($roomTypeCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($roomTypeCode)), __LINE__);
        }
        $this->RoomTypeCode = $roomTypeCode;
        return $this;
    }
    /**
     * Get ApplyToCheckInDate value
     * @return bool|null
     */
    public function getApplyToCheckInDate()
    {
        return $this->ApplyToCheckInDate;
    }
    /**
     * Set ApplyToCheckInDate value
     * @param bool $applyToCheckInDate
     * @return \StructType\JPSOAP_HotelAvailStopSale
     */
    public function setApplyToCheckInDate($applyToCheckInDate = null)
    {
        // validation for constraint: boolean
        if (!is_null($applyToCheckInDate) && !is_bool($applyToCheckInDate)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($applyToCheckInDate)), __LINE__);
        }
        $this->ApplyToCheckInDate = $applyToCheckInDate;
        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_HotelAvailStopSale
     */
    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__;
    }
}
