<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_HotelRatePlanRoomUpgradeOffer StructType
 * @subpackage Structs
 */
class JPSOAP_HotelRatePlanRoomUpgradeOffer extends AbstractStructBase
{
    /**
     * The RoomTypeCodePay
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $RoomTypeCodePay;
    /**
     * The RoomTypeCodeGet
     * Meta informations extracted from the WSDL
     * - use: required
     * @var int
     */
    public $RoomTypeCodeGet;
    /**
     * Constructor method for JPSOAP_HotelRatePlanRoomUpgradeOffer
     * @uses JPSOAP_HotelRatePlanRoomUpgradeOffer::setRoomTypeCodePay()
     * @uses JPSOAP_HotelRatePlanRoomUpgradeOffer::setRoomTypeCodeGet()
     * @param int $roomTypeCodePay
     * @param int $roomTypeCodeGet
     */
    public function __construct($roomTypeCodePay = null, $roomTypeCodeGet = null)
    {
        $this
            ->setRoomTypeCodePay($roomTypeCodePay)
            ->setRoomTypeCodeGet($roomTypeCodeGet);
    }
    /**
     * Get RoomTypeCodePay value
     * @return int
     */
    public function getRoomTypeCodePay()
    {
        return $this->RoomTypeCodePay;
    }
    /**
     * Set RoomTypeCodePay value
     * @param int $roomTypeCodePay
     * @return \StructType\JPSOAP_HotelRatePlanRoomUpgradeOffer
     */
    public function setRoomTypeCodePay($roomTypeCodePay = null)
    {
        // validation for constraint: int
        if (!is_null($roomTypeCodePay) && !is_numeric($roomTypeCodePay)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($roomTypeCodePay)), __LINE__);
        }
        $this->RoomTypeCodePay = $roomTypeCodePay;
        return $this;
    }
    /**
     * Get RoomTypeCodeGet value
     * @return int
     */
    public function getRoomTypeCodeGet()
    {
        return $this->RoomTypeCodeGet;
    }
    /**
     * Set RoomTypeCodeGet value
     * @param int $roomTypeCodeGet
     * @return \StructType\JPSOAP_HotelRatePlanRoomUpgradeOffer
     */
    public function setRoomTypeCodeGet($roomTypeCodeGet = null)
    {
        // validation for constraint: int
        if (!is_null($roomTypeCodeGet) && !is_numeric($roomTypeCodeGet)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($roomTypeCodeGet)), __LINE__);
        }
        $this->RoomTypeCodeGet = $roomTypeCodeGet;
        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_HotelRatePlanRoomUpgradeOffer
     */
    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__;
    }
}
