<?php

namespace Sabre\RulesFromPrice\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\RulesFromPrice\Structs\FareBasis
     */
    public $FareBasis;
    /**
     * The NoMatch
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\RulesFromPrice\Structs\NoMatch
     */
    public $NoMatch;
    /**
     * The Passenger
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\RulesFromPrice\Structs\Passenger
     */
    public $Passenger;
    /**
     * The SegmentSelect
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \Sabre\RulesFromPrice\Structs\SegmentSelect[]
     */
    public $SegmentSelect;
    /**
     * The LevelTwo
     * Meta informations extracted from the WSDL
     * - use: optional
     * @var bool
     */
    public $LevelTwo;
    /**
     * Constructor method for RuleReqInfo
     * @uses RuleReqInfo::setCategory()
     * @uses RuleReqInfo::setFareBasis()
     * @uses RuleReqInfo::setNoMatch()
     * @uses RuleReqInfo::setPassenger()
     * @uses RuleReqInfo::setSegmentSelect()
     * @uses RuleReqInfo::setLevelTwo()
     * @param string[] $category
     * @param \Sabre\RulesFromPrice\Structs\FareBasis $fareBasis
     * @param \Sabre\RulesFromPrice\Structs\NoMatch $noMatch
     * @param \Sabre\RulesFromPrice\Structs\Passenger $passenger
     * @param \Sabre\RulesFromPrice\Structs\SegmentSelect[] $segmentSelect
     * @param bool $levelTwo
     */
    public function __construct(array $category = array(), \Sabre\RulesFromPrice\Structs\FareBasis $fareBasis = null, \Sabre\RulesFromPrice\Structs\NoMatch $noMatch = null, \Sabre\RulesFromPrice\Structs\Passenger $passenger = null, array $segmentSelect = array(), $levelTwo = null)
    {
        $this
            ->setCategory($category)
            ->setFareBasis($fareBasis)
            ->setNoMatch($noMatch)
            ->setPassenger($passenger)
            ->setSegmentSelect($segmentSelect)
            ->setLevelTwo($levelTwo);
    }
    /**
     * Get Category value
     * @return string[]|null
     */
    public function getCategory()
    {
        return $this->Category;
    }
    /**
     * Set Category value
     * @throws \InvalidArgumentException
     * @param string[] $category
     * @return \Sabre\RulesFromPrice\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\RulesFromPrice\Structs\RuleReqInfo
     */
    public function addToCategory($item)
    {
        $this->Category[] = $item;
        return $this;
    }
    /**
     * Get FareBasis value
     * @return \Sabre\RulesFromPrice\Structs\FareBasis|null
     */
    public function getFareBasis()
    {
        return $this->FareBasis;
    }
    /**
     * Set FareBasis value
     * @param \Sabre\RulesFromPrice\Structs\FareBasis $fareBasis
     * @return \Sabre\RulesFromPrice\Structs\RuleReqInfo
     */
    public function setFareBasis(\Sabre\RulesFromPrice\Structs\FareBasis $fareBasis = null)
    {
        $this->FareBasis = $fareBasis;
        return $this;
    }
    /**
     * Get NoMatch value
     * @return \Sabre\RulesFromPrice\Structs\NoMatch|null
     */
    public function getNoMatch()
    {
        return $this->NoMatch;
    }
    /**
     * Set NoMatch value
     * @param \Sabre\RulesFromPrice\Structs\NoMatch $noMatch
     * @return \Sabre\RulesFromPrice\Structs\RuleReqInfo
     */
    public function setNoMatch(\Sabre\RulesFromPrice\Structs\NoMatch $noMatch = null)
    {
        $this->NoMatch = $noMatch;
        return $this;
    }
    /**
     * Get Passenger value
     * @return \Sabre\RulesFromPrice\Structs\Passenger|null
     */
    public function getPassenger()
    {
        return $this->Passenger;
    }
    /**
     * Set Passenger value
     * @param \Sabre\RulesFromPrice\Structs\Passenger $passenger
     * @return \Sabre\RulesFromPrice\Structs\RuleReqInfo
     */
    public function setPassenger(\Sabre\RulesFromPrice\Structs\Passenger $passenger = null)
    {
        $this->Passenger = $passenger;
        return $this;
    }
    /**
     * Get SegmentSelect value
     * @return \Sabre\RulesFromPrice\Structs\SegmentSelect[]|null
     */
    public function getSegmentSelect()
    {
        return $this->SegmentSelect;
    }
    /**
     * Set SegmentSelect value
     * @throws \InvalidArgumentException
     * @param \Sabre\RulesFromPrice\Structs\SegmentSelect[] $segmentSelect
     * @return \Sabre\RulesFromPrice\Structs\RuleReqInfo
     */
    public function setSegmentSelect(array $segmentSelect = array())
    {
        $this->SegmentSelect = $segmentSelect;
        return $this;
    }
    /**
     * Add item to SegmentSelect value
     * @throws \InvalidArgumentException
     * @param \Sabre\RulesFromPrice\Structs\SegmentSelect $item
     * @return \Sabre\RulesFromPrice\Structs\RuleReqInfo
     */
    public function addToSegmentSelect(\Sabre\RulesFromPrice\Structs\SegmentSelect $item)
    {
        $this->SegmentSelect[] = $item;
        return $this;
    }
    /**
     * Get LevelTwo value
     * @return bool|null
     */
    public function getLevelTwo()
    {
        return $this->LevelTwo;
    }
    /**
     * Set LevelTwo value
     * @param bool $levelTwo
     * @return \Sabre\RulesFromPrice\Structs\RuleReqInfo
     */
    public function setLevelTwo($levelTwo = null)
    {
        $this->LevelTwo = $levelTwo;
        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\RulesFromPrice\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__;
    }
}
