天择加密量化开放框架下载
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.

143 lines
4.3 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 SubAccountBalance(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 = {'uid': 'str', 'available': 'dict(str, str)'}
  25. attribute_map = {'uid': 'uid', 'available': 'available'}
  26. def __init__(self, uid=None, available=None, local_vars_configuration=None): # noqa: E501
  27. # type: (str, dict(str, str), Configuration) -> None
  28. """SubAccountBalance - 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._uid = None
  33. self._available = None
  34. self.discriminator = None
  35. if uid is not None:
  36. self.uid = uid
  37. if available is not None:
  38. self.available = available
  39. @property
  40. def uid(self):
  41. """Gets the uid of this SubAccountBalance. # noqa: E501
  42. User ID # noqa: E501
  43. :return: The uid of this SubAccountBalance. # noqa: E501
  44. :rtype: str
  45. """
  46. return self._uid
  47. @uid.setter
  48. def uid(self, uid):
  49. """Sets the uid of this SubAccountBalance.
  50. User ID # noqa: E501
  51. :param uid: The uid of this SubAccountBalance. # noqa: E501
  52. :type: str
  53. """
  54. self._uid = uid
  55. @property
  56. def available(self):
  57. """Gets the available of this SubAccountBalance. # noqa: E501
  58. Available balances of currencies # noqa: E501
  59. :return: The available of this SubAccountBalance. # noqa: E501
  60. :rtype: dict(str, str)
  61. """
  62. return self._available
  63. @available.setter
  64. def available(self, available):
  65. """Sets the available of this SubAccountBalance.
  66. Available balances of currencies # noqa: E501
  67. :param available: The available of this SubAccountBalance. # noqa: E501
  68. :type: dict(str, str)
  69. """
  70. self._available = available
  71. def to_dict(self):
  72. """Returns the model properties as a dict"""
  73. result = {}
  74. for attr, _ in six.iteritems(self.openapi_types):
  75. value = getattr(self, attr)
  76. if isinstance(value, list):
  77. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  78. elif hasattr(value, "to_dict"):
  79. result[attr] = value.to_dict()
  80. elif isinstance(value, dict):
  81. result[attr] = dict(
  82. map(
  83. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  84. value.items(),
  85. )
  86. )
  87. else:
  88. result[attr] = value
  89. return result
  90. def to_str(self):
  91. """Returns the string representation of the model"""
  92. return pprint.pformat(self.to_dict())
  93. def __repr__(self):
  94. """For `print` and `pprint`"""
  95. return self.to_str()
  96. def __eq__(self, other):
  97. """Returns true if both objects are equal"""
  98. if not isinstance(other, SubAccountBalance):
  99. return False
  100. return self.to_dict() == other.to_dict()
  101. def __ne__(self, other):
  102. """Returns true if both objects are not equal"""
  103. if not isinstance(other, SubAccountBalance):
  104. return True
  105. return self.to_dict() != other.to_dict()