AlipayEcoCplifeBasicserviceInitializeModel.py 3.7 KB

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