123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class DeviceGroup(object):
- def __init__(self):
- self._biz_type = None
- self._description = None
- self._device_count = None
- self._gmt_create = None
- self._gmt_modified = None
- self._group_id = None
- self._group_name = None
- @property
- def biz_type(self):
- return self._biz_type
- @biz_type.setter
- def biz_type(self, value):
- self._biz_type = value
- @property
- def description(self):
- return self._description
- @description.setter
- def description(self, value):
- self._description = value
- @property
- def device_count(self):
- return self._device_count
- @device_count.setter
- def device_count(self, value):
- self._device_count = value
- @property
- def gmt_create(self):
- return self._gmt_create
- @gmt_create.setter
- def gmt_create(self, value):
- self._gmt_create = value
- @property
- def gmt_modified(self):
- return self._gmt_modified
- @gmt_modified.setter
- def gmt_modified(self, value):
- self._gmt_modified = value
- @property
- def group_id(self):
- return self._group_id
- @group_id.setter
- def group_id(self, value):
- self._group_id = value
- @property
- def group_name(self):
- return self._group_name
- @group_name.setter
- def group_name(self, value):
- self._group_name = value
- def to_alipay_dict(self):
- params = dict()
- if self.biz_type:
- if hasattr(self.biz_type, 'to_alipay_dict'):
- params['biz_type'] = self.biz_type.to_alipay_dict()
- else:
- params['biz_type'] = self.biz_type
- if self.description:
- if hasattr(self.description, 'to_alipay_dict'):
- params['description'] = self.description.to_alipay_dict()
- else:
- params['description'] = self.description
- if self.device_count:
- if hasattr(self.device_count, 'to_alipay_dict'):
- params['device_count'] = self.device_count.to_alipay_dict()
- else:
- params['device_count'] = self.device_count
- if self.gmt_create:
- if hasattr(self.gmt_create, 'to_alipay_dict'):
- params['gmt_create'] = self.gmt_create.to_alipay_dict()
- else:
- params['gmt_create'] = self.gmt_create
- if self.gmt_modified:
- if hasattr(self.gmt_modified, 'to_alipay_dict'):
- params['gmt_modified'] = self.gmt_modified.to_alipay_dict()
- else:
- params['gmt_modified'] = self.gmt_modified
- if self.group_id:
- if hasattr(self.group_id, 'to_alipay_dict'):
- params['group_id'] = self.group_id.to_alipay_dict()
- else:
- params['group_id'] = self.group_id
- if self.group_name:
- if hasattr(self.group_name, 'to_alipay_dict'):
- params['group_name'] = self.group_name.to_alipay_dict()
- else:
- params['group_name'] = self.group_name
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = DeviceGroup()
- if 'biz_type' in d:
- o.biz_type = d['biz_type']
- if 'description' in d:
- o.description = d['description']
- if 'device_count' in d:
- o.device_count = d['device_count']
- if 'gmt_create' in d:
- o.gmt_create = d['gmt_create']
- if 'gmt_modified' in d:
- o.gmt_modified = d['gmt_modified']
- if 'group_id' in d:
- o.group_id = d['group_id']
- if 'group_name' in d:
- o.group_name = d['group_name']
- return o
|