<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for Consultation_V4 StructType
 * @subpackage Structs
 */
class Consultation_V4 extends Consultation_V3
{
    /**
     * The State
     * Meta information extracted from the WSDL
     * - maxOccurs: 1
     * - minOccurs: 1
     * @var string
     */
    public $State;
    /**
     * Constructor method for Consultation_V4
     * @uses Consultation_V4::setState()
     * @param string $state
     */
    public function __construct($state = null)
    {
        $this
            ->setState($state);
    }
    /**
     * Get State value
     * @return string
     */
    public function getState()
    {
        return $this->State;
    }
    /**
     * Set State value
     * @uses \EnumType\EnumActivityState::valueIsValid()
     * @uses \EnumType\EnumActivityState::getValidValues()
     * @throws \InvalidArgumentException
     * @param string $state
     * @return \StructType\Consultation_V4
     */
    public function setState($state = null)
    {
        // validation for constraint: enumeration
        if (!\EnumType\EnumActivityState::valueIsValid($state)) {
            throw new \InvalidArgumentException(sprintf('Invalid value(s) %s, please use one of: %s from enumeration class \EnumType\EnumActivityState', is_array($state) ? implode(', ', $state) : var_export($state, true), implode(', ', \EnumType\EnumActivityState::getValidValues())), __LINE__);
        }
        $this->State = $state;
        return $this;
    }
}
