using System.Text.Json.Serialization;
using System.Collections.Generic;
using Topsdk.Util;

namespace Topsdk.Top.Ability425.Request;

public class TaobaoTbkScPublisherInfoSaveRequest : AbstractTopApiRequest
{

    /*
        渠道备案 - 来源，取链接的来源
            */
    private string? relationFrom;


    /*
        渠道备案 - 线下场景信息，1 - 门店，2- 学校，3 - 工厂，4 - 其他
            */
    private string? offlineScene;


    /*
        渠道备案 - 线上场景信息，1 - 微信群，2- QQ群，3 - 其他
            */
    private string? onlineScene;


    /*
        淘宝客邀请渠道或会员的邀请码
            */
    private string? inviterCode;


    /*
        类型，必选 默认为1:
            */
    private long? infoType;


    /*
        媒体侧渠道备注
            */
    private string? note;


    /*
        线下备案注册信息,字段包含: 电话号码(phoneNumber，必填),省(province,必填),市(city,必填),区县街道(location,必填),详细地址(detailAddress,必填),经营类型(career,线下个人必填),店铺类型(shopType,线下店铺必填),店铺名称(shopName,线下店铺必填),店铺证书类型(shopCertifyType,线下店铺选填),店铺证书编号(certifyNumber,线下店铺选填)
            */
    private string? registerInfo;


    [JsonPropertyName("relation_from")]
    public string? RelationFrom
    {
        get => relationFrom;
        set => this.relationFrom = value;
    }

    [JsonPropertyName("offline_scene")]
    public string? OfflineScene
    {
        get => offlineScene;
        set => this.offlineScene = value;
    }

    [JsonPropertyName("online_scene")]
    public string? OnlineScene
    {
        get => onlineScene;
        set => this.onlineScene = value;
    }

    [JsonPropertyName("inviter_code")]
    public string? InviterCode
    {
        get => inviterCode;
        set => this.inviterCode = value;
    }

    [JsonPropertyName("info_type")]
    public long? InfoType
    {
        get => infoType;
        set => this.infoType = value;
    }

    [JsonPropertyName("note")]
    public string? Note
    {
        get => note;
        set => this.note = value;
    }

    [JsonPropertyName("register_info")]
    public string? RegisterInfo
    {
        get => registerInfo;
        set => this.registerInfo = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.relationFrom != null)
        {
            requestParam.Add("relation_from",TopUtils.ConvertBasicType(this.relationFrom));
        }
        if(this.offlineScene != null)
        {
            requestParam.Add("offline_scene",TopUtils.ConvertBasicType(this.offlineScene));
        }
        if(this.onlineScene != null)
        {
            requestParam.Add("online_scene",TopUtils.ConvertBasicType(this.onlineScene));
        }
        if(this.inviterCode != null)
        {
            requestParam.Add("inviter_code",TopUtils.ConvertBasicType(this.inviterCode));
        }
        if(this.infoType != null)
        {
            requestParam.Add("info_type",TopUtils.ConvertBasicType(this.infoType));
        }
        if(this.note != null)
        {
            requestParam.Add("note",TopUtils.ConvertBasicType(this.note));
        }
        if(this.registerInfo != null)
        {
            requestParam.Add("register_info",TopUtils.ConvertBasicType(this.registerInfo));
        }
        return requestParam;
    }

    public override IDictionary<string, TopFileItem> ToFileParam()
    {
        IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
        return fileParam;
    }

    public override string GetApiCode()
    {
        return "taobao.tbk.sc.publisher.info.save";
    }

}

