# coding: utf-8

"""
    Python SDK for Opsgenie REST API

    Python SDK for Opsgenie REST API  # noqa: E501

    The version of the OpenAPI document: 2.0.0
    Contact: support@opsgenie.com
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class ErrorResponse(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'request_id': 'str',
        'took': 'float',
        'message': 'str',
        'code': 'int',
        'response_headers': 'dict(str, list[str])'
    }

    attribute_map = {
        'request_id': 'requestId',
        'took': 'took',
        'message': 'message',
        'code': 'code',
        'response_headers': 'responseHeaders'
    }

    def __init__(self, request_id=None, took=0.0, message=None, code=None, response_headers=None):  # noqa: E501
        """ErrorResponse - a model defined in OpenAPI"""  # noqa: E501

        self._request_id = None
        self._took = None
        self._message = None
        self._code = None
        self._response_headers = None
        self.discriminator = None

        self.request_id = request_id
        self.took = took
        if message is not None:
            self.message = message
        if code is not None:
            self.code = code
        if response_headers is not None:
            self.response_headers = response_headers

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


        :return: The request_id of this ErrorResponse.  # noqa: E501
        :rtype: str
        """
        return self._request_id

    @request_id.setter
    def request_id(self, request_id):
        """Sets the request_id of this ErrorResponse.


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

        self._request_id = request_id

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


        :return: The took of this ErrorResponse.  # noqa: E501
        :rtype: float
        """
        return self._took

    @took.setter
    def took(self, took):
        """Sets the took of this ErrorResponse.


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

        self._took = took

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


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

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


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

        self._message = message

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


        :return: The code of this ErrorResponse.  # noqa: E501
        :rtype: int
        """
        return self._code

    @code.setter
    def code(self, code):
        """Sets the code of this ErrorResponse.


        :param code: The code of this ErrorResponse.  # noqa: E501
        :type: int
        """

        self._code = code

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


        :return: The response_headers of this ErrorResponse.  # noqa: E501
        :rtype: dict(str, list[str])
        """
        return self._response_headers

    @response_headers.setter
    def response_headers(self, response_headers):
        """Sets the response_headers of this ErrorResponse.


        :param response_headers: The response_headers of this ErrorResponse.  # noqa: E501
        :type: dict(str, list[str])
        """

        self._response_headers = response_headers

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

        for attr, _ in six.iteritems(self.openapi_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

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

        return self.__dict__ == other.__dict__

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