# 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 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': 'ShippingServiceIdentifier',
        'shipping_service_offer_id': 'str',
        'ship_date': 'Timestamp',
        'earliest_estimated_delivery_date': 'Timestamp',
        'latest_estimated_delivery_date': 'Timestamp',
        'rate': 'CurrencyAmount',
        'shipping_service_options': 'ShippingServiceOptions',
        'available_shipping_service_options': 'AvailableShippingServiceOptions',
        'available_label_formats': 'LabelFormatList',
        'available_format_options_for_label': 'AvailableFormatOptionsForLabelList',
        'requires_additional_seller_inputs': 'bool'
    }

    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'
    }

    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, _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.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
        # TODO@chris check this with backend
        if requires_additional_seller_inputs is not None:
            self.requires_additional_seller_inputs = requires_additional_seller_inputs

    @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


        :return: The shipping_service_id of this ShippingService.  # noqa: E501
        :rtype: ShippingServiceIdentifier
        """
        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.


        :param shipping_service_id: The shipping_service_id of this ShippingService.  # noqa: E501
        :type: ShippingServiceIdentifier
        """
        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

        The date that the carrier will ship the package.  # noqa: E501

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

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

        The date that the carrier will ship the package.  # noqa: E501

        :param ship_date: The ship_date of this ShippingService.  # noqa: E501
        :type: Timestamp
        """
        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

        The earliest date by which the shipment will be delivered.  # noqa: E501

        :return: The earliest_estimated_delivery_date of this ShippingService.  # noqa: E501
        :rtype: Timestamp
        """
        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.

        The earliest date by which the shipment will be delivered.  # noqa: E501

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

        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

        The latest date by which the shipment will be delivered.  # noqa: E501

        :return: The latest_estimated_delivery_date of this ShippingService.  # noqa: E501
        :rtype: Timestamp
        """
        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.

        The latest date by which the shipment will be delivered.  # noqa: E501

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

        self._latest_estimated_delivery_date = latest_estimated_delivery_date

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

        The amount that the carrier will charge for the shipment.  # 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.

        The amount that the carrier will charge for the shipment.  # noqa: E501

        :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

        Extra services offered by the carrier.  # 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.

        Extra services offered by the carrier.  # noqa: E501

        :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


        :return: The available_label_formats of this ShippingService.  # noqa: E501
        :rtype: LabelFormatList
        """
        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.


        :param available_label_formats: The available_label_formats of this ShippingService.  # noqa: E501
        :type: LabelFormatList
        """

        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


        :return: The available_format_options_for_label of this ShippingService.  # noqa: E501
        :rtype: AvailableFormatOptionsForLabelList
        """
        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.


        :param available_format_options_for_label: The available_format_options_for_label of this ShippingService.  # noqa: E501
        :type: AvailableFormatOptionsForLabelList
        """

        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

    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()
