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

namespace Topsdk.Top.Ability374.Request;

public class TaobaoTbkActivityInfoGetRequest : AbstractTopApiRequest
{

    /*
        官方活动会场ID，从淘宝客后台“我要推广-活动推广”中获取
            */
    private string? activityMaterialId;


    /*
        mm_xxx_xxx_xxx的第三位
            */
    private long? adzoneId;


    /*
        mm_xxx_xxx_xxx 仅三方分成场景使用
            */
    private string? subPid;


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


    /*
        自定义输入串，英文和数字组成，长度不能大于12个字符，区分不同的推广渠道
            */
    private string? unionId;


    [JsonPropertyName("activity_material_id")]
    public string? ActivityMaterialId
    {
        get => activityMaterialId;
        set => this.activityMaterialId = value;
    }

    [JsonPropertyName("adzone_id")]
    public long? AdzoneId
    {
        get => adzoneId;
        set => this.adzoneId = value;
    }

    [JsonPropertyName("sub_pid")]
    public string? SubPid
    {
        get => subPid;
        set => this.subPid = value;
    }

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

    [JsonPropertyName("union_id")]
    public string? UnionId
    {
        get => unionId;
        set => this.unionId = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.activityMaterialId != null)
        {
            requestParam.Add("activity_material_id",TopUtils.ConvertBasicType(this.activityMaterialId));
        }
        if(this.adzoneId != null)
        {
            requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
        }
        if(this.subPid != null)
        {
            requestParam.Add("sub_pid",TopUtils.ConvertBasicType(this.subPid));
        }
        if(this.relationId != null)
        {
            requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
        }
        if(this.unionId != null)
        {
            requestParam.Add("union_id",TopUtils.ConvertBasicType(this.unionId));
        }
        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.activity.info.get";
    }

}

