# coding: utf-8

"""
    The Selling Partner API for Amazon Warehousing and Distribution

    The Selling Partner API for Amazon Warehousing and Distribution (AWD) provides programmatic access to information about AWD shipments and inventory.

    The version of the OpenAPI document: 2024-05-09
    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 InboundEligibility(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 = {
        'ineligibility_reasons': 'List[OrderIneligibilityReason]',
        'packages_to_inbound': 'List[SkuEligibility]',
        'previewed_at': 'datetime',
        'status': 'InboundEligibilityStatus',
    }

    attribute_map = {
        'ineligibility_reasons': 'ineligibilityReasons',
        'packages_to_inbound': 'packagesToInbound',
        'previewed_at': 'previewedAt',
        'status': 'status',
    }

    def __init__(self, ineligibility_reasons=None, packages_to_inbound=None, previewed_at=None, status=None, _configuration=None):  # noqa: E501
        """InboundEligibility - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._ineligibility_reasons = None
        self._packages_to_inbound = None
        self._previewed_at = None
        self._status = None
        self.discriminator = None

        if ineligibility_reasons is not None:
            self.ineligibility_reasons = ineligibility_reasons
        self.packages_to_inbound = packages_to_inbound
        self.previewed_at = previewed_at
        self.status = status

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

        If there are order level eligibility issues, then this list will contain those error codes and descriptions.  # noqa: E501

        :return: The ineligibility_reasons of this InboundEligibility.  # noqa: E501
        :rtype: List[OrderIneligibilityReason]
        """
        return self._ineligibility_reasons

    @ineligibility_reasons.setter
    def ineligibility_reasons(self, ineligibility_reasons):
        """Sets the ineligibility_reasons of this InboundEligibility.

        If there are order level eligibility issues, then this list will contain those error codes and descriptions.  # noqa: E501

        :param ineligibility_reasons: The ineligibility_reasons of this InboundEligibility.  # noqa: E501
        :type: List[OrderIneligibilityReason]
        """

        self._ineligibility_reasons = ineligibility_reasons

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

        Details on SKU eligibility for each inbound package.  # noqa: E501

        :return: The packages_to_inbound of this InboundEligibility.  # noqa: E501
        :rtype: List[SkuEligibility]
        """
        return self._packages_to_inbound

    @packages_to_inbound.setter
    def packages_to_inbound(self, packages_to_inbound):
        """Sets the packages_to_inbound of this InboundEligibility.

        Details on SKU eligibility for each inbound package.  # noqa: E501

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

        self._packages_to_inbound = packages_to_inbound

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

        Timestamp when the eligibility check is performed.  # noqa: E501

        :return: The previewed_at of this InboundEligibility.  # noqa: E501
        :rtype: datetime
        """
        return self._previewed_at

    @previewed_at.setter
    def previewed_at(self, previewed_at):
        """Sets the previewed_at of this InboundEligibility.

        Timestamp when the eligibility check is performed.  # noqa: E501

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

        self._previewed_at = previewed_at

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


        :return: The status of this InboundEligibility.  # noqa: E501
        :rtype: InboundEligibilityStatus
        """
        return self._status

    @status.setter
    def status(self, status):
        """Sets the status of this InboundEligibility.


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

        self._status = status

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

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