<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JPSOAP_HotelRatePlanRoomUpgradeOffer StructType
 * @subpackage Structs
 */
class JPSOAP_HotelRatePlanRoomUpgradeOffer extends AbstractStructBase
{
    /**
     * The RoomTypeCodePay
     * Meta information extracted from the WSDL
     * - use: required
     * @var int
     */
    public $RoomTypeCodePay;
    /**
     * The RoomTypeCodeGet
     * Meta information 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_int($roomTypeCodePay) || ctype_digit($roomTypeCodePay))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($roomTypeCodePay, true), 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_int($roomTypeCodeGet) || ctype_digit($roomTypeCodeGet))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide an integer value, %s given', var_export($roomTypeCodeGet, true), gettype($roomTypeCodeGet)), __LINE__);
        }
        $this->RoomTypeCodeGet = $roomTypeCodeGet;
        return $this;
    }
}
