<?php

namespace Sabre\AirTicket\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ItineraryOptions Structs
 * @subpackage Structs
 */
class ItineraryOptions extends AbstractStructBase
{
    /**
     * The SegmentSelect
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \Sabre\AirTicket\Structs\SegmentSelect[]
     */
    public $SegmentSelect;
    /**
     * The SideTrip
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\AirTicket\Structs\SideTrip
     */
    public $SideTrip;
    /**
     * Constructor method for ItineraryOptions
     * @uses ItineraryOptions::setSegmentSelect()
     * @uses ItineraryOptions::setSideTrip()
     * @param \Sabre\AirTicket\Structs\SegmentSelect[] $segmentSelect
     * @param \Sabre\AirTicket\Structs\SideTrip $sideTrip
     */
    public function __construct(array $segmentSelect = array(), \Sabre\AirTicket\Structs\SideTrip $sideTrip = null)
    {
        $this
            ->setSegmentSelect($segmentSelect)
            ->setSideTrip($sideTrip);
    }
    /**
     * Get SegmentSelect value
     * @return \Sabre\AirTicket\Structs\SegmentSelect[]|null
     */
    public function getSegmentSelect()
    {
        return $this->SegmentSelect;
    }
    /**
     * Set SegmentSelect value
     * @throws \InvalidArgumentException
     * @param \Sabre\AirTicket\Structs\SegmentSelect[] $segmentSelect
     * @return \Sabre\AirTicket\Structs\ItineraryOptions
     */
    public function setSegmentSelect(array $segmentSelect = array())
    {
        $this->SegmentSelect = $segmentSelect;
        return $this;
    }
    /**
     * Add item to SegmentSelect value
     * @throws \InvalidArgumentException
     * @param \Sabre\AirTicket\Structs\SegmentSelect $item
     * @return \Sabre\AirTicket\Structs\ItineraryOptions
     */
    public function addToSegmentSelect(\Sabre\AirTicket\Structs\SegmentSelect $item)
    {
        $this->SegmentSelect[] = $item;
        return $this;
    }
    /**
     * Get SideTrip value
     * @return \Sabre\AirTicket\Structs\SideTrip|null
     */
    public function getSideTrip()
    {
        return $this->SideTrip;
    }
    /**
     * Set SideTrip value
     * @param \Sabre\AirTicket\Structs\SideTrip $sideTrip
     * @return \Sabre\AirTicket\Structs\ItineraryOptions
     */
    public function setSideTrip(\Sabre\AirTicket\Structs\SideTrip $sideTrip = null)
    {
        $this->SideTrip = $sideTrip;
        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\AirTicket\Structs\ItineraryOptions
     */
    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__;
    }
}
