# coding: utf-8

"""
    Selling Partner APIs for Fulfillment Outbound

    The Selling Partner API for Fulfillment Outbound lets you create applications that help a seller fulfill Multi-Channel Fulfillment orders using their inventory in Amazon's fulfillment network. You can get information on both potential and existing fulfillment orders.

    The version of the OpenAPI document: 2020-07-01
    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 GetFulfillmentOrderResult(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 = {
        'fulfillment_order': 'FulfillmentOrder',
        'fulfillment_order_items': 'List[FulfillmentOrderItem]',
        'fulfillment_shipments': 'List[FulfillmentShipment]',
        'return_items': 'List[ReturnItem]',
        'return_authorizations': 'List[ReturnAuthorization]',
        'payment_information': 'List[PaymentInformation]',
    }

    attribute_map = {
        'fulfillment_order': 'fulfillmentOrder',
        'fulfillment_order_items': 'fulfillmentOrderItems',
        'fulfillment_shipments': 'fulfillmentShipments',
        'return_items': 'returnItems',
        'return_authorizations': 'returnAuthorizations',
        'payment_information': 'paymentInformation',
    }

    def __init__(self, fulfillment_order=None, fulfillment_order_items=None, fulfillment_shipments=None, return_items=None, return_authorizations=None, payment_information=None, _configuration=None):  # noqa: E501
        """GetFulfillmentOrderResult - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._fulfillment_order = None
        self._fulfillment_order_items = None
        self._fulfillment_shipments = None
        self._return_items = None
        self._return_authorizations = None
        self._payment_information = None
        self.discriminator = None

        self.fulfillment_order = fulfillment_order
        self.fulfillment_order_items = fulfillment_order_items
        if fulfillment_shipments is not None:
            self.fulfillment_shipments = fulfillment_shipments
        self.return_items = return_items
        self.return_authorizations = return_authorizations
        if payment_information is not None:
            self.payment_information = payment_information

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


        :return: The fulfillment_order of this GetFulfillmentOrderResult.  # noqa: E501
        :rtype: FulfillmentOrder
        """
        return self._fulfillment_order

    @fulfillment_order.setter
    def fulfillment_order(self, fulfillment_order):
        """Sets the fulfillment_order of this GetFulfillmentOrderResult.


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

        self._fulfillment_order = fulfillment_order

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

        An array of fulfillment order item information.  # noqa: E501

        :return: The fulfillment_order_items of this GetFulfillmentOrderResult.  # noqa: E501
        :rtype: List[FulfillmentOrderItem]
        """
        return self._fulfillment_order_items

    @fulfillment_order_items.setter
    def fulfillment_order_items(self, fulfillment_order_items):
        """Sets the fulfillment_order_items of this GetFulfillmentOrderResult.

        An array of fulfillment order item information.  # noqa: E501

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

        self._fulfillment_order_items = fulfillment_order_items

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

        An array of fulfillment shipment information.  # noqa: E501

        :return: The fulfillment_shipments of this GetFulfillmentOrderResult.  # noqa: E501
        :rtype: List[FulfillmentShipment]
        """
        return self._fulfillment_shipments

    @fulfillment_shipments.setter
    def fulfillment_shipments(self, fulfillment_shipments):
        """Sets the fulfillment_shipments of this GetFulfillmentOrderResult.

        An array of fulfillment shipment information.  # noqa: E501

        :param fulfillment_shipments: The fulfillment_shipments of this GetFulfillmentOrderResult.  # noqa: E501
        :type: List[FulfillmentShipment]
        """

        self._fulfillment_shipments = fulfillment_shipments

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

        An array of items that Amazon accepted for return. Returns empty if no items were accepted for return.  # noqa: E501

        :return: The return_items of this GetFulfillmentOrderResult.  # noqa: E501
        :rtype: List[ReturnItem]
        """
        return self._return_items

    @return_items.setter
    def return_items(self, return_items):
        """Sets the return_items of this GetFulfillmentOrderResult.

        An array of items that Amazon accepted for return. Returns empty if no items were accepted for return.  # noqa: E501

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

        self._return_items = return_items

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

        An array of return authorization information.  # noqa: E501

        :return: The return_authorizations of this GetFulfillmentOrderResult.  # noqa: E501
        :rtype: List[ReturnAuthorization]
        """
        return self._return_authorizations

    @return_authorizations.setter
    def return_authorizations(self, return_authorizations):
        """Sets the return_authorizations of this GetFulfillmentOrderResult.

        An array of return authorization information.  # noqa: E501

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

        self._return_authorizations = return_authorizations

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

        An array of various payment attributes related to this fulfillment order.  # noqa: E501

        :return: The payment_information of this GetFulfillmentOrderResult.  # noqa: E501
        :rtype: List[PaymentInformation]
        """
        return self._payment_information

    @payment_information.setter
    def payment_information(self, payment_information):
        """Sets the payment_information of this GetFulfillmentOrderResult.

        An array of various payment attributes related to this fulfillment order.  # noqa: E501

        :param payment_information: The payment_information of this GetFulfillmentOrderResult.  # noqa: E501
        :type: List[PaymentInformation]
        """

        self._payment_information = payment_information

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

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