using System.Text.Json.Serialization;
using System.Collections.Generic;
using Topsdk.Util;
using Topsdk.Top.Defaultability.Domain;

namespace Topsdk.Top.Defaultability.Request;

public class TaobaoTbkDgGeneralLinkConvertRequest : AbstractTopApiRequest
{

    /*
        1-动态ID转链场景，2-消费者比价场景，4-
            */
    private string? bizSceneId;


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


    /*
        物料列表，可以为url或淘口令,多个时使用英文逗号拼接传入（邀约制权限有申请门槛，权限分为①联盟推广链接转链；②天猫/淘宝复制链接转链；如有相关需求请在权限申请时同步说明）
            */
    private IList<string>? materialList;


    /*
        渠道管理ID（如是主站选品推广场景，必须入参该字段，且bizSceneId字段需入参2-消费者比价场景，否则二次转链失败）
            */
    private string? relationId;


    /*
        推广位id，mm_xx_xx_xx pid三段式中的第三段
            */
    private long? adzoneId;


    /*
        卖家ID列表,多个时使用英文逗号拼接传入
            */
    private IList<string>? sellerIdList;


    /*
        商品ID列表,多个时使用英文逗号拼接传入
            */
    private IList<string>? itemIdList;


    /*
        会场ID列表,多个时使用英文逗号拼接传入
            */
    private IList<string>? pageIdList;


    /*
        会场页面内定坑商品
            */
    private TaobaoTbkDgGeneralLinkConvertTargetItemDTO? targetItem;


    /*
        商品转链
            */
    private IList<TaobaoTbkDgGeneralLinkConvertLkItemDTO>? itemDto;


    /*
        会场页面转链
            */
    private IList<TaobaoTbkDgGeneralLinkConvertLkPageDTO>? pageDto;


    /*
        店铺转链
            */
    private IList<TaobaoTbkDgGeneralLinkConvertLkShopDTO>? shopDto;


    /*
        链接/口令转链
            */
    private IList<TaobaoTbkDgGeneralLinkConvertLkMaterialDTO>? materialDto;


    /*
        会员运营id
            */
    private string? specialId;


    /*
        加密用户标识
            */
    private string? uvid;


    /*
        启明系统任务ID
            */
    private string? qmtid;


    /*
        （返利）uvid展示授权弹窗1-不展示，0-展示
            */
    private long? uvidNotAuthorized;


    /*
        参数当前不可用
            */
    private string? requiredLinkType;


    [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("material_list")]
    public IList<string>? MaterialList
    {
        get => materialList;
        set => this.materialList = value;
    }

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

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

    [JsonPropertyName("seller_id_list")]
    public IList<string>? SellerIdList
    {
        get => sellerIdList;
        set => this.sellerIdList = value;
    }

    [JsonPropertyName("item_id_list")]
    public IList<string>? ItemIdList
    {
        get => itemIdList;
        set => this.itemIdList = value;
    }

    [JsonPropertyName("page_id_list")]
    public IList<string>? PageIdList
    {
        get => pageIdList;
        set => this.pageIdList = value;
    }

    [JsonPropertyName("target_item")]
    public TaobaoTbkDgGeneralLinkConvertTargetItemDTO? TargetItem
    {
        get => targetItem;
        set => this.targetItem = value;
    }

    [JsonPropertyName("item_dto")]
    public IList<TaobaoTbkDgGeneralLinkConvertLkItemDTO>? ItemDto
    {
        get => itemDto;
        set => this.itemDto = value;
    }

    [JsonPropertyName("page_dto")]
    public IList<TaobaoTbkDgGeneralLinkConvertLkPageDTO>? PageDto
    {
        get => pageDto;
        set => this.pageDto = value;
    }

    [JsonPropertyName("shop_dto")]
    public IList<TaobaoTbkDgGeneralLinkConvertLkShopDTO>? ShopDto
    {
        get => shopDto;
        set => this.shopDto = value;
    }

    [JsonPropertyName("material_dto")]
    public IList<TaobaoTbkDgGeneralLinkConvertLkMaterialDTO>? MaterialDto
    {
        get => materialDto;
        set => this.materialDto = value;
    }

    [JsonPropertyName("special_id")]
    public string? SpecialId
    {
        get => specialId;
        set => this.specialId = value;
    }

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

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

    [JsonPropertyName("uvid_not_authorized")]
    public long? UvidNotAuthorized
    {
        get => uvidNotAuthorized;
        set => this.uvidNotAuthorized = value;
    }

    [JsonPropertyName("required_link_type")]
    public string? RequiredLinkType
    {
        get => requiredLinkType;
        set => this.requiredLinkType = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        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.materialList != null)
        {
            requestParam.Add("material_list",TopUtils.ConvertBasicList(this.materialList));
        }
        if(this.relationId != null)
        {
            requestParam.Add("relation_id",TopUtils.ConvertBasicType(this.relationId));
        }
        if(this.adzoneId != null)
        {
            requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
        }
        if(this.sellerIdList != null)
        {
            requestParam.Add("seller_id_list",TopUtils.ConvertBasicList(this.sellerIdList));
        }
        if(this.itemIdList != null)
        {
            requestParam.Add("item_id_list",TopUtils.ConvertBasicList(this.itemIdList));
        }
        if(this.pageIdList != null)
        {
            requestParam.Add("page_id_list",TopUtils.ConvertBasicList(this.pageIdList));
        }
        if(this.targetItem != null)
        {
            requestParam.Add("target_item",TopUtils.ConvertStruct(this.targetItem));
        }
        if(this.itemDto != null)
        {
            requestParam.Add("item_dto",TopUtils.ConvertStructList(this.itemDto));
        }
        if(this.pageDto != null)
        {
            requestParam.Add("page_dto",TopUtils.ConvertStructList(this.pageDto));
        }
        if(this.shopDto != null)
        {
            requestParam.Add("shop_dto",TopUtils.ConvertStructList(this.shopDto));
        }
        if(this.materialDto != null)
        {
            requestParam.Add("material_dto",TopUtils.ConvertStructList(this.materialDto));
        }
        if(this.specialId != null)
        {
            requestParam.Add("special_id",TopUtils.ConvertBasicType(this.specialId));
        }
        if(this.uvid != null)
        {
            requestParam.Add("uvid",TopUtils.ConvertBasicType(this.uvid));
        }
        if(this.qmtid != null)
        {
            requestParam.Add("qmtid",TopUtils.ConvertBasicType(this.qmtid));
        }
        if(this.uvidNotAuthorized != null)
        {
            requestParam.Add("uvid_not_authorized",TopUtils.ConvertBasicType(this.uvidNotAuthorized));
        }
        if(this.requiredLinkType != null)
        {
            requestParam.Add("required_link_type",TopUtils.ConvertBasicType(this.requiredLinkType));
        }
        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.dg.general.link.convert";
    }

}

