<?php

namespace Sabre\TravelItineraryRead\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for FareDescription Structs
 * @subpackage Structs
 */
class FareDescription extends AbstractStructBase
{
    /**
     * The Name
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Name;
    /**
     * The Code
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Code;
    /**
     * The Detail
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \Sabre\TravelItineraryRead\Structs\Detail[]
     */
    public $Detail;
    /**
     * The Condition
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \Sabre\TravelItineraryRead\Structs\Condition[]
     */
    public $Condition;
    /**
     * The Fees
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var \Sabre\TravelItineraryRead\Structs\Fees
     */
    public $Fees;
    /**
     * Constructor method for FareDescription
     * @uses FareDescription::setName()
     * @uses FareDescription::setCode()
     * @uses FareDescription::setDetail()
     * @uses FareDescription::setCondition()
     * @uses FareDescription::setFees()
     * @param string $name
     * @param string $code
     * @param \Sabre\TravelItineraryRead\Structs\Detail[] $detail
     * @param \Sabre\TravelItineraryRead\Structs\Condition[] $condition
     * @param \Sabre\TravelItineraryRead\Structs\Fees $fees
     */
    public function __construct($name = null, $code = null, array $detail = array(), array $condition = array(), \Sabre\TravelItineraryRead\Structs\Fees $fees = null)
    {
        $this
            ->setName($name)
            ->setCode($code)
            ->setDetail($detail)
            ->setCondition($condition)
            ->setFees($fees);
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function setName($name = null)
    {
        $this->Name = $name;
        return $this;
    }
    /**
     * Get Code value
     * @return string|null
     */
    public function getCode()
    {
        return $this->Code;
    }
    /**
     * Set Code value
     * @param string $code
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function setCode($code = null)
    {
        $this->Code = $code;
        return $this;
    }
    /**
     * Get Detail value
     * @return \Sabre\TravelItineraryRead\Structs\Detail[]|null
     */
    public function getDetail()
    {
        return $this->Detail;
    }
    /**
     * Set Detail value
     * @throws \InvalidArgumentException
     * @param \Sabre\TravelItineraryRead\Structs\Detail[] $detail
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function setDetail(array $detail = array())
    {
        $this->Detail = $detail;
        return $this;
    }
    /**
     * Add item to Detail value
     * @throws \InvalidArgumentException
     * @param \Sabre\TravelItineraryRead\Structs\Detail $item
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function addToDetail(\Sabre\TravelItineraryRead\Structs\Detail $item)
    {
        $this->Detail[] = $item;
        return $this;
    }
    /**
     * Get Condition value
     * @return \Sabre\TravelItineraryRead\Structs\Condition[]|null
     */
    public function getCondition()
    {
        return $this->Condition;
    }
    /**
     * Set Condition value
     * @throws \InvalidArgumentException
     * @param \Sabre\TravelItineraryRead\Structs\Condition[] $condition
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function setCondition(array $condition = array())
    {
        $this->Condition = $condition;
        return $this;
    }
    /**
     * Add item to Condition value
     * @throws \InvalidArgumentException
     * @param \Sabre\TravelItineraryRead\Structs\Condition $item
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function addToCondition(\Sabre\TravelItineraryRead\Structs\Condition $item)
    {
        $this->Condition[] = $item;
        return $this;
    }
    /**
     * Get Fees value
     * @return \Sabre\TravelItineraryRead\Structs\Fees|null
     */
    public function getFees()
    {
        return $this->Fees;
    }
    /**
     * Set Fees value
     * @param \Sabre\TravelItineraryRead\Structs\Fees $fees
     * @return \Sabre\TravelItineraryRead\Structs\FareDescription
     */
    public function setFees(\Sabre\TravelItineraryRead\Structs\Fees $fees = null)
    {
        $this->Fees = $fees;
        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\TravelItineraryRead\Structs\FareDescription
     */
    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__;
    }
}
