KoubeiAdvertDataPromotedetailChannelBatchqueryResponse.py 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.response.AlipayResponse import AlipayResponse
  5. from alipay.aop.api.domain.PromoteDetailChannelModel import PromoteDetailChannelModel
  6. class KoubeiAdvertDataPromotedetailChannelBatchqueryResponse(AlipayResponse):
  7. def __init__(self):
  8. super(KoubeiAdvertDataPromotedetailChannelBatchqueryResponse, self).__init__()
  9. self._data = None
  10. self._page_index = None
  11. self._page_size = None
  12. self._total_count = None
  13. @property
  14. def data(self):
  15. return self._data
  16. @data.setter
  17. def data(self, value):
  18. if isinstance(value, list):
  19. self._data = list()
  20. for i in value:
  21. if isinstance(i, PromoteDetailChannelModel):
  22. self._data.append(i)
  23. else:
  24. self._data.append(PromoteDetailChannelModel.from_alipay_dict(i))
  25. @property
  26. def page_index(self):
  27. return self._page_index
  28. @page_index.setter
  29. def page_index(self, value):
  30. self._page_index = value
  31. @property
  32. def page_size(self):
  33. return self._page_size
  34. @page_size.setter
  35. def page_size(self, value):
  36. self._page_size = value
  37. @property
  38. def total_count(self):
  39. return self._total_count
  40. @total_count.setter
  41. def total_count(self, value):
  42. self._total_count = value
  43. def parse_response_content(self, response_content):
  44. response = super(KoubeiAdvertDataPromotedetailChannelBatchqueryResponse, self).parse_response_content(response_content)
  45. if 'data' in response:
  46. self.data = response['data']
  47. if 'page_index' in response:
  48. self.page_index = response['page_index']
  49. if 'page_size' in response:
  50. self.page_size = response['page_size']
  51. if 'total_count' in response:
  52. self.total_count = response['total_count']