# 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 CreateFulfillmentOrderRequest(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 = {
        'marketplace_id': 'str',
        'seller_fulfillment_order_id': 'str',
        'displayable_order_id': 'str',
        'displayable_order_date': 'datetime',
        'displayable_order_comment': 'str',
        'shipping_speed_category': 'ShippingSpeedCategory',
        'delivery_window': 'DeliveryWindow',
        'destination_address': 'Address',
        'delivery_preferences': 'DeliveryPreferences',
        'fulfillment_action': 'FulfillmentAction',
        'fulfillment_policy': 'FulfillmentPolicy',
        'cod_settings': 'CODSettings',
        'ship_from_country_code': 'str',
        'notification_emails': 'List[str]',
        'feature_constraints': 'List[FeatureSettings]',
        'items': 'List[CreateFulfillmentOrderItem]',
        'payment_information': 'List[PaymentInformation]',
    }

    attribute_map = {
        'marketplace_id': 'marketplaceId',
        'seller_fulfillment_order_id': 'sellerFulfillmentOrderId',
        'displayable_order_id': 'displayableOrderId',
        'displayable_order_date': 'displayableOrderDate',
        'displayable_order_comment': 'displayableOrderComment',
        'shipping_speed_category': 'shippingSpeedCategory',
        'delivery_window': 'deliveryWindow',
        'destination_address': 'destinationAddress',
        'delivery_preferences': 'deliveryPreferences',
        'fulfillment_action': 'fulfillmentAction',
        'fulfillment_policy': 'fulfillmentPolicy',
        'cod_settings': 'codSettings',
        'ship_from_country_code': 'shipFromCountryCode',
        'notification_emails': 'notificationEmails',
        'feature_constraints': 'featureConstraints',
        'items': 'items',
        'payment_information': 'paymentInformation',
    }

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

        self._marketplace_id = None
        self._seller_fulfillment_order_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._delivery_preferences = None
        self._fulfillment_action = None
        self._fulfillment_policy = None
        self._cod_settings = None
        self._ship_from_country_code = None
        self._notification_emails = None
        self._feature_constraints = None
        self._items = None
        self._payment_information = None
        self.discriminator = None

        if marketplace_id is not None:
            self.marketplace_id = marketplace_id
        self.seller_fulfillment_order_id = seller_fulfillment_order_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 delivery_preferences is not None:
            self.delivery_preferences = delivery_preferences
        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
        if ship_from_country_code is not None:
            self.ship_from_country_code = ship_from_country_code
        if notification_emails is not None:
            self.notification_emails = notification_emails
        if feature_constraints is not None:
            self.feature_constraints = feature_constraints
        self.items = items
        if payment_information is not None:
            self.payment_information = payment_information

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

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

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

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

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

        :param marketplace_id: The marketplace_id of this CreateFulfillmentOrderRequest.  # noqa: E501
        :type: str
        """

        self._marketplace_id = marketplace_id

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

        A fulfillment order identifier that the seller creates to track their fulfillment order. The `sellerFulfillmentOrderId` must be unique for each fulfillment order that a seller creates. If the seller's system already creates unique order identifiers, then these might be good values for them to use.  # noqa: E501

        :return: The seller_fulfillment_order_id of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.

        A fulfillment order identifier that the seller creates to track their fulfillment order. The `sellerFulfillmentOrderId` must be unique for each fulfillment order that a seller creates. If the seller's system already creates unique order identifiers, then these might be good values for them to use.  # noqa: E501

        :param seller_fulfillment_order_id: The seller_fulfillment_order_id of this CreateFulfillmentOrderRequest.  # 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
        if (self._configuration.client_side_validation and
                seller_fulfillment_order_id is not None and len(seller_fulfillment_order_id) > 40):
            raise ValueError("Invalid value for `seller_fulfillment_order_id`, length must be less than or equal to `40`")  # noqa: E501

        self._seller_fulfillment_order_id = seller_fulfillment_order_id

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

        A fulfillment order identifier that the seller creates. This value displays as the order identifier in recipient-facing materials such as the outbound shipment packing slip. The value of `displayableOrderId` should match the order identifier that the seller provides to the recipient. The seller can use the SellerFulfillmentOrderId for this value or they can specify an alternate value if they want the recipient to reference an alternate order identifier.  The value must be an alpha-numeric or ISO 8859-1 compliant string from one to 40 characters in length. Cannot contain two spaces in a row. Leading and trailing white space is removed.  # noqa: E501

        :return: The displayable_order_id of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.

        A fulfillment order identifier that the seller creates. This value displays as the order identifier in recipient-facing materials such as the outbound shipment packing slip. The value of `displayableOrderId` should match the order identifier that the seller provides to the recipient. The seller can use the SellerFulfillmentOrderId for this value or they can specify an alternate value if they want the recipient to reference an alternate order identifier.  The value must be an alpha-numeric or ISO 8859-1 compliant string from one to 40 characters in length. Cannot contain two spaces in a row. Leading and trailing white space is removed.  # noqa: E501

        :param displayable_order_id: The displayable_order_id of this CreateFulfillmentOrderRequest.  # 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
        if (self._configuration.client_side_validation and
                displayable_order_id is not None and len(displayable_order_id) > 40):
            raise ValueError("Invalid value for `displayable_order_id`, length must be less than or equal to `40`")  # noqa: E501

        self._displayable_order_id = displayable_order_id

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

        Date timestamp  # noqa: E501

        :return: The displayable_order_date of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.

        Date timestamp  # noqa: E501

        :param displayable_order_date: The displayable_order_date of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.  # noqa: E501

        Order-specific text that appears in recipient-facing materials such as the outbound shipment packing slip.  # noqa: E501

        :return: The displayable_order_comment of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.

        Order-specific text that appears in recipient-facing materials such as the outbound shipment packing slip.  # noqa: E501

        :param displayable_order_comment: The displayable_order_comment of this CreateFulfillmentOrderRequest.  # 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
        if (self._configuration.client_side_validation and
                displayable_order_comment is not None and len(displayable_order_comment) > 750):
            raise ValueError("Invalid value for `displayable_order_comment`, length must be less than or equal to `750`")  # noqa: E501

        self._displayable_order_comment = displayable_order_comment

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


        :return: The shipping_speed_category of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.


        :param shipping_speed_category: The shipping_speed_category of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.  # noqa: E501


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

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


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

        self._delivery_window = delivery_window

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


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

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


        :param destination_address: The destination_address of this CreateFulfillmentOrderRequest.  # 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 delivery_preferences(self):
        """Gets the delivery_preferences of this CreateFulfillmentOrderRequest.  # noqa: E501


        :return: The delivery_preferences of this CreateFulfillmentOrderRequest.  # noqa: E501
        :rtype: DeliveryPreferences
        """
        return self._delivery_preferences

    @delivery_preferences.setter
    def delivery_preferences(self, delivery_preferences):
        """Sets the delivery_preferences of this CreateFulfillmentOrderRequest.


        :param delivery_preferences: The delivery_preferences of this CreateFulfillmentOrderRequest.  # noqa: E501
        :type: DeliveryPreferences
        """

        self._delivery_preferences = delivery_preferences

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


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

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


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

        self._fulfillment_action = fulfillment_action

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


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

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


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

        self._fulfillment_policy = fulfillment_policy

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


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

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


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

        self._cod_settings = cod_settings

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

        The two-character country code for the country from which the fulfillment order ships. Must be in ISO 3166-1 alpha-2 format.  # noqa: E501

        :return: The ship_from_country_code of this CreateFulfillmentOrderRequest.  # noqa: E501
        :rtype: str
        """
        return self._ship_from_country_code

    @ship_from_country_code.setter
    def ship_from_country_code(self, ship_from_country_code):
        """Sets the ship_from_country_code of this CreateFulfillmentOrderRequest.

        The two-character country code for the country from which the fulfillment order ships. Must be in ISO 3166-1 alpha-2 format.  # noqa: E501

        :param ship_from_country_code: The ship_from_country_code of this CreateFulfillmentOrderRequest.  # noqa: E501
        :type: str
        """

        self._ship_from_country_code = ship_from_country_code

    @property
    def notification_emails(self):
        """Gets the notification_emails of this CreateFulfillmentOrderRequest.  # 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 CreateFulfillmentOrderRequest.  # noqa: E501
        :rtype: List[str]
        """
        return self._notification_emails

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

        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 CreateFulfillmentOrderRequest.  # noqa: E501
        :type: List[str]
        """

        self._notification_emails = notification_emails

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

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

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

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

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

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

        self._feature_constraints = feature_constraints

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

        An array of item information for creating a fulfillment order.  # noqa: E501

        :return: The items of this CreateFulfillmentOrderRequest.  # noqa: E501
        :rtype: List[CreateFulfillmentOrderItem]
        """
        return self._items

    @items.setter
    def items(self, items):
        """Sets the items of this CreateFulfillmentOrderRequest.

        An array of item information for creating a fulfillment order.  # noqa: E501

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

        self._items = items

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

        An array of various payment attributes related to this fulfillment order.  # noqa: E501

        :return: The payment_information of this CreateFulfillmentOrderRequest.  # noqa: E501
        :rtype: List[PaymentInformation]
        """
        return self._payment_information

    @payment_information.setter
    def payment_information(self, payment_information):
        """Sets the payment_information of this CreateFulfillmentOrderRequest.

        An array of various payment attributes related to this fulfillment order.  # noqa: E501

        :param payment_information: The payment_information of this CreateFulfillmentOrderRequest.  # noqa: E501
        :type: List[PaymentInformation]
        """

        self._payment_information = payment_information

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

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