# 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 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': 'AmazonOrderId',
        'seller_order_id': 'SellerOrderId',
        'item_list': 'ItemList',
        'ship_from_address': 'Address',
        'package_dimensions': 'PackageDimensions',
        'weight': 'Weight',
        'must_arrive_by_date': 'Timestamp',
        'ship_date': 'Timestamp',
        '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: AmazonOrderId
        """
        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: AmazonOrderId
        """
        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: SellerOrderId
        """
        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: SellerOrderId
        """

        self._seller_order_id = seller_order_id

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


        :return: The item_list of this ShipmentRequestDetails.  # noqa: E501
        :rtype: ItemList
        """
        return self._item_list

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


        :param item_list: The item_list of this ShipmentRequestDetails.  # noqa: E501
        :type: ItemList
        """
        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

        The address of the sender.  # 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.

        The address of the sender.  # noqa: E501

        :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

        The package dimensions.  # 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.

        The package dimensions.  # noqa: E501

        :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

        The package weight.  # 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.

        The package weight.  # noqa: E501

        :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

        The date by which the package must arrive to keep the promise to the customer, in ISO 8601 datetime format. If MustArriveByDate is specified, only shipping service offers that can be delivered by that date are returned.  # noqa: E501

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

        The date by which the package must arrive to keep the promise to the customer, in ISO 8601 datetime format. If MustArriveByDate is specified, only shipping service offers that can be delivered by that date are returned.  # noqa: E501

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

        self._must_arrive_by_date = must_arrive_by_date

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

        When used in a request, this is the date and time that the seller wants to ship the package. When used in a response, this is the date and time that the package can be shipped by the indicated method.  # noqa: E501

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

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

        When used in a request, this is the date and time that the seller wants to ship the package. When used in a response, this is the date and time that the package can be shipped by the indicated method.  # noqa: E501

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

        self._ship_date = ship_date

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

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

        Extra services offered by the carrier.  # noqa: E501

        :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

        Label customization options.  # 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.

        Label customization options.  # noqa: E501

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