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

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


class AlipayCommerceEcRecyclinginvoiceCompanysupplierQueryModel(object):

    def __init__(self):
        self._outer_supplier_id = None
        self._page_num = None
        self._page_size = None
        self._supplier_id = None
        self._tax_no = None

    @property
    def outer_supplier_id(self):
        return self._outer_supplier_id

    @outer_supplier_id.setter
    def outer_supplier_id(self, value):
        self._outer_supplier_id = value
    @property
    def page_num(self):
        return self._page_num

    @page_num.setter
    def page_num(self, value):
        self._page_num = value
    @property
    def page_size(self):
        return self._page_size

    @page_size.setter
    def page_size(self, value):
        self._page_size = value
    @property
    def supplier_id(self):
        return self._supplier_id

    @supplier_id.setter
    def supplier_id(self, value):
        self._supplier_id = value
    @property
    def tax_no(self):
        return self._tax_no

    @tax_no.setter
    def tax_no(self, value):
        self._tax_no = value


    def to_alipay_dict(self):
        params = dict()
        if self.outer_supplier_id:
            if hasattr(self.outer_supplier_id, 'to_alipay_dict'):
                params['outer_supplier_id'] = self.outer_supplier_id.to_alipay_dict()
            else:
                params['outer_supplier_id'] = self.outer_supplier_id
        if self.page_num:
            if hasattr(self.page_num, 'to_alipay_dict'):
                params['page_num'] = self.page_num.to_alipay_dict()
            else:
                params['page_num'] = self.page_num
        if self.page_size:
            if hasattr(self.page_size, 'to_alipay_dict'):
                params['page_size'] = self.page_size.to_alipay_dict()
            else:
                params['page_size'] = self.page_size
        if self.supplier_id:
            if hasattr(self.supplier_id, 'to_alipay_dict'):
                params['supplier_id'] = self.supplier_id.to_alipay_dict()
            else:
                params['supplier_id'] = self.supplier_id
        if self.tax_no:
            if hasattr(self.tax_no, 'to_alipay_dict'):
                params['tax_no'] = self.tax_no.to_alipay_dict()
            else:
                params['tax_no'] = self.tax_no
        return params

    @staticmethod
    def from_alipay_dict(d):
        if not d:
            return None
        o = AlipayCommerceEcRecyclinginvoiceCompanysupplierQueryModel()
        if 'outer_supplier_id' in d:
            o.outer_supplier_id = d['outer_supplier_id']
        if 'page_num' in d:
            o.page_num = d['page_num']
        if 'page_size' in d:
            o.page_size = d['page_size']
        if 'supplier_id' in d:
            o.supplier_id = d['supplier_id']
        if 'tax_no' in d:
            o.tax_no = d['tax_no']
        return o


