# coding: utf-8

"""
    SparkWorks Core API

    Management Service for the SparkWorks Processing Engine  # noqa: E501

    OpenAPI spec version: v2.0
    Contact: info@sparkworks.net
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from sparkworks_client.models.single_resource_measurement_api_model import SingleResourceMeasurementAPIModel  # noqa: F401,E501


class AnalyticsResourceDataResponseDTOAPIModel(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 = {
        'average': 'float',
        'data': 'list[SingleResourceMeasurementAPIModel]',
        'summary': 'float'
    }

    attribute_map = {
        'average': 'average',
        'data': 'data',
        'summary': 'summary'
    }

    def __init__(self, average=None, data=None, summary=None):  # noqa: E501
        """AnalyticsResourceDataResponseDTOAPIModel - a model defined in Swagger"""  # noqa: E501

        self._average = None
        self._data = None
        self._summary = None
        self.discriminator = None

        if average is not None:
            self.average = average
        if data is not None:
            self.data = data
        if summary is not None:
            self.summary = summary

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

        The average value of the included data  # noqa: E501

        :return: The average of this AnalyticsResourceDataResponseDTOAPIModel.  # noqa: E501
        :rtype: float
        """
        return self._average

    @average.setter
    def average(self, average):
        """Sets the average of this AnalyticsResourceDataResponseDTOAPIModel.

        The average value of the included data  # noqa: E501

        :param average: The average of this AnalyticsResourceDataResponseDTOAPIModel.  # noqa: E501
        :type: float
        """

        self._average = average

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

        Array of ResourceDataDTO API Model  # noqa: E501

        :return: The data of this AnalyticsResourceDataResponseDTOAPIModel.  # noqa: E501
        :rtype: list[SingleResourceMeasurementAPIModel]
        """
        return self._data

    @data.setter
    def data(self, data):
        """Sets the data of this AnalyticsResourceDataResponseDTOAPIModel.

        Array of ResourceDataDTO API Model  # noqa: E501

        :param data: The data of this AnalyticsResourceDataResponseDTOAPIModel.  # noqa: E501
        :type: list[SingleResourceMeasurementAPIModel]
        """

        self._data = data

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

        The summary value of the included data  # noqa: E501

        :return: The summary of this AnalyticsResourceDataResponseDTOAPIModel.  # noqa: E501
        :rtype: float
        """
        return self._summary

    @summary.setter
    def summary(self, summary):
        """Sets the summary of this AnalyticsResourceDataResponseDTOAPIModel.

        The summary value of the included data  # noqa: E501

        :param summary: The summary of this AnalyticsResourceDataResponseDTOAPIModel.  # noqa: E501
        :type: float
        """

        self._summary = summary

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

        return self.__dict__ == other.__dict__

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