<?php

namespace Easy\EasyStruct;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetVoucherTracking_Station EasyStruct
 * @package Easy
 * @subpackage Structs
 */
class EasyGetVoucherTracking_Station extends AbstractStructBase
{
    /**
     * The dNumber
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var float
     */
    public $dNumber;
    /**
     * The Language
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * @var string
     */
    public $Language;
    /**
     * The ClsCredential
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var \Easy\EasyStruct\EasyClsCredential
     */
    public $ClsCredential;
    /**
     * Constructor method for GetVoucherTracking_Station
     * @uses EasyGetVoucherTracking_Station::setDNumber()
     * @uses EasyGetVoucherTracking_Station::setLanguage()
     * @uses EasyGetVoucherTracking_Station::setClsCredential()
     * @param float $dNumber
     * @param string $language
     * @param \Easy\EasyStruct\EasyClsCredential $clsCredential
     */
    public function __construct($dNumber = null, $language = null, \Easy\EasyStruct\EasyClsCredential $clsCredential = null)
    {
        $this
            ->setDNumber($dNumber)
            ->setLanguage($language)
            ->setClsCredential($clsCredential);
    }
    /**
     * Get dNumber value
     * @return float|null
     */
    public function getDNumber()
    {
        return $this->dNumber;
    }
    /**
     * Set dNumber value
     * @param float $dNumber
     * @return \Easy\EasyStruct\EasyGetVoucherTracking_Station
     */
    public function setDNumber($dNumber = null)
    {
        // validation for constraint: float
        if (!is_null($dNumber) && !(is_float($dNumber) || is_numeric($dNumber))) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a float value, %s given', var_export($dNumber, true), gettype($dNumber)), __LINE__);
        }
        $this->dNumber = $dNumber;
        return $this;
    }
    /**
     * Get Language value
     * @return string|null
     */
    public function getLanguage()
    {
        return $this->Language;
    }
    /**
     * Set Language value
     * @param string $language
     * @return \Easy\EasyStruct\EasyGetVoucherTracking_Station
     */
    public function setLanguage($language = null)
    {
        // validation for constraint: string
        if (!is_null($language) && !is_string($language)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($language, true), gettype($language)), __LINE__);
        }
        $this->Language = $language;
        return $this;
    }
    /**
     * Get ClsCredential value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return \Easy\EasyStruct\EasyClsCredential|null
     */
    public function getClsCredential()
    {
        return isset($this->ClsCredential) ? $this->ClsCredential : null;
    }
    /**
     * Set ClsCredential value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param \Easy\EasyStruct\EasyClsCredential $clsCredential
     * @return \Easy\EasyStruct\EasyGetVoucherTracking_Station
     */
    public function setClsCredential(\Easy\EasyStruct\EasyClsCredential $clsCredential = null)
    {
        if (is_null($clsCredential) || (is_array($clsCredential) && empty($clsCredential))) {
            unset($this->ClsCredential);
        } else {
            $this->ClsCredential = $clsCredential;
        }
        return $this;
    }
}
