<?php
use \WsdlToPhp\PackageBase\AbstractStructBase;

/**
 * This class stands for DiagnosticException StructType
 * Meta information extracted from the WSDL
 * - nillable: true
 * - type: tns:DiagnosticException
 * @subpackage Structs
 */
class DiagnosticException extends AbstractStructBase
{
    /**
     * The message
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var string
     */
    public $message;
    /**
     * The stack
     * Meta information extracted from the WSDL
     * - minOccurs: 0
     * - nillable: true
     * @var ArrayOfstring
     */
    public $stack;
    /**
     * Constructor method for DiagnosticException
     * @uses DiagnosticException::setMessage()
     * @uses DiagnosticException::setStack()
     * @param string $message
     * @param ArrayOfstring $stack
     */
    public function __construct($message = null, ArrayOfstring $stack = null)
    {
        $this
            ->setMessage($message)
            ->setStack($stack);
    }
    /**
     * Get message 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 getMessage()
    {
        return isset($this->message) ? $this->message : null;
    }
    /**
     * Set message 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 $message
     * @return DiagnosticException
     */
    public function setMessage($message = null)
    {
        if (is_null($message) || (is_array($message) && empty($message))) {
            unset($this->message);
        } else {
            $this->message = $message;
        }
        return $this;
    }
    /**
     * Get stack 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 ArrayOfstring|null
     */
    public function getStack()
    {
        return isset($this->stack) ? $this->stack : null;
    }
    /**
     * Set stack 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 ArrayOfstring $stack
     * @return DiagnosticException
     */
    public function setStack(ArrayOfstring $stack = null)
    {
        if (is_null($stack) || (is_array($stack) && empty($stack))) {
            unset($this->stack);
        } else {
            $this->stack = $stack;
        }
        return $this;
    }
}
