# 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 ReplacedShipmentInfo(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 = {
        'id': 'str',
        'location_id': 'str',
        'marketplace_attributes': 'MarketplaceAttributes',
        'original_line_items': 'List[OriginalLineItem]',
    }

    attribute_map = {
        'id': 'id',
        'location_id': 'locationId',
        'marketplace_attributes': 'marketplaceAttributes',
        'original_line_items': 'originalLineItems',
    }

    def __init__(self, id=None, location_id=None, marketplace_attributes=None, original_line_items=None, _configuration=None):  # noqa: E501
        """ReplacedShipmentInfo - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._id = None
        self._location_id = None
        self._marketplace_attributes = None
        self._original_line_items = None
        self.discriminator = None

        self.id = id
        self.location_id = location_id
        self.marketplace_attributes = marketplace_attributes
        if original_line_items is not None:
            self.original_line_items = original_line_items

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

        The original shipment's ID.  # noqa: E501

        :return: The id of this ReplacedShipmentInfo.  # noqa: E501
        :rtype: str
        """
        return self._id

    @id.setter
    def id(self, id):
        """Sets the id of this ReplacedShipmentInfo.

        The original shipment's ID.  # noqa: E501

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

        self._id = id

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

        The original shipment's location ID.  # noqa: E501

        :return: The location_id of this ReplacedShipmentInfo.  # noqa: E501
        :rtype: str
        """
        return self._location_id

    @location_id.setter
    def location_id(self, location_id):
        """Sets the location_id of this ReplacedShipmentInfo.

        The original shipment's location ID.  # noqa: E501

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

        self._location_id = location_id

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


        :return: The marketplace_attributes of this ReplacedShipmentInfo.  # noqa: E501
        :rtype: MarketplaceAttributes
        """
        return self._marketplace_attributes

    @marketplace_attributes.setter
    def marketplace_attributes(self, marketplace_attributes):
        """Sets the marketplace_attributes of this ReplacedShipmentInfo.


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

        self._marketplace_attributes = marketplace_attributes

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

        The line items from the original shipment that corresponds to this shipment.  # noqa: E501

        :return: The original_line_items of this ReplacedShipmentInfo.  # noqa: E501
        :rtype: List[OriginalLineItem]
        """
        return self._original_line_items

    @original_line_items.setter
    def original_line_items(self, original_line_items):
        """Sets the original_line_items of this ReplacedShipmentInfo.

        The line items from the original shipment that corresponds to this shipment.  # noqa: E501

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

        self._original_line_items = original_line_items

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

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