AlipayEcoMycarCarmodelBatchqueryModel.py 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class AlipayEcoMycarCarmodelBatchqueryModel(object):
  6. def __init__(self):
  7. self._brand_id = None
  8. self._company_id = None
  9. self._query_type = None
  10. self._serie_id = None
  11. @property
  12. def brand_id(self):
  13. return self._brand_id
  14. @brand_id.setter
  15. def brand_id(self, value):
  16. self._brand_id = value
  17. @property
  18. def company_id(self):
  19. return self._company_id
  20. @company_id.setter
  21. def company_id(self, value):
  22. self._company_id = value
  23. @property
  24. def query_type(self):
  25. return self._query_type
  26. @query_type.setter
  27. def query_type(self, value):
  28. self._query_type = value
  29. @property
  30. def serie_id(self):
  31. return self._serie_id
  32. @serie_id.setter
  33. def serie_id(self, value):
  34. self._serie_id = value
  35. def to_alipay_dict(self):
  36. params = dict()
  37. if self.brand_id:
  38. if hasattr(self.brand_id, 'to_alipay_dict'):
  39. params['brand_id'] = self.brand_id.to_alipay_dict()
  40. else:
  41. params['brand_id'] = self.brand_id
  42. if self.company_id:
  43. if hasattr(self.company_id, 'to_alipay_dict'):
  44. params['company_id'] = self.company_id.to_alipay_dict()
  45. else:
  46. params['company_id'] = self.company_id
  47. if self.query_type:
  48. if hasattr(self.query_type, 'to_alipay_dict'):
  49. params['query_type'] = self.query_type.to_alipay_dict()
  50. else:
  51. params['query_type'] = self.query_type
  52. if self.serie_id:
  53. if hasattr(self.serie_id, 'to_alipay_dict'):
  54. params['serie_id'] = self.serie_id.to_alipay_dict()
  55. else:
  56. params['serie_id'] = self.serie_id
  57. return params
  58. @staticmethod
  59. def from_alipay_dict(d):
  60. if not d:
  61. return None
  62. o = AlipayEcoMycarCarmodelBatchqueryModel()
  63. if 'brand_id' in d:
  64. o.brand_id = d['brand_id']
  65. if 'company_id' in d:
  66. o.company_id = d['company_id']
  67. if 'query_type' in d:
  68. o.query_type = d['query_type']
  69. if 'serie_id' in d:
  70. o.serie_id = d['serie_id']
  71. return o