# coding: utf-8

"""
    Model Management Service

    Model Management System (MMS) is a version control system for structured data. It exposes model information through RESTful web services that can be used for CRUD operations, branching, and tagging of the model repository.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from mms_python_client.models.element import Element  # noqa: F401,E501


class Rejection(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 = {
        'code': 'float',
        'id': 'str',
        'element': 'Element',
        'message': 'str',
        'severity': 'str'
    }

    attribute_map = {
        'code': 'code',
        'id': 'id',
        'element': 'element',
        'message': 'message',
        'severity': 'severity'
    }

    def __init__(self, code=None, id=None, element=None, message=None, severity=None):  # noqa: E501
        """Rejection - a model defined in Swagger"""  # noqa: E501

        self._code = None
        self._id = None
        self._element = None
        self._message = None
        self._severity = None
        self.discriminator = None

        self.code = code
        if id is not None:
            self.id = id
        if element is not None:
            self.element = element
        self.message = message
        self.severity = severity

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


        :return: The code of this Rejection.  # noqa: E501
        :rtype: float
        """
        return self._code

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


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

        self._code = code

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


        :return: The id of this Rejection.  # noqa: E501
        :rtype: str
        """
        return self._id

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


        :param id: The id of this Rejection.  # noqa: E501
        :type: str
        """

        self._id = id

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


        :return: The element of this Rejection.  # noqa: E501
        :rtype: Element
        """
        return self._element

    @element.setter
    def element(self, element):
        """Sets the element of this Rejection.


        :param element: The element of this Rejection.  # noqa: E501
        :type: Element
        """

        self._element = element

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


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

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


        :param message: The message of this Rejection.  # 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 severity(self):
        """Gets the severity of this Rejection.  # noqa: E501


        :return: The severity of this Rejection.  # noqa: E501
        :rtype: str
        """
        return self._severity

    @severity.setter
    def severity(self, severity):
        """Sets the severity of this Rejection.


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

        self._severity = severity

    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

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

        return self.__dict__ == other.__dict__

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