<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VehicleTourInfoType StructType
 * @package Dg
 * @subpackage Structs
 */
class DgVehicleTourInfoType extends AbstractStructBase
{
    /**
     * The TourOperator
     * Meta informations extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 0
     * @var \dgsoft\StructType\DgCompanyNameType
     */
    public $TourOperator;
    /**
     * The TourNumber
     * @var string
     */
    public $TourNumber;
    /**
     * Constructor method for VehicleTourInfoType
     * @uses DgVehicleTourInfoType::setTourOperator()
     * @uses DgVehicleTourInfoType::setTourNumber()
     * @param \dgsoft\StructType\DgCompanyNameType $tourOperator
     * @param string $tourNumber
     */
    public function __construct(\dgsoft\StructType\DgCompanyNameType $tourOperator = null, $tourNumber = null)
    {
        $this
            ->setTourOperator($tourOperator)
            ->setTourNumber($tourNumber);
    }
    /**
     * Get TourOperator value
     * @return \dgsoft\StructType\DgCompanyNameType|null
     */
    public function getTourOperator()
    {
        return $this->TourOperator;
    }
    /**
     * Set TourOperator value
     * @param \dgsoft\StructType\DgCompanyNameType $tourOperator
     * @return \dgsoft\StructType\DgVehicleTourInfoType
     */
    public function setTourOperator(\dgsoft\StructType\DgCompanyNameType $tourOperator = null)
    {
        $this->TourOperator = $tourOperator;
        return $this;
    }
    /**
     * Get TourNumber value
     * @return string|null
     */
    public function getTourNumber()
    {
        return $this->TourNumber;
    }
    /**
     * Set TourNumber value
     * @param string $tourNumber
     * @return \dgsoft\StructType\DgVehicleTourInfoType
     */
    public function setTourNumber($tourNumber = null)
    {
        // validation for constraint: string
        if (!is_null($tourNumber) && !is_string($tourNumber)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($tourNumber)), __LINE__);
        }
        $this->TourNumber = $tourNumber;
        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\DgVehicleTourInfoType
     */
    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__;
    }
}
