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

namespace Topsdk.Top.Ability425.Request;

public class TaobaoTbkScInvitecodeGetRequest : AbstractTopApiRequest
{

    /*
        渠道关系ID
            */
    private long? relationId;


    /*
        渠道推广的物料类型
            */
    private string? relationApp;


    /*
        邀请码类型，1 - 渠道邀请，2 - 渠道裂变，3 -会员邀请
            */
    private long? codeType;


    [JsonPropertyName("relation_id")]
    public long? RelationId
    {
        get => relationId;
        set => this.relationId = value;
    }

    [JsonPropertyName("relation_app")]
    public string? RelationApp
    {
        get => relationApp;
        set => this.relationApp = value;
    }

    [JsonPropertyName("code_type")]
    public long? CodeType
    {
        get => codeType;
        set => this.codeType = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.relationId != null)
        {
            requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
        }
        if(this.relationApp != null)
        {
            requestParam.Add("relation_app",TopUtils.ConvertBasicType(this.relationApp));
        }
        if(this.codeType != null)
        {
            requestParam.Add("code_type",TopUtils.ConvertBasicType(this.codeType));
        }
        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.invitecode.get";
    }

}

