AlipayDataAiserviceCloudbusTotalodQueryModel.py 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayDataAiserviceCloudbusTotalodQueryModel(object):
  6. def __init__(self):
  7. self._app_version = None
  8. self._city_code = None
  9. self._end_date = None
  10. self._origin_geo_hashs = None
  11. self._partner_id = None
  12. self._start_date = None
  13. self._type = None
  14. @property
  15. def app_version(self):
  16. return self._app_version
  17. @app_version.setter
  18. def app_version(self, value):
  19. self._app_version = value
  20. @property
  21. def city_code(self):
  22. return self._city_code
  23. @city_code.setter
  24. def city_code(self, value):
  25. self._city_code = value
  26. @property
  27. def end_date(self):
  28. return self._end_date
  29. @end_date.setter
  30. def end_date(self, value):
  31. self._end_date = value
  32. @property
  33. def origin_geo_hashs(self):
  34. return self._origin_geo_hashs
  35. @origin_geo_hashs.setter
  36. def origin_geo_hashs(self, value):
  37. if isinstance(value, list):
  38. self._origin_geo_hashs = list()
  39. for i in value:
  40. self._origin_geo_hashs.append(i)
  41. @property
  42. def partner_id(self):
  43. return self._partner_id
  44. @partner_id.setter
  45. def partner_id(self, value):
  46. self._partner_id = value
  47. @property
  48. def start_date(self):
  49. return self._start_date
  50. @start_date.setter
  51. def start_date(self, value):
  52. self._start_date = value
  53. @property
  54. def type(self):
  55. return self._type
  56. @type.setter
  57. def type(self, value):
  58. self._type = value
  59. def to_alipay_dict(self):
  60. params = dict()
  61. if self.app_version:
  62. if hasattr(self.app_version, 'to_alipay_dict'):
  63. params['app_version'] = self.app_version.to_alipay_dict()
  64. else:
  65. params['app_version'] = self.app_version
  66. if self.city_code:
  67. if hasattr(self.city_code, 'to_alipay_dict'):
  68. params['city_code'] = self.city_code.to_alipay_dict()
  69. else:
  70. params['city_code'] = self.city_code
  71. if self.end_date:
  72. if hasattr(self.end_date, 'to_alipay_dict'):
  73. params['end_date'] = self.end_date.to_alipay_dict()
  74. else:
  75. params['end_date'] = self.end_date
  76. if self.origin_geo_hashs:
  77. if isinstance(self.origin_geo_hashs, list):
  78. for i in range(0, len(self.origin_geo_hashs)):
  79. element = self.origin_geo_hashs[i]
  80. if hasattr(element, 'to_alipay_dict'):
  81. self.origin_geo_hashs[i] = element.to_alipay_dict()
  82. if hasattr(self.origin_geo_hashs, 'to_alipay_dict'):
  83. params['origin_geo_hashs'] = self.origin_geo_hashs.to_alipay_dict()
  84. else:
  85. params['origin_geo_hashs'] = self.origin_geo_hashs
  86. if self.partner_id:
  87. if hasattr(self.partner_id, 'to_alipay_dict'):
  88. params['partner_id'] = self.partner_id.to_alipay_dict()
  89. else:
  90. params['partner_id'] = self.partner_id
  91. if self.start_date:
  92. if hasattr(self.start_date, 'to_alipay_dict'):
  93. params['start_date'] = self.start_date.to_alipay_dict()
  94. else:
  95. params['start_date'] = self.start_date
  96. if self.type:
  97. if hasattr(self.type, 'to_alipay_dict'):
  98. params['type'] = self.type.to_alipay_dict()
  99. else:
  100. params['type'] = self.type
  101. return params
  102. @staticmethod
  103. def from_alipay_dict(d):
  104. if not d:
  105. return None
  106. o = AlipayDataAiserviceCloudbusTotalodQueryModel()
  107. if 'app_version' in d:
  108. o.app_version = d['app_version']
  109. if 'city_code' in d:
  110. o.city_code = d['city_code']
  111. if 'end_date' in d:
  112. o.end_date = d['end_date']
  113. if 'origin_geo_hashs' in d:
  114. o.origin_geo_hashs = d['origin_geo_hashs']
  115. if 'partner_id' in d:
  116. o.partner_id = d['partner_id']
  117. if 'start_date' in d:
  118. o.start_date = d['start_date']
  119. if 'type' in d:
  120. o.type = d['type']
  121. return o