# 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.  # noqa: E501

    OpenAPI spec version: v2
    Contact: swa-api-core@amazon.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

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': 'TrackingId',
        'alternate_leg_tracking_id': 'AlternateLegTrackingId',
        '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):  # noqa: E501
        """GetTrackingResult - a model defined in Swagger"""  # noqa: E501
        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


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

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


        :param tracking_id: The tracking_id of this GetTrackingResult.  # noqa: E501
        :type: TrackingId
        """
        if 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


        :return: The alternate_leg_tracking_id of this GetTrackingResult.  # noqa: E501
        :rtype: AlternateLegTrackingId
        """
        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.


        :param alternate_leg_tracking_id: The alternate_leg_tracking_id of this GetTrackingResult.  # noqa: E501
        :type: AlternateLegTrackingId
        """
        #if 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 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 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 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.__dict__ == other.__dict__

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