AnttechDataServiceBlockchainContractQueryModel.py 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AnttechDataServiceBlockchainContractQueryModel(object):
  6. def __init__(self):
  7. self._at_tenant_name = None
  8. self._block_chain_id = None
  9. self._block_hash = None
  10. self._contract_hash = None
  11. self._end_timestamp = None
  12. self._page_no = None
  13. self._page_size = None
  14. self._start_timestamp = None
  15. @property
  16. def at_tenant_name(self):
  17. return self._at_tenant_name
  18. @at_tenant_name.setter
  19. def at_tenant_name(self, value):
  20. self._at_tenant_name = value
  21. @property
  22. def block_chain_id(self):
  23. return self._block_chain_id
  24. @block_chain_id.setter
  25. def block_chain_id(self, value):
  26. self._block_chain_id = value
  27. @property
  28. def block_hash(self):
  29. return self._block_hash
  30. @block_hash.setter
  31. def block_hash(self, value):
  32. self._block_hash = value
  33. @property
  34. def contract_hash(self):
  35. return self._contract_hash
  36. @contract_hash.setter
  37. def contract_hash(self, value):
  38. self._contract_hash = value
  39. @property
  40. def end_timestamp(self):
  41. return self._end_timestamp
  42. @end_timestamp.setter
  43. def end_timestamp(self, value):
  44. self._end_timestamp = value
  45. @property
  46. def page_no(self):
  47. return self._page_no
  48. @page_no.setter
  49. def page_no(self, value):
  50. self._page_no = value
  51. @property
  52. def page_size(self):
  53. return self._page_size
  54. @page_size.setter
  55. def page_size(self, value):
  56. self._page_size = value
  57. @property
  58. def start_timestamp(self):
  59. return self._start_timestamp
  60. @start_timestamp.setter
  61. def start_timestamp(self, value):
  62. self._start_timestamp = value
  63. def to_alipay_dict(self):
  64. params = dict()
  65. if self.at_tenant_name:
  66. if hasattr(self.at_tenant_name, 'to_alipay_dict'):
  67. params['at_tenant_name'] = self.at_tenant_name.to_alipay_dict()
  68. else:
  69. params['at_tenant_name'] = self.at_tenant_name
  70. if self.block_chain_id:
  71. if hasattr(self.block_chain_id, 'to_alipay_dict'):
  72. params['block_chain_id'] = self.block_chain_id.to_alipay_dict()
  73. else:
  74. params['block_chain_id'] = self.block_chain_id
  75. if self.block_hash:
  76. if hasattr(self.block_hash, 'to_alipay_dict'):
  77. params['block_hash'] = self.block_hash.to_alipay_dict()
  78. else:
  79. params['block_hash'] = self.block_hash
  80. if self.contract_hash:
  81. if hasattr(self.contract_hash, 'to_alipay_dict'):
  82. params['contract_hash'] = self.contract_hash.to_alipay_dict()
  83. else:
  84. params['contract_hash'] = self.contract_hash
  85. if self.end_timestamp:
  86. if hasattr(self.end_timestamp, 'to_alipay_dict'):
  87. params['end_timestamp'] = self.end_timestamp.to_alipay_dict()
  88. else:
  89. params['end_timestamp'] = self.end_timestamp
  90. if self.page_no:
  91. if hasattr(self.page_no, 'to_alipay_dict'):
  92. params['page_no'] = self.page_no.to_alipay_dict()
  93. else:
  94. params['page_no'] = self.page_no
  95. if self.page_size:
  96. if hasattr(self.page_size, 'to_alipay_dict'):
  97. params['page_size'] = self.page_size.to_alipay_dict()
  98. else:
  99. params['page_size'] = self.page_size
  100. if self.start_timestamp:
  101. if hasattr(self.start_timestamp, 'to_alipay_dict'):
  102. params['start_timestamp'] = self.start_timestamp.to_alipay_dict()
  103. else:
  104. params['start_timestamp'] = self.start_timestamp
  105. return params
  106. @staticmethod
  107. def from_alipay_dict(d):
  108. if not d:
  109. return None
  110. o = AnttechDataServiceBlockchainContractQueryModel()
  111. if 'at_tenant_name' in d:
  112. o.at_tenant_name = d['at_tenant_name']
  113. if 'block_chain_id' in d:
  114. o.block_chain_id = d['block_chain_id']
  115. if 'block_hash' in d:
  116. o.block_hash = d['block_hash']
  117. if 'contract_hash' in d:
  118. o.contract_hash = d['contract_hash']
  119. if 'end_timestamp' in d:
  120. o.end_timestamp = d['end_timestamp']
  121. if 'page_no' in d:
  122. o.page_no = d['page_no']
  123. if 'page_size' in d:
  124. o.page_size = d['page_size']
  125. if 'start_timestamp' in d:
  126. o.start_timestamp = d['start_timestamp']
  127. return o