# coding: utf-8

"""
    The Selling Partner API for FBA inbound operations.

    The Selling Partner API for Fulfillment By Amazon (FBA) Inbound. The FBA Inbound API enables building inbound workflows to create, manage, and send shipments into Amazon's fulfillment network. The API has interoperability with the Send-to-Amazon user interface.

    The version of the OpenAPI document: 2024-03-20
    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 InboundPlanSummary(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 = {
        'created_at': 'datetime',
        'inbound_plan_id': 'str',
        'last_updated_at': 'datetime',
        'marketplace_ids': 'List[str]',
        'name': 'str',
        'source_address': 'Address',
        'status': 'str',
    }

    attribute_map = {
        'created_at': 'createdAt',
        'inbound_plan_id': 'inboundPlanId',
        'last_updated_at': 'lastUpdatedAt',
        'marketplace_ids': 'marketplaceIds',
        'name': 'name',
        'source_address': 'sourceAddress',
        'status': 'status',
    }

    def __init__(self, created_at=None, inbound_plan_id=None, last_updated_at=None, marketplace_ids=None, name=None, source_address=None, status=None, _configuration=None):  # noqa: E501
        """InboundPlanSummary - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._created_at = None
        self._inbound_plan_id = None
        self._last_updated_at = None
        self._marketplace_ids = None
        self._name = None
        self._source_address = None
        self._status = None
        self.discriminator = None

        self.created_at = created_at
        self.inbound_plan_id = inbound_plan_id
        self.last_updated_at = last_updated_at
        self.marketplace_ids = marketplace_ids
        self.name = name
        self.source_address = source_address
        self.status = status

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

        The time at which the inbound plan was created. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ssZ`.  # noqa: E501

        :return: The created_at of this InboundPlanSummary.  # noqa: E501
        :rtype: datetime
        """
        return self._created_at

    @created_at.setter
    def created_at(self, created_at):
        """Sets the created_at of this InboundPlanSummary.

        The time at which the inbound plan was created. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ssZ`.  # noqa: E501

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

        self._created_at = created_at

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

        Identifier of an inbound plan.  # noqa: E501

        :return: The inbound_plan_id of this InboundPlanSummary.  # noqa: E501
        :rtype: str
        """
        return self._inbound_plan_id

    @inbound_plan_id.setter
    def inbound_plan_id(self, inbound_plan_id):
        """Sets the inbound_plan_id of this InboundPlanSummary.

        Identifier of an inbound plan.  # noqa: E501

        :param inbound_plan_id: The inbound_plan_id of this InboundPlanSummary.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and inbound_plan_id is None:
            raise ValueError("Invalid value for `inbound_plan_id`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                inbound_plan_id is not None and len(inbound_plan_id) > 38):
            raise ValueError("Invalid value for `inbound_plan_id`, length must be less than or equal to `38`")  # noqa: E501
        if (self._configuration.client_side_validation and
                inbound_plan_id is not None and len(inbound_plan_id) < 38):
            raise ValueError("Invalid value for `inbound_plan_id`, length must be greater than or equal to `38`")  # noqa: E501
        if (self._configuration.client_side_validation and
                inbound_plan_id is not None and not re.search(r'^[a-zA-Z0-9-]*$', inbound_plan_id)):  # noqa: E501
            raise ValueError(r"Invalid value for `inbound_plan_id`, must be a follow pattern or equal to `/^[a-zA-Z0-9-]*$/`")  # noqa: E501

        self._inbound_plan_id = inbound_plan_id

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

        The time at which the inbound plan was last updated. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ssZ`.  # noqa: E501

        :return: The last_updated_at of this InboundPlanSummary.  # noqa: E501
        :rtype: datetime
        """
        return self._last_updated_at

    @last_updated_at.setter
    def last_updated_at(self, last_updated_at):
        """Sets the last_updated_at of this InboundPlanSummary.

        The time at which the inbound plan was last updated. In [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) datetime format with pattern `yyyy-MM-ddTHH:mm:ssZ`.  # noqa: E501

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

        self._last_updated_at = last_updated_at

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

        A list of marketplace IDs.  # noqa: E501

        :return: The marketplace_ids of this InboundPlanSummary.  # noqa: E501
        :rtype: List[str]
        """
        return self._marketplace_ids

    @marketplace_ids.setter
    def marketplace_ids(self, marketplace_ids):
        """Sets the marketplace_ids of this InboundPlanSummary.

        A list of marketplace IDs.  # noqa: E501

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

        self._marketplace_ids = marketplace_ids

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

        Human-readable name of the inbound plan.  # noqa: E501

        :return: The name of this InboundPlanSummary.  # noqa: E501
        :rtype: str
        """
        return self._name

    @name.setter
    def name(self, name):
        """Sets the name of this InboundPlanSummary.

        Human-readable name of the inbound plan.  # noqa: E501

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

        self._name = name

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


        :return: The source_address of this InboundPlanSummary.  # noqa: E501
        :rtype: Address
        """
        return self._source_address

    @source_address.setter
    def source_address(self, source_address):
        """Sets the source_address of this InboundPlanSummary.


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

        self._source_address = source_address

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

        The current status of the inbound plan. Possible values: `ACTIVE`, `VOIDED`, `SHIPPED`, `ERRORED`.  # noqa: E501

        :return: The status of this InboundPlanSummary.  # noqa: E501
        :rtype: str
        """
        return self._status

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

        The current status of the inbound plan. Possible values: `ACTIVE`, `VOIDED`, `SHIPPED`, `ERRORED`.  # noqa: E501

        :param status: The status of this InboundPlanSummary.  # noqa: E501
        :type: str
        """
        if self._configuration.client_side_validation and status is None:
            raise ValueError("Invalid value for `status`, must not be `None`")  # noqa: E501
        if (self._configuration.client_side_validation and
                status is not None and len(status) > 1024):
            raise ValueError("Invalid value for `status`, length must be less than or equal to `1024`")  # noqa: E501
        if (self._configuration.client_side_validation and
                status is not None and len(status) < 1):
            raise ValueError("Invalid value for `status`, length must be greater than or equal to `1`")  # 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(InboundPlanSummary, 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, InboundPlanSummary):
            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, InboundPlanSummary):
            return True

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