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

329 lines
9.3 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 SubAccount(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. 'remark': 'str',
  26. 'login_name': 'str',
  27. 'password': 'str',
  28. 'email': 'str',
  29. 'state': 'int',
  30. 'type': 'int',
  31. 'user_id': 'int',
  32. 'create_time': 'int',
  33. }
  34. attribute_map = {
  35. 'remark': 'remark',
  36. 'login_name': 'login_name',
  37. 'password': 'password',
  38. 'email': 'email',
  39. 'state': 'state',
  40. 'type': 'type',
  41. 'user_id': 'user_id',
  42. 'create_time': 'create_time',
  43. }
  44. def __init__(
  45. self,
  46. remark=None,
  47. login_name=None,
  48. password=None,
  49. email=None,
  50. state=None,
  51. type=None,
  52. user_id=None,
  53. create_time=None,
  54. local_vars_configuration=None,
  55. ): # noqa: E501
  56. # type: (str, str, str, str, int, int, int, int, Configuration) -> None
  57. """SubAccount - a model defined in OpenAPI""" # noqa: E501
  58. if local_vars_configuration is None:
  59. local_vars_configuration = Configuration()
  60. self.local_vars_configuration = local_vars_configuration
  61. self._remark = None
  62. self._login_name = None
  63. self._password = None
  64. self._email = None
  65. self._state = None
  66. self._type = None
  67. self._user_id = None
  68. self._create_time = None
  69. self.discriminator = None
  70. if remark is not None:
  71. self.remark = remark
  72. self.login_name = login_name
  73. if password is not None:
  74. self.password = password
  75. if email is not None:
  76. self.email = email
  77. if state is not None:
  78. self.state = state
  79. if type is not None:
  80. self.type = type
  81. if user_id is not None:
  82. self.user_id = user_id
  83. if create_time is not None:
  84. self.create_time = create_time
  85. @property
  86. def remark(self):
  87. """Gets the remark of this SubAccount. # noqa: E501
  88. custom text # noqa: E501
  89. :return: The remark of this SubAccount. # noqa: E501
  90. :rtype: str
  91. """
  92. return self._remark
  93. @remark.setter
  94. def remark(self, remark):
  95. """Sets the remark of this SubAccount.
  96. custom text # noqa: E501
  97. :param remark: The remark of this SubAccount. # noqa: E501
  98. :type: str
  99. """
  100. self._remark = remark
  101. @property
  102. def login_name(self):
  103. """Gets the login_name of this SubAccount. # noqa: E501
  104. Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501
  105. :return: The login_name of this SubAccount. # noqa: E501
  106. :rtype: str
  107. """
  108. return self._login_name
  109. @login_name.setter
  110. def login_name(self, login_name):
  111. """Sets the login_name of this SubAccount.
  112. Sub-account login name: Only letters, numbers and underscores are supported, and cannot contain other illegal characters # noqa: E501
  113. :param login_name: The login_name of this SubAccount. # noqa: E501
  114. :type: str
  115. """
  116. if self.local_vars_configuration.client_side_validation and login_name is None: # noqa: E501
  117. raise ValueError("Invalid value for `login_name`, must not be `None`") # noqa: E501
  118. self._login_name = login_name
  119. @property
  120. def password(self):
  121. """Gets the password of this SubAccount. # noqa: E501
  122. The sub-account's password. (Default: the same as main account's password) # noqa: E501
  123. :return: The password of this SubAccount. # noqa: E501
  124. :rtype: str
  125. """
  126. return self._password
  127. @password.setter
  128. def password(self, password):
  129. """Sets the password of this SubAccount.
  130. The sub-account's password. (Default: the same as main account's password) # noqa: E501
  131. :param password: The password of this SubAccount. # noqa: E501
  132. :type: str
  133. """
  134. self._password = password
  135. @property
  136. def email(self):
  137. """Gets the email of this SubAccount. # noqa: E501
  138. The sub-account's email address. (Default: the same as main account's email address) # noqa: E501
  139. :return: The email of this SubAccount. # noqa: E501
  140. :rtype: str
  141. """
  142. return self._email
  143. @email.setter
  144. def email(self, email):
  145. """Sets the email of this SubAccount.
  146. The sub-account's email address. (Default: the same as main account's email address) # noqa: E501
  147. :param email: The email of this SubAccount. # noqa: E501
  148. :type: str
  149. """
  150. self._email = email
  151. @property
  152. def state(self):
  153. """Gets the state of this SubAccount. # noqa: E501
  154. State: 1-normal, 2-locked\" # noqa: E501
  155. :return: The state of this SubAccount. # noqa: E501
  156. :rtype: int
  157. """
  158. return self._state
  159. @state.setter
  160. def state(self, state):
  161. """Sets the state of this SubAccount.
  162. State: 1-normal, 2-locked\" # noqa: E501
  163. :param state: The state of this SubAccount. # noqa: E501
  164. :type: int
  165. """
  166. self._state = state
  167. @property
  168. def type(self):
  169. """Gets the type of this SubAccount. # noqa: E501
  170. Type: 1-Sub-account # noqa: E501
  171. :return: The type of this SubAccount. # noqa: E501
  172. :rtype: int
  173. """
  174. return self._type
  175. @type.setter
  176. def type(self, type):
  177. """Sets the type of this SubAccount.
  178. Type: 1-Sub-account # noqa: E501
  179. :param type: The type of this SubAccount. # noqa: E501
  180. :type: int
  181. """
  182. self._type = type
  183. @property
  184. def user_id(self):
  185. """Gets the user_id of this SubAccount. # noqa: E501
  186. The user id of the sub-account # noqa: E501
  187. :return: The user_id of this SubAccount. # noqa: E501
  188. :rtype: int
  189. """
  190. return self._user_id
  191. @user_id.setter
  192. def user_id(self, user_id):
  193. """Sets the user_id of this SubAccount.
  194. The user id of the sub-account # noqa: E501
  195. :param user_id: The user_id of this SubAccount. # noqa: E501
  196. :type: int
  197. """
  198. self._user_id = user_id
  199. @property
  200. def create_time(self):
  201. """Gets the create_time of this SubAccount. # noqa: E501
  202. Created time # noqa: E501
  203. :return: The create_time of this SubAccount. # noqa: E501
  204. :rtype: int
  205. """
  206. return self._create_time
  207. @create_time.setter
  208. def create_time(self, create_time):
  209. """Sets the create_time of this SubAccount.
  210. Created time # noqa: E501
  211. :param create_time: The create_time of this SubAccount. # noqa: E501
  212. :type: int
  213. """
  214. self._create_time = create_time
  215. def to_dict(self):
  216. """Returns the model properties as a dict"""
  217. result = {}
  218. for attr, _ in six.iteritems(self.openapi_types):
  219. value = getattr(self, attr)
  220. if isinstance(value, list):
  221. result[attr] = list(map(lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value))
  222. elif hasattr(value, "to_dict"):
  223. result[attr] = value.to_dict()
  224. elif isinstance(value, dict):
  225. result[attr] = dict(
  226. map(
  227. lambda item: (item[0], item[1].to_dict()) if hasattr(item[1], "to_dict") else item,
  228. value.items(),
  229. )
  230. )
  231. else:
  232. result[attr] = value
  233. return result
  234. def to_str(self):
  235. """Returns the string representation of the model"""
  236. return pprint.pformat(self.to_dict())
  237. def __repr__(self):
  238. """For `print` and `pprint`"""
  239. return self.to_str()
  240. def __eq__(self, other):
  241. """Returns true if both objects are equal"""
  242. if not isinstance(other, SubAccount):
  243. return False
  244. return self.to_dict() == other.to_dict()
  245. def __ne__(self, other):
  246. """Returns true if both objects are not equal"""
  247. if not isinstance(other, SubAccount):
  248. return True
  249. return self.to_dict() != other.to_dict()