123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145 |
- #!/usr/bin/env python
- # -*- coding: utf-8 -*-
- import json
- from alipay.aop.api.constant.ParamConstants import *
- class PropertyAuthInfo(object):
- def __init__(self):
- self._area = None
- self._city = None
- self._community = None
- self._data_id = None
- self._latitude = None
- self._longitude = None
- self._property = None
- self._uid = None
- @property
- def area(self):
- return self._area
- @area.setter
- def area(self, value):
- self._area = value
- @property
- def city(self):
- return self._city
- @city.setter
- def city(self, value):
- self._city = value
- @property
- def community(self):
- return self._community
- @community.setter
- def community(self, value):
- self._community = value
- @property
- def data_id(self):
- return self._data_id
- @data_id.setter
- def data_id(self, value):
- self._data_id = value
- @property
- def latitude(self):
- return self._latitude
- @latitude.setter
- def latitude(self, value):
- self._latitude = value
- @property
- def longitude(self):
- return self._longitude
- @longitude.setter
- def longitude(self, value):
- self._longitude = value
- @property
- def property(self):
- return self._property
- @property.setter
- def property(self, value):
- self._property = value
- @property
- def uid(self):
- return self._uid
- @uid.setter
- def uid(self, value):
- self._uid = value
- def to_alipay_dict(self):
- params = dict()
- if self.area:
- if hasattr(self.area, 'to_alipay_dict'):
- params['area'] = self.area.to_alipay_dict()
- else:
- params['area'] = self.area
- if self.city:
- if hasattr(self.city, 'to_alipay_dict'):
- params['city'] = self.city.to_alipay_dict()
- else:
- params['city'] = self.city
- if self.community:
- if hasattr(self.community, 'to_alipay_dict'):
- params['community'] = self.community.to_alipay_dict()
- else:
- params['community'] = self.community
- if self.data_id:
- if hasattr(self.data_id, 'to_alipay_dict'):
- params['data_id'] = self.data_id.to_alipay_dict()
- else:
- params['data_id'] = self.data_id
- if self.latitude:
- if hasattr(self.latitude, 'to_alipay_dict'):
- params['latitude'] = self.latitude.to_alipay_dict()
- else:
- params['latitude'] = self.latitude
- if self.longitude:
- if hasattr(self.longitude, 'to_alipay_dict'):
- params['longitude'] = self.longitude.to_alipay_dict()
- else:
- params['longitude'] = self.longitude
- if self.property:
- if hasattr(self.property, 'to_alipay_dict'):
- params['property'] = self.property.to_alipay_dict()
- else:
- params['property'] = self.property
- if self.uid:
- if hasattr(self.uid, 'to_alipay_dict'):
- params['uid'] = self.uid.to_alipay_dict()
- else:
- params['uid'] = self.uid
- return params
- @staticmethod
- def from_alipay_dict(d):
- if not d:
- return None
- o = PropertyAuthInfo()
- if 'area' in d:
- o.area = d['area']
- if 'city' in d:
- o.city = d['city']
- if 'community' in d:
- o.community = d['community']
- if 'data_id' in d:
- o.data_id = d['data_id']
- if 'latitude' in d:
- o.latitude = d['latitude']
- if 'longitude' in d:
- o.longitude = d['longitude']
- if 'property' in d:
- o.property = d['property']
- if 'uid' in d:
- o.uid = d['uid']
- return o
|