AlipayEcoCplifeBasicserviceModifyModel.py 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoCplifeBasicserviceModifyModel(object):
  6. def __init__(self):
  7. self._account = None
  8. self._account_type = None
  9. self._community_id = None
  10. self._external_invoke_address = None
  11. self._service_expires = None
  12. self._service_type = None
  13. self._status = None
  14. @property
  15. def account(self):
  16. return self._account
  17. @account.setter
  18. def account(self, value):
  19. self._account = value
  20. @property
  21. def account_type(self):
  22. return self._account_type
  23. @account_type.setter
  24. def account_type(self, value):
  25. self._account_type = value
  26. @property
  27. def community_id(self):
  28. return self._community_id
  29. @community_id.setter
  30. def community_id(self, value):
  31. self._community_id = value
  32. @property
  33. def external_invoke_address(self):
  34. return self._external_invoke_address
  35. @external_invoke_address.setter
  36. def external_invoke_address(self, value):
  37. self._external_invoke_address = value
  38. @property
  39. def service_expires(self):
  40. return self._service_expires
  41. @service_expires.setter
  42. def service_expires(self, value):
  43. self._service_expires = value
  44. @property
  45. def service_type(self):
  46. return self._service_type
  47. @service_type.setter
  48. def service_type(self, value):
  49. self._service_type = value
  50. @property
  51. def status(self):
  52. return self._status
  53. @status.setter
  54. def status(self, value):
  55. self._status = value
  56. def to_alipay_dict(self):
  57. params = dict()
  58. if self.account:
  59. if hasattr(self.account, 'to_alipay_dict'):
  60. params['account'] = self.account.to_alipay_dict()
  61. else:
  62. params['account'] = self.account
  63. if self.account_type:
  64. if hasattr(self.account_type, 'to_alipay_dict'):
  65. params['account_type'] = self.account_type.to_alipay_dict()
  66. else:
  67. params['account_type'] = self.account_type
  68. if self.community_id:
  69. if hasattr(self.community_id, 'to_alipay_dict'):
  70. params['community_id'] = self.community_id.to_alipay_dict()
  71. else:
  72. params['community_id'] = self.community_id
  73. if self.external_invoke_address:
  74. if hasattr(self.external_invoke_address, 'to_alipay_dict'):
  75. params['external_invoke_address'] = self.external_invoke_address.to_alipay_dict()
  76. else:
  77. params['external_invoke_address'] = self.external_invoke_address
  78. if self.service_expires:
  79. if hasattr(self.service_expires, 'to_alipay_dict'):
  80. params['service_expires'] = self.service_expires.to_alipay_dict()
  81. else:
  82. params['service_expires'] = self.service_expires
  83. if self.service_type:
  84. if hasattr(self.service_type, 'to_alipay_dict'):
  85. params['service_type'] = self.service_type.to_alipay_dict()
  86. else:
  87. params['service_type'] = self.service_type
  88. if self.status:
  89. if hasattr(self.status, 'to_alipay_dict'):
  90. params['status'] = self.status.to_alipay_dict()
  91. else:
  92. params['status'] = self.status
  93. return params
  94. @staticmethod
  95. def from_alipay_dict(d):
  96. if not d:
  97. return None
  98. o = AlipayEcoCplifeBasicserviceModifyModel()
  99. if 'account' in d:
  100. o.account = d['account']
  101. if 'account_type' in d:
  102. o.account_type = d['account_type']
  103. if 'community_id' in d:
  104. o.community_id = d['community_id']
  105. if 'external_invoke_address' in d:
  106. o.external_invoke_address = d['external_invoke_address']
  107. if 'service_expires' in d:
  108. o.service_expires = d['service_expires']
  109. if 'service_type' in d:
  110. o.service_type = d['service_type']
  111. if 'status' in d:
  112. o.status = d['status']
  113. return o