# coding: utf-8

"""
    Selling Partner API for Merchant Fulfillment

    With the Selling Partner API for Merchant Fulfillment, you can build applications that sellers can use to purchase shipping for non-Prime and Prime orders using Amazon's Buy Shipping Services.

    The version of the OpenAPI document: v0
    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 ShippingService(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_service_name': 'str',
        'carrier_name': 'str',
        'shipping_service_id': 'str',
        'shipping_service_offer_id': 'str',
        'ship_date': 'datetime',
        'earliest_estimated_delivery_date': 'datetime',
        'latest_estimated_delivery_date': 'datetime',
        'rate': 'CurrencyAmount',
        'shipping_service_options': 'ShippingServiceOptions',
        'available_shipping_service_options': 'AvailableShippingServiceOptions',
        'available_label_formats': 'List[LabelFormat]',
        'available_format_options_for_label': 'List[LabelFormatOption]',
        'requires_additional_seller_inputs': 'bool',
        'benefits': 'Benefits',
    }

    attribute_map = {
        'shipping_service_name': 'ShippingServiceName',
        'carrier_name': 'CarrierName',
        'shipping_service_id': 'ShippingServiceId',
        'shipping_service_offer_id': 'ShippingServiceOfferId',
        'ship_date': 'ShipDate',
        'earliest_estimated_delivery_date': 'EarliestEstimatedDeliveryDate',
        'latest_estimated_delivery_date': 'LatestEstimatedDeliveryDate',
        'rate': 'Rate',
        'shipping_service_options': 'ShippingServiceOptions',
        'available_shipping_service_options': 'AvailableShippingServiceOptions',
        'available_label_formats': 'AvailableLabelFormats',
        'available_format_options_for_label': 'AvailableFormatOptionsForLabel',
        'requires_additional_seller_inputs': 'RequiresAdditionalSellerInputs',
        'benefits': 'Benefits',
    }

    def __init__(self, shipping_service_name=None, carrier_name=None, shipping_service_id=None, shipping_service_offer_id=None, ship_date=None, earliest_estimated_delivery_date=None, latest_estimated_delivery_date=None, rate=None, shipping_service_options=None, available_shipping_service_options=None, available_label_formats=None, available_format_options_for_label=None, requires_additional_seller_inputs=None, benefits=None, _configuration=None):  # noqa: E501
        """ShippingService - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._shipping_service_name = None
        self._carrier_name = None
        self._shipping_service_id = None
        self._shipping_service_offer_id = None
        self._ship_date = None
        self._earliest_estimated_delivery_date = None
        self._latest_estimated_delivery_date = None
        self._rate = None
        self._shipping_service_options = None
        self._available_shipping_service_options = None
        self._available_label_formats = None
        self._available_format_options_for_label = None
        self._requires_additional_seller_inputs = None
        self._benefits = None
        self.discriminator = None

        self.shipping_service_name = shipping_service_name
        self.carrier_name = carrier_name
        self.shipping_service_id = shipping_service_id
        self.shipping_service_offer_id = shipping_service_offer_id
        self.ship_date = ship_date
        if earliest_estimated_delivery_date is not None:
            self.earliest_estimated_delivery_date = earliest_estimated_delivery_date
        if latest_estimated_delivery_date is not None:
            self.latest_estimated_delivery_date = latest_estimated_delivery_date
        self.rate = rate
        self.shipping_service_options = shipping_service_options
        if available_shipping_service_options is not None:
            self.available_shipping_service_options = available_shipping_service_options
        if available_label_formats is not None:
            self.available_label_formats = available_label_formats
        if available_format_options_for_label is not None:
            self.available_format_options_for_label = available_format_options_for_label
        self.requires_additional_seller_inputs = requires_additional_seller_inputs
        if benefits is not None:
            self.benefits = benefits

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

        A plain text representation of a carrier's shipping service. For example, \"UPS Ground\" or \"FedEx Standard Overnight\".   # noqa: E501

        :return: The shipping_service_name of this ShippingService.  # noqa: E501
        :rtype: str
        """
        return self._shipping_service_name

    @shipping_service_name.setter
    def shipping_service_name(self, shipping_service_name):
        """Sets the shipping_service_name of this ShippingService.

        A plain text representation of a carrier's shipping service. For example, \"UPS Ground\" or \"FedEx Standard Overnight\".   # noqa: E501

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

        self._shipping_service_name = shipping_service_name

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

        The name of the carrier.  # noqa: E501

        :return: The carrier_name of this ShippingService.  # noqa: E501
        :rtype: str
        """
        return self._carrier_name

    @carrier_name.setter
    def carrier_name(self, carrier_name):
        """Sets the carrier_name of this ShippingService.

        The name of the carrier.  # noqa: E501

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

        self._carrier_name = carrier_name

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

        An Amazon-defined shipping service identifier.  # noqa: E501

        :return: The shipping_service_id of this ShippingService.  # noqa: E501
        :rtype: str
        """
        return self._shipping_service_id

    @shipping_service_id.setter
    def shipping_service_id(self, shipping_service_id):
        """Sets the shipping_service_id of this ShippingService.

        An Amazon-defined shipping service identifier.  # noqa: E501

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

        self._shipping_service_id = shipping_service_id

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

        An Amazon-defined shipping service offer identifier.  # noqa: E501

        :return: The shipping_service_offer_id of this ShippingService.  # noqa: E501
        :rtype: str
        """
        return self._shipping_service_offer_id

    @shipping_service_offer_id.setter
    def shipping_service_offer_id(self, shipping_service_offer_id):
        """Sets the shipping_service_offer_id of this ShippingService.

        An Amazon-defined shipping service offer identifier.  # noqa: E501

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

        self._shipping_service_offer_id = shipping_service_offer_id

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

        Date-time formatted timestamp.  # noqa: E501

        :return: The ship_date of this ShippingService.  # noqa: E501
        :rtype: datetime
        """
        return self._ship_date

    @ship_date.setter
    def ship_date(self, ship_date):
        """Sets the ship_date of this ShippingService.

        Date-time formatted timestamp.  # noqa: E501

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

        self._ship_date = ship_date

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

        Date-time formatted timestamp.  # noqa: E501

        :return: The earliest_estimated_delivery_date of this ShippingService.  # noqa: E501
        :rtype: datetime
        """
        return self._earliest_estimated_delivery_date

    @earliest_estimated_delivery_date.setter
    def earliest_estimated_delivery_date(self, earliest_estimated_delivery_date):
        """Sets the earliest_estimated_delivery_date of this ShippingService.

        Date-time formatted timestamp.  # noqa: E501

        :param earliest_estimated_delivery_date: The earliest_estimated_delivery_date of this ShippingService.  # noqa: E501
        :type: datetime
        """

        self._earliest_estimated_delivery_date = earliest_estimated_delivery_date

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

        Date-time formatted timestamp.  # noqa: E501

        :return: The latest_estimated_delivery_date of this ShippingService.  # noqa: E501
        :rtype: datetime
        """
        return self._latest_estimated_delivery_date

    @latest_estimated_delivery_date.setter
    def latest_estimated_delivery_date(self, latest_estimated_delivery_date):
        """Sets the latest_estimated_delivery_date of this ShippingService.

        Date-time formatted timestamp.  # noqa: E501

        :param latest_estimated_delivery_date: The latest_estimated_delivery_date of this ShippingService.  # noqa: E501
        :type: datetime
        """

        self._latest_estimated_delivery_date = latest_estimated_delivery_date

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


        :return: The rate of this ShippingService.  # noqa: E501
        :rtype: CurrencyAmount
        """
        return self._rate

    @rate.setter
    def rate(self, rate):
        """Sets the rate of this ShippingService.


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

        self._rate = rate

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


        :return: The shipping_service_options of this ShippingService.  # noqa: E501
        :rtype: ShippingServiceOptions
        """
        return self._shipping_service_options

    @shipping_service_options.setter
    def shipping_service_options(self, shipping_service_options):
        """Sets the shipping_service_options of this ShippingService.


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

        self._shipping_service_options = shipping_service_options

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


        :return: The available_shipping_service_options of this ShippingService.  # noqa: E501
        :rtype: AvailableShippingServiceOptions
        """
        return self._available_shipping_service_options

    @available_shipping_service_options.setter
    def available_shipping_service_options(self, available_shipping_service_options):
        """Sets the available_shipping_service_options of this ShippingService.


        :param available_shipping_service_options: The available_shipping_service_options of this ShippingService.  # noqa: E501
        :type: AvailableShippingServiceOptions
        """

        self._available_shipping_service_options = available_shipping_service_options

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

        List of label formats.  # noqa: E501

        :return: The available_label_formats of this ShippingService.  # noqa: E501
        :rtype: List[LabelFormat]
        """
        return self._available_label_formats

    @available_label_formats.setter
    def available_label_formats(self, available_label_formats):
        """Sets the available_label_formats of this ShippingService.

        List of label formats.  # noqa: E501

        :param available_label_formats: The available_label_formats of this ShippingService.  # noqa: E501
        :type: List[LabelFormat]
        """

        self._available_label_formats = available_label_formats

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

        The available label formats.  # noqa: E501

        :return: The available_format_options_for_label of this ShippingService.  # noqa: E501
        :rtype: List[LabelFormatOption]
        """
        return self._available_format_options_for_label

    @available_format_options_for_label.setter
    def available_format_options_for_label(self, available_format_options_for_label):
        """Sets the available_format_options_for_label of this ShippingService.

        The available label formats.  # noqa: E501

        :param available_format_options_for_label: The available_format_options_for_label of this ShippingService.  # noqa: E501
        :type: List[LabelFormatOption]
        """

        self._available_format_options_for_label = available_format_options_for_label

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

        When true, additional seller inputs are required.  # noqa: E501

        :return: The requires_additional_seller_inputs of this ShippingService.  # noqa: E501
        :rtype: bool
        """
        return self._requires_additional_seller_inputs

    @requires_additional_seller_inputs.setter
    def requires_additional_seller_inputs(self, requires_additional_seller_inputs):
        """Sets the requires_additional_seller_inputs of this ShippingService.

        When true, additional seller inputs are required.  # noqa: E501

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

        self._requires_additional_seller_inputs = requires_additional_seller_inputs

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


        :return: The benefits of this ShippingService.  # noqa: E501
        :rtype: Benefits
        """
        return self._benefits

    @benefits.setter
    def benefits(self, benefits):
        """Sets the benefits of this ShippingService.


        :param benefits: The benefits of this ShippingService.  # noqa: E501
        :type: Benefits
        """

        self._benefits = benefits

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

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