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

namespace Topsdk.Top.Ability371.Request;

public class TaobaoTbkItemInfoGetRequest : AbstractTopApiRequest
{

    /*
        商品ID串，用,分割，最大40个
            */
    private string? numIids;


    /*
        链接形式：1：PC，2：无线，默认：１
         默认值:1    */
    private long? platform;


    /*
        ip地址，影响邮费获取，如果不传或者传入不准确，邮费无法精准提供
            */
    private string? ip;


    /*
        1-动态ID转链场景，2-消费者比价场景，3-商品库导购场景（不填默认为1）
            */
    private string? bizSceneId;


    /*
        1-自购省，2-推广赚（代理模式专属ID，代理模式必填，非代理模式不用填写该字段）
            */
    private string? promotionType;


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


    /*
        商品库服务账户(场景id3权限对应的memberid）
            */
    private long? manageItemPubId;


    [JsonPropertyName("num_iids")]
    public string? NumIids
    {
        get => numIids;
        set => this.numIids = value;
    }

    [JsonPropertyName("platform")]
    public long? Platform
    {
        get => platform;
        set => this.platform = value;
    }

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

    [JsonPropertyName("biz_scene_id")]
    public string? BizSceneId
    {
        get => bizSceneId;
        set => this.bizSceneId = value;
    }

    [JsonPropertyName("promotion_type")]
    public string? PromotionType
    {
        get => promotionType;
        set => this.promotionType = value;
    }

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

    [JsonPropertyName("manage_item_pub_id")]
    public long? ManageItemPubId
    {
        get => manageItemPubId;
        set => this.manageItemPubId = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.numIids != null)
        {
            requestParam.Add("num_iids",TopUtils.ConvertBasicType(this.numIids));
        }
        if(this.platform != null)
        {
            requestParam.Add("platform",TopUtils.ConvertBasicType(this.platform));
        }
        if(this.ip != null)
        {
            requestParam.Add("ip",TopUtils.ConvertBasicType(this.ip));
        }
        if(this.bizSceneId != null)
        {
            requestParam.Add("biz_scene_id",TopUtils.ConvertBasicType(this.bizSceneId));
        }
        if(this.promotionType != null)
        {
            requestParam.Add("promotion_type",TopUtils.ConvertBasicType(this.promotionType));
        }
        if(this.relationId != null)
        {
            requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
        }
        if(this.manageItemPubId != null)
        {
            requestParam.Add("manage_item_pub_id",TopUtils.ConvertBasicType(this.manageItemPubId));
        }
        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.item.info.get";
    }

}

