# coding: utf-8

"""
    Selling Partner API for Data Kiosk

    The Selling Partner API for Data Kiosk lets you submit GraphQL queries from a variety of schemas to help selling partners manage their businesses.  # noqa: E501

    OpenAPI spec version: 2023-11-15
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""

import pprint
import re  # noqa: F401

import six

class Query(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 = {
        'query_id': 'str',
        'query': 'str',
        'created_time': 'datetime',
        'processing_status': 'str',
        'processing_start_time': 'datetime',
        'processing_end_time': 'datetime',
        'data_document_id': 'str',
        'error_document_id': 'str',
        'pagination': 'QueryPagination'
    }

    attribute_map = {
        'query_id': 'queryId',
        'query': 'query',
        'created_time': 'createdTime',
        'processing_status': 'processingStatus',
        'processing_start_time': 'processingStartTime',
        'processing_end_time': 'processingEndTime',
        'data_document_id': 'dataDocumentId',
        'error_document_id': 'errorDocumentId',
        'pagination': 'pagination'
    }

    def __init__(self, query_id=None, query=None, created_time=None, processing_status=None, processing_start_time=None, processing_end_time=None, data_document_id=None, error_document_id=None, pagination=None):  # noqa: E501
        """Query - a model defined in Swagger"""  # noqa: E501
        self._query_id = None
        self._query = None
        self._created_time = None
        self._processing_status = None
        self._processing_start_time = None
        self._processing_end_time = None
        self._data_document_id = None
        self._error_document_id = None
        self._pagination = None
        self.discriminator = None
        self.query_id = query_id
        self.query = query
        self.created_time = created_time
        self.processing_status = processing_status
        if processing_start_time is not None:
            self.processing_start_time = processing_start_time
        if processing_end_time is not None:
            self.processing_end_time = processing_end_time
        if data_document_id is not None:
            self.data_document_id = data_document_id
        if error_document_id is not None:
            self.error_document_id = error_document_id
        if pagination is not None:
            self.pagination = pagination

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

        The query identifier. This identifier is unique only in combination with a selling partner account ID.  # noqa: E501

        :return: The query_id of this Query.  # noqa: E501
        :rtype: str
        """
        return self._query_id

    @query_id.setter
    def query_id(self, query_id):
        """Sets the query_id of this Query.

        The query identifier. This identifier is unique only in combination with a selling partner account ID.  # noqa: E501

        :param query_id: The query_id of this Query.  # noqa: E501
        :type: str
        """
        if query_id is None:
            raise ValueError("Invalid value for `query_id`, must not be `None`")  # noqa: E501

        self._query_id = query_id

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

        The submitted query.  # noqa: E501

        :return: The query of this Query.  # noqa: E501
        :rtype: str
        """
        return self._query

    @query.setter
    def query(self, query):
        """Sets the query of this Query.

        The submitted query.  # noqa: E501

        :param query: The query of this Query.  # noqa: E501
        :type: str
        """
        if query is None:
            raise ValueError("Invalid value for `query`, must not be `None`")  # noqa: E501

        self._query = query

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

        The date and time when the query was created, in ISO 8601 date time format.  # noqa: E501

        :return: The created_time of this Query.  # noqa: E501
        :rtype: datetime
        """
        return self._created_time

    @created_time.setter
    def created_time(self, created_time):
        """Sets the created_time of this Query.

        The date and time when the query was created, in ISO 8601 date time format.  # noqa: E501

        :param created_time: The created_time of this Query.  # noqa: E501
        :type: datetime
        """
        if created_time is None:
            raise ValueError("Invalid value for `created_time`, must not be `None`")  # noqa: E501

        self._created_time = created_time

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

        The processing status of the query.  # noqa: E501

        :return: The processing_status of this Query.  # noqa: E501
        :rtype: str
        """
        return self._processing_status

    @processing_status.setter
    def processing_status(self, processing_status):
        """Sets the processing_status of this Query.

        The processing status of the query.  # noqa: E501

        :param processing_status: The processing_status of this Query.  # noqa: E501
        :type: str
        """
        if processing_status is None:
            raise ValueError("Invalid value for `processing_status`, must not be `None`")  # noqa: E501
        allowed_values = ["CANCELLED", "DONE", "FATAL", "IN_PROGRESS", "IN_QUEUE"]  # noqa: E501
        if processing_status not in allowed_values:
            raise ValueError(
                "Invalid value for `processing_status` ({0}), must be one of {1}"  # noqa: E501
                .format(processing_status, allowed_values)
            )

        self._processing_status = processing_status

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

        The date and time when the query processing started, in ISO 8601 date time format.  # noqa: E501

        :return: The processing_start_time of this Query.  # noqa: E501
        :rtype: datetime
        """
        return self._processing_start_time

    @processing_start_time.setter
    def processing_start_time(self, processing_start_time):
        """Sets the processing_start_time of this Query.

        The date and time when the query processing started, in ISO 8601 date time format.  # noqa: E501

        :param processing_start_time: The processing_start_time of this Query.  # noqa: E501
        :type: datetime
        """

        self._processing_start_time = processing_start_time

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

        The date and time when the query processing completed, in ISO 8601 date time format.  # noqa: E501

        :return: The processing_end_time of this Query.  # noqa: E501
        :rtype: datetime
        """
        return self._processing_end_time

    @processing_end_time.setter
    def processing_end_time(self, processing_end_time):
        """Sets the processing_end_time of this Query.

        The date and time when the query processing completed, in ISO 8601 date time format.  # noqa: E501

        :param processing_end_time: The processing_end_time of this Query.  # noqa: E501
        :type: datetime
        """

        self._processing_end_time = processing_end_time

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

        The data document identifier. This identifier is only present when there is data available as a result of the query. This identifier is unique only in combination with a selling partner account ID. Pass this identifier into the `getDocument` operation to get the information required to retrieve the data document's contents.  # noqa: E501

        :return: The data_document_id of this Query.  # noqa: E501
        :rtype: str
        """
        return self._data_document_id

    @data_document_id.setter
    def data_document_id(self, data_document_id):
        """Sets the data_document_id of this Query.

        The data document identifier. This identifier is only present when there is data available as a result of the query. This identifier is unique only in combination with a selling partner account ID. Pass this identifier into the `getDocument` operation to get the information required to retrieve the data document's contents.  # noqa: E501

        :param data_document_id: The data_document_id of this Query.  # noqa: E501
        :type: str
        """

        self._data_document_id = data_document_id

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

        The error document identifier. This identifier is only present when an error occurs during query processing. This identifier is unique only in combination with a selling partner account ID. Pass this identifier into the `getDocument` operation to get the information required to retrieve the error document's contents.  # noqa: E501

        :return: The error_document_id of this Query.  # noqa: E501
        :rtype: str
        """
        return self._error_document_id

    @error_document_id.setter
    def error_document_id(self, error_document_id):
        """Sets the error_document_id of this Query.

        The error document identifier. This identifier is only present when an error occurs during query processing. This identifier is unique only in combination with a selling partner account ID. Pass this identifier into the `getDocument` operation to get the information required to retrieve the error document's contents.  # noqa: E501

        :param error_document_id: The error_document_id of this Query.  # noqa: E501
        :type: str
        """

        self._error_document_id = error_document_id

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


        :return: The pagination of this Query.  # noqa: E501
        :rtype: QueryPagination
        """
        return self._pagination

    @pagination.setter
    def pagination(self, pagination):
        """Sets the pagination of this Query.


        :param pagination: The pagination of this Query.  # noqa: E501
        :type: QueryPagination
        """

        self._pagination = pagination

    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(Query, 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, Query):
            return False

        return self.__dict__ == other.__dict__

    def __ne__(self, other):
        """Returns true if both objects are not equal"""
        return not self == other
