# coding: utf-8

"""
    Selling Partner API for Retail Procurement Shipments

    The Selling Partner API for Retail Procurement Shipments provides programmatic access to retail shipping data for vendors.

    The version of the OpenAPI document: v1
    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 ImportDetails(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 = {
        'method_of_payment': 'str',
        'seal_number': 'str',
        'route': 'Route',
        'import_containers': 'str',
        'billable_weight': 'Weight',
        'estimated_ship_by_date': 'datetime',
        'handling_instructions': 'str',
    }

    attribute_map = {
        'method_of_payment': 'methodOfPayment',
        'seal_number': 'sealNumber',
        'route': 'route',
        'import_containers': 'importContainers',
        'billable_weight': 'billableWeight',
        'estimated_ship_by_date': 'estimatedShipByDate',
        'handling_instructions': 'handlingInstructions',
    }

    def __init__(self, method_of_payment=None, seal_number=None, route=None, import_containers=None, billable_weight=None, estimated_ship_by_date=None, handling_instructions=None, _configuration=None):  # noqa: E501
        """ImportDetails - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._method_of_payment = None
        self._seal_number = None
        self._route = None
        self._import_containers = None
        self._billable_weight = None
        self._estimated_ship_by_date = None
        self._handling_instructions = None
        self.discriminator = None

        if method_of_payment is not None:
            self.method_of_payment = method_of_payment
        if seal_number is not None:
            self.seal_number = seal_number
        if route is not None:
            self.route = route
        if import_containers is not None:
            self.import_containers = import_containers
        if billable_weight is not None:
            self.billable_weight = billable_weight
        if estimated_ship_by_date is not None:
            self.estimated_ship_by_date = estimated_ship_by_date
        if handling_instructions is not None:
            self.handling_instructions = handling_instructions

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

        This is used for import purchase orders only. If the recipient requests, this field will contain the shipment method of payment.  # noqa: E501

        :return: The method_of_payment of this ImportDetails.  # noqa: E501
        :rtype: str
        """
        return self._method_of_payment

    @method_of_payment.setter
    def method_of_payment(self, method_of_payment):
        """Sets the method_of_payment of this ImportDetails.

        This is used for import purchase orders only. If the recipient requests, this field will contain the shipment method of payment.  # noqa: E501

        :param method_of_payment: The method_of_payment of this ImportDetails.  # noqa: E501
        :type: str
        """
        allowed_values = ["PaidByBuyer", "CollectOnDelivery", "DefinedByBuyerAndSeller", "FOBPortOfCall", "PrepaidBySeller", "PaidBySeller"]  # noqa: E501
        if (self._configuration.client_side_validation and
                method_of_payment not in allowed_values):
            raise ValueError(
                "Invalid value for `method_of_payment` ({0}), must be one of {1}"  # noqa: E501
                .format(method_of_payment, allowed_values)
            )

        self._method_of_payment = method_of_payment

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

        The container's seal number.  # noqa: E501

        :return: The seal_number of this ImportDetails.  # noqa: E501
        :rtype: str
        """
        return self._seal_number

    @seal_number.setter
    def seal_number(self, seal_number):
        """Sets the seal_number of this ImportDetails.

        The container's seal number.  # noqa: E501

        :param seal_number: The seal_number of this ImportDetails.  # noqa: E501
        :type: str
        """

        self._seal_number = seal_number

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


        :return: The route of this ImportDetails.  # noqa: E501
        :rtype: Route
        """
        return self._route

    @route.setter
    def route(self, route):
        """Sets the route of this ImportDetails.


        :param route: The route of this ImportDetails.  # noqa: E501
        :type: Route
        """

        self._route = route

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

        Types and numbers of container(s) for import purchase orders. Can be a comma-separated list if shipment has multiple containers.  # noqa: E501

        :return: The import_containers of this ImportDetails.  # noqa: E501
        :rtype: str
        """
        return self._import_containers

    @import_containers.setter
    def import_containers(self, import_containers):
        """Sets the import_containers of this ImportDetails.

        Types and numbers of container(s) for import purchase orders. Can be a comma-separated list if shipment has multiple containers.  # noqa: E501

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

        self._import_containers = import_containers

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


        :return: The billable_weight of this ImportDetails.  # noqa: E501
        :rtype: Weight
        """
        return self._billable_weight

    @billable_weight.setter
    def billable_weight(self, billable_weight):
        """Sets the billable_weight of this ImportDetails.


        :param billable_weight: The billable_weight of this ImportDetails.  # noqa: E501
        :type: Weight
        """

        self._billable_weight = billable_weight

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

        Date on which the shipment is expected to be shipped. This value should not be in the past and not more than 60 days out in the future.  # noqa: E501

        :return: The estimated_ship_by_date of this ImportDetails.  # noqa: E501
        :rtype: datetime
        """
        return self._estimated_ship_by_date

    @estimated_ship_by_date.setter
    def estimated_ship_by_date(self, estimated_ship_by_date):
        """Sets the estimated_ship_by_date of this ImportDetails.

        Date on which the shipment is expected to be shipped. This value should not be in the past and not more than 60 days out in the future.  # noqa: E501

        :param estimated_ship_by_date: The estimated_ship_by_date of this ImportDetails.  # noqa: E501
        :type: datetime
        """

        self._estimated_ship_by_date = estimated_ship_by_date

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

        Identification of the instructions on how specified item/carton/pallet should be handled.  # noqa: E501

        :return: The handling_instructions of this ImportDetails.  # noqa: E501
        :rtype: str
        """
        return self._handling_instructions

    @handling_instructions.setter
    def handling_instructions(self, handling_instructions):
        """Sets the handling_instructions of this ImportDetails.

        Identification of the instructions on how specified item/carton/pallet should be handled.  # noqa: E501

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

        self._handling_instructions = handling_instructions

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

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