FoodDispenserCellInfo.py 2.7 KB

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