KoubeiMarketingTessssssssssstQueryModel.py 2.9 KB

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