# 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 Contracts(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 = {
        'ask': 'float',
        'bid': 'float',
        'call_put_id': 'str',
        'change': 'float',
        'change_percent': 'float',
        'contract_name': 'str',
        'contract_period': 'float',
        'contract_size': 'float',
        'currency': 'str',
        'days_before_expiration': 'float',
        'delta': 'float',
        'expiration_date': 'date',
        'gamma': 'float',
        'implied_volatility': 'float',
        'in_the_money': 'bool',
        'intrinsic_value': 'float',
        'last_price': 'float',
        'last_trade_datetime': 'datetime',
        'open_interest': 'float',
        'rho': 'float',
        'strike': 'float',
        'theoretical': 'float',
        'theta': 'float',
        'time_value': 'float',
        'updated_at': 'datetime',
        'vega': 'float',
        'volume': 'float'
    }

    attribute_map = {
        'ask': 'ask',
        'bid': 'bid',
        'call_put_id': 'call_put_id',
        'change': 'change',
        'change_percent': 'change_percent',
        'contract_name': 'contract_name',
        'contract_period': 'contract_period',
        'contract_size': 'contract_size',
        'currency': 'currency',
        'days_before_expiration': 'days_before_expiration',
        'delta': 'delta',
        'expiration_date': 'expiration_date',
        'gamma': 'gamma',
        'implied_volatility': 'implied_volatility',
        'in_the_money': 'in_the_money',
        'intrinsic_value': 'intrinsic_value',
        'last_price': 'last_price',
        'last_trade_datetime': 'last_trade_datetime',
        'open_interest': 'open_interest',
        'rho': 'rho',
        'strike': 'strike',
        'theoretical': 'theoretical',
        'theta': 'theta',
        'time_value': 'time_value',
        'updated_at': 'updated_at',
        'vega': 'vega',
        'volume': 'volume'
    }

    def __init__(self, ask=None, bid=None, call_put_id=None, change=None, change_percent=None, contract_name=None, contract_period=None, contract_size=None, currency=None, days_before_expiration=None, delta=None, expiration_date=None, gamma=None, implied_volatility=None, in_the_money=None, intrinsic_value=None, last_price=None, last_trade_datetime=None, open_interest=None, rho=None, strike=None, theoretical=None, theta=None, time_value=None, updated_at=None, vega=None, volume=None, local_vars_configuration=None):  # noqa: E501
        """Contracts - 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._ask = None
        self._bid = None
        self._call_put_id = None
        self._change = None
        self._change_percent = None
        self._contract_name = None
        self._contract_period = None
        self._contract_size = None
        self._currency = None
        self._days_before_expiration = None
        self._delta = None
        self._expiration_date = None
        self._gamma = None
        self._implied_volatility = None
        self._in_the_money = None
        self._intrinsic_value = None
        self._last_price = None
        self._last_trade_datetime = None
        self._open_interest = None
        self._rho = None
        self._strike = None
        self._theoretical = None
        self._theta = None
        self._time_value = None
        self._updated_at = None
        self._vega = None
        self._volume = None
        self.discriminator = None

        if ask is not None:
            self.ask = ask
        if bid is not None:
            self.bid = bid
        if call_put_id is not None:
            self.call_put_id = call_put_id
        if change is not None:
            self.change = change
        if change_percent is not None:
            self.change_percent = change_percent
        if contract_name is not None:
            self.contract_name = contract_name
        if contract_period is not None:
            self.contract_period = contract_period
        if contract_size is not None:
            self.contract_size = contract_size
        if currency is not None:
            self.currency = currency
        if days_before_expiration is not None:
            self.days_before_expiration = days_before_expiration
        if delta is not None:
            self.delta = delta
        if expiration_date is not None:
            self.expiration_date = expiration_date
        if gamma is not None:
            self.gamma = gamma
        if implied_volatility is not None:
            self.implied_volatility = implied_volatility
        if in_the_money is not None:
            self.in_the_money = in_the_money
        if intrinsic_value is not None:
            self.intrinsic_value = intrinsic_value
        if last_price is not None:
            self.last_price = last_price
        if last_trade_datetime is not None:
            self.last_trade_datetime = last_trade_datetime
        if open_interest is not None:
            self.open_interest = open_interest
        if rho is not None:
            self.rho = rho
        if strike is not None:
            self.strike = strike
        if theoretical is not None:
            self.theoretical = theoretical
        if theta is not None:
            self.theta = theta
        if time_value is not None:
            self.time_value = time_value
        if updated_at is not None:
            self.updated_at = updated_at
        if vega is not None:
            self.vega = vega
        if volume is not None:
            self.volume = volume

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

        Ask Price in Float  # noqa: E501

        :return: The ask of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._ask

    @ask.setter
    def ask(self, ask):
        """Sets the ask of this Contracts.

        Ask Price in Float  # noqa: E501

        :param ask: The ask of this Contracts.  # noqa: E501
        :type: float
        """

        self._ask = ask

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

        Bidding Price in Float  # noqa: E501

        :return: The bid of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._bid

    @bid.setter
    def bid(self, bid):
        """Sets the bid of this Contracts.

        Bidding Price in Float  # noqa: E501

        :param bid: The bid of this Contracts.  # noqa: E501
        :type: float
        """

        self._bid = bid

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

        Call put id  # noqa: E501

        :return: The call_put_id of this Contracts.  # noqa: E501
        :rtype: str
        """
        return self._call_put_id

    @call_put_id.setter
    def call_put_id(self, call_put_id):
        """Sets the call_put_id of this Contracts.

        Call put id  # noqa: E501

        :param call_put_id: The call_put_id of this Contracts.  # noqa: E501
        :type: str
        """

        self._call_put_id = call_put_id

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

        Amount Change in Float  # noqa: E501

        :return: The change of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._change

    @change.setter
    def change(self, change):
        """Sets the change of this Contracts.

        Amount Change in Float  # noqa: E501

        :param change: The change of this Contracts.  # noqa: E501
        :type: float
        """

        self._change = change

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

        Amount Change in Percentage  # noqa: E501

        :return: The change_percent of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._change_percent

    @change_percent.setter
    def change_percent(self, change_percent):
        """Sets the change_percent of this Contracts.

        Amount Change in Percentage  # noqa: E501

        :param change_percent: The change_percent of this Contracts.  # noqa: E501
        :type: float
        """

        self._change_percent = change_percent

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

        contract name  # noqa: E501

        :return: The contract_name of this Contracts.  # noqa: E501
        :rtype: str
        """
        return self._contract_name

    @contract_name.setter
    def contract_name(self, contract_name):
        """Sets the contract_name of this Contracts.

        contract name  # noqa: E501

        :param contract_name: The contract_name of this Contracts.  # noqa: E501
        :type: str
        """

        self._contract_name = contract_name

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

        period of contract  # noqa: E501

        :return: The contract_period of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._contract_period

    @contract_period.setter
    def contract_period(self, contract_period):
        """Sets the contract_period of this Contracts.

        period of contract  # noqa: E501

        :param contract_period: The contract_period of this Contracts.  # noqa: E501
        :type: float
        """

        self._contract_period = contract_period

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

        size of contract  # noqa: E501

        :return: The contract_size of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._contract_size

    @contract_size.setter
    def contract_size(self, contract_size):
        """Sets the contract_size of this Contracts.

        size of contract  # noqa: E501

        :param contract_size: The contract_size of this Contracts.  # noqa: E501
        :type: float
        """

        self._contract_size = contract_size

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

        contract currency  # noqa: E501

        :return: The currency of this Contracts.  # noqa: E501
        :rtype: str
        """
        return self._currency

    @currency.setter
    def currency(self, currency):
        """Sets the currency of this Contracts.

        contract currency  # noqa: E501

        :param currency: The currency of this Contracts.  # noqa: E501
        :type: str
        """

        self._currency = currency

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

        number of days before expiration Integer  # noqa: E501

        :return: The days_before_expiration of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._days_before_expiration

    @days_before_expiration.setter
    def days_before_expiration(self, days_before_expiration):
        """Sets the days_before_expiration of this Contracts.

        number of days before expiration Integer  # noqa: E501

        :param days_before_expiration: The days_before_expiration of this Contracts.  # noqa: E501
        :type: float
        """

        self._days_before_expiration = days_before_expiration

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

        delta in Float  # noqa: E501

        :return: The delta of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._delta

    @delta.setter
    def delta(self, delta):
        """Sets the delta of this Contracts.

        delta in Float  # noqa: E501

        :param delta: The delta of this Contracts.  # noqa: E501
        :type: float
        """

        self._delta = delta

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

        expiration date in ISO Format  # noqa: E501

        :return: The expiration_date of this Contracts.  # noqa: E501
        :rtype: date
        """
        return self._expiration_date

    @expiration_date.setter
    def expiration_date(self, expiration_date):
        """Sets the expiration_date of this Contracts.

        expiration date in ISO Format  # noqa: E501

        :param expiration_date: The expiration_date of this Contracts.  # noqa: E501
        :type: date
        """

        self._expiration_date = expiration_date

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

        gamma in Float  # noqa: E501

        :return: The gamma of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._gamma

    @gamma.setter
    def gamma(self, gamma):
        """Sets the gamma of this Contracts.

        gamma in Float  # noqa: E501

        :param gamma: The gamma of this Contracts.  # noqa: E501
        :type: float
        """

        self._gamma = gamma

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

        implied volatility in Float  # noqa: E501

        :return: The implied_volatility of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._implied_volatility

    @implied_volatility.setter
    def implied_volatility(self, implied_volatility):
        """Sets the implied_volatility of this Contracts.

        implied volatility in Float  # noqa: E501

        :param implied_volatility: The implied_volatility of this Contracts.  # noqa: E501
        :type: float
        """

        self._implied_volatility = implied_volatility

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

        money in  # noqa: E501

        :return: The in_the_money of this Contracts.  # noqa: E501
        :rtype: bool
        """
        return self._in_the_money

    @in_the_money.setter
    def in_the_money(self, in_the_money):
        """Sets the in_the_money of this Contracts.

        money in  # noqa: E501

        :param in_the_money: The in_the_money of this Contracts.  # noqa: E501
        :type: bool
        """

        self._in_the_money = in_the_money

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

        Intrinsic Value in Float  # noqa: E501

        :return: The intrinsic_value of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._intrinsic_value

    @intrinsic_value.setter
    def intrinsic_value(self, intrinsic_value):
        """Sets the intrinsic_value of this Contracts.

        Intrinsic Value in Float  # noqa: E501

        :param intrinsic_value: The intrinsic_value of this Contracts.  # noqa: E501
        :type: float
        """

        self._intrinsic_value = intrinsic_value

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

        last contract price in Float  # noqa: E501

        :return: The last_price of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._last_price

    @last_price.setter
    def last_price(self, last_price):
        """Sets the last_price of this Contracts.

        last contract price in Float  # noqa: E501

        :param last_price: The last_price of this Contracts.  # noqa: E501
        :type: float
        """

        self._last_price = last_price

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

        date and time of last trade in ISO Format  # noqa: E501

        :return: The last_trade_datetime of this Contracts.  # noqa: E501
        :rtype: datetime
        """
        return self._last_trade_datetime

    @last_trade_datetime.setter
    def last_trade_datetime(self, last_trade_datetime):
        """Sets the last_trade_datetime of this Contracts.

        date and time of last trade in ISO Format  # noqa: E501

        :param last_trade_datetime: The last_trade_datetime of this Contracts.  # noqa: E501
        :type: datetime
        """

        self._last_trade_datetime = last_trade_datetime

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

        Open Interest in Float  # noqa: E501

        :return: The open_interest of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._open_interest

    @open_interest.setter
    def open_interest(self, open_interest):
        """Sets the open_interest of this Contracts.

        Open Interest in Float  # noqa: E501

        :param open_interest: The open_interest of this Contracts.  # noqa: E501
        :type: float
        """

        self._open_interest = open_interest

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

        Rho in Float  # noqa: E501

        :return: The rho of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._rho

    @rho.setter
    def rho(self, rho):
        """Sets the rho of this Contracts.

        Rho in Float  # noqa: E501

        :param rho: The rho of this Contracts.  # noqa: E501
        :type: float
        """

        self._rho = rho

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

        number of strikes in Float  # noqa: E501

        :return: The strike of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._strike

    @strike.setter
    def strike(self, strike):
        """Sets the strike of this Contracts.

        number of strikes in Float  # noqa: E501

        :param strike: The strike of this Contracts.  # noqa: E501
        :type: float
        """

        self._strike = strike

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

        theoretical in Float  # noqa: E501

        :return: The theoretical of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._theoretical

    @theoretical.setter
    def theoretical(self, theoretical):
        """Sets the theoretical of this Contracts.

        theoretical in Float  # noqa: E501

        :param theoretical: The theoretical of this Contracts.  # noqa: E501
        :type: float
        """

        self._theoretical = theoretical

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

        theta in Float  # noqa: E501

        :return: The theta of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._theta

    @theta.setter
    def theta(self, theta):
        """Sets the theta of this Contracts.

        theta in Float  # noqa: E501

        :param theta: The theta of this Contracts.  # noqa: E501
        :type: float
        """

        self._theta = theta

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

        Time value in Float  # noqa: E501

        :return: The time_value of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._time_value

    @time_value.setter
    def time_value(self, time_value):
        """Sets the time_value of this Contracts.

        Time value in Float  # noqa: E501

        :param time_value: The time_value of this Contracts.  # noqa: E501
        :type: float
        """

        self._time_value = time_value

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

        Updated at datetime in ISO Format  # noqa: E501

        :return: The updated_at of this Contracts.  # noqa: E501
        :rtype: datetime
        """
        return self._updated_at

    @updated_at.setter
    def updated_at(self, updated_at):
        """Sets the updated_at of this Contracts.

        Updated at datetime in ISO Format  # noqa: E501

        :param updated_at: The updated_at of this Contracts.  # noqa: E501
        :type: datetime
        """

        self._updated_at = updated_at

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

        vega in Float  # noqa: E501

        :return: The vega of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._vega

    @vega.setter
    def vega(self, vega):
        """Sets the vega of this Contracts.

        vega in Float  # noqa: E501

        :param vega: The vega of this Contracts.  # noqa: E501
        :type: float
        """

        self._vega = vega

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

        Volume Tradedin Float  # noqa: E501

        :return: The volume of this Contracts.  # noqa: E501
        :rtype: float
        """
        return self._volume

    @volume.setter
    def volume(self, volume):
        """Sets the volume of this Contracts.

        Volume Tradedin Float  # noqa: E501

        :param volume: The volume of this Contracts.  # noqa: E501
        :type: float
        """

        self._volume = volume

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

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