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

270 lines
8.0 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 CurrencyChain(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. 'chain': 'str',
  26. 'name_cn': 'str',
  27. 'name_en': 'str',
  28. 'is_disabled': 'int',
  29. 'is_deposit_disabled': 'int',
  30. 'is_withdraw_disabled': 'int',
  31. }
  32. attribute_map = {
  33. 'chain': 'chain',
  34. 'name_cn': 'name_cn',
  35. 'name_en': 'name_en',
  36. 'is_disabled': 'is_disabled',
  37. 'is_deposit_disabled': 'is_deposit_disabled',
  38. 'is_withdraw_disabled': 'is_withdraw_disabled',
  39. }
  40. def __init__(
  41. self,
  42. chain=None,
  43. name_cn=None,
  44. name_en=None,
  45. is_disabled=None,
  46. is_deposit_disabled=None,
  47. is_withdraw_disabled=None,
  48. local_vars_configuration=None,
  49. ): # noqa: E501
  50. # type: (str, str, str, int, int, int, Configuration) -> None
  51. """CurrencyChain - a model defined in OpenAPI""" # noqa: E501
  52. if local_vars_configuration is None:
  53. local_vars_configuration = Configuration()
  54. self.local_vars_configuration = local_vars_configuration
  55. self._chain = None
  56. self._name_cn = None
  57. self._name_en = None
  58. self._is_disabled = None
  59. self._is_deposit_disabled = None
  60. self._is_withdraw_disabled = None
  61. self.discriminator = None
  62. if chain is not None:
  63. self.chain = chain
  64. if name_cn is not None:
  65. self.name_cn = name_cn
  66. if name_en is not None:
  67. self.name_en = name_en
  68. if is_disabled is not None:
  69. self.is_disabled = is_disabled
  70. if is_deposit_disabled is not None:
  71. self.is_deposit_disabled = is_deposit_disabled
  72. if is_withdraw_disabled is not None:
  73. self.is_withdraw_disabled = is_withdraw_disabled
  74. @property
  75. def chain(self):
  76. """Gets the chain of this CurrencyChain. # noqa: E501
  77. Chain name # noqa: E501
  78. :return: The chain of this CurrencyChain. # noqa: E501
  79. :rtype: str
  80. """
  81. return self._chain
  82. @chain.setter
  83. def chain(self, chain):
  84. """Sets the chain of this CurrencyChain.
  85. Chain name # noqa: E501
  86. :param chain: The chain of this CurrencyChain. # noqa: E501
  87. :type: str
  88. """
  89. self._chain = chain
  90. @property
  91. def name_cn(self):
  92. """Gets the name_cn of this CurrencyChain. # noqa: E501
  93. Chain name in Chinese # noqa: E501
  94. :return: The name_cn of this CurrencyChain. # noqa: E501
  95. :rtype: str
  96. """
  97. return self._name_cn
  98. @name_cn.setter
  99. def name_cn(self, name_cn):
  100. """Sets the name_cn of this CurrencyChain.
  101. Chain name in Chinese # noqa: E501
  102. :param name_cn: The name_cn of this CurrencyChain. # noqa: E501
  103. :type: str
  104. """
  105. self._name_cn = name_cn
  106. @property
  107. def name_en(self):
  108. """Gets the name_en of this CurrencyChain. # noqa: E501
  109. Chain name in English # noqa: E501
  110. :return: The name_en of this CurrencyChain. # noqa: E501
  111. :rtype: str
  112. """
  113. return self._name_en
  114. @name_en.setter
  115. def name_en(self, name_en):
  116. """Sets the name_en of this CurrencyChain.
  117. Chain name in English # noqa: E501
  118. :param name_en: The name_en of this CurrencyChain. # noqa: E501
  119. :type: str
  120. """
  121. self._name_en = name_en
  122. @property
  123. def is_disabled(self):
  124. """Gets the is_disabled of this CurrencyChain. # noqa: E501
  125. If it is disabled. 0 means NOT being disabled # noqa: E501
  126. :return: The is_disabled of this CurrencyChain. # noqa: E501
  127. :rtype: int
  128. """
  129. return self._is_disabled
  130. @is_disabled.setter
  131. def is_disabled(self, is_disabled):
  132. """Sets the is_disabled of this CurrencyChain.
  133. If it is disabled. 0 means NOT being disabled # noqa: E501
  134. :param is_disabled: The is_disabled of this CurrencyChain. # noqa: E501
  135. :type: int
  136. """
  137. self._is_disabled = is_disabled
  138. @property
  139. def is_deposit_disabled(self):
  140. """Gets the is_deposit_disabled of this CurrencyChain. # noqa: E501
  141. Is deposit disabled. 0 means not # noqa: E501
  142. :return: The is_deposit_disabled of this CurrencyChain. # noqa: E501
  143. :rtype: int
  144. """
  145. return self._is_deposit_disabled
  146. @is_deposit_disabled.setter
  147. def is_deposit_disabled(self, is_deposit_disabled):
  148. """Sets the is_deposit_disabled of this CurrencyChain.
  149. Is deposit disabled. 0 means not # noqa: E501
  150. :param is_deposit_disabled: The is_deposit_disabled of this CurrencyChain. # noqa: E501
  151. :type: int
  152. """
  153. self._is_deposit_disabled = is_deposit_disabled
  154. @property
  155. def is_withdraw_disabled(self):
  156. """Gets the is_withdraw_disabled of this CurrencyChain. # noqa: E501
  157. Is withdrawal disabled. 0 means not # noqa: E501
  158. :return: The is_withdraw_disabled of this CurrencyChain. # noqa: E501
  159. :rtype: int
  160. """
  161. return self._is_withdraw_disabled
  162. @is_withdraw_disabled.setter
  163. def is_withdraw_disabled(self, is_withdraw_disabled):
  164. """Sets the is_withdraw_disabled of this CurrencyChain.
  165. Is withdrawal disabled. 0 means not # noqa: E501
  166. :param is_withdraw_disabled: The is_withdraw_disabled of this CurrencyChain. # noqa: E501
  167. :type: int
  168. """
  169. self._is_withdraw_disabled = is_withdraw_disabled
  170. def to_dict(self):
  171. """Returns the model properties as a dict"""
  172. result = {}
  173. for attr, _ in six.iteritems(self.openapi_types):
  174. value = getattr(self, attr)
  175. if isinstance(value, list):
  176. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  177. elif hasattr(value, "to_dict"):
  178. result[attr] = value.to_dict()
  179. elif isinstance(value, dict):
  180. result[attr] = dict(
  181. map(
  182. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  183. value.items(),
  184. )
  185. )
  186. else:
  187. result[attr] = value
  188. return result
  189. def to_str(self):
  190. """Returns the string representation of the model"""
  191. return pprint.pformat(self.to_dict())
  192. def __repr__(self):
  193. """For `print` and `pprint`"""
  194. return self.to_str()
  195. def __eq__(self, other):
  196. """Returns true if both objects are equal"""
  197. if not isinstance(other, CurrencyChain):
  198. return False
  199. return self.to_dict() == other.to_dict()
  200. def __ne__(self, other):
  201. """Returns true if both objects are not equal"""
  202. if not isinstance(other, CurrencyChain):
  203. return True
  204. return self.to_dict() != other.to_dict()