# coding: utf-8

"""
    IncQuery Server Model Analyzer

    Model Analyzer jobs can be executed on indexed compartments.  # noqa: E501

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


import pprint
import re  # noqa: F401

import six

from model_analyzer_client.configuration import Configuration


class QuerySpecificationResponse(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',
        'parameters': 'list[QueryParameter]',
        'definition': 'str',
        'annotations': 'list[QuerySpecificationAnnotation]'
    }

    attribute_map = {
        'query_fqn': 'queryFQN',
        'parameters': 'parameters',
        'definition': 'definition',
        'annotations': 'annotations'
    }

    def __init__(self, query_fqn=None, parameters=None, definition=None, annotations=None, local_vars_configuration=None):  # noqa: E501
        """QuerySpecificationResponse - 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._parameters = None
        self._definition = None
        self._annotations = None
        self.discriminator = None

        self.query_fqn = query_fqn
        self.parameters = parameters
        self.definition = definition
        self.annotations = annotations

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


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

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


        :param query_fqn: The query_fqn of this QuerySpecificationResponse.  # 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 parameters(self):
        """Gets the parameters of this QuerySpecificationResponse.  # noqa: E501


        :return: The parameters of this QuerySpecificationResponse.  # noqa: E501
        :rtype: list[QueryParameter]
        """
        return self._parameters

    @parameters.setter
    def parameters(self, parameters):
        """Sets the parameters of this QuerySpecificationResponse.


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

        self._parameters = parameters

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


        :return: The definition of this QuerySpecificationResponse.  # noqa: E501
        :rtype: str
        """
        return self._definition

    @definition.setter
    def definition(self, definition):
        """Sets the definition of this QuerySpecificationResponse.


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

        self._definition = definition

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


        :return: The annotations of this QuerySpecificationResponse.  # noqa: E501
        :rtype: list[QuerySpecificationAnnotation]
        """
        return self._annotations

    @annotations.setter
    def annotations(self, annotations):
        """Sets the annotations of this QuerySpecificationResponse.


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

        self._annotations = annotations

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

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