# coding: utf-8

"""
    Amazon Shipping API

    The Amazon Shipping API is designed to support outbound shipping use cases both for orders originating on Amazon-owned marketplaces as well as external channels/marketplaces. With these APIs, you can request shipping rates, create shipments, cancel shipments, and track shipments.

    The version of the OpenAPI document: v2
    Contact: swa-api-core@amazon.com
    Generated by OpenAPI Generator (https://openapi-generator.tech)

    Do not edit the class manually.
"""  # noqa: E501


import pprint
import re  # noqa: F401

import six

from spapi.configuration import Configuration


class Event(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 = {
        'event_code': 'EventCode',
        'location': 'Location',
        'event_time': 'datetime',
        'shipment_type': 'ShipmentType',
    }

    attribute_map = {
        'event_code': 'eventCode',
        'location': 'location',
        'event_time': 'eventTime',
        'shipment_type': 'shipmentType',
    }

    def __init__(self, event_code=None, location=None, event_time=None, shipment_type=None, _configuration=None):  # noqa: E501
        """Event - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._event_code = None
        self._location = None
        self._event_time = None
        self._shipment_type = None
        self.discriminator = None

        self.event_code = event_code
        if location is not None:
            self.location = location
        self.event_time = event_time
        if shipment_type is not None:
            self.shipment_type = shipment_type

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


        :return: The event_code of this Event.  # noqa: E501
        :rtype: EventCode
        """
        return self._event_code

    @event_code.setter
    def event_code(self, event_code):
        """Sets the event_code of this Event.


        :param event_code: The event_code of this Event.  # noqa: E501
        :type: EventCode
        """
        if self._configuration.client_side_validation and event_code is None:
            raise ValueError("Invalid value for `event_code`, must not be `None`")  # noqa: E501

        self._event_code = event_code

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


        :return: The location of this Event.  # noqa: E501
        :rtype: Location
        """
        return self._location

    @location.setter
    def location(self, location):
        """Sets the location of this Event.


        :param location: The location of this Event.  # noqa: E501
        :type: Location
        """

        self._location = location

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

        The ISO 8601 formatted timestamp of the event.  # noqa: E501

        :return: The event_time of this Event.  # noqa: E501
        :rtype: datetime
        """
        return self._event_time

    @event_time.setter
    def event_time(self, event_time):
        """Sets the event_time of this Event.

        The ISO 8601 formatted timestamp of the event.  # noqa: E501

        :param event_time: The event_time of this Event.  # noqa: E501
        :type: datetime
        """
        if self._configuration.client_side_validation and event_time is None:
            raise ValueError("Invalid value for `event_time`, must not be `None`")  # noqa: E501

        self._event_time = event_time

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


        :return: The shipment_type of this Event.  # noqa: E501
        :rtype: ShipmentType
        """
        return self._shipment_type

    @shipment_type.setter
    def shipment_type(self, shipment_type):
        """Sets the shipment_type of this Event.


        :param shipment_type: The shipment_type of this Event.  # noqa: E501
        :type: ShipmentType
        """

        self._shipment_type = shipment_type

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

        return self.to_dict() == other.to_dict()

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

        return self.to_dict() != other.to_dict()
