# coding: utf-8

"""
    Selling Partner APIs for Fulfillment Outbound

    The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.

    The version of the OpenAPI document: 2020-07-01
    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 DeliveryOffer(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 = {
        'expires_at': 'datetime',
        'date_range': 'DateRange',
        'policy': 'DeliveryPolicy',
    }

    attribute_map = {
        'expires_at': 'expiresAt',
        'date_range': 'dateRange',
        'policy': 'policy',
    }

    def __init__(self, expires_at=None, date_range=None, policy=None, _configuration=None):  # noqa: E501
        """DeliveryOffer - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._expires_at = None
        self._date_range = None
        self._policy = None
        self.discriminator = None

        if expires_at is not None:
            self.expires_at = expires_at
        if date_range is not None:
            self.date_range = date_range
        if policy is not None:
            self.policy = policy

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

        Date timestamp  # noqa: E501

        :return: The expires_at of this DeliveryOffer.  # noqa: E501
        :rtype: datetime
        """
        return self._expires_at

    @expires_at.setter
    def expires_at(self, expires_at):
        """Sets the expires_at of this DeliveryOffer.

        Date timestamp  # noqa: E501

        :param expires_at: The expires_at of this DeliveryOffer.  # noqa: E501
        :type: datetime
        """

        self._expires_at = expires_at

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


        :return: The date_range of this DeliveryOffer.  # noqa: E501
        :rtype: DateRange
        """
        return self._date_range

    @date_range.setter
    def date_range(self, date_range):
        """Sets the date_range of this DeliveryOffer.


        :param date_range: The date_range of this DeliveryOffer.  # noqa: E501
        :type: DateRange
        """

        self._date_range = date_range

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


        :return: The policy of this DeliveryOffer.  # noqa: E501
        :rtype: DeliveryPolicy
        """
        return self._policy

    @policy.setter
    def policy(self, policy):
        """Sets the policy of this DeliveryOffer.


        :param policy: The policy of this DeliveryOffer.  # noqa: E501
        :type: DeliveryPolicy
        """

        self._policy = policy

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

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