<?php

namespace Sabre\OTAAirRules\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RuleReqInfo Structs
 * @subpackage Structs
 */
class RuleReqInfo extends AbstractStructBase
{
    /**
     * The Category
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var string[]
     */
    public $Category;
    /**
     * The FareBasis
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\OTAAirRules\Structs\FareBasis
     */
    public $FareBasis;
    /**
     * The RPH
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var int
     */
    public $RPH;
    /**
     * Constructor method for RuleReqInfo
     * @uses RuleReqInfo::setCategory()
     * @uses RuleReqInfo::setFareBasis()
     * @uses RuleReqInfo::setRPH()
     * @param string[] $category
     * @param \Sabre\OTAAirRules\Structs\FareBasis $fareBasis
     * @param int $rPH
     */
    public function __construct(array $category = array(), \Sabre\OTAAirRules\Structs\FareBasis $fareBasis = null, $rPH = null)
    {
        $this
            ->setCategory($category)
            ->setFareBasis($fareBasis)
            ->setRPH($rPH);
    }
    /**
     * Get Category value
     * @return string[]|null
     */
    public function getCategory()
    {
        return $this->Category;
    }
    /**
     * Set Category value
     * @throws \InvalidArgumentException
     * @param string[] $category
     * @return \Sabre\OTAAirRules\Structs\RuleReqInfo
     */
    public function setCategory(array $category = array())
    {
        $this->Category = $category;
        return $this;
    }
    /**
     * Add item to Category value
     * @throws \InvalidArgumentException
     * @param string $item
     * @return \Sabre\OTAAirRules\Structs\RuleReqInfo
     */
    public function addToCategory($item)
    {
        $this->Category[] = $item;
        return $this;
    }
    /**
     * Get FareBasis value
     * @return \Sabre\OTAAirRules\Structs\FareBasis|null
     */
    public function getFareBasis()
    {
        return $this->FareBasis;
    }
    /**
     * Set FareBasis value
     * @param \Sabre\OTAAirRules\Structs\FareBasis $fareBasis
     * @return \Sabre\OTAAirRules\Structs\RuleReqInfo
     */
    public function setFareBasis(\Sabre\OTAAirRules\Structs\FareBasis $fareBasis = null)
    {
        $this->FareBasis = $fareBasis;
        return $this;
    }
    /**
     * Get RPH value
     * @return int|null
     */
    public function getRPH()
    {
        return $this->RPH;
    }
    /**
     * Set RPH value
     * @param int $rPH
     * @return \Sabre\OTAAirRules\Structs\RuleReqInfo
     */
    public function setRPH($rPH = null)
    {
        $this->RPH = $rPH;
        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 \Sabre\OTAAirRules\Structs\RuleReqInfo
     */
    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__;
    }
}
