<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for GeneralMessageCapabilityAccessControlStructure StructType
 * Meta informations extracted from the WSDL
 * - documentation: Type for access control.
 * @subpackage Structs
 */
class GeneralMessageCapabilityAccessControlStructure extends CapabilityAccessControlStructure
{
    /**
     * The CheckInfoChannelRef
     * Meta informations extracted from the WSDL
     * - default: true
     * - documentation: If access control is supported, whether access control by LINE is supported. Default is 'true'.
     * @var bool
     */
    public $CheckInfoChannelRef;
    /**
     * Constructor method for GeneralMessageCapabilityAccessControlStructure
     * @uses GeneralMessageCapabilityAccessControlStructure::setCheckInfoChannelRef()
     * @param bool $checkInfoChannelRef
     */
    public function __construct($checkInfoChannelRef = true)
    {
        $this
            ->setCheckInfoChannelRef($checkInfoChannelRef);
    }
    /**
     * Get CheckInfoChannelRef value
     * @return bool|null
     */
    public function getCheckInfoChannelRef()
    {
        return $this->CheckInfoChannelRef;
    }
    /**
     * Set CheckInfoChannelRef value
     * @param bool $checkInfoChannelRef
     * @return \StructType\GeneralMessageCapabilityAccessControlStructure
     */
    public function setCheckInfoChannelRef($checkInfoChannelRef = true)
    {
        // validation for constraint: boolean
        if (!is_null($checkInfoChannelRef) && !is_bool($checkInfoChannelRef)) {
            throw new \InvalidArgumentException(sprintf('Invalid value, please provide a bool, "%s" given', gettype($checkInfoChannelRef)), __LINE__);
        }
        $this->CheckInfoChannelRef = $checkInfoChannelRef;
        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\GeneralMessageCapabilityAccessControlStructure
     */
    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__;
    }
}
