# coding: utf-8

"""
    Laserfiche API

    Welcome to the Laserfiche API Swagger Playground. You can try out any of our API calls against your live Laserfiche Cloud account. Visit the developer center for more details: <a href=\"https://developer.laserfiche.com\">https://developer.laserfiche.com</a><p><strong>Build# : </strong>561590</p>  # noqa: E501

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

import pprint
import re  # noqa: F401

import six

class APIServerException(object):
    """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 = {
        'operation_id': 'str',
        'message': 'str',
        'error_code': 'int',
        'error_class': 'str',
        'status_code': 'int',
        'error_source': 'str'
    }

    attribute_map = {
        'operation_id': 'operationId',
        'message': 'message',
        'error_code': 'errorCode',
        'error_class': 'errorClass',
        'status_code': 'statusCode',
        'error_source': 'errorSource'
    }

    def __init__(self, operation_id=None, message=None, error_code=None, error_class=None, status_code=None, error_source=None):  # noqa: E501
        """APIServerException - a model defined in Swagger"""  # noqa: E501
        self._operation_id = None
        self._message = None
        self._error_code = None
        self._error_class = None
        self._status_code = None
        self._error_source = None
        self.discriminator = None
        if operation_id is not None:
            self.operation_id = operation_id
        if message is not None:
            self.message = message
        if error_code is not None:
            self.error_code = error_code
        if error_class is not None:
            self.error_class = error_class
        if status_code is not None:
            self.status_code = status_code
        if error_source is not None:
            self.error_source = error_source

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

        The id of the operation that threw the exception.  # noqa: E501

        :return: The operation_id of this APIServerException.  # noqa: E501
        :rtype: str
        """
        return self._operation_id

    @operation_id.setter
    def operation_id(self, operation_id):
        """Sets the operation_id of this APIServerException.

        The id of the operation that threw the exception.  # noqa: E501

        :param operation_id: The operation_id of this APIServerException.  # noqa: E501
        :type: str
        """

        self._operation_id = operation_id

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

        The explaination of the exception that occurred.  # noqa: E501

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

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

        The explaination of the exception that occurred.  # noqa: E501

        :param message: The message of this APIServerException.  # noqa: E501
        :type: str
        """

        self._message = message

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

        The code associated with the exception.  # noqa: E501

        :return: The error_code of this APIServerException.  # noqa: E501
        :rtype: int
        """
        return self._error_code

    @error_code.setter
    def error_code(self, error_code):
        """Sets the error_code of this APIServerException.

        The code associated with the exception.  # noqa: E501

        :param error_code: The error_code of this APIServerException.  # noqa: E501
        :type: int
        """

        self._error_code = error_code

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

        The class of exceptions this belongs to.  # noqa: E501

        :return: The error_class of this APIServerException.  # noqa: E501
        :rtype: str
        """
        return self._error_class

    @error_class.setter
    def error_class(self, error_class):
        """Sets the error_class of this APIServerException.

        The class of exceptions this belongs to.  # noqa: E501

        :param error_class: The error_class of this APIServerException.  # noqa: E501
        :type: str
        """

        self._error_class = error_class

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

        The HTTP status code returned.  # noqa: E501

        :return: The status_code of this APIServerException.  # noqa: E501
        :rtype: int
        """
        return self._status_code

    @status_code.setter
    def status_code(self, status_code):
        """Sets the status_code of this APIServerException.

        The HTTP status code returned.  # noqa: E501

        :param status_code: The status_code of this APIServerException.  # noqa: E501
        :type: int
        """

        self._status_code = status_code

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

        The source of where the exception occurred.  # noqa: E501

        :return: The error_source of this APIServerException.  # noqa: E501
        :rtype: str
        """
        return self._error_source

    @error_source.setter
    def error_source(self, error_source):
        """Sets the error_source of this APIServerException.

        The source of where the exception occurred.  # noqa: E501

        :param error_source: The error_source of this APIServerException.  # noqa: E501
        :type: str
        """

        self._error_source = error_source

    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(APIServerException, 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, APIServerException):
            return False

        return self.__dict__ == other.__dict__

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