# coding: utf-8

"""
    Finnhub API

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

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


import pprint
import re  # noqa: F401

import six

from docifier-test.configuration import Configuration


class EarningEstimate(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 = {
        'eps_avg': 'float',
        'eps_high': 'float',
        'eps_low': 'float',
        'number_analysts': 'int',
        'period': 'date'
    }

    attribute_map = {
        'eps_avg': 'epsAvg',
        'eps_high': 'epsHigh',
        'eps_low': 'epsLow',
        'number_analysts': 'numberAnalysts',
        'period': 'period'
    }

    def __init__(self, eps_avg=None, eps_high=None, eps_low=None, number_analysts=None, period=None, local_vars_configuration=None):  # noqa: E501
        """EarningEstimate - 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._eps_avg = None
        self._eps_high = None
        self._eps_low = None
        self._number_analysts = None
        self._period = None
        self.discriminator = None

        if eps_avg is not None:
            self.eps_avg = eps_avg
        if eps_high is not None:
            self.eps_high = eps_high
        if eps_low is not None:
            self.eps_low = eps_low
        if number_analysts is not None:
            self.number_analysts = number_analysts
        if period is not None:
            self.period = period

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

        Average EPS estimates.  # noqa: E501

        :return: The eps_avg of this EarningEstimate.  # noqa: E501
        :rtype: float
        """
        return self._eps_avg

    @eps_avg.setter
    def eps_avg(self, eps_avg):
        """Sets the eps_avg of this EarningEstimate.

        Average EPS estimates.  # noqa: E501

        :param eps_avg: The eps_avg of this EarningEstimate.  # noqa: E501
        :type: float
        """

        self._eps_avg = eps_avg

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

        Highest estimate.  # noqa: E501

        :return: The eps_high of this EarningEstimate.  # noqa: E501
        :rtype: float
        """
        return self._eps_high

    @eps_high.setter
    def eps_high(self, eps_high):
        """Sets the eps_high of this EarningEstimate.

        Highest estimate.  # noqa: E501

        :param eps_high: The eps_high of this EarningEstimate.  # noqa: E501
        :type: float
        """

        self._eps_high = eps_high

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

        Lowest estimate.  # noqa: E501

        :return: The eps_low of this EarningEstimate.  # noqa: E501
        :rtype: float
        """
        return self._eps_low

    @eps_low.setter
    def eps_low(self, eps_low):
        """Sets the eps_low of this EarningEstimate.

        Lowest estimate.  # noqa: E501

        :param eps_low: The eps_low of this EarningEstimate.  # noqa: E501
        :type: float
        """

        self._eps_low = eps_low

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

        Number of Analysts.  # noqa: E501

        :return: The number_analysts of this EarningEstimate.  # noqa: E501
        :rtype: int
        """
        return self._number_analysts

    @number_analysts.setter
    def number_analysts(self, number_analysts):
        """Sets the number_analysts of this EarningEstimate.

        Number of Analysts.  # noqa: E501

        :param number_analysts: The number_analysts of this EarningEstimate.  # noqa: E501
        :type: int
        """

        self._number_analysts = number_analysts

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

        Period.  # noqa: E501

        :return: The period of this EarningEstimate.  # noqa: E501
        :rtype: date
        """
        return self._period

    @period.setter
    def period(self, period):
        """Sets the period of this EarningEstimate.

        Period.  # noqa: E501

        :param period: The period of this EarningEstimate.  # noqa: E501
        :type: date
        """

        self._period = period

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

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