<?php

namespace Sabre\EnhancedAirBook\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SubCodeInfo Structs
 * @subpackage Structs
 */
class SubCodeInfo extends AbstractStructBase
{
    /**
     * The SubCodeForAllowance
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * - minOccurs: 0
     * @var \Sabre\EnhancedAirBook\Structs\SubCodeForAllowance[]
     */
    public $SubCodeForAllowance;
    /**
     * The SubCodeForChargesOthers
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $SubCodeForChargesOthers;
    /**
     * Constructor method for SubCodeInfo
     * @uses SubCodeInfo::setSubCodeForAllowance()
     * @uses SubCodeInfo::setSubCodeForChargesOthers()
     * @param \Sabre\EnhancedAirBook\Structs\SubCodeForAllowance[] $subCodeForAllowance
     * @param string $subCodeForChargesOthers
     */
    public function __construct(array $subCodeForAllowance = array(), $subCodeForChargesOthers = null)
    {
        $this
            ->setSubCodeForAllowance($subCodeForAllowance)
            ->setSubCodeForChargesOthers($subCodeForChargesOthers);
    }
    /**
     * Get SubCodeForAllowance value
     * @return \Sabre\EnhancedAirBook\Structs\SubCodeForAllowance[]|null
     */
    public function getSubCodeForAllowance()
    {
        return $this->SubCodeForAllowance;
    }
    /**
     * Set SubCodeForAllowance value
     * @throws \InvalidArgumentException
     * @param \Sabre\EnhancedAirBook\Structs\SubCodeForAllowance[] $subCodeForAllowance
     * @return \Sabre\EnhancedAirBook\Structs\SubCodeInfo
     */
    public function setSubCodeForAllowance(array $subCodeForAllowance = array())
    {
        $this->SubCodeForAllowance = $subCodeForAllowance;
        return $this;
    }
    /**
     * Add item to SubCodeForAllowance value
     * @throws \InvalidArgumentException
     * @param \Sabre\EnhancedAirBook\Structs\SubCodeForAllowance $item
     * @return \Sabre\EnhancedAirBook\Structs\SubCodeInfo
     */
    public function addToSubCodeForAllowance(\Sabre\EnhancedAirBook\Structs\SubCodeForAllowance $item)
    {
        $this->SubCodeForAllowance[] = $item;
        return $this;
    }
    /**
     * Get SubCodeForChargesOthers value
     * @return string|null
     */
    public function getSubCodeForChargesOthers()
    {
        return $this->SubCodeForChargesOthers;
    }
    /**
     * Set SubCodeForChargesOthers value
     * @param string $subCodeForChargesOthers
     * @return \Sabre\EnhancedAirBook\Structs\SubCodeInfo
     */
    public function setSubCodeForChargesOthers($subCodeForChargesOthers = null)
    {
        $this->SubCodeForChargesOthers = $subCodeForChargesOthers;
        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\EnhancedAirBook\Structs\SubCodeInfo
     */
    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__;
    }
}
