#!/usr/bin/env python
# -*- coding: utf-8 -*-
import json

from alipay.aop.api.constant.ParamConstants import *


class AlipayFundJointaccountTradePayModel(object):

    def __init__(self):
        self._account_id = None
        self._biz_scene = None
        self._ext_info = None
        self._hide_menu = None
        self._product_code = None
        self._type = None

    @property
    def account_id(self):
        return self._account_id

    @account_id.setter
    def account_id(self, value):
        self._account_id = value
    @property
    def biz_scene(self):
        return self._biz_scene

    @biz_scene.setter
    def biz_scene(self, value):
        self._biz_scene = value
    @property
    def ext_info(self):
        return self._ext_info

    @ext_info.setter
    def ext_info(self, value):
        self._ext_info = value
    @property
    def hide_menu(self):
        return self._hide_menu

    @hide_menu.setter
    def hide_menu(self, value):
        self._hide_menu = value
    @property
    def product_code(self):
        return self._product_code

    @product_code.setter
    def product_code(self, value):
        self._product_code = value
    @property
    def type(self):
        return self._type

    @type.setter
    def type(self, value):
        self._type = value


    def to_alipay_dict(self):
        params = dict()
        if self.account_id:
            if hasattr(self.account_id, 'to_alipay_dict'):
                params['account_id'] = self.account_id.to_alipay_dict()
            else:
                params['account_id'] = self.account_id
        if self.biz_scene:
            if hasattr(self.biz_scene, 'to_alipay_dict'):
                params['biz_scene'] = self.biz_scene.to_alipay_dict()
            else:
                params['biz_scene'] = self.biz_scene
        if self.ext_info:
            if hasattr(self.ext_info, 'to_alipay_dict'):
                params['ext_info'] = self.ext_info.to_alipay_dict()
            else:
                params['ext_info'] = self.ext_info
        if self.hide_menu:
            if hasattr(self.hide_menu, 'to_alipay_dict'):
                params['hide_menu'] = self.hide_menu.to_alipay_dict()
            else:
                params['hide_menu'] = self.hide_menu
        if self.product_code:
            if hasattr(self.product_code, 'to_alipay_dict'):
                params['product_code'] = self.product_code.to_alipay_dict()
            else:
                params['product_code'] = self.product_code
        if self.type:
            if hasattr(self.type, 'to_alipay_dict'):
                params['type'] = self.type.to_alipay_dict()
            else:
                params['type'] = self.type
        return params

    @staticmethod
    def from_alipay_dict(d):
        if not d:
            return None
        o = AlipayFundJointaccountTradePayModel()
        if 'account_id' in d:
            o.account_id = d['account_id']
        if 'biz_scene' in d:
            o.biz_scene = d['biz_scene']
        if 'ext_info' in d:
            o.ext_info = d['ext_info']
        if 'hide_menu' in d:
            o.hide_menu = d['hide_menu']
        if 'product_code' in d:
            o.product_code = d['product_code']
        if 'type' in d:
            o.type = d['type']
        return o


