<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for OTA_VehRateRuleRSVehicle StructType
 * @package Dg
 * @subpackage Structs
 */
class DgOTA_VehRateRuleRSVehicle extends DgVehicleType
{
    /**
     * The Description
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgFormattedTextTextType
     */
    public $Description;
    /**
     * The LowMileage
     * @var int
     */
    public $LowMileage;
    /**
     * The HighMileage
     * @var int
     */
    public $HighMileage;
    /**
     * Constructor method for OTA_VehRateRuleRSVehicle
     * @uses DgOTA_VehRateRuleRSVehicle::setDescription()
     * @uses DgOTA_VehRateRuleRSVehicle::setLowMileage()
     * @uses DgOTA_VehRateRuleRSVehicle::setHighMileage()
     * @param \dgsoft\StructType\DgFormattedTextTextType $description
     * @param int $lowMileage
     * @param int $highMileage
     */
    public function __construct(\dgsoft\StructType\DgFormattedTextTextType $description = null, $lowMileage = null, $highMileage = null)
    {
        $this
            ->setDescription($description)
            ->setLowMileage($lowMileage)
            ->setHighMileage($highMileage);
    }
    /**
     * Get Description value
     * @return \dgsoft\StructType\DgFormattedTextTextType|null
     */
    public function getDescription()
    {
        return $this->Description;
    }
    /**
     * Set Description value
     * @param \dgsoft\StructType\DgFormattedTextTextType $description
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSVehicle
     */
    public function setDescription(\dgsoft\StructType\DgFormattedTextTextType $description = null)
    {
        $this->Description = $description;
        return $this;
    }
    /**
     * Get LowMileage value
     * @return int|null
     */
    public function getLowMileage()
    {
        return $this->LowMileage;
    }
    /**
     * Set LowMileage value
     * @param int $lowMileage
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSVehicle
     */
    public function setLowMileage($lowMileage = null)
    {
        // validation for constraint: int
        if (!is_null($lowMileage) && !is_numeric($lowMileage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($lowMileage)), __LINE__);
        }
        $this->LowMileage = $lowMileage;
        return $this;
    }
    /**
     * Get HighMileage value
     * @return int|null
     */
    public function getHighMileage()
    {
        return $this->HighMileage;
    }
    /**
     * Set HighMileage value
     * @param int $highMileage
     * @return \dgsoft\StructType\DgOTA_VehRateRuleRSVehicle
     */
    public function setHighMileage($highMileage = null)
    {
        // validation for constraint: int
        if (!is_null($highMileage) && !is_numeric($highMileage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a numeric value, "%s" given', gettype($highMileage)), __LINE__);
        }
        $this->HighMileage = $highMileage;
        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\DgOTA_VehRateRuleRSVehicle
     */
    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__;
    }
}
