# coding: utf-8

"""
    DotAAS Part 2 | HTTP/REST | Entire API Collection

    All APIs of the Specification of the [Specification of the Asset Administration Shell: Part 2](http://industrialdigitaltwin.org/en/content-hub) in one collection. Please not that this API is not intended to generate productive code but only for overview purposes.   Publisher: Industrial Digital Twin Association (IDTA) 2023\"  # noqa: E501

    OpenAPI spec version: V3.0.1
    Contact: info@idtwin.org
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Message(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': 'str',
        'correlation_id': 'str',
        'message_type': 'str',
        'text': 'str',
        'timestamp': 'str'
    }

    attribute_map = {
        'code': 'code',
        'correlation_id': 'correlationId',
        'message_type': 'messageType',
        'text': 'text',
        'timestamp': 'timestamp'
    }

    def __init__(self, code=None, correlation_id=None, message_type=None, text=None, timestamp=None):  # noqa: E501
        """Message - a model defined in Swagger"""  # noqa: E501
        self._code = None
        self._correlation_id = None
        self._message_type = None
        self._text = None
        self._timestamp = None
        self.discriminator = None
        if code is not None:
            self.code = code
        if correlation_id is not None:
            self.correlation_id = correlation_id
        if message_type is not None:
            self.message_type = message_type
        if text is not None:
            self.text = text
        if timestamp is not None:
            self.timestamp = timestamp

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


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

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


        :param code: The code of this Message.  # noqa: E501
        :type: str
        """

        self._code = code

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


        :return: The correlation_id of this Message.  # noqa: E501
        :rtype: str
        """
        return self._correlation_id

    @correlation_id.setter
    def correlation_id(self, correlation_id):
        """Sets the correlation_id of this Message.


        :param correlation_id: The correlation_id of this Message.  # noqa: E501
        :type: str
        """

        self._correlation_id = correlation_id

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


        :return: The message_type of this Message.  # noqa: E501
        :rtype: str
        """
        return self._message_type

    @message_type.setter
    def message_type(self, message_type):
        """Sets the message_type of this Message.


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

        self._message_type = message_type

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


        :return: The text of this Message.  # noqa: E501
        :rtype: str
        """
        return self._text

    @text.setter
    def text(self, text):
        """Sets the text of this Message.


        :param text: The text of this Message.  # noqa: E501
        :type: str
        """

        self._text = text

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


        :return: The timestamp of this Message.  # noqa: E501
        :rtype: str
        """
        return self._timestamp

    @timestamp.setter
    def timestamp(self, timestamp):
        """Sets the timestamp of this Message.


        :param timestamp: The timestamp of this Message.  # noqa: E501
        :type: str
        """

        self._timestamp = timestamp

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

        return self.__dict__ == other.__dict__

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