<?php

namespace CfcalSasieSDK\Entity;

use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for ExceptionWCF Entity
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:ExceptionWCF
 * @subpackage Structs
 */
class ExceptionWCF extends AbstractStructBase
{
    /**
     * The mMessage
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $mMessage;
    /**
     * The mNomMethode
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $mNomMethode;
    /**
     * Constructor method for ExceptionWCF
     * @uses ExceptionWCF::setMMessage()
     * @uses ExceptionWCF::setMNomMethode()
     * @param string $mMessage
     * @param string $mNomMethode
     */
    public function __construct($mMessage = null, $mNomMethode = null)
    {
        $this
            ->setMMessage($mMessage)
            ->setMNomMethode($mNomMethode);
    }
    /**
     * Get mMessage value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getMMessage()
    {
        return isset($this->mMessage) ? $this->mMessage : null;
    }
    /**
     * Set mMessage value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $mMessage
     * @return \CfcalSasieSDK\Entity\ExceptionWCF
     */
    public function setMMessage($mMessage = null)
    {
        // validation for constraint: string
        if (!is_null($mMessage) && !is_string($mMessage)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($mMessage, true), gettype($mMessage)), __LINE__);
        }
        if (is_null($mMessage) || (is_array($mMessage) && empty($mMessage))) {
            unset($this->mMessage);
        } else {
            $this->mMessage = $mMessage;
        }
        return $this;
    }
    /**
     * Get mNomMethode value
     * An additional test has been added (isset) before returning the property value as
     * this property may have been unset before, due to the fact that this property is
     * removable from the request (nillable=true+minOccurs=0)
     * @return string|null
     */
    public function getMNomMethode()
    {
        return isset($this->mNomMethode) ? $this->mNomMethode : null;
    }
    /**
     * Set mNomMethode value
     * This property is removable from request (nillable=true+minOccurs=0), therefore
     * if the value assigned to this property is null, it is removed from this object
     * @param string $mNomMethode
     * @return \CfcalSasieSDK\Entity\ExceptionWCF
     */
    public function setMNomMethode($mNomMethode = null)
    {
        // validation for constraint: string
        if (!is_null($mNomMethode) && !is_string($mNomMethode)) {
            throw new \InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($mNomMethode, true), gettype($mNomMethode)), __LINE__);
        }
        if (is_null($mNomMethode) || (is_array($mNomMethode) && empty($mNomMethode))) {
            unset($this->mNomMethode);
        } else {
            $this->mNomMethode = $mNomMethode;
        }
        return $this;
    }
}
