<?php

namespace Sabre\CreatePassengerNameRecord\Structs;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for SegmentReferences Structs
 * Meta informations extracted from the WSDL
 * - documentation: to be checked
 * @subpackage Structs
 */
class SegmentReferences extends AbstractStructBase
{
    /**
     * The SegmentRef
     * Meta informations extracted from the WSDL
     * - maxOccurs: unbounded
     * @var \Sabre\CreatePassengerNameRecord\Structs\SegmentRef[]
     */
    public $SegmentRef;
    /**
     * Constructor method for SegmentReferences
     * @uses SegmentReferences::setSegmentRef()
     * @param \Sabre\CreatePassengerNameRecord\Structs\SegmentRef[] $segmentRef
     */
    public function __construct(array $segmentRef = array())
    {
        $this
            ->setSegmentRef($segmentRef);
    }
    /**
     * Get SegmentRef value
     * @return \Sabre\CreatePassengerNameRecord\Structs\SegmentRef[]|null
     */
    public function getSegmentRef()
    {
        return $this->SegmentRef;
    }
    /**
     * Set SegmentRef value
     * @throws \InvalidArgumentException
     * @param \Sabre\CreatePassengerNameRecord\Structs\SegmentRef[] $segmentRef
     * @return \Sabre\CreatePassengerNameRecord\Structs\SegmentReferences
     */
    public function setSegmentRef(array $segmentRef = array())
    {
        $this->SegmentRef = $segmentRef;
        return $this;
    }
    /**
     * Add item to SegmentRef value
     * @throws \InvalidArgumentException
     * @param \Sabre\CreatePassengerNameRecord\Structs\SegmentRef $item
     * @return \Sabre\CreatePassengerNameRecord\Structs\SegmentReferences
     */
    public function addToSegmentRef(\Sabre\CreatePassengerNameRecord\Structs\SegmentRef $item)
    {
        $this->SegmentRef[] = $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\CreatePassengerNameRecord\Structs\SegmentReferences
     */
    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__;
    }
}
