# coding: utf-8

"""
    SevOne API Documentation

    Supported endpoints by the new RESTful API  # noqa: E501

    OpenAPI spec version: 2.1.18, Hash: db562e6
    
    Generated by: https://github.com/swagger-api/swagger-codegen.git
"""


import pprint
import re  # noqa: F401

import six

from swagger_client.models.result_limit_setting import ResultLimitSetting  # noqa: F401,E501
from swagger_client.models.top_n_aggregation_setting import TopNAggregationSetting  # noqa: F401,E501
from swagger_client.models.top_n_setting import TopNSetting  # noqa: F401,E501
from swagger_client.models.top_n_work_hours_setting import TopNWorkHoursSetting  # noqa: F401,E501
from swagger_client.models.units_setting import UnitsSetting  # noqa: F401,E501


class TopNSettings(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 = {
        'aggregation': 'TopNAggregationSetting',
        'result_limit': 'ResultLimitSetting',
        'top_n': 'TopNSetting',
        'units': 'UnitsSetting',
        'work_hours': 'TopNWorkHoursSetting'
    }

    attribute_map = {
        'aggregation': 'aggregation',
        'result_limit': 'resultLimit',
        'top_n': 'topN',
        'units': 'units',
        'work_hours': 'workHours'
    }

    def __init__(self, aggregation=None, result_limit=None, top_n=None, units=None, work_hours=None):  # noqa: E501
        """TopNSettings - a model defined in Swagger"""  # noqa: E501

        self._aggregation = None
        self._result_limit = None
        self._top_n = None
        self._units = None
        self._work_hours = None
        self.discriminator = None

        if aggregation is not None:
            self.aggregation = aggregation
        if result_limit is not None:
            self.result_limit = result_limit
        if top_n is not None:
            self.top_n = top_n
        if units is not None:
            self.units = units
        if work_hours is not None:
            self.work_hours = work_hours

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


        :return: The aggregation of this TopNSettings.  # noqa: E501
        :rtype: TopNAggregationSetting
        """
        return self._aggregation

    @aggregation.setter
    def aggregation(self, aggregation):
        """Sets the aggregation of this TopNSettings.


        :param aggregation: The aggregation of this TopNSettings.  # noqa: E501
        :type: TopNAggregationSetting
        """

        self._aggregation = aggregation

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


        :return: The result_limit of this TopNSettings.  # noqa: E501
        :rtype: ResultLimitSetting
        """
        return self._result_limit

    @result_limit.setter
    def result_limit(self, result_limit):
        """Sets the result_limit of this TopNSettings.


        :param result_limit: The result_limit of this TopNSettings.  # noqa: E501
        :type: ResultLimitSetting
        """

        self._result_limit = result_limit

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


        :return: The top_n of this TopNSettings.  # noqa: E501
        :rtype: TopNSetting
        """
        return self._top_n

    @top_n.setter
    def top_n(self, top_n):
        """Sets the top_n of this TopNSettings.


        :param top_n: The top_n of this TopNSettings.  # noqa: E501
        :type: TopNSetting
        """

        self._top_n = top_n

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


        :return: The units of this TopNSettings.  # noqa: E501
        :rtype: UnitsSetting
        """
        return self._units

    @units.setter
    def units(self, units):
        """Sets the units of this TopNSettings.


        :param units: The units of this TopNSettings.  # noqa: E501
        :type: UnitsSetting
        """

        self._units = units

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


        :return: The work_hours of this TopNSettings.  # noqa: E501
        :rtype: TopNWorkHoursSetting
        """
        return self._work_hours

    @work_hours.setter
    def work_hours(self, work_hours):
        """Sets the work_hours of this TopNSettings.


        :param work_hours: The work_hours of this TopNSettings.  # noqa: E501
        :type: TopNWorkHoursSetting
        """

        self._work_hours = work_hours

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

        return self.__dict__ == other.__dict__

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