# 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 ShippingInfo(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 = {
        'recommended_ship_method': 'str',
        'expected_shipping_date_time_in_utc': 'str',
        'ship_to_address': 'Address',
        'shipping_type': 'str',
        'recommended_packages': 'List[RecommendedPackage]',
    }

    attribute_map = {
        'recommended_ship_method': 'recommendedShipMethod',
        'expected_shipping_date_time_in_utc': 'expectedShippingDateTimeInUTC',
        'ship_to_address': 'shipToAddress',
        'shipping_type': 'shippingType',
        'recommended_packages': 'recommendedPackages',
    }

    def __init__(self, recommended_ship_method=None, expected_shipping_date_time_in_utc=None, ship_to_address=None, shipping_type=None, recommended_packages=None, _configuration=None):  # noqa: E501
        """ShippingInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._recommended_ship_method = None
        self._expected_shipping_date_time_in_utc = None
        self._ship_to_address = None
        self._shipping_type = None
        self._recommended_packages = None
        self.discriminator = None

        if recommended_ship_method is not None:
            self.recommended_ship_method = recommended_ship_method
        self.expected_shipping_date_time_in_utc = expected_shipping_date_time_in_utc
        if ship_to_address is not None:
            self.ship_to_address = ship_to_address
        if shipping_type is not None:
            self.shipping_type = shipping_type
        if recommended_packages is not None:
            self.recommended_packages = recommended_packages

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

        The ship method recommended by the Amazon Fulfillment Network for the packages in this shipment.  # noqa: E501

        :return: The recommended_ship_method of this ShippingInfo.  # noqa: E501
        :rtype: str
        """
        return self._recommended_ship_method

    @recommended_ship_method.setter
    def recommended_ship_method(self, recommended_ship_method):
        """Sets the recommended_ship_method of this ShippingInfo.

        The ship method recommended by the Amazon Fulfillment Network for the packages in this shipment.  # noqa: E501

        :param recommended_ship_method: The recommended_ship_method of this ShippingInfo.  # noqa: E501
        :type: str
        """

        self._recommended_ship_method = recommended_ship_method

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

        A date and time in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.  # noqa: E501

        :return: The expected_shipping_date_time_in_utc of this ShippingInfo.  # noqa: E501
        :rtype: str
        """
        return self._expected_shipping_date_time_in_utc

    @expected_shipping_date_time_in_utc.setter
    def expected_shipping_date_time_in_utc(self, expected_shipping_date_time_in_utc):
        """Sets the expected_shipping_date_time_in_utc of this ShippingInfo.

        A date and time in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) format.  # noqa: E501

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

        self._expected_shipping_date_time_in_utc = expected_shipping_date_time_in_utc

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


        :return: The ship_to_address of this ShippingInfo.  # noqa: E501
        :rtype: Address
        """
        return self._ship_to_address

    @ship_to_address.setter
    def ship_to_address(self, ship_to_address):
        """Sets the ship_to_address of this ShippingInfo.


        :param ship_to_address: The ship_to_address of this ShippingInfo.  # noqa: E501
        :type: Address
        """

        self._ship_to_address = ship_to_address

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

        The type of shipping that the seller uses to deliver a customer order.  # noqa: E501

        :return: The shipping_type of this ShippingInfo.  # noqa: E501
        :rtype: str
        """
        return self._shipping_type

    @shipping_type.setter
    def shipping_type(self, shipping_type):
        """Sets the shipping_type of this ShippingInfo.

        The type of shipping that the seller uses to deliver a customer order.  # noqa: E501

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

        self._shipping_type = shipping_type

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

        Recommendations for the packages in an order.  # noqa: E501

        :return: The recommended_packages of this ShippingInfo.  # noqa: E501
        :rtype: List[RecommendedPackage]
        """
        return self._recommended_packages

    @recommended_packages.setter
    def recommended_packages(self, recommended_packages):
        """Sets the recommended_packages of this ShippingInfo.

        Recommendations for the packages in an order.  # noqa: E501

        :param recommended_packages: The recommended_packages of this ShippingInfo.  # noqa: E501
        :type: List[RecommendedPackage]
        """
        if (self._configuration.client_side_validation and
                recommended_packages is not None and len(recommended_packages) < 1):
            raise ValueError("Invalid value for `recommended_packages`, number of items must be greater than or equal to `1`")  # noqa: E501

        self._recommended_packages = recommended_packages

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

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