# coding: utf-8

"""
    The Selling Partner API for Amazon External Fulfillment Shipments Processing

    You can use the External Fulfillment Shipments API to retrieve, manage, and track shipments processed through Amazon's external fulfillment network. Use this API to get shipment details, monitor status changes, and access fulfillment requirements.

    The version of the OpenAPI document: 2024-09-11
    Contact: marketplaceapitest@amazon.com
    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 ShippingOptions(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_option_id': 'str',
        'ship_by': 'str',
        'carrier_name': 'str',
        'pickup_window': 'TimeWindow',
        'time_slot': 'TimeWindow',
    }

    attribute_map = {
        'shipping_option_id': 'shippingOptionId',
        'ship_by': 'shipBy',
        'carrier_name': 'carrierName',
        'pickup_window': 'pickupWindow',
        'time_slot': 'timeSlot',
    }

    def __init__(self, shipping_option_id=None, ship_by=None, carrier_name=None, pickup_window=None, time_slot=None, _configuration=None):  # noqa: E501
        """ShippingOptions - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._shipping_option_id = None
        self._ship_by = None
        self._carrier_name = None
        self._pickup_window = None
        self._time_slot = None
        self.discriminator = None

        self.shipping_option_id = shipping_option_id
        self.ship_by = ship_by
        if carrier_name is not None:
            self.carrier_name = carrier_name
        if pickup_window is not None:
            self.pickup_window = pickup_window
        if time_slot is not None:
            self.time_slot = time_slot

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

        An identifier for the shipping option.  # noqa: E501

        :return: The shipping_option_id of this ShippingOptions.  # noqa: E501
        :rtype: str
        """
        return self._shipping_option_id

    @shipping_option_id.setter
    def shipping_option_id(self, shipping_option_id):
        """Sets the shipping_option_id of this ShippingOptions.

        An identifier for the shipping option.  # noqa: E501

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

        self._shipping_option_id = shipping_option_id

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

        The shipper type.  # noqa: E501

        :return: The ship_by of this ShippingOptions.  # noqa: E501
        :rtype: str
        """
        return self._ship_by

    @ship_by.setter
    def ship_by(self, ship_by):
        """Sets the ship_by of this ShippingOptions.

        The shipper type.  # noqa: E501

        :param ship_by: The ship_by of this ShippingOptions.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and ship_by is None:
            raise ValueError("Invalid value for `ship_by`, must not be `None`")  # noqa: E501
        allowed_values = ["MARKETPLACE", "SELLER", "THIRD_PARTY_CARRIER", "OTHER"]  # noqa: E501
        if (self._configuration.client_side_validation and
                ship_by not in allowed_values):
            raise ValueError(
                "Invalid value for `ship_by` ({0}), must be one of {1}"  # noqa: E501
                .format(ship_by, allowed_values)
            )

        self._ship_by = ship_by

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

        The carrier name for the offering.  # noqa: E501

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

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

        The carrier name for the offering.  # noqa: E501

        :param carrier_name: The carrier_name of this ShippingOptions.  # noqa: E501
        :type: str
        """

        self._carrier_name = carrier_name

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


        :return: The pickup_window of this ShippingOptions.  # noqa: E501
        :rtype: TimeWindow
        """
        return self._pickup_window

    @pickup_window.setter
    def pickup_window(self, pickup_window):
        """Sets the pickup_window of this ShippingOptions.


        :param pickup_window: The pickup_window of this ShippingOptions.  # noqa: E501
        :type: TimeWindow
        """

        self._pickup_window = pickup_window

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


        :return: The time_slot of this ShippingOptions.  # noqa: E501
        :rtype: TimeWindow
        """
        return self._time_slot

    @time_slot.setter
    def time_slot(self, time_slot):
        """Sets the time_slot of this ShippingOptions.


        :param time_slot: The time_slot of this ShippingOptions.  # noqa: E501
        :type: TimeWindow
        """

        self._time_slot = time_slot

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

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