# coding: utf-8

"""
    Cyclos 4.11.5 API

    The REST API for Cyclos 4.11.5  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from swagger_client.configuration import Configuration


class Error(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 = {
        'kind': 'ErrorKind',
        'exception_type': 'str',
        'exception_message': 'str'
    }

    attribute_map = {
        'kind': 'kind',
        'exception_type': 'exceptionType',
        'exception_message': 'exceptionMessage'
    }

    def __init__(self, kind=None, exception_type=None, exception_message=None, _configuration=None):  # noqa: E501
        """Error - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._kind = None
        self._exception_type = None
        self._exception_message = None
        self.discriminator = None

        if kind is not None:
            self.kind = kind
        self.exception_type = exception_type
        if exception_message is not None:
            self.exception_message = exception_message

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

        Error types associated to the HTTP Status 500 Possible values are: * buyVoucher: An error has occurred when buying a voucher  * forgottenPassword: An error has occurred when changing a forgotten password. * general: An unexpected error has occurred * initializeNfc: An error has occurred when initializing a NFC token * nested: An error which has another internal error at a given property / index * nfcAuth: An error has occurred when making an external NFC authentication * otp: An error has occurred requesting an OTP * payment: An error has occurred when making a payment * personalizeNfc: An error has occurred when personalizing a NFC token * pos: An error has occurred when receiving a payment on a POS operation * redeemVoucher: An error has occurred when redeeming a voucher * shoppingCart: An error has occurred when interacting with a shopping cart. * shoppingCartCheckout: An error has occurred when checking out a shopping cart.   # noqa: E501

        :return: The kind of this Error.  # noqa: E501
        :rtype: ErrorKind
        """
        return self._kind

    @kind.setter
    def kind(self, kind):
        """Sets the kind of this Error.

        Error types associated to the HTTP Status 500 Possible values are: * buyVoucher: An error has occurred when buying a voucher  * forgottenPassword: An error has occurred when changing a forgotten password. * general: An unexpected error has occurred * initializeNfc: An error has occurred when initializing a NFC token * nested: An error which has another internal error at a given property / index * nfcAuth: An error has occurred when making an external NFC authentication * otp: An error has occurred requesting an OTP * payment: An error has occurred when making a payment * personalizeNfc: An error has occurred when personalizing a NFC token * pos: An error has occurred when receiving a payment on a POS operation * redeemVoucher: An error has occurred when redeeming a voucher * shoppingCart: An error has occurred when interacting with a shopping cart. * shoppingCartCheckout: An error has occurred when checking out a shopping cart.   # noqa: E501

        :param kind: The kind of this Error.  # noqa: E501
        :type: ErrorKind
        """

        self._kind = kind

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

        The server exception class name (not intended to be shown to  final users. Only for logging purposes)   # noqa: E501

        :return: The exception_type of this Error.  # noqa: E501
        :rtype: str
        """
        return self._exception_type

    @exception_type.setter
    def exception_type(self, exception_type):
        """Sets the exception_type of this Error.

        The server exception class name (not intended to be shown to  final users. Only for logging purposes)   # noqa: E501

        :param exception_type: The exception_type of this Error.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and exception_type is None:
            raise ValueError("Invalid value for `exception_type`, must not be `None`")  # noqa: E501

        self._exception_type = exception_type

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

        The server exception message (not intended to be shown to  final users. Only for logging purposes)   # noqa: E501

        :return: The exception_message of this Error.  # noqa: E501
        :rtype: str
        """
        return self._exception_message

    @exception_message.setter
    def exception_message(self, exception_message):
        """Sets the exception_message of this Error.

        The server exception message (not intended to be shown to  final users. Only for logging purposes)   # noqa: E501

        :param exception_message: The exception_message of this Error.  # noqa: E501
        :type: str
        """

        self._exception_message = exception_message

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
