AlipayIserviceCognitiveClassificationWasteQueryModel.py 4.3 KB

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