# coding: utf-8

"""
    IncQuery Server Web API

    No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)  # noqa: E501

    The version of the OpenAPI document: placeHolderApiVersion
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from iqs_client.configuration import Configuration


class QueryExecutionResponse(object):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    """
    Attributes:
      openapi_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.
    """
    openapi_types = {
        'query_fqn': 'str',
        'binding': 'list[Argument]',
        'match_set_size': 'int',
        'matches': 'list[Match]',
        'result_status': 'str'
    }

    attribute_map = {
        'query_fqn': 'queryFQN',
        'binding': 'binding',
        'match_set_size': 'matchSetSize',
        'matches': 'matches',
        'result_status': 'resultStatus'
    }

    def __init__(self, query_fqn=None, binding=None, match_set_size=None, matches=None, result_status=None, local_vars_configuration=None):  # noqa: E501
        """QueryExecutionResponse - a model defined in OpenAPI"""  # noqa: E501
        if local_vars_configuration is None:
            local_vars_configuration = Configuration()
        self.local_vars_configuration = local_vars_configuration

        self._query_fqn = None
        self._binding = None
        self._match_set_size = None
        self._matches = None
        self._result_status = None
        self.discriminator = None

        self.query_fqn = query_fqn
        self.binding = binding
        self.match_set_size = match_set_size
        self.matches = matches
        if result_status is not None:
            self.result_status = result_status

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


        :return: The query_fqn of this QueryExecutionResponse.  # noqa: E501
        :rtype: str
        """
        return self._query_fqn

    @query_fqn.setter
    def query_fqn(self, query_fqn):
        """Sets the query_fqn of this QueryExecutionResponse.


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

        self._query_fqn = query_fqn

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


        :return: The binding of this QueryExecutionResponse.  # noqa: E501
        :rtype: list[Argument]
        """
        return self._binding

    @binding.setter
    def binding(self, binding):
        """Sets the binding of this QueryExecutionResponse.


        :param binding: The binding of this QueryExecutionResponse.  # noqa: E501
        :type: list[Argument]
        """
        if self.local_vars_configuration.client_side_validation and binding is None:  # noqa: E501
            raise ValueError("Invalid value for `binding`, must not be `None`")  # noqa: E501

        self._binding = binding

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


        :return: The match_set_size of this QueryExecutionResponse.  # noqa: E501
        :rtype: int
        """
        return self._match_set_size

    @match_set_size.setter
    def match_set_size(self, match_set_size):
        """Sets the match_set_size of this QueryExecutionResponse.


        :param match_set_size: The match_set_size of this QueryExecutionResponse.  # noqa: E501
        :type: int
        """
        if self.local_vars_configuration.client_side_validation and match_set_size is None:  # noqa: E501
            raise ValueError("Invalid value for `match_set_size`, must not be `None`")  # noqa: E501

        self._match_set_size = match_set_size

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


        :return: The matches of this QueryExecutionResponse.  # noqa: E501
        :rtype: list[Match]
        """
        return self._matches

    @matches.setter
    def matches(self, matches):
        """Sets the matches of this QueryExecutionResponse.


        :param matches: The matches of this QueryExecutionResponse.  # noqa: E501
        :type: list[Match]
        """
        if self.local_vars_configuration.client_side_validation and matches is None:  # noqa: E501
            raise ValueError("Invalid value for `matches`, must not be `None`")  # noqa: E501

        self._matches = matches

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

        OK         - All query results returned TIME_LIMIT - Query execution timeout limit reached, partial results returned SIZE_LIMIT - Query response size limit reached, partial results returned  # noqa: E501

        :return: The result_status of this QueryExecutionResponse.  # noqa: E501
        :rtype: str
        """
        return self._result_status

    @result_status.setter
    def result_status(self, result_status):
        """Sets the result_status of this QueryExecutionResponse.

        OK         - All query results returned TIME_LIMIT - Query execution timeout limit reached, partial results returned SIZE_LIMIT - Query response size limit reached, partial results returned  # noqa: E501

        :param result_status: The result_status of this QueryExecutionResponse.  # noqa: E501
        :type: str
        """
        allowed_values = ["OK", "TIME_LIMIT", "SIZE_LIMIT"]  # noqa: E501
        if self.local_vars_configuration.client_side_validation and result_status not in allowed_values:  # noqa: E501
            raise ValueError(
                "Invalid value for `result_status` ({0}), must be one of {1}"  # noqa: E501
                .format(result_status, allowed_values)
            )

        self._result_status = result_status

    def to_dict(self):
        """Returns the model properties as a dict"""
        result = {}

        for attr, _ in six.iteritems(self.openapi_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

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

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