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

328 lines
9.1 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 UniLend(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 = {
  25. 'currency': 'str',
  26. 'current_amount': 'str',
  27. 'amount': 'str',
  28. 'lent_amount': 'str',
  29. 'frozen_amount': 'str',
  30. 'min_rate': 'str',
  31. 'create_time': 'int',
  32. 'update_time': 'int',
  33. }
  34. attribute_map = {
  35. 'currency': 'currency',
  36. 'current_amount': 'current_amount',
  37. 'amount': 'amount',
  38. 'lent_amount': 'lent_amount',
  39. 'frozen_amount': 'frozen_amount',
  40. 'min_rate': 'min_rate',
  41. 'create_time': 'create_time',
  42. 'update_time': 'update_time',
  43. }
  44. def __init__(
  45. self,
  46. currency=None,
  47. current_amount=None,
  48. amount=None,
  49. lent_amount=None,
  50. frozen_amount=None,
  51. min_rate=None,
  52. create_time=None,
  53. update_time=None,
  54. local_vars_configuration=None,
  55. ): # noqa: E501
  56. # type: (str, str, str, str, str, str, int, int, Configuration) -> None
  57. """UniLend - a model defined in OpenAPI""" # noqa: E501
  58. if local_vars_configuration is None:
  59. local_vars_configuration = Configuration()
  60. self.local_vars_configuration = local_vars_configuration
  61. self._currency = None
  62. self._current_amount = None
  63. self._amount = None
  64. self._lent_amount = None
  65. self._frozen_amount = None
  66. self._min_rate = None
  67. self._create_time = None
  68. self._update_time = None
  69. self.discriminator = None
  70. if currency is not None:
  71. self.currency = currency
  72. if current_amount is not None:
  73. self.current_amount = current_amount
  74. if amount is not None:
  75. self.amount = amount
  76. if lent_amount is not None:
  77. self.lent_amount = lent_amount
  78. if frozen_amount is not None:
  79. self.frozen_amount = frozen_amount
  80. if min_rate is not None:
  81. self.min_rate = min_rate
  82. if create_time is not None:
  83. self.create_time = create_time
  84. if update_time is not None:
  85. self.update_time = update_time
  86. @property
  87. def currency(self):
  88. """Gets the currency of this UniLend. # noqa: E501
  89. Currency # noqa: E501
  90. :return: The currency of this UniLend. # noqa: E501
  91. :rtype: str
  92. """
  93. return self._currency
  94. @currency.setter
  95. def currency(self, currency):
  96. """Sets the currency of this UniLend.
  97. Currency # noqa: E501
  98. :param currency: The currency of this UniLend. # noqa: E501
  99. :type: str
  100. """
  101. self._currency = currency
  102. @property
  103. def current_amount(self):
  104. """Gets the current_amount of this UniLend. # noqa: E501
  105. Current amount # noqa: E501
  106. :return: The current_amount of this UniLend. # noqa: E501
  107. :rtype: str
  108. """
  109. return self._current_amount
  110. @current_amount.setter
  111. def current_amount(self, current_amount):
  112. """Sets the current_amount of this UniLend.
  113. Current amount # noqa: E501
  114. :param current_amount: The current_amount of this UniLend. # noqa: E501
  115. :type: str
  116. """
  117. self._current_amount = current_amount
  118. @property
  119. def amount(self):
  120. """Gets the amount of this UniLend. # noqa: E501
  121. Total amount # noqa: E501
  122. :return: The amount of this UniLend. # noqa: E501
  123. :rtype: str
  124. """
  125. return self._amount
  126. @amount.setter
  127. def amount(self, amount):
  128. """Sets the amount of this UniLend.
  129. Total amount # noqa: E501
  130. :param amount: The amount of this UniLend. # noqa: E501
  131. :type: str
  132. """
  133. self._amount = amount
  134. @property
  135. def lent_amount(self):
  136. """Gets the lent_amount of this UniLend. # noqa: E501
  137. Lent amount # noqa: E501
  138. :return: The lent_amount of this UniLend. # noqa: E501
  139. :rtype: str
  140. """
  141. return self._lent_amount
  142. @lent_amount.setter
  143. def lent_amount(self, lent_amount):
  144. """Sets the lent_amount of this UniLend.
  145. Lent amount # noqa: E501
  146. :param lent_amount: The lent_amount of this UniLend. # noqa: E501
  147. :type: str
  148. """
  149. self._lent_amount = lent_amount
  150. @property
  151. def frozen_amount(self):
  152. """Gets the frozen_amount of this UniLend. # noqa: E501
  153. Frozen amount # noqa: E501
  154. :return: The frozen_amount of this UniLend. # noqa: E501
  155. :rtype: str
  156. """
  157. return self._frozen_amount
  158. @frozen_amount.setter
  159. def frozen_amount(self, frozen_amount):
  160. """Sets the frozen_amount of this UniLend.
  161. Frozen amount # noqa: E501
  162. :param frozen_amount: The frozen_amount of this UniLend. # noqa: E501
  163. :type: str
  164. """
  165. self._frozen_amount = frozen_amount
  166. @property
  167. def min_rate(self):
  168. """Gets the min_rate of this UniLend. # noqa: E501
  169. Minimum interest rate # noqa: E501
  170. :return: The min_rate of this UniLend. # noqa: E501
  171. :rtype: str
  172. """
  173. return self._min_rate
  174. @min_rate.setter
  175. def min_rate(self, min_rate):
  176. """Sets the min_rate of this UniLend.
  177. Minimum interest rate # noqa: E501
  178. :param min_rate: The min_rate of this UniLend. # noqa: E501
  179. :type: str
  180. """
  181. self._min_rate = min_rate
  182. @property
  183. def create_time(self):
  184. """Gets the create_time of this UniLend. # noqa: E501
  185. Created time of the lending order # noqa: E501
  186. :return: The create_time of this UniLend. # noqa: E501
  187. :rtype: int
  188. """
  189. return self._create_time
  190. @create_time.setter
  191. def create_time(self, create_time):
  192. """Sets the create_time of this UniLend.
  193. Created time of the lending order # noqa: E501
  194. :param create_time: The create_time of this UniLend. # noqa: E501
  195. :type: int
  196. """
  197. self._create_time = create_time
  198. @property
  199. def update_time(self):
  200. """Gets the update_time of this UniLend. # noqa: E501
  201. Upated time of the lending order # noqa: E501
  202. :return: The update_time of this UniLend. # noqa: E501
  203. :rtype: int
  204. """
  205. return self._update_time
  206. @update_time.setter
  207. def update_time(self, update_time):
  208. """Sets the update_time of this UniLend.
  209. Upated time of the lending order # noqa: E501
  210. :param update_time: The update_time of this UniLend. # noqa: E501
  211. :type: int
  212. """
  213. self._update_time = update_time
  214. def to_dict(self):
  215. """Returns the model properties as a dict"""
  216. result = {}
  217. for attr, _ in six.iteritems(self.openapi_types):
  218. value = getattr(self, attr)
  219. if isinstance(value, list):
  220. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  221. elif hasattr(value, "to_dict"):
  222. result[attr] = value.to_dict()
  223. elif isinstance(value, dict):
  224. result[attr] = dict(
  225. map(
  226. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  227. value.items(),
  228. )
  229. )
  230. else:
  231. result[attr] = value
  232. return result
  233. def to_str(self):
  234. """Returns the string representation of the model"""
  235. return pprint.pformat(self.to_dict())
  236. def __repr__(self):
  237. """For `print` and `pprint`"""
  238. return self.to_str()
  239. def __eq__(self, other):
  240. """Returns true if both objects are equal"""
  241. if not isinstance(other, UniLend):
  242. return False
  243. return self.to_dict() == other.to_dict()
  244. def __ne__(self, other):
  245. """Returns true if both objects are not equal"""
  246. if not isinstance(other, UniLend):
  247. return True
  248. return self.to_dict() != other.to_dict()