<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for RefPoint StructType
 * @package Dg
 * @subpackage Structs
 */
class DgRefPoint extends AbstractStructBase
{
    /**
     * The _
     * @var string
     */
    public $_;
    /**
     * The StateProv
     * @var string
     */
    public $StateProv;
    /**
     * The CountryCode
     * @var string
     */
    public $CountryCode;
    /**
     * The URI
     * @var string
     */
    public $URI;
    /**
     * The RefPointType
     * @var string
     */
    public $RefPointType;
    /**
     * The Name
     * @var string
     */
    public $Name;
    /**
     * The CityName
     * @var string
     */
    public $CityName;
    /**
     * Constructor method for RefPoint
     * @uses DgRefPoint::set_()
     * @uses DgRefPoint::setStateProv()
     * @uses DgRefPoint::setCountryCode()
     * @uses DgRefPoint::setURI()
     * @uses DgRefPoint::setRefPointType()
     * @uses DgRefPoint::setName()
     * @uses DgRefPoint::setCityName()
     * @param string $_
     * @param string $stateProv
     * @param string $countryCode
     * @param string $uRI
     * @param string $refPointType
     * @param string $name
     * @param string $cityName
     */
    public function __construct($_ = null, $stateProv = null, $countryCode = null, $uRI = null, $refPointType = null, $name = null, $cityName = null)
    {
        $this
            ->set_($_)
            ->setStateProv($stateProv)
            ->setCountryCode($countryCode)
            ->setURI($uRI)
            ->setRefPointType($refPointType)
            ->setName($name)
            ->setCityName($cityName);
    }
    /**
     * Get _ value
     * @return string|null
     */
    public function get_()
    {
        return $this->_;
    }
    /**
     * Set _ value
     * @param string $_
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function set_($_ = null)
    {
        // validation for constraint: string
        if (!is_null($_) && !is_string($_)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($_)), __LINE__);
        }
        $this->_ = $_;
        return $this;
    }
    /**
     * Get StateProv value
     * @return string|null
     */
    public function getStateProv()
    {
        return $this->StateProv;
    }
    /**
     * Set StateProv value
     * @param string $stateProv
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function setStateProv($stateProv = null)
    {
        // validation for constraint: string
        if (!is_null($stateProv) && !is_string($stateProv)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($stateProv)), __LINE__);
        }
        $this->StateProv = $stateProv;
        return $this;
    }
    /**
     * Get CountryCode value
     * @return string|null
     */
    public function getCountryCode()
    {
        return $this->CountryCode;
    }
    /**
     * Set CountryCode value
     * @param string $countryCode
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function setCountryCode($countryCode = null)
    {
        // validation for constraint: string
        if (!is_null($countryCode) && !is_string($countryCode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($countryCode)), __LINE__);
        }
        $this->CountryCode = $countryCode;
        return $this;
    }
    /**
     * Get URI value
     * @return string|null
     */
    public function getURI()
    {
        return $this->URI;
    }
    /**
     * Set URI value
     * @param string $uRI
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function setURI($uRI = null)
    {
        // validation for constraint: string
        if (!is_null($uRI) && !is_string($uRI)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($uRI)), __LINE__);
        }
        $this->URI = $uRI;
        return $this;
    }
    /**
     * Get RefPointType value
     * @return string|null
     */
    public function getRefPointType()
    {
        return $this->RefPointType;
    }
    /**
     * Set RefPointType value
     * @param string $refPointType
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function setRefPointType($refPointType = null)
    {
        // validation for constraint: string
        if (!is_null($refPointType) && !is_string($refPointType)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($refPointType)), __LINE__);
        }
        $this->RefPointType = $refPointType;
        return $this;
    }
    /**
     * Get Name value
     * @return string|null
     */
    public function getName()
    {
        return $this->Name;
    }
    /**
     * Set Name value
     * @param string $name
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function setName($name = null)
    {
        // validation for constraint: string
        if (!is_null($name) && !is_string($name)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($name)), __LINE__);
        }
        $this->Name = $name;
        return $this;
    }
    /**
     * Get CityName value
     * @return string|null
     */
    public function getCityName()
    {
        return $this->CityName;
    }
    /**
     * Set CityName value
     * @param string $cityName
     * @return \dgsoft\StructType\DgRefPoint
     */
    public function setCityName($cityName = null)
    {
        // validation for constraint: string
        if (!is_null($cityName) && !is_string($cityName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($cityName)), __LINE__);
        }
        $this->CityName = $cityName;
        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\DgRefPoint
     */
    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__;
    }
}
