<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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