KoubeiItemExtitemUpdateModel.py 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. import json
  4. from alipay.aop.api.constant.ParamConstants import *
  5. class KoubeiItemExtitemUpdateModel(object):
  6. def __init__(self):
  7. self._brand_code = None
  8. self._category_code = None
  9. self._count = None
  10. self._country = None
  11. self._description = None
  12. self._id = None
  13. self._item_code = None
  14. self._picture = None
  15. self._price = None
  16. self._specification = None
  17. self._title = None
  18. @property
  19. def brand_code(self):
  20. return self._brand_code
  21. @brand_code.setter
  22. def brand_code(self, value):
  23. self._brand_code = value
  24. @property
  25. def category_code(self):
  26. return self._category_code
  27. @category_code.setter
  28. def category_code(self, value):
  29. self._category_code = value
  30. @property
  31. def count(self):
  32. return self._count
  33. @count.setter
  34. def count(self, value):
  35. self._count = value
  36. @property
  37. def country(self):
  38. return self._country
  39. @country.setter
  40. def country(self, value):
  41. self._country = value
  42. @property
  43. def description(self):
  44. return self._description
  45. @description.setter
  46. def description(self, value):
  47. self._description = value
  48. @property
  49. def id(self):
  50. return self._id
  51. @id.setter
  52. def id(self, value):
  53. self._id = value
  54. @property
  55. def item_code(self):
  56. return self._item_code
  57. @item_code.setter
  58. def item_code(self, value):
  59. self._item_code = value
  60. @property
  61. def picture(self):
  62. return self._picture
  63. @picture.setter
  64. def picture(self, value):
  65. self._picture = value
  66. @property
  67. def price(self):
  68. return self._price
  69. @price.setter
  70. def price(self, value):
  71. self._price = value
  72. @property
  73. def specification(self):
  74. return self._specification
  75. @specification.setter
  76. def specification(self, value):
  77. self._specification = value
  78. @property
  79. def title(self):
  80. return self._title
  81. @title.setter
  82. def title(self, value):
  83. self._title = value
  84. def to_alipay_dict(self):
  85. params = dict()
  86. if self.brand_code:
  87. if hasattr(self.brand_code, 'to_alipay_dict'):
  88. params['brand_code'] = self.brand_code.to_alipay_dict()
  89. else:
  90. params['brand_code'] = self.brand_code
  91. if self.category_code:
  92. if hasattr(self.category_code, 'to_alipay_dict'):
  93. params['category_code'] = self.category_code.to_alipay_dict()
  94. else:
  95. params['category_code'] = self.category_code
  96. if self.count:
  97. if hasattr(self.count, 'to_alipay_dict'):
  98. params['count'] = self.count.to_alipay_dict()
  99. else:
  100. params['count'] = self.count
  101. if self.country:
  102. if hasattr(self.country, 'to_alipay_dict'):
  103. params['country'] = self.country.to_alipay_dict()
  104. else:
  105. params['country'] = self.country
  106. if self.description:
  107. if hasattr(self.description, 'to_alipay_dict'):
  108. params['description'] = self.description.to_alipay_dict()
  109. else:
  110. params['description'] = self.description
  111. if self.id:
  112. if hasattr(self.id, 'to_alipay_dict'):
  113. params['id'] = self.id.to_alipay_dict()
  114. else:
  115. params['id'] = self.id
  116. if self.item_code:
  117. if hasattr(self.item_code, 'to_alipay_dict'):
  118. params['item_code'] = self.item_code.to_alipay_dict()
  119. else:
  120. params['item_code'] = self.item_code
  121. if self.picture:
  122. if hasattr(self.picture, 'to_alipay_dict'):
  123. params['picture'] = self.picture.to_alipay_dict()
  124. else:
  125. params['picture'] = self.picture
  126. if self.price:
  127. if hasattr(self.price, 'to_alipay_dict'):
  128. params['price'] = self.price.to_alipay_dict()
  129. else:
  130. params['price'] = self.price
  131. if self.specification:
  132. if hasattr(self.specification, 'to_alipay_dict'):
  133. params['specification'] = self.specification.to_alipay_dict()
  134. else:
  135. params['specification'] = self.specification
  136. if self.title:
  137. if hasattr(self.title, 'to_alipay_dict'):
  138. params['title'] = self.title.to_alipay_dict()
  139. else:
  140. params['title'] = self.title
  141. return params
  142. @staticmethod
  143. def from_alipay_dict(d):
  144. if not d:
  145. return None
  146. o = KoubeiItemExtitemUpdateModel()
  147. if 'brand_code' in d:
  148. o.brand_code = d['brand_code']
  149. if 'category_code' in d:
  150. o.category_code = d['category_code']
  151. if 'count' in d:
  152. o.count = d['count']
  153. if 'country' in d:
  154. o.country = d['country']
  155. if 'description' in d:
  156. o.description = d['description']
  157. if 'id' in d:
  158. o.id = d['id']
  159. if 'item_code' in d:
  160. o.item_code = d['item_code']
  161. if 'picture' in d:
  162. o.picture = d['picture']
  163. if 'price' in d:
  164. o.price = d['price']
  165. if 'specification' in d:
  166. o.specification = d['specification']
  167. if 'title' in d:
  168. o.title = d['title']
  169. return o