<?php

namespace dgsoft\StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

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