天择加密量化开放框架下载
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.6 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 UniLoan(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. 'currency_pair': 'str',
  27. 'amount': 'str',
  28. 'create_time': 'int',
  29. 'update_time': 'int',
  30. }
  31. attribute_map = {
  32. 'currency': 'currency',
  33. 'currency_pair': 'currency_pair',
  34. 'amount': 'amount',
  35. 'create_time': 'create_time',
  36. 'update_time': 'update_time',
  37. }
  38. def __init__(
  39. self,
  40. currency=None,
  41. currency_pair=None,
  42. amount=None,
  43. create_time=None,
  44. update_time=None,
  45. local_vars_configuration=None,
  46. ): # noqa: E501
  47. # type: (str, str, str, int, int, Configuration) -> None
  48. """UniLoan - 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._currency_pair = None
  54. self._amount = None
  55. self._create_time = None
  56. self._update_time = None
  57. self.discriminator = None
  58. if currency is not None:
  59. self.currency = currency
  60. if currency_pair is not None:
  61. self.currency_pair = currency_pair
  62. if amount is not None:
  63. self.amount = amount
  64. if create_time is not None:
  65. self.create_time = create_time
  66. if update_time is not None:
  67. self.update_time = update_time
  68. @property
  69. def currency(self):
  70. """Gets the currency of this UniLoan. # noqa: E501
  71. Currency # noqa: E501
  72. :return: The currency of this UniLoan. # noqa: E501
  73. :rtype: str
  74. """
  75. return self._currency
  76. @currency.setter
  77. def currency(self, currency):
  78. """Sets the currency of this UniLoan.
  79. Currency # noqa: E501
  80. :param currency: The currency of this UniLoan. # noqa: E501
  81. :type: str
  82. """
  83. self._currency = currency
  84. @property
  85. def currency_pair(self):
  86. """Gets the currency_pair of this UniLoan. # noqa: E501
  87. Currency pair # noqa: E501
  88. :return: The currency_pair of this UniLoan. # noqa: E501
  89. :rtype: str
  90. """
  91. return self._currency_pair
  92. @currency_pair.setter
  93. def currency_pair(self, currency_pair):
  94. """Sets the currency_pair of this UniLoan.
  95. Currency pair # noqa: E501
  96. :param currency_pair: The currency_pair of this UniLoan. # noqa: E501
  97. :type: str
  98. """
  99. self._currency_pair = currency_pair
  100. @property
  101. def amount(self):
  102. """Gets the amount of this UniLoan. # noqa: E501
  103. amount # noqa: E501
  104. :return: The amount of this UniLoan. # noqa: E501
  105. :rtype: str
  106. """
  107. return self._amount
  108. @amount.setter
  109. def amount(self, amount):
  110. """Sets the amount of this UniLoan.
  111. amount # noqa: E501
  112. :param amount: The amount of this UniLoan. # noqa: E501
  113. :type: str
  114. """
  115. self._amount = amount
  116. @property
  117. def create_time(self):
  118. """Gets the create_time of this UniLoan. # noqa: E501
  119. Created time # noqa: E501
  120. :return: The create_time of this UniLoan. # noqa: E501
  121. :rtype: int
  122. """
  123. return self._create_time
  124. @create_time.setter
  125. def create_time(self, create_time):
  126. """Sets the create_time of this UniLoan.
  127. Created time # noqa: E501
  128. :param create_time: The create_time of this UniLoan. # noqa: E501
  129. :type: int
  130. """
  131. self._create_time = create_time
  132. @property
  133. def update_time(self):
  134. """Gets the update_time of this UniLoan. # noqa: E501
  135. Updated time # noqa: E501
  136. :return: The update_time of this UniLoan. # noqa: E501
  137. :rtype: int
  138. """
  139. return self._update_time
  140. @update_time.setter
  141. def update_time(self, update_time):
  142. """Sets the update_time of this UniLoan.
  143. Updated time # noqa: E501
  144. :param update_time: The update_time of this UniLoan. # noqa: E501
  145. :type: int
  146. """
  147. self._update_time = update_time
  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, UniLoan):
  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, UniLoan):
  181. return True
  182. return self.to_dict() != other.to_dict()