# coding: utf-8

"""
    Netilion API Documentation

    Welcome to the Netilion API Documentation, which provides interactive access and documentation to our REST API. Please visit our developer portal for further instructions and information: https://developer.netilion.endress.com/   # noqa: E501

    OpenAPI spec version: 01.00.00
    
    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 = {
        'type': 'str',
        'message': 'str',
        'attribute': 'str'
    }

    attribute_map = {
        'type': 'type',
        'message': 'message',
        'attribute': 'attribute'
    }

    def __init__(self, type=None, message=None, attribute=None):  # noqa: E501
        """Error - a model defined in Swagger"""  # noqa: E501
        self._type = None
        self._message = None
        self._attribute = None
        self.discriminator = None
        self.type = type
        self.message = message
        if attribute is not None:
            self.attribute = attribute

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

        The type of the error that occured. Possible types are * access_denied - access to the required resource denied * api_lockout - action would lead to an api lockout * assigned - resources has assigned resource * assigned_restriction - resource can't be deleted because of dependents * association_blank - mandatory association was blank * association_not_found - invalid reference used for relation field * association_tenant_conflict - tenant association mismatch * association_conflict - association mismatch * associations_already_added - duplicate association * associations_not_found - invalid references used for relation field * blank - mandatory field was not set * boolean_format - value is not a boolean * date_format - invalid date format for field * date_range - invalid date range * date_time_format - invalid date time format for field * date_year_month_format - invalid date/year month/year format * greater_than - value to high for numeric field * id_format - invalid format of an ID field * internal_server_error - unexpected error on server * invalid - format not allowed * invalid_input - invalid input data caused an error * invalid_enum_value - the given value is not a valid enum value * key_format - invalid key format * lockout - action would lead to a resource lockout * less_than - value to low for numeric field * missing_header - a mandatory request header is missing * missing_parameter - a mandatory request parameter is missing * not_a_number - for numerical fields * not_unique_in_scope - resource not unique in corresponding scope * number_format - wrong input for number * parameter_missing - required parameter for resource is missing * parent - resource can not be deleted cause its a parent to other resources * present - field that should not be set * quota_exceeded - file, image or asset could not be created because the subscription quota has exceeded * service_unavailable - service is currently not available * specification_not_found - specification for given key not found * specifications_not_found - specifications for given keys not found * taken - unique field is already taken * tenant_on_child - tenant parent/child conflict * too_long - length not in valid range * too_short - length not in valid range * unconfirmed - user is unconfirmed * wrong_format - invalid date format for field * wrong_length - does not match exact length  # noqa: E501

        :return: The type of this Error.  # noqa: E501
        :rtype: str
        """
        return self._type

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

        The type of the error that occured. Possible types are * access_denied - access to the required resource denied * api_lockout - action would lead to an api lockout * assigned - resources has assigned resource * assigned_restriction - resource can't be deleted because of dependents * association_blank - mandatory association was blank * association_not_found - invalid reference used for relation field * association_tenant_conflict - tenant association mismatch * association_conflict - association mismatch * associations_already_added - duplicate association * associations_not_found - invalid references used for relation field * blank - mandatory field was not set * boolean_format - value is not a boolean * date_format - invalid date format for field * date_range - invalid date range * date_time_format - invalid date time format for field * date_year_month_format - invalid date/year month/year format * greater_than - value to high for numeric field * id_format - invalid format of an ID field * internal_server_error - unexpected error on server * invalid - format not allowed * invalid_input - invalid input data caused an error * invalid_enum_value - the given value is not a valid enum value * key_format - invalid key format * lockout - action would lead to a resource lockout * less_than - value to low for numeric field * missing_header - a mandatory request header is missing * missing_parameter - a mandatory request parameter is missing * not_a_number - for numerical fields * not_unique_in_scope - resource not unique in corresponding scope * number_format - wrong input for number * parameter_missing - required parameter for resource is missing * parent - resource can not be deleted cause its a parent to other resources * present - field that should not be set * quota_exceeded - file, image or asset could not be created because the subscription quota has exceeded * service_unavailable - service is currently not available * specification_not_found - specification for given key not found * specifications_not_found - specifications for given keys not found * taken - unique field is already taken * tenant_on_child - tenant parent/child conflict * too_long - length not in valid range * too_short - length not in valid range * unconfirmed - user is unconfirmed * wrong_format - invalid date format for field * wrong_length - does not match exact length  # noqa: E501

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

        self._type = type

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

        readable message about the error  # 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.

        readable message about the error  # noqa: E501

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

        self._message = message

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

        the attribute on which the error occured. This could be used to figure out which field was invalid. Is also set for relation attributes with faulty references  # noqa: E501

        :return: The attribute of this Error.  # noqa: E501
        :rtype: str
        """
        return self._attribute

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

        the attribute on which the error occured. This could be used to figure out which field was invalid. Is also set for relation attributes with faulty references  # noqa: E501

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

        self._attribute = attribute

    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
