<?php
/**
 * File for class DhlApiStructTrackAndTraceResponse
 * @package DhlApi
 * @subpackage Structs
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20140325-01
 * @date 2015-02-05
 */
/**
 * This class stands for DhlApiStructTrackAndTraceResponse originally named TrackAndTraceResponse
 * Meta informations extracted from the WSDL
 * - from schema : {@link https://dhl24.com.pl/webapi2.html}
 * @package DhlApi
 * @subpackage Structs
 * @author WsdlToPhp Team <contact@wsdltophp.com>
 * @version 20140325-01
 * @date 2015-02-05
 */
class DhlApiStructTrackAndTraceResponse extends DhlApiWsdlClass
{
    /**
     * The shipmentId
     * Meta informations extracted from the WSDL
     * - nillable : true
     * @var string
     */
    public $shipmentId;
    /**
     * The receivedBy
     * Meta informations extracted from the WSDL
     * - nillable : true
     * @var string
     */
    public $receivedBy;
    /**
     * The events
     * Meta informations extracted from the WSDL
     * - nillable : true
     * @var DhlApiStructArrayOfTrackandtraceevent
     */
    public $events;
    /**
     * Constructor method for TrackAndTraceResponse
     * @see parent::__construct()
     * @param string $_shipmentId
     * @param string $_receivedBy
     * @param DhlApiStructArrayOfTrackandtraceevent $_events
     * @return DhlApiStructTrackAndTraceResponse
     */
    public function __construct($_shipmentId = NULL,$_receivedBy = NULL,$_events = NULL)
    {
        parent::__construct(array('shipmentId'=>$_shipmentId,'receivedBy'=>$_receivedBy,'events'=>($_events instanceof DhlApiStructArrayOfTrackandtraceevent)?$_events:new DhlApiStructArrayOfTrackandtraceevent($_events)),false);
    }
    /**
     * Get shipmentId value
     * @return string|null
     */
    public function getShipmentId()
    {
        return $this->shipmentId;
    }
    /**
     * Set shipmentId value
     * @param string $_shipmentId the shipmentId
     * @return string
     */
    public function setShipmentId($_shipmentId)
    {
        return ($this->shipmentId = $_shipmentId);
    }
    /**
     * Get receivedBy value
     * @return string|null
     */
    public function getReceivedBy()
    {
        return $this->receivedBy;
    }
    /**
     * Set receivedBy value
     * @param string $_receivedBy the receivedBy
     * @return string
     */
    public function setReceivedBy($_receivedBy)
    {
        return ($this->receivedBy = $_receivedBy);
    }
    /**
     * Get events value
     * @return DhlApiStructArrayOfTrackandtraceevent|null
     */
    public function getEvents()
    {
        return $this->events;
    }
    /**
     * Set events value
     * @param DhlApiStructArrayOfTrackandtraceevent $_events the events
     * @return DhlApiStructArrayOfTrackandtraceevent
     */
    public function setEvents($_events)
    {
        return ($this->events = $_events);
    }
    /**
     * Method called when an object has been exported with var_export() functions
     * It allows to return an object instantiated with the values
     * @see DhlApiWsdlClass::__set_state()
     * @uses DhlApiWsdlClass::__set_state()
     * @param array $_array the exported values
     * @return DhlApiStructTrackAndTraceResponse
     */
    public static function __set_state(array $_array,$_className = __CLASS__)
    {
        return parent::__set_state($_array,$_className);
    }
    /**
     * Method returning the class name
     * @return string __CLASS__
     */
    public function __toString()
    {
        return __CLASS__;
    }
}
