# 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 OrderEvent(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',
        'order': 'OrderEventData',
        'type': 'CheckoutFormStatus',
        'occurred_at': 'datetime'
    }

    attribute_map = {
        'id': 'id',
        'order': 'order',
        'type': 'type',
        'occurred_at': 'occurredAt'
    }

    def __init__(self, id=None, order=None, type=None, occurred_at=None):  # noqa: E501
        """OrderEvent - a model defined in OpenAPI"""  # noqa: E501

        self._id = None
        self._order = None
        self._type = None
        self._occurred_at = None
        self.discriminator = None

        self.id = id
        self.order = order
        self.type = type
        self.occurred_at = occurred_at

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

        event id  # noqa: E501

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

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

        event id  # noqa: E501

        :param id: The id of this OrderEvent.  # 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 order(self):
        """Gets the order of this OrderEvent.  # noqa: E501


        :return: The order of this OrderEvent.  # noqa: E501
        :rtype: OrderEventData
        """
        return self._order

    @order.setter
    def order(self, order):
        """Sets the order of this OrderEvent.


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

        self._order = order

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


        :return: The type of this OrderEvent.  # noqa: E501
        :rtype: CheckoutFormStatus
        """
        return self._type

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


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

        self._type = type

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

        Date when the event occurred  # noqa: E501

        :return: The occurred_at of this OrderEvent.  # noqa: E501
        :rtype: datetime
        """
        return self._occurred_at

    @occurred_at.setter
    def occurred_at(self, occurred_at):
        """Sets the occurred_at of this OrderEvent.

        Date when the event occurred  # noqa: E501

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

        self._occurred_at = occurred_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, OrderEvent):
            return False

        return self.__dict__ == other.__dict__

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