<?php

namespace Sabre\BargainFinderMax\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for FareComponents Structs
 * Meta informations extracted from the WSDL
 * - documentation: A collection of additional information for each Fare Component
 * @subpackage Structs
 */
class FareComponents extends AbstractStructBase
{
    /**
     * The FareComponent
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * @var \Sabre\BargainFinderMax\Structs\FareComponent[]
     */
    public $FareComponent;
    /**
     * Constructor method for FareComponents
     * @uses FareComponents::setFareComponent()
     * @param \Sabre\BargainFinderMax\Structs\FareComponent[] $fareComponent
     */
    public function __construct(array $fareComponent = array())
    {
        $this
            ->setFareComponent($fareComponent);
    }
    /**
     * Get FareComponent value
     * @return \Sabre\BargainFinderMax\Structs\FareComponent[]|null
     */
    public function getFareComponent()
    {
        return $this->FareComponent;
    }
    /**
     * Set FareComponent value
     * @throws \InvalidArgumentException
     * @param \Sabre\BargainFinderMax\Structs\FareComponent[] $fareComponent
     * @return \Sabre\BargainFinderMax\Structs\FareComponents
     */
    public function setFareComponent(array $fareComponent = array())
    {
        $this->FareComponent = $fareComponent;
        return $this;
    }
    /**
     * Add item to FareComponent value
     * @throws \InvalidArgumentException
     * @param \Sabre\BargainFinderMax\Structs\FareComponent $item
     * @return \Sabre\BargainFinderMax\Structs\FareComponents
     */
    public function addToFareComponent(\Sabre\BargainFinderMax\Structs\FareComponent $item)
    {
        $this->FareComponent[] = $item;
        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\BargainFinderMax\Structs\FareComponents
     */
    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__;
    }
}
