AlipayMarketingCdpAdvertiseModifyModel.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayMarketingCdpAdvertiseModifyModel(object):
  6. def __init__(self):
  7. self._action_url = None
  8. self._ad_id = None
  9. self._content = None
  10. self._end_time = None
  11. self._height = None
  12. self._start_time = None
  13. @property
  14. def action_url(self):
  15. return self._action_url
  16. @action_url.setter
  17. def action_url(self, value):
  18. self._action_url = value
  19. @property
  20. def ad_id(self):
  21. return self._ad_id
  22. @ad_id.setter
  23. def ad_id(self, value):
  24. self._ad_id = value
  25. @property
  26. def content(self):
  27. return self._content
  28. @content.setter
  29. def content(self, value):
  30. self._content = value
  31. @property
  32. def end_time(self):
  33. return self._end_time
  34. @end_time.setter
  35. def end_time(self, value):
  36. self._end_time = value
  37. @property
  38. def height(self):
  39. return self._height
  40. @height.setter
  41. def height(self, value):
  42. self._height = value
  43. @property
  44. def start_time(self):
  45. return self._start_time
  46. @start_time.setter
  47. def start_time(self, value):
  48. self._start_time = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.action_url:
  52. if hasattr(self.action_url, 'to_alipay_dict'):
  53. params['action_url'] = self.action_url.to_alipay_dict()
  54. else:
  55. params['action_url'] = self.action_url
  56. if self.ad_id:
  57. if hasattr(self.ad_id, 'to_alipay_dict'):
  58. params['ad_id'] = self.ad_id.to_alipay_dict()
  59. else:
  60. params['ad_id'] = self.ad_id
  61. if self.content:
  62. if hasattr(self.content, 'to_alipay_dict'):
  63. params['content'] = self.content.to_alipay_dict()
  64. else:
  65. params['content'] = self.content
  66. if self.end_time:
  67. if hasattr(self.end_time, 'to_alipay_dict'):
  68. params['end_time'] = self.end_time.to_alipay_dict()
  69. else:
  70. params['end_time'] = self.end_time
  71. if self.height:
  72. if hasattr(self.height, 'to_alipay_dict'):
  73. params['height'] = self.height.to_alipay_dict()
  74. else:
  75. params['height'] = self.height
  76. if self.start_time:
  77. if hasattr(self.start_time, 'to_alipay_dict'):
  78. params['start_time'] = self.start_time.to_alipay_dict()
  79. else:
  80. params['start_time'] = self.start_time
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = AlipayMarketingCdpAdvertiseModifyModel()
  87. if 'action_url' in d:
  88. o.action_url = d['action_url']
  89. if 'ad_id' in d:
  90. o.ad_id = d['ad_id']
  91. if 'content' in d:
  92. o.content = d['content']
  93. if 'end_time' in d:
  94. o.end_time = d['end_time']
  95. if 'height' in d:
  96. o.height = d['height']
  97. if 'start_time' in d:
  98. o.start_time = d['start_time']
  99. return o