天择加密量化开放框架下载
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

141 lines
4.7 KiB

1 year ago
  1. # coding: utf-8
  2. """
  3. Gate API v4
  4. Welcome to Gate.io API APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. # noqa: E501
  5. Contact: support@mail.gate.io
  6. Generated by: https://openapi-generator.tech
  7. """
  8. import pprint
  9. import re # noqa: F401
  10. import six
  11. from gate_api.configuration import Configuration
  12. class TotalBalance(object):
  13. """NOTE: This class is auto generated by OpenAPI Generator.
  14. Ref: https://openapi-generator.tech
  15. Do not edit the class manually.
  16. """
  17. """
  18. Attributes:
  19. openapi_types (dict): The key is attribute name
  20. and the value is attribute type.
  21. attribute_map (dict): The key is attribute name
  22. and the value is json key in definition.
  23. """
  24. openapi_types = {'total': 'AccountBalance', 'details': 'dict(str, AccountBalance)'}
  25. attribute_map = {'total': 'total', 'details': 'details'}
  26. def __init__(self, total=None, details=None, local_vars_configuration=None): # noqa: E501
  27. # type: (AccountBalance, dict(str, AccountBalance), Configuration) -> None
  28. """TotalBalance - a model defined in OpenAPI""" # noqa: E501
  29. if local_vars_configuration is None:
  30. local_vars_configuration = Configuration()
  31. self.local_vars_configuration = local_vars_configuration
  32. self._total = None
  33. self._details = None
  34. self.discriminator = None
  35. if total is not None:
  36. self.total = total
  37. if details is not None:
  38. self.details = details
  39. @property
  40. def total(self):
  41. """Gets the total of this TotalBalance. # noqa: E501
  42. :return: The total of this TotalBalance. # noqa: E501
  43. :rtype: AccountBalance
  44. """
  45. return self._total
  46. @total.setter
  47. def total(self, total):
  48. """Sets the total of this TotalBalance.
  49. :param total: The total of this TotalBalance. # noqa: E501
  50. :type: AccountBalance
  51. """
  52. self._total = total
  53. @property
  54. def details(self):
  55. """Gets the details of this TotalBalance. # noqa: E501
  56. Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501
  57. :return: The details of this TotalBalance. # noqa: E501
  58. :rtype: dict(str, AccountBalance)
  59. """
  60. return self._details
  61. @details.setter
  62. def details(self, details):
  63. """Sets the details of this TotalBalance.
  64. Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account # noqa: E501
  65. :param details: The details of this TotalBalance. # noqa: E501
  66. :type: dict(str, AccountBalance)
  67. """
  68. self._details = details
  69. def to_dict(self):
  70. """Returns the model properties as a dict"""
  71. result = {}
  72. for attr, _ in six.iteritems(self.openapi_types):
  73. value = getattr(self, attr)
  74. if isinstance(value, list):
  75. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  76. elif hasattr(value, "to_dict"):
  77. result[attr] = value.to_dict()
  78. elif isinstance(value, dict):
  79. result[attr] = dict(
  80. map(
  81. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  82. value.items(),
  83. )
  84. )
  85. else:
  86. result[attr] = value
  87. return result
  88. def to_str(self):
  89. """Returns the string representation of the model"""
  90. return pprint.pformat(self.to_dict())
  91. def __repr__(self):
  92. """For `print` and `pprint`"""
  93. return self.to_str()
  94. def __eq__(self, other):
  95. """Returns true if both objects are equal"""
  96. if not isinstance(other, TotalBalance):
  97. return False
  98. return self.to_dict() == other.to_dict()
  99. def __ne__(self, other):
  100. """Returns true if both objects are not equal"""
  101. if not isinstance(other, TotalBalance):
  102. return True
  103. return self.to_dict() != other.to_dict()