# 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 FulfillmentPreview(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 = {
        'shipping_speed_category': 'ShippingSpeedCategory',
        'scheduled_delivery_info': 'ScheduledDeliveryInfo',
        'is_fulfillable': 'bool',
        'is_cod_capable': 'bool',
        'estimated_shipping_weight': 'Weight',
        'estimated_fees': 'List[Fee]',
        'fulfillment_preview_shipments': 'List[FulfillmentPreviewShipment]',
        'unfulfillable_preview_items': 'List[UnfulfillablePreviewItem]',
        'order_unfulfillable_reasons': 'List[str]',
        'marketplace_id': 'str',
        'feature_constraints': 'List[FeatureSettings]',
    }

    attribute_map = {
        'shipping_speed_category': 'shippingSpeedCategory',
        'scheduled_delivery_info': 'scheduledDeliveryInfo',
        'is_fulfillable': 'isFulfillable',
        'is_cod_capable': 'isCODCapable',
        'estimated_shipping_weight': 'estimatedShippingWeight',
        'estimated_fees': 'estimatedFees',
        'fulfillment_preview_shipments': 'fulfillmentPreviewShipments',
        'unfulfillable_preview_items': 'unfulfillablePreviewItems',
        'order_unfulfillable_reasons': 'orderUnfulfillableReasons',
        'marketplace_id': 'marketplaceId',
        'feature_constraints': 'featureConstraints',
    }

    def __init__(self, shipping_speed_category=None, scheduled_delivery_info=None, is_fulfillable=None, is_cod_capable=None, estimated_shipping_weight=None, estimated_fees=None, fulfillment_preview_shipments=None, unfulfillable_preview_items=None, order_unfulfillable_reasons=None, marketplace_id=None, feature_constraints=None, _configuration=None):  # noqa: E501
        """FulfillmentPreview - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._shipping_speed_category = None
        self._scheduled_delivery_info = None
        self._is_fulfillable = None
        self._is_cod_capable = None
        self._estimated_shipping_weight = None
        self._estimated_fees = None
        self._fulfillment_preview_shipments = None
        self._unfulfillable_preview_items = None
        self._order_unfulfillable_reasons = None
        self._marketplace_id = None
        self._feature_constraints = None
        self.discriminator = None

        self.shipping_speed_category = shipping_speed_category
        if scheduled_delivery_info is not None:
            self.scheduled_delivery_info = scheduled_delivery_info
        self.is_fulfillable = is_fulfillable
        self.is_cod_capable = is_cod_capable
        if estimated_shipping_weight is not None:
            self.estimated_shipping_weight = estimated_shipping_weight
        if estimated_fees is not None:
            self.estimated_fees = estimated_fees
        if fulfillment_preview_shipments is not None:
            self.fulfillment_preview_shipments = fulfillment_preview_shipments
        if unfulfillable_preview_items is not None:
            self.unfulfillable_preview_items = unfulfillable_preview_items
        if order_unfulfillable_reasons is not None:
            self.order_unfulfillable_reasons = order_unfulfillable_reasons
        self.marketplace_id = marketplace_id
        if feature_constraints is not None:
            self.feature_constraints = feature_constraints

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


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


        :param shipping_speed_category: The shipping_speed_category of this FulfillmentPreview.  # 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 scheduled_delivery_info(self):
        """Gets the scheduled_delivery_info of this FulfillmentPreview.  # noqa: E501


        :return: The scheduled_delivery_info of this FulfillmentPreview.  # noqa: E501
        :rtype: ScheduledDeliveryInfo
        """
        return self._scheduled_delivery_info

    @scheduled_delivery_info.setter
    def scheduled_delivery_info(self, scheduled_delivery_info):
        """Sets the scheduled_delivery_info of this FulfillmentPreview.


        :param scheduled_delivery_info: The scheduled_delivery_info of this FulfillmentPreview.  # noqa: E501
        :type: ScheduledDeliveryInfo
        """

        self._scheduled_delivery_info = scheduled_delivery_info

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

        When true, this fulfillment order preview is fulfillable.  # noqa: E501

        :return: The is_fulfillable of this FulfillmentPreview.  # noqa: E501
        :rtype: bool
        """
        return self._is_fulfillable

    @is_fulfillable.setter
    def is_fulfillable(self, is_fulfillable):
        """Sets the is_fulfillable of this FulfillmentPreview.

        When true, this fulfillment order preview is fulfillable.  # noqa: E501

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

        self._is_fulfillable = is_fulfillable

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

        When true, this fulfillment order preview is for COD (Cash On Delivery).  # noqa: E501

        :return: The is_cod_capable of this FulfillmentPreview.  # noqa: E501
        :rtype: bool
        """
        return self._is_cod_capable

    @is_cod_capable.setter
    def is_cod_capable(self, is_cod_capable):
        """Sets the is_cod_capable of this FulfillmentPreview.

        When true, this fulfillment order preview is for COD (Cash On Delivery).  # noqa: E501

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

        self._is_cod_capable = is_cod_capable

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


        :return: The estimated_shipping_weight of this FulfillmentPreview.  # noqa: E501
        :rtype: Weight
        """
        return self._estimated_shipping_weight

    @estimated_shipping_weight.setter
    def estimated_shipping_weight(self, estimated_shipping_weight):
        """Sets the estimated_shipping_weight of this FulfillmentPreview.


        :param estimated_shipping_weight: The estimated_shipping_weight of this FulfillmentPreview.  # noqa: E501
        :type: Weight
        """

        self._estimated_shipping_weight = estimated_shipping_weight

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

        An array of fee type and cost pairs.  # noqa: E501

        :return: The estimated_fees of this FulfillmentPreview.  # noqa: E501
        :rtype: List[Fee]
        """
        return self._estimated_fees

    @estimated_fees.setter
    def estimated_fees(self, estimated_fees):
        """Sets the estimated_fees of this FulfillmentPreview.

        An array of fee type and cost pairs.  # noqa: E501

        :param estimated_fees: The estimated_fees of this FulfillmentPreview.  # noqa: E501
        :type: List[Fee]
        """

        self._estimated_fees = estimated_fees

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

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

        :return: The fulfillment_preview_shipments of this FulfillmentPreview.  # noqa: E501
        :rtype: List[FulfillmentPreviewShipment]
        """
        return self._fulfillment_preview_shipments

    @fulfillment_preview_shipments.setter
    def fulfillment_preview_shipments(self, fulfillment_preview_shipments):
        """Sets the fulfillment_preview_shipments of this FulfillmentPreview.

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

        :param fulfillment_preview_shipments: The fulfillment_preview_shipments of this FulfillmentPreview.  # noqa: E501
        :type: List[FulfillmentPreviewShipment]
        """

        self._fulfillment_preview_shipments = fulfillment_preview_shipments

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

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

        :return: The unfulfillable_preview_items of this FulfillmentPreview.  # noqa: E501
        :rtype: List[UnfulfillablePreviewItem]
        """
        return self._unfulfillable_preview_items

    @unfulfillable_preview_items.setter
    def unfulfillable_preview_items(self, unfulfillable_preview_items):
        """Sets the unfulfillable_preview_items of this FulfillmentPreview.

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

        :param unfulfillable_preview_items: The unfulfillable_preview_items of this FulfillmentPreview.  # noqa: E501
        :type: List[UnfulfillablePreviewItem]
        """

        self._unfulfillable_preview_items = unfulfillable_preview_items

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

        String list  # noqa: E501

        :return: The order_unfulfillable_reasons of this FulfillmentPreview.  # noqa: E501
        :rtype: List[str]
        """
        return self._order_unfulfillable_reasons

    @order_unfulfillable_reasons.setter
    def order_unfulfillable_reasons(self, order_unfulfillable_reasons):
        """Sets the order_unfulfillable_reasons of this FulfillmentPreview.

        String list  # noqa: E501

        :param order_unfulfillable_reasons: The order_unfulfillable_reasons of this FulfillmentPreview.  # noqa: E501
        :type: List[str]
        """

        self._order_unfulfillable_reasons = order_unfulfillable_reasons

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

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

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

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

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

        :param marketplace_id: The marketplace_id of this FulfillmentPreview.  # 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 feature_constraints(self):
        """Gets the feature_constraints of this FulfillmentPreview.  # noqa: E501

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

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

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

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

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

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