InsClaimAttachment.py 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class InsClaimAttachment(object):
  6. def __init__(self):
  7. self._description = None
  8. self._name = None
  9. self._path = None
  10. self._reason = None
  11. self._status = None
  12. self._type = None
  13. @property
  14. def description(self):
  15. return self._description
  16. @description.setter
  17. def description(self, value):
  18. self._description = value
  19. @property
  20. def name(self):
  21. return self._name
  22. @name.setter
  23. def name(self, value):
  24. self._name = value
  25. @property
  26. def path(self):
  27. return self._path
  28. @path.setter
  29. def path(self, value):
  30. self._path = value
  31. @property
  32. def reason(self):
  33. return self._reason
  34. @reason.setter
  35. def reason(self, value):
  36. self._reason = 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 type(self):
  45. return self._type
  46. @type.setter
  47. def type(self, value):
  48. self._type = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.description:
  52. if hasattr(self.description, 'to_alipay_dict'):
  53. params['description'] = self.description.to_alipay_dict()
  54. else:
  55. params['description'] = self.description
  56. if self.name:
  57. if hasattr(self.name, 'to_alipay_dict'):
  58. params['name'] = self.name.to_alipay_dict()
  59. else:
  60. params['name'] = self.name
  61. if self.path:
  62. if hasattr(self.path, 'to_alipay_dict'):
  63. params['path'] = self.path.to_alipay_dict()
  64. else:
  65. params['path'] = self.path
  66. if self.reason:
  67. if hasattr(self.reason, 'to_alipay_dict'):
  68. params['reason'] = self.reason.to_alipay_dict()
  69. else:
  70. params['reason'] = self.reason
  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.type:
  77. if hasattr(self.type, 'to_alipay_dict'):
  78. params['type'] = self.type.to_alipay_dict()
  79. else:
  80. params['type'] = self.type
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = InsClaimAttachment()
  87. if 'description' in d:
  88. o.description = d['description']
  89. if 'name' in d:
  90. o.name = d['name']
  91. if 'path' in d:
  92. o.path = d['path']
  93. if 'reason' in d:
  94. o.reason = d['reason']
  95. if 'status' in d:
  96. o.status = d['status']
  97. if 'type' in d:
  98. o.type = d['type']
  99. return o