# coding: utf-8

"""
    CMS Contribution API

    The CMS Contribution API allows access and modification of Lumapps contents.   # noqa: E501

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

import pprint
import re  # noqa: F401

import six


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 = {
        "links": "ErrorLinks",
        "status": "str",
        "code": "str",
        "title": "str",
        "detail": "str",
        "source": "ErrorSource",
        "meta": "str",
    }

    attribute_map = {
        "links": "links",
        "status": "status",
        "code": "code",
        "title": "title",
        "detail": "detail",
        "source": "source",
        "meta": "meta",
    }

    def __init__(
        self,
        links=None,
        status=None,
        code=None,
        title=None,
        detail=None,
        source=None,
        meta=None,
    ):  # noqa: E501
        """Error - a model defined in Swagger"""  # noqa: E501
        self._links = None
        self._status = None
        self._code = None
        self._title = None
        self._detail = None
        self._source = None
        self._meta = None
        self.discriminator = None
        if links is not None:
            self.links = links
        if status is not None:
            self.status = status
        self.code = code
        self.title = title
        self.detail = detail
        if source is not None:
            self.source = source
        if meta is not None:
            self.meta = meta

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


        :return: The links of this Error.  # noqa: E501
        :rtype: ErrorLinks
        """
        return self._links

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


        :param links: The links of this Error.  # noqa: E501
        :type: ErrorLinks
        """

        self._links = links

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

        The HTTP status code applicable to this problem, expressed as an integer value. Only provided if useful.   # noqa: E501

        :return: The status of this Error.  # noqa: E501
        :rtype: str
        """
        return self._status

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

        The HTTP status code applicable to this problem, expressed as an integer value. Only provided if useful.   # noqa: E501

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

        self._status = status

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

        An application-specific error code, expressed as a string value.   # noqa: E501

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

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

        An application-specific error code, expressed as a string value.   # noqa: E501

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

        self._code = code

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

        A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.   # noqa: E501

        :return: The title of this Error.  # noqa: E501
        :rtype: str
        """
        return self._title

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

        A short, human-readable summary of the problem that SHOULD NOT change from occurrence to occurrence of the problem, except for purposes of localization.   # noqa: E501

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

        self._title = title

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

        A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.   # noqa: E501

        :return: The detail of this Error.  # noqa: E501
        :rtype: str
        """
        return self._detail

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

        A human-readable explanation specific to this occurrence of the problem. Like title, this field’s value can be localized.   # noqa: E501

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

        self._detail = detail

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


        :return: The source of this Error.  # noqa: E501
        :rtype: ErrorSource
        """
        return self._source

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


        :param source: The source of this Error.  # noqa: E501
        :type: ErrorSource
        """

        self._source = source

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

        A meta object containing non-standard meta-information about the error.  # noqa: E501

        :return: The meta of this Error.  # noqa: E501
        :rtype: str
        """
        return self._meta

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

        A meta object containing non-standard meta-information about the error.  # noqa: E501

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

        self._meta = meta

    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.__dict__ == other.__dict__

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