KoubeiCateringDishAreaQueryModel.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 KoubeiCateringDishAreaQueryModel(object):
  6. def __init__(self):
  7. self._area_id = None
  8. self._area_name = None
  9. self._merchant_id = None
  10. self._shop_id = None
  11. self._status = None
  12. self._tab_id = None
  13. @property
  14. def area_id(self):
  15. return self._area_id
  16. @area_id.setter
  17. def area_id(self, value):
  18. self._area_id = value
  19. @property
  20. def area_name(self):
  21. return self._area_name
  22. @area_name.setter
  23. def area_name(self, value):
  24. self._area_name = value
  25. @property
  26. def merchant_id(self):
  27. return self._merchant_id
  28. @merchant_id.setter
  29. def merchant_id(self, value):
  30. self._merchant_id = value
  31. @property
  32. def shop_id(self):
  33. return self._shop_id
  34. @shop_id.setter
  35. def shop_id(self, value):
  36. self._shop_id = value
  37. @property
  38. def status(self):
  39. return self._status
  40. @status.setter
  41. def status(self, value):
  42. self._status = value
  43. @property
  44. def tab_id(self):
  45. return self._tab_id
  46. @tab_id.setter
  47. def tab_id(self, value):
  48. self._tab_id = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.area_id:
  52. if hasattr(self.area_id, 'to_alipay_dict'):
  53. params['area_id'] = self.area_id.to_alipay_dict()
  54. else:
  55. params['area_id'] = self.area_id
  56. if self.area_name:
  57. if hasattr(self.area_name, 'to_alipay_dict'):
  58. params['area_name'] = self.area_name.to_alipay_dict()
  59. else:
  60. params['area_name'] = self.area_name
  61. if self.merchant_id:
  62. if hasattr(self.merchant_id, 'to_alipay_dict'):
  63. params['merchant_id'] = self.merchant_id.to_alipay_dict()
  64. else:
  65. params['merchant_id'] = self.merchant_id
  66. if self.shop_id:
  67. if hasattr(self.shop_id, 'to_alipay_dict'):
  68. params['shop_id'] = self.shop_id.to_alipay_dict()
  69. else:
  70. params['shop_id'] = self.shop_id
  71. if self.status:
  72. if hasattr(self.status, 'to_alipay_dict'):
  73. params['status'] = self.status.to_alipay_dict()
  74. else:
  75. params['status'] = self.status
  76. if self.tab_id:
  77. if hasattr(self.tab_id, 'to_alipay_dict'):
  78. params['tab_id'] = self.tab_id.to_alipay_dict()
  79. else:
  80. params['tab_id'] = self.tab_id
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = KoubeiCateringDishAreaQueryModel()
  87. if 'area_id' in d:
  88. o.area_id = d['area_id']
  89. if 'area_name' in d:
  90. o.area_name = d['area_name']
  91. if 'merchant_id' in d:
  92. o.merchant_id = d['merchant_id']
  93. if 'shop_id' in d:
  94. o.shop_id = d['shop_id']
  95. if 'status' in d:
  96. o.status = d['status']
  97. if 'tab_id' in d:
  98. o.tab_id = d['tab_id']
  99. return o