ProductVOOptions.py 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class ProductVOOptions(object):
  6. def __init__(self):
  7. self._include_condition_group = None
  8. self._include_prod_base = None
  9. self._include_prod_ip = None
  10. self._include_prod_lo = None
  11. self._include_prod_mark = None
  12. self._include_prod_rel = None
  13. self._include_prod_ri = None
  14. @property
  15. def include_condition_group(self):
  16. return self._include_condition_group
  17. @include_condition_group.setter
  18. def include_condition_group(self, value):
  19. self._include_condition_group = value
  20. @property
  21. def include_prod_base(self):
  22. return self._include_prod_base
  23. @include_prod_base.setter
  24. def include_prod_base(self, value):
  25. self._include_prod_base = value
  26. @property
  27. def include_prod_ip(self):
  28. return self._include_prod_ip
  29. @include_prod_ip.setter
  30. def include_prod_ip(self, value):
  31. self._include_prod_ip = value
  32. @property
  33. def include_prod_lo(self):
  34. return self._include_prod_lo
  35. @include_prod_lo.setter
  36. def include_prod_lo(self, value):
  37. self._include_prod_lo = value
  38. @property
  39. def include_prod_mark(self):
  40. return self._include_prod_mark
  41. @include_prod_mark.setter
  42. def include_prod_mark(self, value):
  43. self._include_prod_mark = value
  44. @property
  45. def include_prod_rel(self):
  46. return self._include_prod_rel
  47. @include_prod_rel.setter
  48. def include_prod_rel(self, value):
  49. self._include_prod_rel = value
  50. @property
  51. def include_prod_ri(self):
  52. return self._include_prod_ri
  53. @include_prod_ri.setter
  54. def include_prod_ri(self, value):
  55. self._include_prod_ri = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.include_condition_group:
  59. if hasattr(self.include_condition_group, 'to_alipay_dict'):
  60. params['include_condition_group'] = self.include_condition_group.to_alipay_dict()
  61. else:
  62. params['include_condition_group'] = self.include_condition_group
  63. if self.include_prod_base:
  64. if hasattr(self.include_prod_base, 'to_alipay_dict'):
  65. params['include_prod_base'] = self.include_prod_base.to_alipay_dict()
  66. else:
  67. params['include_prod_base'] = self.include_prod_base
  68. if self.include_prod_ip:
  69. if hasattr(self.include_prod_ip, 'to_alipay_dict'):
  70. params['include_prod_ip'] = self.include_prod_ip.to_alipay_dict()
  71. else:
  72. params['include_prod_ip'] = self.include_prod_ip
  73. if self.include_prod_lo:
  74. if hasattr(self.include_prod_lo, 'to_alipay_dict'):
  75. params['include_prod_lo'] = self.include_prod_lo.to_alipay_dict()
  76. else:
  77. params['include_prod_lo'] = self.include_prod_lo
  78. if self.include_prod_mark:
  79. if hasattr(self.include_prod_mark, 'to_alipay_dict'):
  80. params['include_prod_mark'] = self.include_prod_mark.to_alipay_dict()
  81. else:
  82. params['include_prod_mark'] = self.include_prod_mark
  83. if self.include_prod_rel:
  84. if hasattr(self.include_prod_rel, 'to_alipay_dict'):
  85. params['include_prod_rel'] = self.include_prod_rel.to_alipay_dict()
  86. else:
  87. params['include_prod_rel'] = self.include_prod_rel
  88. if self.include_prod_ri:
  89. if hasattr(self.include_prod_ri, 'to_alipay_dict'):
  90. params['include_prod_ri'] = self.include_prod_ri.to_alipay_dict()
  91. else:
  92. params['include_prod_ri'] = self.include_prod_ri
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = ProductVOOptions()
  99. if 'include_condition_group' in d:
  100. o.include_condition_group = d['include_condition_group']
  101. if 'include_prod_base' in d:
  102. o.include_prod_base = d['include_prod_base']
  103. if 'include_prod_ip' in d:
  104. o.include_prod_ip = d['include_prod_ip']
  105. if 'include_prod_lo' in d:
  106. o.include_prod_lo = d['include_prod_lo']
  107. if 'include_prod_mark' in d:
  108. o.include_prod_mark = d['include_prod_mark']
  109. if 'include_prod_rel' in d:
  110. o.include_prod_rel = d['include_prod_rel']
  111. if 'include_prod_ri' in d:
  112. o.include_prod_ri = d['include_prod_ri']
  113. return o