# 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 GetFulfillmentPreviewRequest(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',
        'address': 'Address',
        'items': 'List[GetFulfillmentPreviewItem]',
        'shipping_speed_categories': 'List[ShippingSpeedCategory]',
        'include_cod_fulfillment_preview': 'bool',
        'include_delivery_windows': 'bool',
        'feature_constraints': 'List[FeatureSettings]',
    }

    attribute_map = {
        'marketplace_id': 'marketplaceId',
        'address': 'address',
        'items': 'items',
        'shipping_speed_categories': 'shippingSpeedCategories',
        'include_cod_fulfillment_preview': 'includeCODFulfillmentPreview',
        'include_delivery_windows': 'includeDeliveryWindows',
        'feature_constraints': 'featureConstraints',
    }

    def __init__(self, marketplace_id=None, address=None, items=None, shipping_speed_categories=None, include_cod_fulfillment_preview=None, include_delivery_windows=None, feature_constraints=None, _configuration=None):  # noqa: E501
        """GetFulfillmentPreviewRequest - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._marketplace_id = None
        self._address = None
        self._items = None
        self._shipping_speed_categories = None
        self._include_cod_fulfillment_preview = None
        self._include_delivery_windows = None
        self._feature_constraints = None
        self.discriminator = None

        if marketplace_id is not None:
            self.marketplace_id = marketplace_id
        self.address = address
        self.items = items
        if shipping_speed_categories is not None:
            self.shipping_speed_categories = shipping_speed_categories
        if include_cod_fulfillment_preview is not None:
            self.include_cod_fulfillment_preview = include_cod_fulfillment_preview
        if include_delivery_windows is not None:
            self.include_delivery_windows = include_delivery_windows
        if feature_constraints is not None:
            self.feature_constraints = feature_constraints

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

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

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

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

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

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

        self._marketplace_id = marketplace_id

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


        :return: The address of this GetFulfillmentPreviewRequest.  # noqa: E501
        :rtype: Address
        """
        return self._address

    @address.setter
    def address(self, address):
        """Sets the address of this GetFulfillmentPreviewRequest.


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

        self._address = address

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

        An array of fulfillment preview item information.  # noqa: E501

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

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

        An array of fulfillment preview item information.  # noqa: E501

        :param items: The items of this GetFulfillmentPreviewRequest.  # noqa: E501
        :type: List[GetFulfillmentPreviewItem]
        """
        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 shipping_speed_categories(self):
        """Gets the shipping_speed_categories of this GetFulfillmentPreviewRequest.  # noqa: E501

        List of shipping speed categories.  # noqa: E501

        :return: The shipping_speed_categories of this GetFulfillmentPreviewRequest.  # noqa: E501
        :rtype: List[ShippingSpeedCategory]
        """
        return self._shipping_speed_categories

    @shipping_speed_categories.setter
    def shipping_speed_categories(self, shipping_speed_categories):
        """Sets the shipping_speed_categories of this GetFulfillmentPreviewRequest.

        List of shipping speed categories.  # noqa: E501

        :param shipping_speed_categories: The shipping_speed_categories of this GetFulfillmentPreviewRequest.  # noqa: E501
        :type: List[ShippingSpeedCategory]
        """

        self._shipping_speed_categories = shipping_speed_categories

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

        When true, returns all fulfillment order previews both for COD and not for COD. Otherwise, returns only fulfillment order previews that are not for COD.  # noqa: E501

        :return: The include_cod_fulfillment_preview of this GetFulfillmentPreviewRequest.  # noqa: E501
        :rtype: bool
        """
        return self._include_cod_fulfillment_preview

    @include_cod_fulfillment_preview.setter
    def include_cod_fulfillment_preview(self, include_cod_fulfillment_preview):
        """Sets the include_cod_fulfillment_preview of this GetFulfillmentPreviewRequest.

        When true, returns all fulfillment order previews both for COD and not for COD. Otherwise, returns only fulfillment order previews that are not for COD.  # noqa: E501

        :param include_cod_fulfillment_preview: The include_cod_fulfillment_preview of this GetFulfillmentPreviewRequest.  # noqa: E501
        :type: bool
        """

        self._include_cod_fulfillment_preview = include_cod_fulfillment_preview

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

        When true, returns the `ScheduledDeliveryInfo` response object, which contains the available delivery windows for a Scheduled Delivery. The `ScheduledDeliveryInfo` response object can only be returned for fulfillment order previews with `ShippingSpeedCategories` equal to `ScheduledDelivery`.  # noqa: E501

        :return: The include_delivery_windows of this GetFulfillmentPreviewRequest.  # noqa: E501
        :rtype: bool
        """
        return self._include_delivery_windows

    @include_delivery_windows.setter
    def include_delivery_windows(self, include_delivery_windows):
        """Sets the include_delivery_windows of this GetFulfillmentPreviewRequest.

        When true, returns the `ScheduledDeliveryInfo` response object, which contains the available delivery windows for a Scheduled Delivery. The `ScheduledDeliveryInfo` response object can only be returned for fulfillment order previews with `ShippingSpeedCategories` equal to `ScheduledDelivery`.  # noqa: E501

        :param include_delivery_windows: The include_delivery_windows of this GetFulfillmentPreviewRequest.  # noqa: E501
        :type: bool
        """

        self._include_delivery_windows = include_delivery_windows

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

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

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

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

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

        :param feature_constraints: The feature_constraints of this GetFulfillmentPreviewRequest.  # 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(GetFulfillmentPreviewRequest, 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, GetFulfillmentPreviewRequest):
            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, GetFulfillmentPreviewRequest):
            return True

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