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

namespace Topsdk.Top.Ability304.Request;

public class TaobaoTopSecretGetRequest : AbstractTopApiRequest
{

    /*
        秘钥版本号
            */
    private long? secretVersion;


    /*
        伪随机数
            */
    private string? randomNum;


    /*
        自定义用户id
            */
    private long? customerUserId;


    [JsonPropertyName("secret_version")]
    public long? SecretVersion
    {
        get => secretVersion;
        set => this.secretVersion = value;
    }

    [JsonPropertyName("random_num")]
    public string? RandomNum
    {
        get => randomNum;
        set => this.randomNum = value;
    }

    [JsonPropertyName("customer_user_id")]
    public long? CustomerUserId
    {
        get => customerUserId;
        set => this.customerUserId = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.secretVersion != null)
        {
            requestParam.Add("secret_version",TopUtils.ConvertBasicType(this.secretVersion));
        }
        if(this.randomNum != null)
        {
            requestParam.Add("random_num",TopUtils.ConvertBasicType(this.randomNum));
        }
        if(this.customerUserId != null)
        {
            requestParam.Add("customer_user_id",TopUtils.ConvertBasicType(this.customerUserId));
        }
        return requestParam;
    }

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

    public override string GetApiCode()
    {
        return "taobao.top.secret.get";
    }

}

