<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VehicleTypeVehMakeModel StructType
 * @package Dg
 * @subpackage Structs
 */
class DgVehicleTypeVehMakeModel extends AbstractStructBase
{
    /**
     * The ModelYear
     * @var string
     */
    public $ModelYear;
    /**
     * Constructor method for VehicleTypeVehMakeModel
     * @uses DgVehicleTypeVehMakeModel::setModelYear()
     * @param string $modelYear
     */
    public function __construct($modelYear = null)
    {
        $this
            ->setModelYear($modelYear);
    }
    /**
     * Get ModelYear value
     * @return string|null
     */
    public function getModelYear()
    {
        return $this->ModelYear;
    }
    /**
     * Set ModelYear value
     * @param string $modelYear
     * @return \dgsoft\StructType\DgVehicleTypeVehMakeModel
     */
    public function setModelYear($modelYear = null)
    {
        // validation for constraint: string
        if (!is_null($modelYear) && !is_string($modelYear)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($modelYear)), __LINE__);
        }
        $this->ModelYear = $modelYear;
        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 \dgsoft\StructType\DgVehicleTypeVehMakeModel
     */
    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__;
    }
}
