<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for LastVehicleInfo_V2 StructType
 * @subpackage Structs
 */
class LastVehicleInfo_V2 extends AbstractStructBase
{
    /**
     * The DateLastVehicle
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * - nillable: true
     * @var string
     */
    public $DateLastVehicle;
    /**
     * The LastVehicle
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\IdentifierVehicleResult_V2
     */
    public $LastVehicle;
    /**
     * The Position
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \StructType\Position
     */
    public $Position;
    /**
     * Constructor method for LastVehicleInfo_V2
     * @uses LastVehicleInfo_V2::setDateLastVehicle()
     * @uses LastVehicleInfo_V2::setLastVehicle()
     * @uses LastVehicleInfo_V2::setPosition()
     * @param string $dateLastVehicle
     * @param \StructType\IdentifierVehicleResult_V2 $lastVehicle
     * @param \StructType\Position $position
     */
    public function __construct($dateLastVehicle = null, \StructType\IdentifierVehicleResult_V2 $lastVehicle = null, \StructType\Position $position = null)
    {
        $this
            ->setDateLastVehicle($dateLastVehicle)
            ->setLastVehicle($lastVehicle)
            ->setPosition($position);
    }
    /**
     * Get DateLastVehicle value
     * @return string
     */
    public function getDateLastVehicle()
    {
        return $this->DateLastVehicle;
    }
    /**
     * Set DateLastVehicle value
     * @param string $dateLastVehicle
     * @return \StructType\LastVehicleInfo_V2
     */
    public function setDateLastVehicle($dateLastVehicle = null)
    {
        // validation for constraint: string
        if (!is_null($dateLastVehicle) && !is_string($dateLastVehicle)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($dateLastVehicle, true), gettype($dateLastVehicle)), __LINE__);
        }
        $this->DateLastVehicle = $dateLastVehicle;
        return $this;
    }
    /**
     * Get LastVehicle value
     * @return \StructType\IdentifierVehicleResult_V2|null
     */
    public function getLastVehicle()
    {
        return $this->LastVehicle;
    }
    /**
     * Set LastVehicle value
     * @param \StructType\IdentifierVehicleResult_V2 $lastVehicle
     * @return \StructType\LastVehicleInfo_V2
     */
    public function setLastVehicle(\StructType\IdentifierVehicleResult_V2 $lastVehicle = null)
    {
        $this->LastVehicle = $lastVehicle;
        return $this;
    }
    /**
     * Get Position value
     * @return \StructType\Position|null
     */
    public function getPosition()
    {
        return $this->Position;
    }
    /**
     * Set Position value
     * @param \StructType\Position $position
     * @return \StructType\LastVehicleInfo_V2
     */
    public function setPosition(\StructType\Position $position = null)
    {
        $this->Position = $position;
        return $this;
    }
}
