AntMerchantExpandItemSecurityQueryModel.py 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AntMerchantExpandItemSecurityQueryModel(object):
  6. def __init__(self):
  7. self._front_category_id = None
  8. self._scene = None
  9. self._status = None
  10. self._target_id = None
  11. self._target_type = None
  12. @property
  13. def front_category_id(self):
  14. return self._front_category_id
  15. @front_category_id.setter
  16. def front_category_id(self, value):
  17. self._front_category_id = value
  18. @property
  19. def scene(self):
  20. return self._scene
  21. @scene.setter
  22. def scene(self, value):
  23. self._scene = value
  24. @property
  25. def status(self):
  26. return self._status
  27. @status.setter
  28. def status(self, value):
  29. self._status = value
  30. @property
  31. def target_id(self):
  32. return self._target_id
  33. @target_id.setter
  34. def target_id(self, value):
  35. self._target_id = value
  36. @property
  37. def target_type(self):
  38. return self._target_type
  39. @target_type.setter
  40. def target_type(self, value):
  41. self._target_type = value
  42. def to_alipay_dict(self):
  43. params = dict()
  44. if self.front_category_id:
  45. if hasattr(self.front_category_id, 'to_alipay_dict'):
  46. params['front_category_id'] = self.front_category_id.to_alipay_dict()
  47. else:
  48. params['front_category_id'] = self.front_category_id
  49. if self.scene:
  50. if hasattr(self.scene, 'to_alipay_dict'):
  51. params['scene'] = self.scene.to_alipay_dict()
  52. else:
  53. params['scene'] = self.scene
  54. if self.status:
  55. if hasattr(self.status, 'to_alipay_dict'):
  56. params['status'] = self.status.to_alipay_dict()
  57. else:
  58. params['status'] = self.status
  59. if self.target_id:
  60. if hasattr(self.target_id, 'to_alipay_dict'):
  61. params['target_id'] = self.target_id.to_alipay_dict()
  62. else:
  63. params['target_id'] = self.target_id
  64. if self.target_type:
  65. if hasattr(self.target_type, 'to_alipay_dict'):
  66. params['target_type'] = self.target_type.to_alipay_dict()
  67. else:
  68. params['target_type'] = self.target_type
  69. return params
  70. @staticmethod
  71. def from_alipay_dict(d):
  72. if not d:
  73. return None
  74. o = AntMerchantExpandItemSecurityQueryModel()
  75. if 'front_category_id' in d:
  76. o.front_category_id = d['front_category_id']
  77. if 'scene' in d:
  78. o.scene = d['scene']
  79. if 'status' in d:
  80. o.status = d['status']
  81. if 'target_id' in d:
  82. o.target_id = d['target_id']
  83. if 'target_type' in d:
  84. o.target_type = d['target_type']
  85. return o