KoubeiRetailWmsInboundworkDeleteModel.py 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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.OperateContext import OperateContext
  6. class KoubeiRetailWmsInboundworkDeleteModel(object):
  7. def __init__(self):
  8. self._inbound_work_id = None
  9. self._operate_context = None
  10. @property
  11. def inbound_work_id(self):
  12. return self._inbound_work_id
  13. @inbound_work_id.setter
  14. def inbound_work_id(self, value):
  15. self._inbound_work_id = value
  16. @property
  17. def operate_context(self):
  18. return self._operate_context
  19. @operate_context.setter
  20. def operate_context(self, value):
  21. if isinstance(value, OperateContext):
  22. self._operate_context = value
  23. else:
  24. self._operate_context = OperateContext.from_alipay_dict(value)
  25. def to_alipay_dict(self):
  26. params = dict()
  27. if self.inbound_work_id:
  28. if hasattr(self.inbound_work_id, 'to_alipay_dict'):
  29. params['inbound_work_id'] = self.inbound_work_id.to_alipay_dict()
  30. else:
  31. params['inbound_work_id'] = self.inbound_work_id
  32. if self.operate_context:
  33. if hasattr(self.operate_context, 'to_alipay_dict'):
  34. params['operate_context'] = self.operate_context.to_alipay_dict()
  35. else:
  36. params['operate_context'] = self.operate_context
  37. return params
  38. @staticmethod
  39. def from_alipay_dict(d):
  40. if not d:
  41. return None
  42. o = KoubeiRetailWmsInboundworkDeleteModel()
  43. if 'inbound_work_id' in d:
  44. o.inbound_work_id = d['inbound_work_id']
  45. if 'operate_context' in d:
  46. o.operate_context = d['operate_context']
  47. return o