#!/usr/bin/env python # -*- coding: utf-8 -*- import json from alipay.aop.api.constant.ParamConstants import * class AlipayEcoTokenFastGetModel(object): def __init__(self): self._auth_code = None self._client_id = None self._client_secret = None @property def auth_code(self): return self._auth_code @auth_code.setter def auth_code(self, value): self._auth_code = value @property def client_id(self): return self._client_id @client_id.setter def client_id(self, value): self._client_id = value @property def client_secret(self): return self._client_secret @client_secret.setter def client_secret(self, value): self._client_secret = value def to_alipay_dict(self): params = dict() if self.auth_code: if hasattr(self.auth_code, 'to_alipay_dict'): params['auth_code'] = self.auth_code.to_alipay_dict() else: params['auth_code'] = self.auth_code if self.client_id: if hasattr(self.client_id, 'to_alipay_dict'): params['client_id'] = self.client_id.to_alipay_dict() else: params['client_id'] = self.client_id if self.client_secret: if hasattr(self.client_secret, 'to_alipay_dict'): params['client_secret'] = self.client_secret.to_alipay_dict() else: params['client_secret'] = self.client_secret return params @staticmethod def from_alipay_dict(d): if not d: return None o = AlipayEcoTokenFastGetModel() if 'auth_code' in d: o.auth_code = d['auth_code'] if 'client_id' in d: o.client_id = d['client_id'] if 'client_secret' in d: o.client_secret = d['client_secret'] return o