123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class KoubeiShopExternalDataSyncModel(object):
- def __init__(self):
- self._action = None
- self._content = None
- self._data_source = None
- self._data_version = None
- self._external_shop_id = None
- self._shop_id = None
- @property
- def action(self):
- return self._action
- @action.setter
- def action(self, value):
- self._action = value
- @property
- def content(self):
- return self._content
- @content.setter
- def content(self, value):
- self._content = value
- @property
- def data_source(self):
- return self._data_source
- @data_source.setter
- def data_source(self, value):
- self._data_source = value
- @property
- def data_version(self):
- return self._data_version
- @data_version.setter
- def data_version(self, value):
- self._data_version = value
- @property
- def external_shop_id(self):
- return self._external_shop_id
- @external_shop_id.setter
- def external_shop_id(self, value):
- self._external_shop_id = value
- @property
- def shop_id(self):
- return self._shop_id
- @shop_id.setter
- def shop_id(self, value):
- self._shop_id = value
- def to_alipay_dict(self):
- params = dict()
- if self.action:
- if hasattr(self.action, 'to_alipay_dict'):
- params['action'] = self.action.to_alipay_dict()
- else:
- params['action'] = self.action
- if self.content:
- if hasattr(self.content, 'to_alipay_dict'):
- params['content'] = self.content.to_alipay_dict()
- else:
- params['content'] = self.content
- if self.data_source:
- if hasattr(self.data_source, 'to_alipay_dict'):
- params['data_source'] = self.data_source.to_alipay_dict()
- else:
- params['data_source'] = self.data_source
- if self.data_version:
- if hasattr(self.data_version, 'to_alipay_dict'):
- params['data_version'] = self.data_version.to_alipay_dict()
- else:
- params['data_version'] = self.data_version
- if self.external_shop_id:
- if hasattr(self.external_shop_id, 'to_alipay_dict'):
- params['external_shop_id'] = self.external_shop_id.to_alipay_dict()
- else:
- params['external_shop_id'] = self.external_shop_id
- if self.shop_id:
- if hasattr(self.shop_id, 'to_alipay_dict'):
- params['shop_id'] = self.shop_id.to_alipay_dict()
- else:
- params['shop_id'] = self.shop_id
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = KoubeiShopExternalDataSyncModel()
- if 'action' in d:
- o.action = d['action']
- if 'content' in d:
- o.content = d['content']
- if 'data_source' in d:
- o.data_source = d['data_source']
- if 'data_version' in d:
- o.data_version = d['data_version']
- if 'external_shop_id' in d:
- o.external_shop_id = d['external_shop_id']
- if 'shop_id' in d:
- o.shop_id = d['shop_id']
- return o
|