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

171 lines
5.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 DepositAddress(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', 'address': 'str', 'multichain_addresses': 'list[MultiChainAddressItem]'}
  25. attribute_map = {'currency': 'currency', 'address': 'address', 'multichain_addresses': 'multichain_addresses'}
  26. def __init__(
  27. self, currency=None, address=None, multichain_addresses=None, local_vars_configuration=None
  28. ): # noqa: E501
  29. # type: (str, str, list[MultiChainAddressItem], Configuration) -> None
  30. """DepositAddress - a model defined in OpenAPI""" # noqa: E501
  31. if local_vars_configuration is None:
  32. local_vars_configuration = Configuration()
  33. self.local_vars_configuration = local_vars_configuration
  34. self._currency = None
  35. self._address = None
  36. self._multichain_addresses = None
  37. self.discriminator = None
  38. self.currency = currency
  39. self.address = address
  40. if multichain_addresses is not None:
  41. self.multichain_addresses = multichain_addresses
  42. @property
  43. def currency(self):
  44. """Gets the currency of this DepositAddress. # noqa: E501
  45. Currency detail # noqa: E501
  46. :return: The currency of this DepositAddress. # noqa: E501
  47. :rtype: str
  48. """
  49. return self._currency
  50. @currency.setter
  51. def currency(self, currency):
  52. """Sets the currency of this DepositAddress.
  53. Currency detail # noqa: E501
  54. :param currency: The currency of this DepositAddress. # noqa: E501
  55. :type: str
  56. """
  57. if self.local_vars_configuration.client_side_validation and currency is None: # noqa: E501
  58. raise ValueError("Invalid value for `currency`, must not be `None`") # noqa: E501
  59. self._currency = currency
  60. @property
  61. def address(self):
  62. """Gets the address of this DepositAddress. # noqa: E501
  63. Deposit address # noqa: E501
  64. :return: The address of this DepositAddress. # noqa: E501
  65. :rtype: str
  66. """
  67. return self._address
  68. @address.setter
  69. def address(self, address):
  70. """Sets the address of this DepositAddress.
  71. Deposit address # noqa: E501
  72. :param address: The address of this DepositAddress. # noqa: E501
  73. :type: str
  74. """
  75. if self.local_vars_configuration.client_side_validation and address is None: # noqa: E501
  76. raise ValueError("Invalid value for `address`, must not be `None`") # noqa: E501
  77. self._address = address
  78. @property
  79. def multichain_addresses(self):
  80. """Gets the multichain_addresses of this DepositAddress. # noqa: E501
  81. :return: The multichain_addresses of this DepositAddress. # noqa: E501
  82. :rtype: list[MultiChainAddressItem]
  83. """
  84. return self._multichain_addresses
  85. @multichain_addresses.setter
  86. def multichain_addresses(self, multichain_addresses):
  87. """Sets the multichain_addresses of this DepositAddress.
  88. :param multichain_addresses: The multichain_addresses of this DepositAddress. # noqa: E501
  89. :type: list[MultiChainAddressItem]
  90. """
  91. self._multichain_addresses = multichain_addresses
  92. def to_dict(self):
  93. """Returns the model properties as a dict"""
  94. result = {}
  95. for attr, _ in six.iteritems(self.openapi_types):
  96. value = getattr(self, attr)
  97. if isinstance(value, list):
  98. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  99. elif hasattr(value, "to_dict"):
  100. result[attr] = value.to_dict()
  101. elif isinstance(value, dict):
  102. result[attr] = dict(
  103. map(
  104. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  105. value.items(),
  106. )
  107. )
  108. else:
  109. result[attr] = value
  110. return result
  111. def to_str(self):
  112. """Returns the string representation of the model"""
  113. return pprint.pformat(self.to_dict())
  114. def __repr__(self):
  115. """For `print` and `pprint`"""
  116. return self.to_str()
  117. def __eq__(self, other):
  118. """Returns true if both objects are equal"""
  119. if not isinstance(other, DepositAddress):
  120. return False
  121. return self.to_dict() == other.to_dict()
  122. def __ne__(self, other):
  123. """Returns true if both objects are not equal"""
  124. if not isinstance(other, DepositAddress):
  125. return True
  126. return self.to_dict() != other.to_dict()