# coding: utf-8

"""
    AristaFlowREST/LicenceManager

    No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)  # noqa: E501

    OpenAPI spec version: 2.0.0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six
from af_licence_manager.models.dummy_parent import DummyParent  # noqa: F401,E501

class IlmException(DummyParent):
    """NOTE: This class is auto generated by the swagger code generator program.

    Do not edit the class manually.
    """
    """
    Attributes:
      swagger_types (dict): The key is attribute name
                            and the value is attribute type.
      attribute_map (dict): The key is attribute name
                            and the value is json key in definition.
    """
    swagger_types = {
        'stack_trace': 'list[IlmExceptionStackTrace]',
        'sub_class': 'str',
        'message': 'str',
        'cause_class': 'str',
        'server_log_id': 'str',
        'suppress_stack': 'bool',
        'suppressed': 'list[IlmExceptionSuppressed]'
    }
    if hasattr(DummyParent, "swagger_types"):
        swagger_types.update(DummyParent.swagger_types)

    attribute_map = {
        'stack_trace': 'stackTrace',
        'sub_class': 'subClass',
        'message': 'message',
        'cause_class': 'causeClass',
        'server_log_id': 'serverLogId',
        'suppress_stack': 'suppressStack',
        'suppressed': 'suppressed'
    }
    if hasattr(DummyParent, "attribute_map"):
        attribute_map.update(DummyParent.attribute_map)

    discriminator_value_class_map = {
          'OrgModelException': 'OrgModelException',
'InvalidDataContainerException': 'InvalidDataContainerException',
'InvalidInstanceStateException': 'InvalidInstanceStateException',
'AuthenticationException': 'AuthenticationException',
'WrappingException': 'WrappingException',
'DataConsistencyException': 'DataConsistencyException',
'ScriptException': 'ScriptException',
'WrongAgentException': 'WrongAgentException',
'PolicyResolutionException': 'PolicyResolutionException',
'InvalidActivityStateException': 'InvalidActivityStateException',
'LockException': 'LockException',
'AgentUnknownException': 'AgentUnknownException',
'ParameterException': 'ParameterException',
'AbortTransactionException': 'AbortTransactionException',
'AbortServiceException': 'AbortServiceException',
'IncompatibleGuiContextException': 'IncompatibleGuiContextException',
'UnknownSessionException': 'UnknownSessionException',
'InterruptException': 'InterruptException',
'InvalidTemplateStateException': 'InvalidTemplateStateException',
'PasswordPolicyException': 'PasswordPolicyException',
'DataSourceException': 'DataSourceException',
'PlainTextException': 'PlainTextException',
'WrongRuntimeManagerException': 'WrongRuntimeManagerException'    }

    def __init__(self, stack_trace=None, sub_class=None, message=None, cause_class=None, server_log_id=None, suppress_stack=None, suppressed=None, *args, **kwargs):  # noqa: E501
        """IlmException - a model defined in Swagger"""  # noqa: E501
        self._stack_trace = None
        self._sub_class = None
        self._message = None
        self._cause_class = None
        self._server_log_id = None
        self._suppress_stack = None
        self._suppressed = None
        if not(hasattr(self, "discriminator")) or not(self.discriminator):
            self.discriminator = 'sub_class'
        if stack_trace is not None:
            self.stack_trace = stack_trace
        self.sub_class = sub_class
        self.message = message
        if cause_class is not None:
            self.cause_class = cause_class
        if server_log_id is not None:
            self.server_log_id = server_log_id
        self.suppress_stack = suppress_stack
        if suppressed is not None:
            self.suppressed = suppressed
        DummyParent.__init__(self, *args, **kwargs)

    @property
    def stack_trace(self):
        """Gets the stack_trace of this IlmException.  # noqa: E501


        :return: The stack_trace of this IlmException.  # noqa: E501
        :rtype: list[IlmExceptionStackTrace]
        """
        return self._stack_trace

    @stack_trace.setter
    def stack_trace(self, stack_trace):
        """Sets the stack_trace of this IlmException.


        :param stack_trace: The stack_trace of this IlmException.  # noqa: E501
        :type: list[IlmExceptionStackTrace]
        """

        self._stack_trace = stack_trace

    @property
    def sub_class(self):
        """Gets the sub_class of this IlmException.  # noqa: E501


        :return: The sub_class of this IlmException.  # noqa: E501
        :rtype: str
        """
        return self._sub_class

    @sub_class.setter
    def sub_class(self, sub_class):
        """Sets the sub_class of this IlmException.


        :param sub_class: The sub_class of this IlmException.  # noqa: E501
        :type: str
        """
        if sub_class is None:
            raise ValueError("Invalid value for `sub_class`, must not be `None`")  # noqa: E501

        self._sub_class = sub_class

    @property
    def message(self):
        """Gets the message of this IlmException.  # noqa: E501


        :return: The message of this IlmException.  # noqa: E501
        :rtype: str
        """
        return self._message

    @message.setter
    def message(self, message):
        """Sets the message of this IlmException.


        :param message: The message of this IlmException.  # noqa: E501
        :type: str
        """
        if message is None:
            raise ValueError("Invalid value for `message`, must not be `None`")  # noqa: E501

        self._message = message

    @property
    def cause_class(self):
        """Gets the cause_class of this IlmException.  # noqa: E501


        :return: The cause_class of this IlmException.  # noqa: E501
        :rtype: str
        """
        return self._cause_class

    @cause_class.setter
    def cause_class(self, cause_class):
        """Sets the cause_class of this IlmException.


        :param cause_class: The cause_class of this IlmException.  # noqa: E501
        :type: str
        """

        self._cause_class = cause_class

    @property
    def server_log_id(self):
        """Gets the server_log_id of this IlmException.  # noqa: E501


        :return: The server_log_id of this IlmException.  # noqa: E501
        :rtype: str
        """
        return self._server_log_id

    @server_log_id.setter
    def server_log_id(self, server_log_id):
        """Sets the server_log_id of this IlmException.


        :param server_log_id: The server_log_id of this IlmException.  # noqa: E501
        :type: str
        """

        self._server_log_id = server_log_id

    @property
    def suppress_stack(self):
        """Gets the suppress_stack of this IlmException.  # noqa: E501


        :return: The suppress_stack of this IlmException.  # noqa: E501
        :rtype: bool
        """
        return self._suppress_stack

    @suppress_stack.setter
    def suppress_stack(self, suppress_stack):
        """Sets the suppress_stack of this IlmException.


        :param suppress_stack: The suppress_stack of this IlmException.  # noqa: E501
        :type: bool
        """
        if suppress_stack is None:
            raise ValueError("Invalid value for `suppress_stack`, must not be `None`")  # noqa: E501

        self._suppress_stack = suppress_stack

    @property
    def suppressed(self):
        """Gets the suppressed of this IlmException.  # noqa: E501


        :return: The suppressed of this IlmException.  # noqa: E501
        :rtype: list[IlmExceptionSuppressed]
        """
        return self._suppressed

    @suppressed.setter
    def suppressed(self, suppressed):
        """Sets the suppressed of this IlmException.


        :param suppressed: The suppressed of this IlmException.  # noqa: E501
        :type: list[IlmExceptionSuppressed]
        """

        self._suppressed = suppressed

    def get_real_child_model(self, data):
        """Returns the real base class specified by the discriminator"""
        discriminator_value = data[self.attribute_map[self.discriminator]]
        return discriminator_value if not(self.__class__.__name__ == discriminator_value) else None

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.swagger_types):
            value = getattr(self, attr)
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: x.to_dict() if hasattr(x, "to_dict") else x,
                    value
                ))
            elif hasattr(value, "to_dict"):
                result[attr] = value.to_dict()
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], item[1].to_dict())
                    if hasattr(item[1], "to_dict") else item,
                    value.items()
                ))
            else:
                result[attr] = value
        if issubclass(IlmException, dict):
            for key, value in self.items():
                result[key] = value

        return result

    def to_str(self):
        """Returns the string representation of the model"""
        return pprint.pformat(self.to_dict())

    def __repr__(self):
        """For `print` and `pprint`"""
        return self.to_str()

    def __eq__(self, other):
        """Returns true if both objects are equal"""
        if not isinstance(other, IlmException):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
