<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for CapabilityNotSupportedErrorStructure StructType
 * Meta informations extracted from the WSDL
 * - documentation: Type for Error: Service does not support requested capability.
 * @subpackage Structs
 */
class CapabilityNotSupportedErrorStructure extends ErrorCodeStructure
{
    /**
     * The CapabilityRef
     * Meta informations extracted from the WSDL
     * - documentation: Id of capabiliuty that is noit supported. | Type for capability code.
     * - minOccurs: 0
     * @var string
     */
    public $CapabilityRef;
    /**
     * Constructor method for CapabilityNotSupportedErrorStructure
     * @uses CapabilityNotSupportedErrorStructure::setCapabilityRef()
     * @param string $capabilityRef
     */
    public function __construct($capabilityRef = null)
    {
        $this
            ->setCapabilityRef($capabilityRef);
    }
    /**
     * Get CapabilityRef value
     * @return string|null
     */
    public function getCapabilityRef()
    {
        return $this->CapabilityRef;
    }
    /**
     * Set CapabilityRef value
     * @param string $capabilityRef
     * @return \StructType\CapabilityNotSupportedErrorStructure
     */
    public function setCapabilityRef($capabilityRef = null)
    {
        // validation for constraint: string
        if (!is_null($capabilityRef) && !is_string($capabilityRef)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a string, "%s" given', gettype($capabilityRef)), __LINE__);
        }
        $this->CapabilityRef = $capabilityRef;
        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 \StructType\CapabilityNotSupportedErrorStructure
     */
    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__;
    }
}
