# 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 OriginalLineItem(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 = {
        'replacing_sku': 'str',
        'original_sku': 'str',
        'charges': 'List[Charge]',
    }

    attribute_map = {
        'replacing_sku': 'replacingSku',
        'original_sku': 'originalSku',
        'charges': 'charges',
    }

    def __init__(self, replacing_sku=None, original_sku=None, charges=None, _configuration=None):  # noqa: E501
        """OriginalLineItem - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._replacing_sku = None
        self._original_sku = None
        self._charges = None
        self.discriminator = None

        self.replacing_sku = replacing_sku
        self.original_sku = original_sku
        self.charges = charges

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

        The SKU ID for this shipment  # noqa: E501

        :return: The replacing_sku of this OriginalLineItem.  # noqa: E501
        :rtype: str
        """
        return self._replacing_sku

    @replacing_sku.setter
    def replacing_sku(self, replacing_sku):
        """Sets the replacing_sku of this OriginalLineItem.

        The SKU ID for this shipment  # noqa: E501

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

        self._replacing_sku = replacing_sku

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

        The SKU ID for the original shipment.  # noqa: E501

        :return: The original_sku of this OriginalLineItem.  # noqa: E501
        :rtype: str
        """
        return self._original_sku

    @original_sku.setter
    def original_sku(self, original_sku):
        """Sets the original_sku of this OriginalLineItem.

        The SKU ID for the original shipment.  # noqa: E501

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

        self._original_sku = original_sku

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

        The charges associated with the shipment.  # noqa: E501

        :return: The charges of this OriginalLineItem.  # noqa: E501
        :rtype: List[Charge]
        """
        return self._charges

    @charges.setter
    def charges(self, charges):
        """Sets the charges of this OriginalLineItem.

        The charges associated with the shipment.  # noqa: E501

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

        self._charges = charges

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

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