# coding: utf-8

"""
    ARLAS Exploration API

    Explore the content of ARLAS collections  # noqa: E501

    OpenAPI spec version: 19.0.1
    Contact: contact@gisaia.com
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six


class AggregationResponse(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_time': 'int',
        'total_time': 'int',
        'totalnb': 'int',
        'name': 'str',
        'count': 'int',
        'sumotherdoccounts': 'int',
        'key': 'object',
        'key_as_string': 'object',
        'elements': 'list[AggregationResponse]',
        'metrics': 'list[AggregationMetric]',
        'hits': 'list[object]',
        'geometries': 'list[ReturnedGeometry]',
        'flattened_elements': 'dict(str, object)'
    }

    attribute_map = {
        'query_time': 'query_time',
        'total_time': 'total_time',
        'totalnb': 'totalnb',
        'name': 'name',
        'count': 'count',
        'sumotherdoccounts': 'sumotherdoccounts',
        'key': 'key',
        'key_as_string': 'key_as_string',
        'elements': 'elements',
        'metrics': 'metrics',
        'hits': 'hits',
        'geometries': 'geometries',
        'flattened_elements': 'flattened_elements'
    }

    def __init__(self, query_time=None, total_time=None, totalnb=None, name=None, count=None, sumotherdoccounts=None, key=None, key_as_string=None, elements=None, metrics=None, hits=None, geometries=None, flattened_elements=None):  # noqa: E501
        """AggregationResponse - a model defined in Swagger"""  # noqa: E501

        self._query_time = None
        self._total_time = None
        self._totalnb = None
        self._name = None
        self._count = None
        self._sumotherdoccounts = None
        self._key = None
        self._key_as_string = None
        self._elements = None
        self._metrics = None
        self._hits = None
        self._geometries = None
        self._flattened_elements = None
        self.discriminator = None

        if query_time is not None:
            self.query_time = query_time
        if total_time is not None:
            self.total_time = total_time
        if totalnb is not None:
            self.totalnb = totalnb
        if name is not None:
            self.name = name
        if count is not None:
            self.count = count
        if sumotherdoccounts is not None:
            self.sumotherdoccounts = sumotherdoccounts
        if key is not None:
            self.key = key
        if key_as_string is not None:
            self.key_as_string = key_as_string
        if elements is not None:
            self.elements = elements
        if metrics is not None:
            self.metrics = metrics
        if hits is not None:
            self.hits = hits
        if geometries is not None:
            self.geometries = geometries
        if flattened_elements is not None:
            self.flattened_elements = flattened_elements

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


        :return: The query_time of this AggregationResponse.  # noqa: E501
        :rtype: int
        """
        return self._query_time

    @query_time.setter
    def query_time(self, query_time):
        """Sets the query_time of this AggregationResponse.


        :param query_time: The query_time of this AggregationResponse.  # noqa: E501
        :type: int
        """

        self._query_time = query_time

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


        :return: The total_time of this AggregationResponse.  # noqa: E501
        :rtype: int
        """
        return self._total_time

    @total_time.setter
    def total_time(self, total_time):
        """Sets the total_time of this AggregationResponse.


        :param total_time: The total_time of this AggregationResponse.  # noqa: E501
        :type: int
        """

        self._total_time = total_time

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


        :return: The totalnb of this AggregationResponse.  # noqa: E501
        :rtype: int
        """
        return self._totalnb

    @totalnb.setter
    def totalnb(self, totalnb):
        """Sets the totalnb of this AggregationResponse.


        :param totalnb: The totalnb of this AggregationResponse.  # noqa: E501
        :type: int
        """

        self._totalnb = totalnb

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


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

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


        :param name: The name of this AggregationResponse.  # noqa: E501
        :type: str
        """

        self._name = name

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


        :return: The count of this AggregationResponse.  # noqa: E501
        :rtype: int
        """
        return self._count

    @count.setter
    def count(self, count):
        """Sets the count of this AggregationResponse.


        :param count: The count of this AggregationResponse.  # noqa: E501
        :type: int
        """

        self._count = count

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


        :return: The sumotherdoccounts of this AggregationResponse.  # noqa: E501
        :rtype: int
        """
        return self._sumotherdoccounts

    @sumotherdoccounts.setter
    def sumotherdoccounts(self, sumotherdoccounts):
        """Sets the sumotherdoccounts of this AggregationResponse.


        :param sumotherdoccounts: The sumotherdoccounts of this AggregationResponse.  # noqa: E501
        :type: int
        """

        self._sumotherdoccounts = sumotherdoccounts

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


        :return: The key of this AggregationResponse.  # noqa: E501
        :rtype: object
        """
        return self._key

    @key.setter
    def key(self, key):
        """Sets the key of this AggregationResponse.


        :param key: The key of this AggregationResponse.  # noqa: E501
        :type: object
        """

        self._key = key

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


        :return: The key_as_string of this AggregationResponse.  # noqa: E501
        :rtype: object
        """
        return self._key_as_string

    @key_as_string.setter
    def key_as_string(self, key_as_string):
        """Sets the key_as_string of this AggregationResponse.


        :param key_as_string: The key_as_string of this AggregationResponse.  # noqa: E501
        :type: object
        """

        self._key_as_string = key_as_string

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


        :return: The elements of this AggregationResponse.  # noqa: E501
        :rtype: list[AggregationResponse]
        """
        return self._elements

    @elements.setter
    def elements(self, elements):
        """Sets the elements of this AggregationResponse.


        :param elements: The elements of this AggregationResponse.  # noqa: E501
        :type: list[AggregationResponse]
        """

        self._elements = elements

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


        :return: The metrics of this AggregationResponse.  # noqa: E501
        :rtype: list[AggregationMetric]
        """
        return self._metrics

    @metrics.setter
    def metrics(self, metrics):
        """Sets the metrics of this AggregationResponse.


        :param metrics: The metrics of this AggregationResponse.  # noqa: E501
        :type: list[AggregationMetric]
        """

        self._metrics = metrics

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


        :return: The hits of this AggregationResponse.  # noqa: E501
        :rtype: list[object]
        """
        return self._hits

    @hits.setter
    def hits(self, hits):
        """Sets the hits of this AggregationResponse.


        :param hits: The hits of this AggregationResponse.  # noqa: E501
        :type: list[object]
        """

        self._hits = hits

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


        :return: The geometries of this AggregationResponse.  # noqa: E501
        :rtype: list[ReturnedGeometry]
        """
        return self._geometries

    @geometries.setter
    def geometries(self, geometries):
        """Sets the geometries of this AggregationResponse.


        :param geometries: The geometries of this AggregationResponse.  # noqa: E501
        :type: list[ReturnedGeometry]
        """

        self._geometries = geometries

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


        :return: The flattened_elements of this AggregationResponse.  # noqa: E501
        :rtype: dict(str, object)
        """
        return self._flattened_elements

    @flattened_elements.setter
    def flattened_elements(self, flattened_elements):
        """Sets the flattened_elements of this AggregationResponse.


        :param flattened_elements: The flattened_elements of this AggregationResponse.  # noqa: E501
        :type: dict(str, object)
        """

        self._flattened_elements = flattened_elements

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

        return self.__dict__ == other.__dict__

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