# coding: utf-8

"""
    The Selling Partner API for Invoices.

    Use the Selling Partner API for Invoices to retrieve and manage invoice-related operations, which can help selling partners manage their bookkeeping processes.

    The version of the OpenAPI document: 2024-06-19
    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 Export(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 = {
        'error_message': 'str',
        'export_id': 'str',
        'generate_export_finished_at': 'datetime',
        'generate_export_started_at': 'datetime',
        'invoices_document_ids': 'List[str]',
        'status': 'ExportStatus',
    }

    attribute_map = {
        'error_message': 'errorMessage',
        'export_id': 'exportId',
        'generate_export_finished_at': 'generateExportFinishedAt',
        'generate_export_started_at': 'generateExportStartedAt',
        'invoices_document_ids': 'invoicesDocumentIds',
        'status': 'status',
    }

    def __init__(self, error_message=None, export_id=None, generate_export_finished_at=None, generate_export_started_at=None, invoices_document_ids=None, status=None, _configuration=None):  # noqa: E501
        """Export - a model defined in Swagger"""  # noqa: E501
        if _configuration is None:
            _configuration = Configuration()
        self._configuration = _configuration

        self._error_message = None
        self._export_id = None
        self._generate_export_finished_at = None
        self._generate_export_started_at = None
        self._invoices_document_ids = None
        self._status = None
        self.discriminator = None

        if error_message is not None:
            self.error_message = error_message
        if export_id is not None:
            self.export_id = export_id
        if generate_export_finished_at is not None:
            self.generate_export_finished_at = generate_export_finished_at
        if generate_export_started_at is not None:
            self.generate_export_started_at = generate_export_started_at
        if invoices_document_ids is not None:
            self.invoices_document_ids = invoices_document_ids
        if status is not None:
            self.status = status

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

        When the export generation fails, this attribute contains a description of the error.  # noqa: E501

        :return: The error_message of this Export.  # noqa: E501
        :rtype: str
        """
        return self._error_message

    @error_message.setter
    def error_message(self, error_message):
        """Sets the error_message of this Export.

        When the export generation fails, this attribute contains a description of the error.  # noqa: E501

        :param error_message: The error_message of this Export.  # noqa: E501
        :type: str
        """

        self._error_message = error_message

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

        The export identifier.  # noqa: E501

        :return: The export_id of this Export.  # noqa: E501
        :rtype: str
        """
        return self._export_id

    @export_id.setter
    def export_id(self, export_id):
        """Sets the export_id of this Export.

        The export identifier.  # noqa: E501

        :param export_id: The export_id of this Export.  # noqa: E501
        :type: str
        """

        self._export_id = export_id

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

        The date and time when the export generation finished. Vales are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.  # noqa: E501

        :return: The generate_export_finished_at of this Export.  # noqa: E501
        :rtype: datetime
        """
        return self._generate_export_finished_at

    @generate_export_finished_at.setter
    def generate_export_finished_at(self, generate_export_finished_at):
        """Sets the generate_export_finished_at of this Export.

        The date and time when the export generation finished. Vales are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.  # noqa: E501

        :param generate_export_finished_at: The generate_export_finished_at of this Export.  # noqa: E501
        :type: datetime
        """

        self._generate_export_finished_at = generate_export_finished_at

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

        The date and time when the export generation started. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.  # noqa: E501

        :return: The generate_export_started_at of this Export.  # noqa: E501
        :rtype: datetime
        """
        return self._generate_export_started_at

    @generate_export_started_at.setter
    def generate_export_started_at(self, generate_export_started_at):
        """Sets the generate_export_started_at of this Export.

        The date and time when the export generation started. Values are in [ISO 8601](https://developer-docs.amazon.com/sp-api/docs/iso-8601) date-time format.  # noqa: E501

        :param generate_export_started_at: The generate_export_started_at of this Export.  # noqa: E501
        :type: datetime
        """

        self._generate_export_started_at = generate_export_started_at

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

        The identifier for the export documents. To get the information required to retrieve the export document's contents, pass each ID in the `getInvoicesDocument` operation.  This list is empty until the status is `DONE`.  # noqa: E501

        :return: The invoices_document_ids of this Export.  # noqa: E501
        :rtype: List[str]
        """
        return self._invoices_document_ids

    @invoices_document_ids.setter
    def invoices_document_ids(self, invoices_document_ids):
        """Sets the invoices_document_ids of this Export.

        The identifier for the export documents. To get the information required to retrieve the export document's contents, pass each ID in the `getInvoicesDocument` operation.  This list is empty until the status is `DONE`.  # noqa: E501

        :param invoices_document_ids: The invoices_document_ids of this Export.  # noqa: E501
        :type: List[str]
        """

        self._invoices_document_ids = invoices_document_ids

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


        :return: The status of this Export.  # noqa: E501
        :rtype: ExportStatus
        """
        return self._status

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


        :param status: The status of this Export.  # noqa: E501
        :type: ExportStatus
        """

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

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