<?php

namespace Pepitelabs\PWS\TrackingService;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for TrackPackagesByReferenceResponseContainer TrackingService
 * Meta information extracted from the WSDL
 * - documentation: Service Contract Class - TrackPackagesByReferenceResponse
 * - nillable: true
 * - type: tns:TrackPackagesByReferenceResponseContainer
 * @subpackage Structs
 */
class TrackPackagesByReferenceResponseContainer extends ResponseContainer
{
    /**
     * The TrackingInformationList
     * Meta information extracted from the WSDL
     * - documentation: TrackingInformationList - TrackingInformation[]
     * - minOccurs: 0
     * - nillable: true
     * @var \Pepitelabs\PWS\TrackingService\ArrayOfTrackingInformation
     */
    public $TrackingInformationList;
    /**
     * Constructor method for TrackPackagesByReferenceResponseContainer
     * @uses TrackPackagesByReferenceResponseContainer::setTrackingInformationList()
     * @param \Pepitelabs\PWS\TrackingService\ArrayOfTrackingInformation $trackingInformationList
     */
    public function __construct(\Pepitelabs\PWS\TrackingService\ArrayOfTrackingInformation $trackingInformationList = null)
    {
        $this
            ->setTrackingInformationList($trackingInformationList);
    }
    /**
     * Get TrackingInformationList value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \Pepitelabs\PWS\TrackingService\ArrayOfTrackingInformation|null
     */
    public function getTrackingInformationList()
    {
        return isset($this->TrackingInformationList) ? $this->TrackingInformationList : null;
    }
    /**
     * Set TrackingInformationList value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \Pepitelabs\PWS\TrackingService\ArrayOfTrackingInformation $trackingInformationList
     * @return \Pepitelabs\PWS\TrackingService\TrackPackagesByReferenceResponseContainer
     */
    public function setTrackingInformationList(\Pepitelabs\PWS\TrackingService\ArrayOfTrackingInformation $trackingInformationList = null)
    {
        if (is_null($trackingInformationList) || (is_array($trackingInformationList) && empty($trackingInformationList))) {
            unset($this->TrackingInformationList);
        } else {
            $this->TrackingInformationList = $trackingInformationList;
        }
        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 \Pepitelabs\PWS\TrackingService\TrackPackagesByReferenceResponseContainer
     */
    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__;
    }
}
