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

202 lines
6.2 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 FlashSwapCurrency(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 = {'currency': 'str', 'min_amount': 'str', 'max_amount': 'str', 'swappable': 'list[str]'}
  25. attribute_map = {
  26. 'currency': 'currency',
  27. 'min_amount': 'min_amount',
  28. 'max_amount': 'max_amount',
  29. 'swappable': 'swappable',
  30. }
  31. def __init__(
  32. self, currency=None, min_amount=None, max_amount=None, swappable=None, local_vars_configuration=None
  33. ): # noqa: E501
  34. # type: (str, str, str, list[str], Configuration) -> None
  35. """FlashSwapCurrency - a model defined in OpenAPI""" # noqa: E501
  36. if local_vars_configuration is None:
  37. local_vars_configuration = Configuration()
  38. self.local_vars_configuration = local_vars_configuration
  39. self._currency = None
  40. self._min_amount = None
  41. self._max_amount = None
  42. self._swappable = None
  43. self.discriminator = None
  44. if currency is not None:
  45. self.currency = currency
  46. if min_amount is not None:
  47. self.min_amount = min_amount
  48. if max_amount is not None:
  49. self.max_amount = max_amount
  50. if swappable is not None:
  51. self.swappable = swappable
  52. @property
  53. def currency(self):
  54. """Gets the currency of this FlashSwapCurrency. # noqa: E501
  55. Currency name # noqa: E501
  56. :return: The currency of this FlashSwapCurrency. # noqa: E501
  57. :rtype: str
  58. """
  59. return self._currency
  60. @currency.setter
  61. def currency(self, currency):
  62. """Sets the currency of this FlashSwapCurrency.
  63. Currency name # noqa: E501
  64. :param currency: The currency of this FlashSwapCurrency. # noqa: E501
  65. :type: str
  66. """
  67. self._currency = currency
  68. @property
  69. def min_amount(self):
  70. """Gets the min_amount of this FlashSwapCurrency. # noqa: E501
  71. Minimum amount required in flash swap # noqa: E501
  72. :return: The min_amount of this FlashSwapCurrency. # noqa: E501
  73. :rtype: str
  74. """
  75. return self._min_amount
  76. @min_amount.setter
  77. def min_amount(self, min_amount):
  78. """Sets the min_amount of this FlashSwapCurrency.
  79. Minimum amount required in flash swap # noqa: E501
  80. :param min_amount: The min_amount of this FlashSwapCurrency. # noqa: E501
  81. :type: str
  82. """
  83. self._min_amount = min_amount
  84. @property
  85. def max_amount(self):
  86. """Gets the max_amount of this FlashSwapCurrency. # noqa: E501
  87. Maximum amount allowed in flash swap # noqa: E501
  88. :return: The max_amount of this FlashSwapCurrency. # noqa: E501
  89. :rtype: str
  90. """
  91. return self._max_amount
  92. @max_amount.setter
  93. def max_amount(self, max_amount):
  94. """Sets the max_amount of this FlashSwapCurrency.
  95. Maximum amount allowed in flash swap # noqa: E501
  96. :param max_amount: The max_amount of this FlashSwapCurrency. # noqa: E501
  97. :type: str
  98. """
  99. self._max_amount = max_amount
  100. @property
  101. def swappable(self):
  102. """Gets the swappable of this FlashSwapCurrency. # noqa: E501
  103. Currencies which can be swapped to from this currency # noqa: E501
  104. :return: The swappable of this FlashSwapCurrency. # noqa: E501
  105. :rtype: list[str]
  106. """
  107. return self._swappable
  108. @swappable.setter
  109. def swappable(self, swappable):
  110. """Sets the swappable of this FlashSwapCurrency.
  111. Currencies which can be swapped to from this currency # noqa: E501
  112. :param swappable: The swappable of this FlashSwapCurrency. # noqa: E501
  113. :type: list[str]
  114. """
  115. self._swappable = swappable
  116. def to_dict(self):
  117. """Returns the model properties as a dict"""
  118. result = {}
  119. for attr, _ in six.iteritems(self.openapi_types):
  120. value = getattr(self, attr)
  121. if isinstance(value, list):
  122. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  123. elif hasattr(value, "to_dict"):
  124. result[attr] = value.to_dict()
  125. elif isinstance(value, dict):
  126. result[attr] = dict(
  127. map(
  128. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  129. value.items(),
  130. )
  131. )
  132. else:
  133. result[attr] = value
  134. return result
  135. def to_str(self):
  136. """Returns the string representation of the model"""
  137. return pprint.pformat(self.to_dict())
  138. def __repr__(self):
  139. """For `print` and `pprint`"""
  140. return self.to_str()
  141. def __eq__(self, other):
  142. """Returns true if both objects are equal"""
  143. if not isinstance(other, FlashSwapCurrency):
  144. return False
  145. return self.to_dict() == other.to_dict()
  146. def __ne__(self, other):
  147. """Returns true if both objects are not equal"""
  148. if not isinstance(other, FlashSwapCurrency):
  149. return True
  150. return self.to_dict() != other.to_dict()