<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_HotelRoomCode StructType
 * @subpackage Structs
 */
class JP_HotelRoomCode extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The Code
     * @var string
     */
    public $Code;
    /**
     * The CategoryCode
     * @var string
     */
    public $CategoryCode;
    /**
     * The CategoryType
     * @var string
     */
    public $CategoryType;
    /**
     * The CombinationCode
     * @var string
     */
    public $CombinationCode;
    /**
     * The Source
     * @var string
     */
    public $Source;
    /**
     * Constructor method for JP_HotelRoomCode
     * @uses JP_HotelRoomCode::set_()
     * @uses JP_HotelRoomCode::setCode()
     * @uses JP_HotelRoomCode::setCategoryCode()
     * @uses JP_HotelRoomCode::setCategoryType()
     * @uses JP_HotelRoomCode::setCombinationCode()
     * @uses JP_HotelRoomCode::setSource()
     * @param string $_
     * @param string $code
     * @param string $categoryCode
     * @param string $categoryType
     * @param string $combinationCode
     * @param string $source
     */
    public function __construct($_ = null, $code = null, $categoryCode = null, $categoryType = null, $combinationCode = null, $source = null)
    {
        $this
            ->set_($_)
            ->setCode($code)
            ->setCategoryCode($categoryCode)
            ->setCategoryType($categoryType)
            ->setCombinationCode($combinationCode)
            ->setSource($source);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \StructType\JP_HotelRoomCode
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($_, true), gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \StructType\JP_HotelRoomCode
     */
    public function setCode($code = null)
    {
        // validation for constraint: string
        if (!is_null($code) && !is_string($code)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($code, true), gettype($code)), __LINE__);
        }
        $this->Code = $code;
        return $this;
    }
    /**
     * Get CategoryCode value
     * @return string|null
     */
    public function getCategoryCode()
    {
        return $this->CategoryCode;
    }
    /**
     * Set CategoryCode value
     * @param string $categoryCode
     * @return \StructType\JP_HotelRoomCode
     */
    public function setCategoryCode($categoryCode = null)
    {
        // validation for constraint: string
        if (!is_null($categoryCode) && !is_string($categoryCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($categoryCode, true), gettype($categoryCode)), __LINE__);
        }
        $this->CategoryCode = $categoryCode;
        return $this;
    }
    /**
     * Get CategoryType value
     * @return string|null
     */
    public function getCategoryType()
    {
        return $this->CategoryType;
    }
    /**
     * Set CategoryType value
     * @param string $categoryType
     * @return \StructType\JP_HotelRoomCode
     */
    public function setCategoryType($categoryType = null)
    {
        // validation for constraint: string
        if (!is_null($categoryType) && !is_string($categoryType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($categoryType, true), gettype($categoryType)), __LINE__);
        }
        $this->CategoryType = $categoryType;
        return $this;
    }
    /**
     * Get CombinationCode value
     * @return string|null
     */
    public function getCombinationCode()
    {
        return $this->CombinationCode;
    }
    /**
     * Set CombinationCode value
     * @param string $combinationCode
     * @return \StructType\JP_HotelRoomCode
     */
    public function setCombinationCode($combinationCode = null)
    {
        // validation for constraint: string
        if (!is_null($combinationCode) && !is_string($combinationCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($combinationCode, true), gettype($combinationCode)), __LINE__);
        }
        $this->CombinationCode = $combinationCode;
        return $this;
    }
    /**
     * Get Source value
     * @return string|null
     */
    public function getSource()
    {
        return $this->Source;
    }
    /**
     * Set Source value
     * @param string $source
     * @return \StructType\JP_HotelRoomCode
     */
    public function setSource($source = null)
    {
        // validation for constraint: string
        if (!is_null($source) && !is_string($source)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($source, true), gettype($source)), __LINE__);
        }
        $this->Source = $source;
        return $this;
    }
}
