# 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 LastBidAsk(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 = {
        'b': 'float',
        'a': 'float',
        'bv': 'float',
        'av': 'float',
        't': 'int'
    }

    attribute_map = {
        'b': 'b',
        'a': 'a',
        'bv': 'bv',
        'av': 'av',
        't': 't'
    }

    def __init__(self, b=None, a=None, bv=None, av=None, t=None, local_vars_configuration=None):  # noqa: E501
        """LastBidAsk - 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._b = None
        self._a = None
        self._bv = None
        self._av = None
        self._t = None
        self.discriminator = None

        if b is not None:
            self.b = b
        if a is not None:
            self.a = a
        if bv is not None:
            self.bv = bv
        if av is not None:
            self.av = av
        if t is not None:
            self.t = t

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

        Bid price.  # noqa: E501

        :return: The b of this LastBidAsk.  # noqa: E501
        :rtype: float
        """
        return self._b

    @b.setter
    def b(self, b):
        """Sets the b of this LastBidAsk.

        Bid price.  # noqa: E501

        :param b: The b of this LastBidAsk.  # noqa: E501
        :type: float
        """

        self._b = b

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

        Ask price.  # noqa: E501

        :return: The a of this LastBidAsk.  # noqa: E501
        :rtype: float
        """
        return self._a

    @a.setter
    def a(self, a):
        """Sets the a of this LastBidAsk.

        Ask price.  # noqa: E501

        :param a: The a of this LastBidAsk.  # noqa: E501
        :type: float
        """

        self._a = a

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

        Bid volume.  # noqa: E501

        :return: The bv of this LastBidAsk.  # noqa: E501
        :rtype: float
        """
        return self._bv

    @bv.setter
    def bv(self, bv):
        """Sets the bv of this LastBidAsk.

        Bid volume.  # noqa: E501

        :param bv: The bv of this LastBidAsk.  # noqa: E501
        :type: float
        """

        self._bv = bv

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

        Ask volume.  # noqa: E501

        :return: The av of this LastBidAsk.  # noqa: E501
        :rtype: float
        """
        return self._av

    @av.setter
    def av(self, av):
        """Sets the av of this LastBidAsk.

        Ask volume.  # noqa: E501

        :param av: The av of this LastBidAsk.  # noqa: E501
        :type: float
        """

        self._av = av

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

        Reference UNIX timestamp in ms.  # noqa: E501

        :return: The t of this LastBidAsk.  # noqa: E501
        :rtype: int
        """
        return self._t

    @t.setter
    def t(self, t):
        """Sets the t of this LastBidAsk.

        Reference UNIX timestamp in ms.  # noqa: E501

        :param t: The t of this LastBidAsk.  # noqa: E501
        :type: int
        """

        self._t = t

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

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