# coding: utf-8

"""
    Mux API

    Mux is how developers build online video. This API encompasses both Mux Video and Mux Data functionality to help you build your video-related projects better and faster than ever before.  # noqa: E501

    The version of the OpenAPI document: v1
    Contact: devex@mux.com
    Generated by: https://openapi-generator.tech
"""


import inspect
import pprint
import re  # noqa: F401
import six

from mux_python.configuration import Configuration


class Error(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 = {
        'id': 'int',
        'percentage': 'float',
        'notes': 'str',
        'message': 'str',
        'last_seen': 'str',
        'description': 'str',
        'count': 'int',
        'code': 'int'
    }

    attribute_map = {
        'id': 'id',
        'percentage': 'percentage',
        'notes': 'notes',
        'message': 'message',
        'last_seen': 'last_seen',
        'description': 'description',
        'count': 'count',
        'code': 'code'
    }

    def __init__(self, id=None, percentage=None, notes=None, message=None, last_seen=None, description=None, count=None, code=None, local_vars_configuration=None):  # noqa: E501
        """Error - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration.get_default_copy()
        self.local_vars_configuration = local_vars_configuration

        self._id = None
        self._percentage = None
        self._notes = None
        self._message = None
        self._last_seen = None
        self._description = None
        self._count = None
        self._code = None
        self.discriminator = None

        if id is not None:
            self.id = id
        if percentage is not None:
            self.percentage = percentage
        if notes is not None:
            self.notes = notes
        if message is not None:
            self.message = message
        if last_seen is not None:
            self.last_seen = last_seen
        if description is not None:
            self.description = description
        if count is not None:
            self.count = count
        if code is not None:
            self.code = code

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

        A unique identifier for this error.  # noqa: E501

        :return: The id of this Error.  # noqa: E501
        :rtype: int
        """
        return self._id

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

        A unique identifier for this error.  # noqa: E501

        :param id: The id of this Error.  # noqa: E501
        :type id: int
        """

        self._id = id

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

        The percentage of views that experienced this error.  # noqa: E501

        :return: The percentage of this Error.  # noqa: E501
        :rtype: float
        """
        return self._percentage

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

        The percentage of views that experienced this error.  # noqa: E501

        :param percentage: The percentage of this Error.  # noqa: E501
        :type percentage: float
        """

        self._percentage = percentage

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

        Notes that are attached to this error.  # noqa: E501

        :return: The notes of this Error.  # noqa: E501
        :rtype: str
        """
        return self._notes

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

        Notes that are attached to this error.  # noqa: E501

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

        self._notes = notes

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

        The error message.  # noqa: E501

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

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

        The error message.  # noqa: E501

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

        self._message = message

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

        The last time this error was seen (ISO 8601 timestamp).  # noqa: E501

        :return: The last_seen of this Error.  # noqa: E501
        :rtype: str
        """
        return self._last_seen

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

        The last time this error was seen (ISO 8601 timestamp).  # noqa: E501

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

        self._last_seen = last_seen

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

        Description of the error.  # noqa: E501

        :return: The description of this Error.  # noqa: E501
        :rtype: str
        """
        return self._description

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

        Description of the error.  # noqa: E501

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

        self._description = description

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

        The total number of views that experiend this error.  # noqa: E501

        :return: The count of this Error.  # noqa: E501
        :rtype: int
        """
        return self._count

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

        The total number of views that experiend this error.  # noqa: E501

        :param count: The count of this Error.  # noqa: E501
        :type count: int
        """

        self._count = count

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

        The error code  # noqa: E501

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

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

        The error code  # noqa: E501

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

        self._code = code

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

        def convert(x):
            if hasattr(x, "to_dict"):
                args = inspect.getargspec(x.to_dict).args
                if len(args) == 1:
                    return x.to_dict()
                else:
                    return x.to_dict(serialize)
            else:
                return x

        for attr, _ in six.iteritems(self.openapi_types):
            value = getattr(self, attr)
            attr = self.attribute_map.get(attr, attr) if serialize else attr
            if isinstance(value, list):
                result[attr] = list(map(
                    lambda x: convert(x),
                    value
                ))
            elif isinstance(value, dict):
                result[attr] = dict(map(
                    lambda item: (item[0], convert(item[1])),
                    value.items()
                ))
            else:
                result[attr] = convert(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()
