AlipayEcoMycarParkingSpaceinfoSyncModel.py 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoMycarParkingSpaceinfoSyncModel(object):
  6. def __init__(self):
  7. self._free_charging_pile = None
  8. self._free_parking_space = None
  9. self._parking_id = None
  10. self._parking_space_status = None
  11. @property
  12. def free_charging_pile(self):
  13. return self._free_charging_pile
  14. @free_charging_pile.setter
  15. def free_charging_pile(self, value):
  16. self._free_charging_pile = value
  17. @property
  18. def free_parking_space(self):
  19. return self._free_parking_space
  20. @free_parking_space.setter
  21. def free_parking_space(self, value):
  22. self._free_parking_space = value
  23. @property
  24. def parking_id(self):
  25. return self._parking_id
  26. @parking_id.setter
  27. def parking_id(self, value):
  28. self._parking_id = value
  29. @property
  30. def parking_space_status(self):
  31. return self._parking_space_status
  32. @parking_space_status.setter
  33. def parking_space_status(self, value):
  34. self._parking_space_status = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.free_charging_pile:
  38. if hasattr(self.free_charging_pile, 'to_alipay_dict'):
  39. params['free_charging_pile'] = self.free_charging_pile.to_alipay_dict()
  40. else:
  41. params['free_charging_pile'] = self.free_charging_pile
  42. if self.free_parking_space:
  43. if hasattr(self.free_parking_space, 'to_alipay_dict'):
  44. params['free_parking_space'] = self.free_parking_space.to_alipay_dict()
  45. else:
  46. params['free_parking_space'] = self.free_parking_space
  47. if self.parking_id:
  48. if hasattr(self.parking_id, 'to_alipay_dict'):
  49. params['parking_id'] = self.parking_id.to_alipay_dict()
  50. else:
  51. params['parking_id'] = self.parking_id
  52. if self.parking_space_status:
  53. if hasattr(self.parking_space_status, 'to_alipay_dict'):
  54. params['parking_space_status'] = self.parking_space_status.to_alipay_dict()
  55. else:
  56. params['parking_space_status'] = self.parking_space_status
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayEcoMycarParkingSpaceinfoSyncModel()
  63. if 'free_charging_pile' in d:
  64. o.free_charging_pile = d['free_charging_pile']
  65. if 'free_parking_space' in d:
  66. o.free_parking_space = d['free_parking_space']
  67. if 'parking_id' in d:
  68. o.parking_id = d['parking_id']
  69. if 'parking_space_status' in d:
  70. o.parking_space_status = d['parking_space_status']
  71. return o