AlipayEcoCplifeResidentinfoDeleteModel.py 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoCplifeResidentinfoDeleteModel(object):
  6. def __init__(self):
  7. self._community_id = None
  8. self._out_resident_id_set = None
  9. @property
  10. def community_id(self):
  11. return self._community_id
  12. @community_id.setter
  13. def community_id(self, value):
  14. self._community_id = value
  15. @property
  16. def out_resident_id_set(self):
  17. return self._out_resident_id_set
  18. @out_resident_id_set.setter
  19. def out_resident_id_set(self, value):
  20. if isinstance(value, list):
  21. self._out_resident_id_set = list()
  22. for i in value:
  23. self._out_resident_id_set.append(i)
  24. def to_alipay_dict(self):
  25. params = dict()
  26. if self.community_id:
  27. if hasattr(self.community_id, 'to_alipay_dict'):
  28. params['community_id'] = self.community_id.to_alipay_dict()
  29. else:
  30. params['community_id'] = self.community_id
  31. if self.out_resident_id_set:
  32. if isinstance(self.out_resident_id_set, list):
  33. for i in range(0, len(self.out_resident_id_set)):
  34. element = self.out_resident_id_set[i]
  35. if hasattr(element, 'to_alipay_dict'):
  36. self.out_resident_id_set[i] = element.to_alipay_dict()
  37. if hasattr(self.out_resident_id_set, 'to_alipay_dict'):
  38. params['out_resident_id_set'] = self.out_resident_id_set.to_alipay_dict()
  39. else:
  40. params['out_resident_id_set'] = self.out_resident_id_set
  41. return params
  42. @staticmethod
  43. def from_alipay_dict(d):
  44. if not d:
  45. return None
  46. o = AlipayEcoCplifeResidentinfoDeleteModel()
  47. if 'community_id' in d:
  48. o.community_id = d['community_id']
  49. if 'out_resident_id_set' in d:
  50. o.out_resident_id_set = d['out_resident_id_set']
  51. return o