AlipayEcoMycarViolationCityPushModel.py 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoMycarViolationCityPushModel(object):
  6. def __init__(self):
  7. self._city_code = None
  8. self._push_type = None
  9. self._service_status = None
  10. @property
  11. def city_code(self):
  12. return self._city_code
  13. @city_code.setter
  14. def city_code(self, value):
  15. self._city_code = value
  16. @property
  17. def push_type(self):
  18. return self._push_type
  19. @push_type.setter
  20. def push_type(self, value):
  21. self._push_type = value
  22. @property
  23. def service_status(self):
  24. return self._service_status
  25. @service_status.setter
  26. def service_status(self, value):
  27. self._service_status = value
  28. def to_alipay_dict(self):
  29. params = dict()
  30. if self.city_code:
  31. if hasattr(self.city_code, 'to_alipay_dict'):
  32. params['city_code'] = self.city_code.to_alipay_dict()
  33. else:
  34. params['city_code'] = self.city_code
  35. if self.push_type:
  36. if hasattr(self.push_type, 'to_alipay_dict'):
  37. params['push_type'] = self.push_type.to_alipay_dict()
  38. else:
  39. params['push_type'] = self.push_type
  40. if self.service_status:
  41. if hasattr(self.service_status, 'to_alipay_dict'):
  42. params['service_status'] = self.service_status.to_alipay_dict()
  43. else:
  44. params['service_status'] = self.service_status
  45. return params
  46. @staticmethod
  47. def from_alipay_dict(d):
  48. if not d:
  49. return None
  50. o = AlipayEcoMycarViolationCityPushModel()
  51. if 'city_code' in d:
  52. o.city_code = d['city_code']
  53. if 'push_type' in d:
  54. o.push_type = d['push_type']
  55. if 'service_status' in d:
  56. o.service_status = d['service_status']
  57. return o