# 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 FulfillmentOrder(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 = {
        'seller_fulfillment_order_id': 'str',
        'marketplace_id': 'str',
        'displayable_order_id': 'str',
        'displayable_order_date': 'datetime',
        'displayable_order_comment': 'str',
        'shipping_speed_category': 'ShippingSpeedCategory',
        'delivery_window': 'DeliveryWindow',
        'destination_address': 'Address',
        'fulfillment_action': 'FulfillmentAction',
        'fulfillment_policy': 'FulfillmentPolicy',
        'cod_settings': 'CODSettings',
        'received_date': 'datetime',
        'fulfillment_order_status': 'FulfillmentOrderStatus',
        'status_updated_date': 'datetime',
        'notification_emails': 'List[str]',
        'feature_constraints': 'List[FeatureSettings]',
    }

    attribute_map = {
        'seller_fulfillment_order_id': 'sellerFulfillmentOrderId',
        'marketplace_id': 'marketplaceId',
        'displayable_order_id': 'displayableOrderId',
        'displayable_order_date': 'displayableOrderDate',
        'displayable_order_comment': 'displayableOrderComment',
        'shipping_speed_category': 'shippingSpeedCategory',
        'delivery_window': 'deliveryWindow',
        'destination_address': 'destinationAddress',
        'fulfillment_action': 'fulfillmentAction',
        'fulfillment_policy': 'fulfillmentPolicy',
        'cod_settings': 'codSettings',
        'received_date': 'receivedDate',
        'fulfillment_order_status': 'fulfillmentOrderStatus',
        'status_updated_date': 'statusUpdatedDate',
        'notification_emails': 'notificationEmails',
        'feature_constraints': 'featureConstraints',
    }

    def __init__(self, seller_fulfillment_order_id=None, marketplace_id=None, displayable_order_id=None, displayable_order_date=None, displayable_order_comment=None, shipping_speed_category=None, delivery_window=None, destination_address=None, fulfillment_action=None, fulfillment_policy=None, cod_settings=None, received_date=None, fulfillment_order_status=None, status_updated_date=None, notification_emails=None, feature_constraints=None, _configuration=None):  # noqa: E501
        """FulfillmentOrder - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._seller_fulfillment_order_id = None
        self._marketplace_id = None
        self._displayable_order_id = None
        self._displayable_order_date = None
        self._displayable_order_comment = None
        self._shipping_speed_category = None
        self._delivery_window = None
        self._destination_address = None
        self._fulfillment_action = None
        self._fulfillment_policy = None
        self._cod_settings = None
        self._received_date = None
        self._fulfillment_order_status = None
        self._status_updated_date = None
        self._notification_emails = None
        self._feature_constraints = None
        self.discriminator = None

        self.seller_fulfillment_order_id = seller_fulfillment_order_id
        self.marketplace_id = marketplace_id
        self.displayable_order_id = displayable_order_id
        self.displayable_order_date = displayable_order_date
        self.displayable_order_comment = displayable_order_comment
        self.shipping_speed_category = shipping_speed_category
        if delivery_window is not None:
            self.delivery_window = delivery_window
        self.destination_address = destination_address
        if fulfillment_action is not None:
            self.fulfillment_action = fulfillment_action
        if fulfillment_policy is not None:
            self.fulfillment_policy = fulfillment_policy
        if cod_settings is not None:
            self.cod_settings = cod_settings
        self.received_date = received_date
        self.fulfillment_order_status = fulfillment_order_status
        self.status_updated_date = status_updated_date
        if notification_emails is not None:
            self.notification_emails = notification_emails
        if feature_constraints is not None:
            self.feature_constraints = feature_constraints

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

        The fulfillment order identifier submitted with the `createFulfillmentOrder` operation.  # noqa: E501

        :return: The seller_fulfillment_order_id of this FulfillmentOrder.  # noqa: E501
        :rtype: str
        """
        return self._seller_fulfillment_order_id

    @seller_fulfillment_order_id.setter
    def seller_fulfillment_order_id(self, seller_fulfillment_order_id):
        """Sets the seller_fulfillment_order_id of this FulfillmentOrder.

        The fulfillment order identifier submitted with the `createFulfillmentOrder` operation.  # noqa: E501

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

        self._seller_fulfillment_order_id = seller_fulfillment_order_id

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

        The identifier for the marketplace the fulfillment order is placed against.  # noqa: E501

        :return: The marketplace_id of this FulfillmentOrder.  # noqa: E501
        :rtype: str
        """
        return self._marketplace_id

    @marketplace_id.setter
    def marketplace_id(self, marketplace_id):
        """Sets the marketplace_id of this FulfillmentOrder.

        The identifier for the marketplace the fulfillment order is placed against.  # noqa: E501

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

        self._marketplace_id = marketplace_id

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

        A fulfillment order identifier submitted with the `createFulfillmentOrder` operation. Displays as the order identifier in recipient-facing materials such as the packing slip.  # noqa: E501

        :return: The displayable_order_id of this FulfillmentOrder.  # noqa: E501
        :rtype: str
        """
        return self._displayable_order_id

    @displayable_order_id.setter
    def displayable_order_id(self, displayable_order_id):
        """Sets the displayable_order_id of this FulfillmentOrder.

        A fulfillment order identifier submitted with the `createFulfillmentOrder` operation. Displays as the order identifier in recipient-facing materials such as the packing slip.  # noqa: E501

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

        self._displayable_order_id = displayable_order_id

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

        Date timestamp  # noqa: E501

        :return: The displayable_order_date of this FulfillmentOrder.  # noqa: E501
        :rtype: datetime
        """
        return self._displayable_order_date

    @displayable_order_date.setter
    def displayable_order_date(self, displayable_order_date):
        """Sets the displayable_order_date of this FulfillmentOrder.

        Date timestamp  # noqa: E501

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

        self._displayable_order_date = displayable_order_date

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

        A text block submitted with the `createFulfillmentOrder` operation. Displays in recipient-facing materials such as the packing slip.  # noqa: E501

        :return: The displayable_order_comment of this FulfillmentOrder.  # noqa: E501
        :rtype: str
        """
        return self._displayable_order_comment

    @displayable_order_comment.setter
    def displayable_order_comment(self, displayable_order_comment):
        """Sets the displayable_order_comment of this FulfillmentOrder.

        A text block submitted with the `createFulfillmentOrder` operation. Displays in recipient-facing materials such as the packing slip.  # noqa: E501

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

        self._displayable_order_comment = displayable_order_comment

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


        :return: The shipping_speed_category of this FulfillmentOrder.  # noqa: E501
        :rtype: ShippingSpeedCategory
        """
        return self._shipping_speed_category

    @shipping_speed_category.setter
    def shipping_speed_category(self, shipping_speed_category):
        """Sets the shipping_speed_category of this FulfillmentOrder.


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

        self._shipping_speed_category = shipping_speed_category

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


        :return: The delivery_window of this FulfillmentOrder.  # noqa: E501
        :rtype: DeliveryWindow
        """
        return self._delivery_window

    @delivery_window.setter
    def delivery_window(self, delivery_window):
        """Sets the delivery_window of this FulfillmentOrder.


        :param delivery_window: The delivery_window of this FulfillmentOrder.  # noqa: E501
        :type: DeliveryWindow
        """

        self._delivery_window = delivery_window

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


        :return: The destination_address of this FulfillmentOrder.  # noqa: E501
        :rtype: Address
        """
        return self._destination_address

    @destination_address.setter
    def destination_address(self, destination_address):
        """Sets the destination_address of this FulfillmentOrder.


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

        self._destination_address = destination_address

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


        :return: The fulfillment_action of this FulfillmentOrder.  # noqa: E501
        :rtype: FulfillmentAction
        """
        return self._fulfillment_action

    @fulfillment_action.setter
    def fulfillment_action(self, fulfillment_action):
        """Sets the fulfillment_action of this FulfillmentOrder.


        :param fulfillment_action: The fulfillment_action of this FulfillmentOrder.  # noqa: E501
        :type: FulfillmentAction
        """

        self._fulfillment_action = fulfillment_action

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


        :return: The fulfillment_policy of this FulfillmentOrder.  # noqa: E501
        :rtype: FulfillmentPolicy
        """
        return self._fulfillment_policy

    @fulfillment_policy.setter
    def fulfillment_policy(self, fulfillment_policy):
        """Sets the fulfillment_policy of this FulfillmentOrder.


        :param fulfillment_policy: The fulfillment_policy of this FulfillmentOrder.  # noqa: E501
        :type: FulfillmentPolicy
        """

        self._fulfillment_policy = fulfillment_policy

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


        :return: The cod_settings of this FulfillmentOrder.  # noqa: E501
        :rtype: CODSettings
        """
        return self._cod_settings

    @cod_settings.setter
    def cod_settings(self, cod_settings):
        """Sets the cod_settings of this FulfillmentOrder.


        :param cod_settings: The cod_settings of this FulfillmentOrder.  # noqa: E501
        :type: CODSettings
        """

        self._cod_settings = cod_settings

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

        Date timestamp  # noqa: E501

        :return: The received_date of this FulfillmentOrder.  # noqa: E501
        :rtype: datetime
        """
        return self._received_date

    @received_date.setter
    def received_date(self, received_date):
        """Sets the received_date of this FulfillmentOrder.

        Date timestamp  # noqa: E501

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

        self._received_date = received_date

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


        :return: The fulfillment_order_status of this FulfillmentOrder.  # noqa: E501
        :rtype: FulfillmentOrderStatus
        """
        return self._fulfillment_order_status

    @fulfillment_order_status.setter
    def fulfillment_order_status(self, fulfillment_order_status):
        """Sets the fulfillment_order_status of this FulfillmentOrder.


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

        self._fulfillment_order_status = fulfillment_order_status

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

        Date timestamp  # noqa: E501

        :return: The status_updated_date of this FulfillmentOrder.  # noqa: E501
        :rtype: datetime
        """
        return self._status_updated_date

    @status_updated_date.setter
    def status_updated_date(self, status_updated_date):
        """Sets the status_updated_date of this FulfillmentOrder.

        Date timestamp  # noqa: E501

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

        self._status_updated_date = status_updated_date

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

        A list of email addresses that the seller provides that are used by Amazon to send ship-complete notifications to recipients on behalf of the seller.  # noqa: E501

        :return: The notification_emails of this FulfillmentOrder.  # noqa: E501
        :rtype: List[str]
        """
        return self._notification_emails

    @notification_emails.setter
    def notification_emails(self, notification_emails):
        """Sets the notification_emails of this FulfillmentOrder.

        A list of email addresses that the seller provides that are used by Amazon to send ship-complete notifications to recipients on behalf of the seller.  # noqa: E501

        :param notification_emails: The notification_emails of this FulfillmentOrder.  # noqa: E501
        :type: List[str]
        """

        self._notification_emails = notification_emails

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

        A list of features and their fulfillment policies to apply to the order.  # noqa: E501

        :return: The feature_constraints of this FulfillmentOrder.  # noqa: E501
        :rtype: List[FeatureSettings]
        """
        return self._feature_constraints

    @feature_constraints.setter
    def feature_constraints(self, feature_constraints):
        """Sets the feature_constraints of this FulfillmentOrder.

        A list of features and their fulfillment policies to apply to the order.  # noqa: E501

        :param feature_constraints: The feature_constraints of this FulfillmentOrder.  # noqa: E501
        :type: List[FeatureSettings]
        """

        self._feature_constraints = feature_constraints

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

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