# coding: utf-8

"""
    Selling Partner API for Merchant Fulfillment

    The Selling Partner API for Merchant Fulfillment helps you build applications that let sellers purchase shipping for non-Prime and Prime orders using Amazon’s Buy Shipping Services.  # noqa: E501

    OpenAPI spec version: v0
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from src.api_models.mfn_api.swagger_client.configuration import Configuration


class ShippingServiceOptions(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 = {
        'delivery_experience': 'DeliveryExperienceType',
        'declared_value': 'CurrencyAmount',
        'carrier_will_pick_up': 'bool',
        'carrier_will_pick_up_option': 'CarrierWillPickUpOption',
        'label_format': 'LabelFormat'
    }

    attribute_map = {
        'delivery_experience': 'DeliveryExperience',
        'declared_value': 'DeclaredValue',
        'carrier_will_pick_up': 'CarrierWillPickUp',
        'carrier_will_pick_up_option': 'CarrierWillPickUpOption',
        'label_format': 'LabelFormat'
    }

    def __init__(self, delivery_experience=None, declared_value=None, carrier_will_pick_up=None, carrier_will_pick_up_option=None, label_format=None, _configuration=None):  # noqa: E501
        """ShippingServiceOptions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._delivery_experience = None
        self._declared_value = None
        self._carrier_will_pick_up = None
        self._carrier_will_pick_up_option = None
        self._label_format = None
        self.discriminator = None

        self.delivery_experience = delivery_experience
        if declared_value is not None:
            self.declared_value = declared_value
        # TODO@chris check this with backend
        if carrier_will_pick_up is not None:
            self.carrier_will_pick_up = carrier_will_pick_up
        if carrier_will_pick_up_option is not None:
            self.carrier_will_pick_up_option = carrier_will_pick_up_option
        if label_format is not None:
            self.label_format = label_format

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

        The delivery confirmation level.  # noqa: E501

        :return: The delivery_experience of this ShippingServiceOptions.  # noqa: E501
        :rtype: DeliveryExperienceType
        """
        return self._delivery_experience

    @delivery_experience.setter
    def delivery_experience(self, delivery_experience):
        """Sets the delivery_experience of this ShippingServiceOptions.

        The delivery confirmation level.  # noqa: E501

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

        self._delivery_experience = delivery_experience

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

        The declared value of the shipment. The carrier uses this value to determine the amount to use to insure the shipment. If DeclaredValue is greater than the carrier's minimum insurance amount, the seller is charged for the additional insurance as determined by the carrier. For information about optional insurance coverage, see the Seller Central Help [UK](https://sellercentral.amazon.co.uk/gp/help/200204080) [US](https://sellercentral.amazon.com/gp/help/200204080).  # noqa: E501

        :return: The declared_value of this ShippingServiceOptions.  # noqa: E501
        :rtype: CurrencyAmount
        """
        return self._declared_value

    @declared_value.setter
    def declared_value(self, declared_value):
        """Sets the declared_value of this ShippingServiceOptions.

        The declared value of the shipment. The carrier uses this value to determine the amount to use to insure the shipment. If DeclaredValue is greater than the carrier's minimum insurance amount, the seller is charged for the additional insurance as determined by the carrier. For information about optional insurance coverage, see the Seller Central Help [UK](https://sellercentral.amazon.co.uk/gp/help/200204080) [US](https://sellercentral.amazon.com/gp/help/200204080).  # noqa: E501

        :param declared_value: The declared_value of this ShippingServiceOptions.  # noqa: E501
        :type: CurrencyAmount
        """

        self._declared_value = declared_value

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

        When true, the carrier will pick up the package.  Note: Scheduled carrier pickup is available only using Dynamex (US), DPD (UK), and Royal Mail (UK).  # noqa: E501

        :return: The carrier_will_pick_up of this ShippingServiceOptions.  # noqa: E501
        :rtype: bool
        """
        return self._carrier_will_pick_up

    @carrier_will_pick_up.setter
    def carrier_will_pick_up(self, carrier_will_pick_up):
        """Sets the carrier_will_pick_up of this ShippingServiceOptions.

        When true, the carrier will pick up the package.  Note: Scheduled carrier pickup is available only using Dynamex (US), DPD (UK), and Royal Mail (UK).  # noqa: E501

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

        self._carrier_will_pick_up = carrier_will_pick_up

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


        :return: The carrier_will_pick_up_option of this ShippingServiceOptions.  # noqa: E501
        :rtype: CarrierWillPickUpOption
        """
        return self._carrier_will_pick_up_option

    @carrier_will_pick_up_option.setter
    def carrier_will_pick_up_option(self, carrier_will_pick_up_option):
        """Sets the carrier_will_pick_up_option of this ShippingServiceOptions.


        :param carrier_will_pick_up_option: The carrier_will_pick_up_option of this ShippingServiceOptions.  # noqa: E501
        :type: CarrierWillPickUpOption
        """

        self._carrier_will_pick_up_option = carrier_will_pick_up_option

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

        The seller's preferred label format.  # noqa: E501

        :return: The label_format of this ShippingServiceOptions.  # noqa: E501
        :rtype: LabelFormat
        """
        return self._label_format

    @label_format.setter
    def label_format(self, label_format):
        """Sets the label_format of this ShippingServiceOptions.

        The seller's preferred label format.  # noqa: E501

        :param label_format: The label_format of this ShippingServiceOptions.  # noqa: E501
        :type: LabelFormat
        """

        self._label_format = label_format

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

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