<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VehicleAvailRQCoreTypeVehPref StructType
 * @package Dg
 * @subpackage Structs
 */
class DgVehicleAvailRQCoreTypeVehPref extends DgVehiclePrefType
{
    /**
     * The UpSellInd
     * @var bool
     */
    public $UpSellInd;
    /**
     * Constructor method for VehicleAvailRQCoreTypeVehPref
     * @uses DgVehicleAvailRQCoreTypeVehPref::setUpSellInd()
     * @param bool $upSellInd
     */
    public function __construct($upSellInd = null)
    {
        $this
            ->setUpSellInd($upSellInd);
    }
    /**
     * Get UpSellInd value
     * @return bool|null
     */
    public function getUpSellInd()
    {
        return $this->UpSellInd;
    }
    /**
     * Set UpSellInd value
     * @param bool $upSellInd
     * @return \dgsoft\StructType\DgVehicleAvailRQCoreTypeVehPref
     */
    public function setUpSellInd($upSellInd = null)
    {
        // validation for constraint: boolean
        if (!is_null($upSellInd) && !is_bool($upSellInd)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($upSellInd)), __LINE__);
        }
        $this->UpSellInd = $upSellInd;
        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\DgVehicleAvailRQCoreTypeVehPref
     */
    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__;
    }
}
