# coding: utf-8

"""
    EOD STOCK API

     <h2>Intelligent EOD Stocks API</h2>     <p>     End of day stock world wide STOCK API, this api is intended for use by web application developers,      and service providers looking for up-to-date always available.     <ul>         <li>Exchange Information</li>         <li>Stock Tickers Data</li>         <li>End of Day (EOD) Stock Data</li>         <li>Fundamental Data</li>         <li>Stock Options And Splits Data</li>         <li>Financial News API</li>         <li>Social Media Trend Data For Stocks</li>         <li>Sentiment Analysis for News & Social Media</li>     </ul>                The information provided covers more than 150 000 tickers, stocks, mutual funds and more around the world.         we provide information for any period, including daily, weekly.     </p>    # noqa: E501

    The version of the OpenAPI document: v1
    Contact: support@eod-stock-api.site
    Generated by: https://openapi-generator.tech
"""


import pprint
import re  # noqa: F401

import six

from src.IntelligentStockMarketAPI.configuration import Configuration


class ShareStats(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 = {
        'date_created': 'date',
        'fundamental_id': 'str',
        'percent_insiders': 'float',
        'percent_institutions': 'float',
        'shares_float': 'int',
        'shares_outstanding': 'int',
        'shares_short': 'int',
        'shares_short_prior_month': 'int',
        'short_percent_float': 'float',
        'short_percent_outstanding': 'float',
        'short_ratio': 'float'
    }

    attribute_map = {
        'date_created': 'date_created',
        'fundamental_id': 'fundamental_id',
        'percent_insiders': 'percent_insiders',
        'percent_institutions': 'percent_institutions',
        'shares_float': 'shares_float',
        'shares_outstanding': 'shares_outstanding',
        'shares_short': 'shares_short',
        'shares_short_prior_month': 'shares_short_prior_month',
        'short_percent_float': 'short_percent_float',
        'short_percent_outstanding': 'short_percent_outstanding',
        'short_ratio': 'short_ratio'
    }

    def __init__(self, date_created=None, fundamental_id=None, percent_insiders=None, percent_institutions=None, shares_float=None, shares_outstanding=None, shares_short=None, shares_short_prior_month=None, short_percent_float=None, short_percent_outstanding=None, short_ratio=None, local_vars_configuration=None):  # noqa: E501
        """ShareStats - 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._date_created = None
        self._fundamental_id = None
        self._percent_insiders = None
        self._percent_institutions = None
        self._shares_float = None
        self._shares_outstanding = None
        self._shares_short = None
        self._shares_short_prior_month = None
        self._short_percent_float = None
        self._short_percent_outstanding = None
        self._short_ratio = None
        self.discriminator = None

        if date_created is not None:
            self.date_created = date_created
        if fundamental_id is not None:
            self.fundamental_id = fundamental_id
        if percent_insiders is not None:
            self.percent_insiders = percent_insiders
        if percent_institutions is not None:
            self.percent_institutions = percent_institutions
        if shares_float is not None:
            self.shares_float = shares_float
        if shares_outstanding is not None:
            self.shares_outstanding = shares_outstanding
        if shares_short is not None:
            self.shares_short = shares_short
        if shares_short_prior_month is not None:
            self.shares_short_prior_month = shares_short_prior_month
        if short_percent_float is not None:
            self.short_percent_float = short_percent_float
        if short_percent_outstanding is not None:
            self.short_percent_outstanding = short_percent_outstanding
        if short_ratio is not None:
            self.short_ratio = short_ratio

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

        Date of valuation  # noqa: E501

        :return: The date_created of this ShareStats.  # noqa: E501
        :rtype: date
        """
        return self._date_created

    @date_created.setter
    def date_created(self, date_created):
        """Sets the date_created of this ShareStats.

        Date of valuation  # noqa: E501

        :param date_created: The date_created of this ShareStats.  # noqa: E501
        :type: date
        """

        self._date_created = date_created

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

        Fundamental id  # noqa: E501

        :return: The fundamental_id of this ShareStats.  # noqa: E501
        :rtype: str
        """
        return self._fundamental_id

    @fundamental_id.setter
    def fundamental_id(self, fundamental_id):
        """Sets the fundamental_id of this ShareStats.

        Fundamental id  # noqa: E501

        :param fundamental_id: The fundamental_id of this ShareStats.  # noqa: E501
        :type: str
        """

        self._fundamental_id = fundamental_id

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

        Percentage of insider shares  # noqa: E501

        :return: The percent_insiders of this ShareStats.  # noqa: E501
        :rtype: float
        """
        return self._percent_insiders

    @percent_insiders.setter
    def percent_insiders(self, percent_insiders):
        """Sets the percent_insiders of this ShareStats.

        Percentage of insider shares  # noqa: E501

        :param percent_insiders: The percent_insiders of this ShareStats.  # noqa: E501
        :type: float
        """

        self._percent_insiders = percent_insiders

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

        Percentage of shares owned by institutions  # noqa: E501

        :return: The percent_institutions of this ShareStats.  # noqa: E501
        :rtype: float
        """
        return self._percent_institutions

    @percent_institutions.setter
    def percent_institutions(self, percent_institutions):
        """Sets the percent_institutions of this ShareStats.

        Percentage of shares owned by institutions  # noqa: E501

        :param percent_institutions: The percent_institutions of this ShareStats.  # noqa: E501
        :type: float
        """

        self._percent_institutions = percent_institutions

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

        shares float  # noqa: E501

        :return: The shares_float of this ShareStats.  # noqa: E501
        :rtype: int
        """
        return self._shares_float

    @shares_float.setter
    def shares_float(self, shares_float):
        """Sets the shares_float of this ShareStats.

        shares float  # noqa: E501

        :param shares_float: The shares_float of this ShareStats.  # noqa: E501
        :type: int
        """

        self._shares_float = shares_float

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

        Number of shares outstanding  # noqa: E501

        :return: The shares_outstanding of this ShareStats.  # noqa: E501
        :rtype: int
        """
        return self._shares_outstanding

    @shares_outstanding.setter
    def shares_outstanding(self, shares_outstanding):
        """Sets the shares_outstanding of this ShareStats.

        Number of shares outstanding  # noqa: E501

        :param shares_outstanding: The shares_outstanding of this ShareStats.  # noqa: E501
        :type: int
        """

        self._shares_outstanding = shares_outstanding

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

        Number of shares Shorted  # noqa: E501

        :return: The shares_short of this ShareStats.  # noqa: E501
        :rtype: int
        """
        return self._shares_short

    @shares_short.setter
    def shares_short(self, shares_short):
        """Sets the shares_short of this ShareStats.

        Number of shares Shorted  # noqa: E501

        :param shares_short: The shares_short of this ShareStats.  # noqa: E501
        :type: int
        """

        self._shares_short = shares_short

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

        Number of shares Shorted Previous Month  # noqa: E501

        :return: The shares_short_prior_month of this ShareStats.  # noqa: E501
        :rtype: int
        """
        return self._shares_short_prior_month

    @shares_short_prior_month.setter
    def shares_short_prior_month(self, shares_short_prior_month):
        """Sets the shares_short_prior_month of this ShareStats.

        Number of shares Shorted Previous Month  # noqa: E501

        :param shares_short_prior_month: The shares_short_prior_month of this ShareStats.  # noqa: E501
        :type: int
        """

        self._shares_short_prior_month = shares_short_prior_month

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

        percentage of a company's stock that has been shorted by institutional traders, compared to the number of shares of a company's stock that are available to the public  # noqa: E501

        :return: The short_percent_float of this ShareStats.  # noqa: E501
        :rtype: float
        """
        return self._short_percent_float

    @short_percent_float.setter
    def short_percent_float(self, short_percent_float):
        """Sets the short_percent_float of this ShareStats.

        percentage of a company's stock that has been shorted by institutional traders, compared to the number of shares of a company's stock that are available to the public  # noqa: E501

        :param short_percent_float: The short_percent_float of this ShareStats.  # noqa: E501
        :type: float
        """

        self._short_percent_float = short_percent_float

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

        number of shorted shares divided by the number of shares outstanding  # noqa: E501

        :return: The short_percent_outstanding of this ShareStats.  # noqa: E501
        :rtype: float
        """
        return self._short_percent_outstanding

    @short_percent_outstanding.setter
    def short_percent_outstanding(self, short_percent_outstanding):
        """Sets the short_percent_outstanding of this ShareStats.

        number of shorted shares divided by the number of shares outstanding  # noqa: E501

        :param short_percent_outstanding: The short_percent_outstanding of this ShareStats.  # noqa: E501
        :type: float
        """

        self._short_percent_outstanding = short_percent_outstanding

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

        Ratio of shorted shares  # noqa: E501

        :return: The short_ratio of this ShareStats.  # noqa: E501
        :rtype: float
        """
        return self._short_ratio

    @short_ratio.setter
    def short_ratio(self, short_ratio):
        """Sets the short_ratio of this ShareStats.

        Ratio of shorted shares  # noqa: E501

        :param short_ratio: The short_ratio of this ShareStats.  # noqa: E501
        :type: float
        """

        self._short_ratio = short_ratio

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

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