SsdataDataserviceRiskIpprofileQueryModel.py 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class SsdataDataserviceRiskIpprofileQueryModel(object):
  6. def __init__(self):
  7. self._cert_no = None
  8. self._city = None
  9. self._district = None
  10. self._ip_address = None
  11. self._partner_id = None
  12. self._phone = None
  13. @property
  14. def cert_no(self):
  15. return self._cert_no
  16. @cert_no.setter
  17. def cert_no(self, value):
  18. self._cert_no = value
  19. @property
  20. def city(self):
  21. return self._city
  22. @city.setter
  23. def city(self, value):
  24. self._city = value
  25. @property
  26. def district(self):
  27. return self._district
  28. @district.setter
  29. def district(self, value):
  30. self._district = value
  31. @property
  32. def ip_address(self):
  33. return self._ip_address
  34. @ip_address.setter
  35. def ip_address(self, value):
  36. self._ip_address = value
  37. @property
  38. def partner_id(self):
  39. return self._partner_id
  40. @partner_id.setter
  41. def partner_id(self, value):
  42. self._partner_id = value
  43. @property
  44. def phone(self):
  45. return self._phone
  46. @phone.setter
  47. def phone(self, value):
  48. self._phone = value
  49. def to_alipay_dict(self):
  50. params = dict()
  51. if self.cert_no:
  52. if hasattr(self.cert_no, 'to_alipay_dict'):
  53. params['cert_no'] = self.cert_no.to_alipay_dict()
  54. else:
  55. params['cert_no'] = self.cert_no
  56. if self.city:
  57. if hasattr(self.city, 'to_alipay_dict'):
  58. params['city'] = self.city.to_alipay_dict()
  59. else:
  60. params['city'] = self.city
  61. if self.district:
  62. if hasattr(self.district, 'to_alipay_dict'):
  63. params['district'] = self.district.to_alipay_dict()
  64. else:
  65. params['district'] = self.district
  66. if self.ip_address:
  67. if hasattr(self.ip_address, 'to_alipay_dict'):
  68. params['ip_address'] = self.ip_address.to_alipay_dict()
  69. else:
  70. params['ip_address'] = self.ip_address
  71. if self.partner_id:
  72. if hasattr(self.partner_id, 'to_alipay_dict'):
  73. params['partner_id'] = self.partner_id.to_alipay_dict()
  74. else:
  75. params['partner_id'] = self.partner_id
  76. if self.phone:
  77. if hasattr(self.phone, 'to_alipay_dict'):
  78. params['phone'] = self.phone.to_alipay_dict()
  79. else:
  80. params['phone'] = self.phone
  81. return params
  82. @staticmethod
  83. def from_alipay_dict(d):
  84. if not d:
  85. return None
  86. o = SsdataDataserviceRiskIpprofileQueryModel()
  87. if 'cert_no' in d:
  88. o.cert_no = d['cert_no']
  89. if 'city' in d:
  90. o.city = d['city']
  91. if 'district' in d:
  92. o.district = d['district']
  93. if 'ip_address' in d:
  94. o.ip_address = d['ip_address']
  95. if 'partner_id' in d:
  96. o.partner_id = d['partner_id']
  97. if 'phone' in d:
  98. o.phone = d['phone']
  99. return o