<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GetCCMVersionReq StructType
 * @subpackage Structs
 */
class GetCCMVersionReq extends AbstractStructBase
{
    /**
     * The processNodeName
     * Meta informations extracted from the WSDL
     * - minOccurs: 0
     * - maxLength: 255
     * @var string
     */
    public $processNodeName;
    /**
     * Constructor method for GetCCMVersionReq
     * @uses GetCCMVersionReq::setProcessNodeName()
     * @param string $processNodeName
     */
    public function __construct($processNodeName = null)
    {
        $this
            ->setProcessNodeName($processNodeName);
    }
    /**
     * Get processNodeName value
     * @return string|null
     */
    public function getProcessNodeName()
    {
        return $this->processNodeName;
    }
    /**
     * Set processNodeName value
     * @param string $processNodeName
     * @return GetCCMVersionReq
     */
    public function setProcessNodeName($processNodeName = null)
    {
        // validation for constraint: maxLength
        if ((is_scalar($processNodeName) && strlen($processNodeName) > 255) || (is_array($processNodeName) && count($processNodeName) > 255)) {
            throw new \InvalidArgumentException(sprintf('Invalid length, please provide an array with 255 element(s) or a scalar of 255 character(s) at most, "%d" length given', is_scalar($processNodeName) ? strlen($processNodeName) : count($processNodeName)), __LINE__);
        }
        // validation for constraint: string
        if (!is_null($processNodeName) && !is_string($processNodeName)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($processNodeName)), __LINE__);
        }
        $this->processNodeName = $processNodeName;
        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 GetCCMVersionReq
     */
    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__;
    }
}
