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

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


class AnttechMorseMarketingPayinstEquitySendModel(object):

    def __init__(self):
        self._campaign_id = None
        self._campaign_ids = None
        self._equity_type = None
        self._mobile_sha_256 = None
        self._out_request_id = None
        self._resource_id = None
        self._send_target_id = None

    @property
    def campaign_id(self):
        return self._campaign_id

    @campaign_id.setter
    def campaign_id(self, value):
        self._campaign_id = value
    @property
    def campaign_ids(self):
        return self._campaign_ids

    @campaign_ids.setter
    def campaign_ids(self, value):
        self._campaign_ids = value
    @property
    def equity_type(self):
        return self._equity_type

    @equity_type.setter
    def equity_type(self, value):
        self._equity_type = value
    @property
    def mobile_sha_256(self):
        return self._mobile_sha_256

    @mobile_sha_256.setter
    def mobile_sha_256(self, value):
        self._mobile_sha_256 = value
    @property
    def out_request_id(self):
        return self._out_request_id

    @out_request_id.setter
    def out_request_id(self, value):
        self._out_request_id = value
    @property
    def resource_id(self):
        return self._resource_id

    @resource_id.setter
    def resource_id(self, value):
        self._resource_id = value
    @property
    def send_target_id(self):
        return self._send_target_id

    @send_target_id.setter
    def send_target_id(self, value):
        self._send_target_id = value


    def to_alipay_dict(self):
        params = dict()
        if self.campaign_id:
            if hasattr(self.campaign_id, 'to_alipay_dict'):
                params['campaign_id'] = self.campaign_id.to_alipay_dict()
            else:
                params['campaign_id'] = self.campaign_id
        if self.campaign_ids:
            if hasattr(self.campaign_ids, 'to_alipay_dict'):
                params['campaign_ids'] = self.campaign_ids.to_alipay_dict()
            else:
                params['campaign_ids'] = self.campaign_ids
        if self.equity_type:
            if hasattr(self.equity_type, 'to_alipay_dict'):
                params['equity_type'] = self.equity_type.to_alipay_dict()
            else:
                params['equity_type'] = self.equity_type
        if self.mobile_sha_256:
            if hasattr(self.mobile_sha_256, 'to_alipay_dict'):
                params['mobile_sha_256'] = self.mobile_sha_256.to_alipay_dict()
            else:
                params['mobile_sha_256'] = self.mobile_sha_256
        if self.out_request_id:
            if hasattr(self.out_request_id, 'to_alipay_dict'):
                params['out_request_id'] = self.out_request_id.to_alipay_dict()
            else:
                params['out_request_id'] = self.out_request_id
        if self.resource_id:
            if hasattr(self.resource_id, 'to_alipay_dict'):
                params['resource_id'] = self.resource_id.to_alipay_dict()
            else:
                params['resource_id'] = self.resource_id
        if self.send_target_id:
            if hasattr(self.send_target_id, 'to_alipay_dict'):
                params['send_target_id'] = self.send_target_id.to_alipay_dict()
            else:
                params['send_target_id'] = self.send_target_id
        return params

    @staticmethod
    def from_alipay_dict(d):
        if not d:
            return None
        o = AnttechMorseMarketingPayinstEquitySendModel()
        if 'campaign_id' in d:
            o.campaign_id = d['campaign_id']
        if 'campaign_ids' in d:
            o.campaign_ids = d['campaign_ids']
        if 'equity_type' in d:
            o.equity_type = d['equity_type']
        if 'mobile_sha_256' in d:
            o.mobile_sha_256 = d['mobile_sha_256']
        if 'out_request_id' in d:
            o.out_request_id = d['out_request_id']
        if 'resource_id' in d:
            o.resource_id = d['resource_id']
        if 'send_target_id' in d:
            o.send_target_id = d['send_target_id']
        return o


