# 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 GetTrackingResult(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 = {
        'tracking_id': 'str',
        'alternate_leg_tracking_id': 'str',
        'event_history': 'List[Event]',
        'promised_delivery_date': 'datetime',
        'summary': 'TrackingSummary',
    }

    attribute_map = {
        'tracking_id': 'trackingId',
        'alternate_leg_tracking_id': 'alternateLegTrackingId',
        'event_history': 'eventHistory',
        'promised_delivery_date': 'promisedDeliveryDate',
        'summary': 'summary',
    }

    def __init__(self, tracking_id=None, alternate_leg_tracking_id=None, event_history=None, promised_delivery_date=None, summary=None, _configuration=None):  # noqa: E501
        """GetTrackingResult - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._tracking_id = None
        self._alternate_leg_tracking_id = None
        self._event_history = None
        self._promised_delivery_date = None
        self._summary = None
        self.discriminator = None

        self.tracking_id = tracking_id
        self.alternate_leg_tracking_id = alternate_leg_tracking_id
        self.event_history = event_history
        self.promised_delivery_date = promised_delivery_date
        self.summary = summary

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

        The carrier generated identifier for a package in a purchased shipment.  # noqa: E501

        :return: The tracking_id of this GetTrackingResult.  # noqa: E501
        :rtype: str
        """
        return self._tracking_id

    @tracking_id.setter
    def tracking_id(self, tracking_id):
        """Sets the tracking_id of this GetTrackingResult.

        The carrier generated identifier for a package in a purchased shipment.  # noqa: E501

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

        self._tracking_id = tracking_id

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

        The carrier generated reverse identifier for a returned package in a purchased shipment.  # noqa: E501

        :return: The alternate_leg_tracking_id of this GetTrackingResult.  # noqa: E501
        :rtype: str
        """
        return self._alternate_leg_tracking_id

    @alternate_leg_tracking_id.setter
    def alternate_leg_tracking_id(self, alternate_leg_tracking_id):
        """Sets the alternate_leg_tracking_id of this GetTrackingResult.

        The carrier generated reverse identifier for a returned package in a purchased shipment.  # noqa: E501

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

        self._alternate_leg_tracking_id = alternate_leg_tracking_id

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

        A list of tracking events.  # noqa: E501

        :return: The event_history of this GetTrackingResult.  # noqa: E501
        :rtype: List[Event]
        """
        return self._event_history

    @event_history.setter
    def event_history(self, event_history):
        """Sets the event_history of this GetTrackingResult.

        A list of tracking events.  # noqa: E501

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

        self._event_history = event_history

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

        The date and time by which the shipment is promised to be delivered.  # noqa: E501

        :return: The promised_delivery_date of this GetTrackingResult.  # noqa: E501
        :rtype: datetime
        """
        return self._promised_delivery_date

    @promised_delivery_date.setter
    def promised_delivery_date(self, promised_delivery_date):
        """Sets the promised_delivery_date of this GetTrackingResult.

        The date and time by which the shipment is promised to be delivered.  # noqa: E501

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

        self._promised_delivery_date = promised_delivery_date

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


        :return: The summary of this GetTrackingResult.  # noqa: E501
        :rtype: TrackingSummary
        """
        return self._summary

    @summary.setter
    def summary(self, summary):
        """Sets the summary of this GetTrackingResult.


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

        self._summary = summary

    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(GetTrackingResult, 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, GetTrackingResult):
            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, GetTrackingResult):
            return True

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