# coding: utf-8

"""
    Allegro REST API

    https://developer.allegro.pl/about  # noqa: E501

    OpenAPI spec version: latest
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six


class DisputeFirstMessage(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'id': 'str',
        'text': 'str',
        'attachment': 'DisputeAttachment',
        'author': 'DisputeAuthor',
        'created_at': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'text': 'text',
        'attachment': 'attachment',
        'author': 'author',
        'created_at': 'createdAt'
    }

    def __init__(self, id=None, text=None, attachment=None, author=None, created_at=None):  # noqa: E501
        """DisputeFirstMessage - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._text = None
        self._attachment = None
        self._author = None
        self._created_at = None
        self.discriminator = None

        self.id = id
        if text is not None:
            self.text = text
        if attachment is not None:
            self.attachment = attachment
        self.author = author
        self.created_at = created_at

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


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

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


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

        self._id = id

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


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

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


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

        self._text = text

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


        :return: The attachment of this DisputeFirstMessage.  # noqa: E501
        :rtype: DisputeAttachment
        """
        return self._attachment

    @attachment.setter
    def attachment(self, attachment):
        """Sets the attachment of this DisputeFirstMessage.


        :param attachment: The attachment of this DisputeFirstMessage.  # noqa: E501
        :type: DisputeAttachment
        """

        self._attachment = attachment

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


        :return: The author of this DisputeFirstMessage.  # noqa: E501
        :rtype: DisputeAuthor
        """
        return self._author

    @author.setter
    def author(self, author):
        """Sets the author of this DisputeFirstMessage.


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

        self._author = author

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


        :return: The created_at of this DisputeFirstMessage.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this DisputeFirstMessage.


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

        self._created_at = created_at

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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, DisputeFirstMessage):
            return False

        return self.__dict__ == other.__dict__

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