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

namespace Topsdk.Top.Ability375.Request;

public class TaobaoTbkTpwdCreateRequest : AbstractTopApiRequest
{

    /*
        兼容旧版本api参数，无实际作用
            */
    private string? text;


    /*
        兼容旧版本api参数，无实际作用
            */
    private string? logo;


    /*
        兼容旧版本api参数，无实际作用
            */
    private string? ext;


    /*
        兼容旧版本api参数，无实际作用
            */
    private string? userId;


    /*
        联盟官方渠道获取的淘客推广链接，请注意，不要随意篡改官方生成的链接，否则可能无法生成淘口令
            */
    private string? url;


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

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

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

    [JsonPropertyName("user_id")]
    public string? UserId
    {
        get => userId;
        set => this.userId = value;
    }

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



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.text != null)
        {
            requestParam.Add("text",TopUtils.ConvertBasicType(this.text));
        }
        if(this.logo != null)
        {
            requestParam.Add("logo",TopUtils.ConvertBasicType(this.logo));
        }
        if(this.ext != null)
        {
            requestParam.Add("ext",TopUtils.ConvertBasicType(this.ext));
        }
        if(this.userId != null)
        {
            requestParam.Add("user_id",TopUtils.ConvertBasicType(this.userId));
        }
        if(this.url != null)
        {
            requestParam.Add("url",TopUtils.ConvertBasicType(this.url));
        }
        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.tpwd.create";
    }

}

