KbAdvertContentPasswordModify.py 2.5 KB

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