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

117 lines
3.5 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 TransactionID(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 = {'tx_id': 'int'}
  25. attribute_map = {'tx_id': 'tx_id'}
  26. def __init__(self, tx_id=None, local_vars_configuration=None): # noqa: E501
  27. # type: (int, Configuration) -> None
  28. """TransactionID - a model defined in OpenAPI""" # noqa: E501
  29. if local_vars_configuration is None:
  30. local_vars_configuration = Configuration()
  31. self.local_vars_configuration = local_vars_configuration
  32. self._tx_id = None
  33. self.discriminator = None
  34. if tx_id is not None:
  35. self.tx_id = tx_id
  36. @property
  37. def tx_id(self):
  38. """Gets the tx_id of this TransactionID. # noqa: E501
  39. Order id # noqa: E501
  40. :return: The tx_id of this TransactionID. # noqa: E501
  41. :rtype: int
  42. """
  43. return self._tx_id
  44. @tx_id.setter
  45. def tx_id(self, tx_id):
  46. """Sets the tx_id of this TransactionID.
  47. Order id # noqa: E501
  48. :param tx_id: The tx_id of this TransactionID. # noqa: E501
  49. :type: int
  50. """
  51. self._tx_id = tx_id
  52. def to_dict(self):
  53. """Returns the model properties as a dict"""
  54. result = {}
  55. for attr, _ in six.iteritems(self.openapi_types):
  56. value = getattr(self, attr)
  57. if isinstance(value, list):
  58. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  59. elif hasattr(value, "to_dict"):
  60. result[attr] = value.to_dict()
  61. elif isinstance(value, dict):
  62. result[attr] = dict(
  63. map(
  64. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  65. value.items(),
  66. )
  67. )
  68. else:
  69. result[attr] = value
  70. return result
  71. def to_str(self):
  72. """Returns the string representation of the model"""
  73. return pprint.pformat(self.to_dict())
  74. def __repr__(self):
  75. """For `print` and `pprint`"""
  76. return self.to_str()
  77. def __eq__(self, other):
  78. """Returns true if both objects are equal"""
  79. if not isinstance(other, TransactionID):
  80. return False
  81. return self.to_dict() == other.to_dict()
  82. def __ne__(self, other):
  83. """Returns true if both objects are not equal"""
  84. if not isinstance(other, TransactionID):
  85. return True
  86. return self.to_dict() != other.to_dict()