# coding: utf-8

"""
    AssistedInstall

    Assisted installation  # noqa: E501

    OpenAPI spec version: 1.0.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 = {
        'kind': 'str',
        'id': 'int',
        'href': 'str',
        'code': 'str',
        'reason': 'str'
    }

    attribute_map = {
        'kind': 'kind',
        'id': 'id',
        'href': 'href',
        'code': 'code',
        'reason': 'reason'
    }

    def __init__(self, kind=None, id=None, href=None, code=None, reason=None):  # noqa: E501
        """Error - a model defined in Swagger"""  # noqa: E501

        self._kind = None
        self._id = None
        self._href = None
        self._code = None
        self._reason = None
        self.discriminator = None

        self.kind = kind
        self.id = id
        self.href = href
        self.code = code
        self.reason = reason

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

        Indicates the type of this object. Will always be 'Error'.  # noqa: E501

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

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

        Indicates the type of this object. Will always be 'Error'.  # noqa: E501

        :param kind: The kind of this Error.  # noqa: E501
        :type: str
        """
        if kind is None:
            raise ValueError("Invalid value for `kind`, must not be `None`")  # noqa: E501
        allowed_values = ["Error"]  # noqa: E501
        if kind not in allowed_values:
            raise ValueError(
                "Invalid value for `kind` ({0}), must be one of {1}"  # noqa: E501
                .format(kind, allowed_values)
            )

        self._kind = kind

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

        Numeric identifier of the 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.

        Numeric identifier of the error.  # noqa: E501

        :param id: The id of this Error.  # noqa: E501
        :type: int
        """
        if id is None:
            raise ValueError("Invalid value for `id`, must not be `None`")  # noqa: E501
        if id is not None and id > 504:  # noqa: E501
            raise ValueError("Invalid value for `id`, must be a value less than or equal to `504`")  # noqa: E501
        if id is not None and id < 400:  # noqa: E501
            raise ValueError("Invalid value for `id`, must be a value greater than or equal to `400`")  # noqa: E501

        self._id = id

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

        Self link.  # noqa: E501

        :return: The href of this Error.  # noqa: E501
        :rtype: str
        """
        return self._href

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

        Self link.  # noqa: E501

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

        self._href = href

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

        Globally unique code of the error, composed of the unique identifier of the API and the numeric identifier of the error. For example, if the numeric identifier of the error is 93 and the identifier of the API is assisted_install then the code will be ASSISTED-INSTALL-93.  # 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.

        Globally unique code of the error, composed of the unique identifier of the API and the numeric identifier of the error. For example, if the numeric identifier of the error is 93 and the identifier of the API is assisted_install then the code will be ASSISTED-INSTALL-93.  # 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 reason(self):
        """Gets the reason of this Error.  # noqa: E501

        Human-readable description of the error.  # noqa: E501

        :return: The reason of this Error.  # noqa: E501
        :rtype: str
        """
        return self._reason

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

        Human-readable description of the error.  # noqa: E501

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

        self._reason = reason

    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
