# 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 ShipmentRequestDetails(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 = {
        'amazon_order_id': 'str',
        'seller_order_id': 'str',
        'item_list': 'List[Item]',
        'ship_from_address': 'Address',
        'package_dimensions': 'PackageDimensions',
        'weight': 'Weight',
        'must_arrive_by_date': 'datetime',
        'ship_date': 'datetime',
        'shipping_service_options': 'ShippingServiceOptions',
        'label_customization': 'LabelCustomization',
    }

    attribute_map = {
        'amazon_order_id': 'AmazonOrderId',
        'seller_order_id': 'SellerOrderId',
        'item_list': 'ItemList',
        'ship_from_address': 'ShipFromAddress',
        'package_dimensions': 'PackageDimensions',
        'weight': 'Weight',
        'must_arrive_by_date': 'MustArriveByDate',
        'ship_date': 'ShipDate',
        'shipping_service_options': 'ShippingServiceOptions',
        'label_customization': 'LabelCustomization',
    }

    def __init__(self, amazon_order_id=None, seller_order_id=None, item_list=None, ship_from_address=None, package_dimensions=None, weight=None, must_arrive_by_date=None, ship_date=None, shipping_service_options=None, label_customization=None, _configuration=None):  # noqa: E501
        """ShipmentRequestDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._amazon_order_id = None
        self._seller_order_id = None
        self._item_list = None
        self._ship_from_address = None
        self._package_dimensions = None
        self._weight = None
        self._must_arrive_by_date = None
        self._ship_date = None
        self._shipping_service_options = None
        self._label_customization = None
        self.discriminator = None

        self.amazon_order_id = amazon_order_id
        if seller_order_id is not None:
            self.seller_order_id = seller_order_id
        self.item_list = item_list
        self.ship_from_address = ship_from_address
        self.package_dimensions = package_dimensions
        self.weight = weight
        if must_arrive_by_date is not None:
            self.must_arrive_by_date = must_arrive_by_date
        if ship_date is not None:
            self.ship_date = ship_date
        self.shipping_service_options = shipping_service_options
        if label_customization is not None:
            self.label_customization = label_customization

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

        An Amazon-defined order identifier, in 3-7-7 format.  # noqa: E501

        :return: The amazon_order_id of this ShipmentRequestDetails.  # noqa: E501
        :rtype: str
        """
        return self._amazon_order_id

    @amazon_order_id.setter
    def amazon_order_id(self, amazon_order_id):
        """Sets the amazon_order_id of this ShipmentRequestDetails.

        An Amazon-defined order identifier, in 3-7-7 format.  # noqa: E501

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

        self._amazon_order_id = amazon_order_id

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

        A seller-defined order identifier.  # noqa: E501

        :return: The seller_order_id of this ShipmentRequestDetails.  # noqa: E501
        :rtype: str
        """
        return self._seller_order_id

    @seller_order_id.setter
    def seller_order_id(self, seller_order_id):
        """Sets the seller_order_id of this ShipmentRequestDetails.

        A seller-defined order identifier.  # noqa: E501

        :param seller_order_id: The seller_order_id of this ShipmentRequestDetails.  # noqa: E501
        :type: str
        """
        if (self._configuration.client_side_validation and
                seller_order_id is not None and len(seller_order_id) > 64):
            raise ValueError("Invalid value for `seller_order_id`, length must be less than or equal to `64`")  # noqa: E501

        self._seller_order_id = seller_order_id

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

        The list of items you want to include in a shipment.  # noqa: E501

        :return: The item_list of this ShipmentRequestDetails.  # noqa: E501
        :rtype: List[Item]
        """
        return self._item_list

    @item_list.setter
    def item_list(self, item_list):
        """Sets the item_list of this ShipmentRequestDetails.

        The list of items you want to include in a shipment.  # noqa: E501

        :param item_list: The item_list of this ShipmentRequestDetails.  # noqa: E501
        :type: List[Item]
        """
        if self._configuration.client_side_validation and item_list is None:
            raise ValueError("Invalid value for `item_list`, must not be `None`")  # noqa: E501

        self._item_list = item_list

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


        :return: The ship_from_address of this ShipmentRequestDetails.  # noqa: E501
        :rtype: Address
        """
        return self._ship_from_address

    @ship_from_address.setter
    def ship_from_address(self, ship_from_address):
        """Sets the ship_from_address of this ShipmentRequestDetails.


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

        self._ship_from_address = ship_from_address

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


        :return: The package_dimensions of this ShipmentRequestDetails.  # noqa: E501
        :rtype: PackageDimensions
        """
        return self._package_dimensions

    @package_dimensions.setter
    def package_dimensions(self, package_dimensions):
        """Sets the package_dimensions of this ShipmentRequestDetails.


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

        self._package_dimensions = package_dimensions

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


        :return: The weight of this ShipmentRequestDetails.  # noqa: E501
        :rtype: Weight
        """
        return self._weight

    @weight.setter
    def weight(self, weight):
        """Sets the weight of this ShipmentRequestDetails.


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

        self._weight = weight

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

        Date-time formatted timestamp.  # noqa: E501

        :return: The must_arrive_by_date of this ShipmentRequestDetails.  # noqa: E501
        :rtype: datetime
        """
        return self._must_arrive_by_date

    @must_arrive_by_date.setter
    def must_arrive_by_date(self, must_arrive_by_date):
        """Sets the must_arrive_by_date of this ShipmentRequestDetails.

        Date-time formatted timestamp.  # noqa: E501

        :param must_arrive_by_date: The must_arrive_by_date of this ShipmentRequestDetails.  # noqa: E501
        :type: datetime
        """

        self._must_arrive_by_date = must_arrive_by_date

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

        Date-time formatted timestamp.  # noqa: E501

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

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

        Date-time formatted timestamp.  # noqa: E501

        :param ship_date: The ship_date of this ShipmentRequestDetails.  # noqa: E501
        :type: datetime
        """

        self._ship_date = ship_date

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


        :return: The shipping_service_options of this ShipmentRequestDetails.  # 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 ShipmentRequestDetails.


        :param shipping_service_options: The shipping_service_options of this ShipmentRequestDetails.  # 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 label_customization(self):
        """Gets the label_customization of this ShipmentRequestDetails.  # noqa: E501


        :return: The label_customization of this ShipmentRequestDetails.  # noqa: E501
        :rtype: LabelCustomization
        """
        return self._label_customization

    @label_customization.setter
    def label_customization(self, label_customization):
        """Sets the label_customization of this ShipmentRequestDetails.


        :param label_customization: The label_customization of this ShipmentRequestDetails.  # noqa: E501
        :type: LabelCustomization
        """

        self._label_customization = label_customization

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

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