<?php

namespace StructType;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for JP_ModificationInfo StructType
 * @subpackage Structs
 */
class JP_ModificationInfo extends AbstractStructBase
{
    /**
     * The Allowed
     * @var bool
     */
    public $Allowed;
    /**
     * Constructor method for JP_ModificationInfo
     * @uses JP_ModificationInfo::setAllowed()
     * @param bool $allowed
     */
    public function __construct($allowed = null)
    {
        $this
            ->setAllowed($allowed);
    }
    /**
     * Get Allowed value
     * @return bool|null
     */
    public function getAllowed()
    {
        return $this->Allowed;
    }
    /**
     * Set Allowed value
     * @param bool $allowed
     * @return \StructType\JP_ModificationInfo
     */
    public function setAllowed($allowed = null)
    {
        // validation for constraint: boolean
        if (!is_null($allowed) && !is_bool($allowed)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a bool, %s given', var_export($allowed, true), gettype($allowed)), __LINE__);
        }
        $this->Allowed = $allowed;
        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\JP_ModificationInfo
     */
    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__;
    }
}
