<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for VehicleRentalCoreTypeReturnLocation StructType
 * @package Dg
 * @subpackage Structs
 */
class DgVehicleRentalCoreTypeReturnLocation extends DgLocationType
{
    /**
     * The IsAirport
     * Meta informations extracted from the WSDL
     * - use: required
     * @var bool
     */
    public $IsAirport;
    /**
     * The _
     * @var \dgsoft\StructType\DgLocationType
     */
    public $_;
    /**
     * The ExtendedLocationCode
     * @var string
     */
    public $ExtendedLocationCode;
    /**
     * The CounterLocation
     * @var string
     */
    public $CounterLocation;
    /**
     * Constructor method for VehicleRentalCoreTypeReturnLocation
     * @uses DgVehicleRentalCoreTypeReturnLocation::setIsAirport()
     * @uses DgVehicleRentalCoreTypeReturnLocation::set_()
     * @uses DgVehicleRentalCoreTypeReturnLocation::setExtendedLocationCode()
     * @uses DgVehicleRentalCoreTypeReturnLocation::setCounterLocation()
     * @param bool $isAirport
     * @param \dgsoft\StructType\DgLocationType $_
     * @param string $extendedLocationCode
     * @param string $counterLocation
     */
    public function __construct($isAirport = null, \dgsoft\StructType\DgLocationType $_ = null, $extendedLocationCode = null, $counterLocation = null)
    {
        $this
            ->setIsAirport($isAirport)
            ->set_($_)
            ->setExtendedLocationCode($extendedLocationCode)
            ->setCounterLocation($counterLocation);
    }
    /**
     * Get IsAirport value
     * @return bool
     */
    public function getIsAirport()
    {
        return $this->IsAirport;
    }
    /**
     * Set IsAirport value
     * @param bool $isAirport
     * @return \dgsoft\StructType\DgVehicleRentalCoreTypeReturnLocation
     */
    public function setIsAirport($isAirport = null)
    {
        // validation for constraint: boolean
        if (!is_null($isAirport) && !is_bool($isAirport)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($isAirport)), __LINE__);
        }
        $this->IsAirport = $isAirport;
        return $this;
    }
    /**
     * Get _ value
     * @return \dgsoft\StructType\DgLocationType|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param \dgsoft\StructType\DgLocationType $_
     * @return \dgsoft\StructType\DgVehicleRentalCoreTypeReturnLocation
     */
    public function set_(\dgsoft\StructType\DgLocationType $_ = null)
    {
        $this->_ = $_;
        return $this;
    }
    /**
     * Get ExtendedLocationCode value
     * @return string|null
     */
    public function getExtendedLocationCode()
    {
        return $this->ExtendedLocationCode;
    }
    /**
     * Set ExtendedLocationCode value
     * @param string $extendedLocationCode
     * @return \dgsoft\StructType\DgVehicleRentalCoreTypeReturnLocation
     */
    public function setExtendedLocationCode($extendedLocationCode = null)
    {
        // validation for constraint: string
        if (!is_null($extendedLocationCode) && !is_string($extendedLocationCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($extendedLocationCode)), __LINE__);
        }
        $this->ExtendedLocationCode = $extendedLocationCode;
        return $this;
    }
    /**
     * Get CounterLocation value
     * @return string|null
     */
    public function getCounterLocation()
    {
        return $this->CounterLocation;
    }
    /**
     * Set CounterLocation value
     * @param string $counterLocation
     * @return \dgsoft\StructType\DgVehicleRentalCoreTypeReturnLocation
     */
    public function setCounterLocation($counterLocation = null)
    {
        // validation for constraint: string
        if (!is_null($counterLocation) && !is_string($counterLocation)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($counterLocation)), __LINE__);
        }
        $this->CounterLocation = $counterLocation;
        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\DgVehicleRentalCoreTypeReturnLocation
     */
    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__;
    }
}
