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

241 lines
6.9 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 UniCurrency(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. 'min_lend_amount': 'str',
  27. 'max_lend_amount': 'str',
  28. 'max_rate': 'str',
  29. 'min_rate': 'str',
  30. }
  31. attribute_map = {
  32. 'currency': 'currency',
  33. 'min_lend_amount': 'min_lend_amount',
  34. 'max_lend_amount': 'max_lend_amount',
  35. 'max_rate': 'max_rate',
  36. 'min_rate': 'min_rate',
  37. }
  38. def __init__(
  39. self,
  40. currency=None,
  41. min_lend_amount=None,
  42. max_lend_amount=None,
  43. max_rate=None,
  44. min_rate=None,
  45. local_vars_configuration=None,
  46. ): # noqa: E501
  47. # type: (str, str, str, str, str, Configuration) -> None
  48. """UniCurrency - a model defined in OpenAPI""" # noqa: E501
  49. if local_vars_configuration is None:
  50. local_vars_configuration = Configuration()
  51. self.local_vars_configuration = local_vars_configuration
  52. self._currency = None
  53. self._min_lend_amount = None
  54. self._max_lend_amount = None
  55. self._max_rate = None
  56. self._min_rate = None
  57. self.discriminator = None
  58. if currency is not None:
  59. self.currency = currency
  60. if min_lend_amount is not None:
  61. self.min_lend_amount = min_lend_amount
  62. if max_lend_amount is not None:
  63. self.max_lend_amount = max_lend_amount
  64. if max_rate is not None:
  65. self.max_rate = max_rate
  66. if min_rate is not None:
  67. self.min_rate = min_rate
  68. @property
  69. def currency(self):
  70. """Gets the currency of this UniCurrency. # noqa: E501
  71. Currency name # noqa: E501
  72. :return: The currency of this UniCurrency. # noqa: E501
  73. :rtype: str
  74. """
  75. return self._currency
  76. @currency.setter
  77. def currency(self, currency):
  78. """Sets the currency of this UniCurrency.
  79. Currency name # noqa: E501
  80. :param currency: The currency of this UniCurrency. # noqa: E501
  81. :type: str
  82. """
  83. self._currency = currency
  84. @property
  85. def min_lend_amount(self):
  86. """Gets the min_lend_amount of this UniCurrency. # noqa: E501
  87. Minimum lend amount # noqa: E501
  88. :return: The min_lend_amount of this UniCurrency. # noqa: E501
  89. :rtype: str
  90. """
  91. return self._min_lend_amount
  92. @min_lend_amount.setter
  93. def min_lend_amount(self, min_lend_amount):
  94. """Sets the min_lend_amount of this UniCurrency.
  95. Minimum lend amount # noqa: E501
  96. :param min_lend_amount: The min_lend_amount of this UniCurrency. # noqa: E501
  97. :type: str
  98. """
  99. self._min_lend_amount = min_lend_amount
  100. @property
  101. def max_lend_amount(self):
  102. """Gets the max_lend_amount of this UniCurrency. # noqa: E501
  103. Maximum lend amount # noqa: E501
  104. :return: The max_lend_amount of this UniCurrency. # noqa: E501
  105. :rtype: str
  106. """
  107. return self._max_lend_amount
  108. @max_lend_amount.setter
  109. def max_lend_amount(self, max_lend_amount):
  110. """Sets the max_lend_amount of this UniCurrency.
  111. Maximum lend amount # noqa: E501
  112. :param max_lend_amount: The max_lend_amount of this UniCurrency. # noqa: E501
  113. :type: str
  114. """
  115. self._max_lend_amount = max_lend_amount
  116. @property
  117. def max_rate(self):
  118. """Gets the max_rate of this UniCurrency. # noqa: E501
  119. Maximum rate (Hourly) # noqa: E501
  120. :return: The max_rate of this UniCurrency. # noqa: E501
  121. :rtype: str
  122. """
  123. return self._max_rate
  124. @max_rate.setter
  125. def max_rate(self, max_rate):
  126. """Sets the max_rate of this UniCurrency.
  127. Maximum rate (Hourly) # noqa: E501
  128. :param max_rate: The max_rate of this UniCurrency. # noqa: E501
  129. :type: str
  130. """
  131. self._max_rate = max_rate
  132. @property
  133. def min_rate(self):
  134. """Gets the min_rate of this UniCurrency. # noqa: E501
  135. Minimum rate (Hourly) # noqa: E501
  136. :return: The min_rate of this UniCurrency. # noqa: E501
  137. :rtype: str
  138. """
  139. return self._min_rate
  140. @min_rate.setter
  141. def min_rate(self, min_rate):
  142. """Sets the min_rate of this UniCurrency.
  143. Minimum rate (Hourly) # noqa: E501
  144. :param min_rate: The min_rate of this UniCurrency. # noqa: E501
  145. :type: str
  146. """
  147. self._min_rate = min_rate
  148. def to_dict(self):
  149. """Returns the model properties as a dict"""
  150. result = {}
  151. for attr, _ in six.iteritems(self.openapi_types):
  152. value = getattr(self, attr)
  153. if isinstance(value, list):
  154. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  155. elif hasattr(value, "to_dict"):
  156. result[attr] = value.to_dict()
  157. elif isinstance(value, dict):
  158. result[attr] = dict(
  159. map(
  160. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  161. value.items(),
  162. )
  163. )
  164. else:
  165. result[attr] = value
  166. return result
  167. def to_str(self):
  168. """Returns the string representation of the model"""
  169. return pprint.pformat(self.to_dict())
  170. def __repr__(self):
  171. """For `print` and `pprint`"""
  172. return self.to_str()
  173. def __eq__(self, other):
  174. """Returns true if both objects are equal"""
  175. if not isinstance(other, UniCurrency):
  176. return False
  177. return self.to_dict() == other.to_dict()
  178. def __ne__(self, other):
  179. """Returns true if both objects are not equal"""
  180. if not isinstance(other, UniCurrency):
  181. return True
  182. return self.to_dict() != other.to_dict()