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

namespace Topsdk.Top.Ability369.Request;

public class TaobaoTbkDgOptimusPromotionRequest : AbstractTopApiRequest
{

    /*
        页大小，一次请求请限制在10以内
         默认值:10    */
    private long? pageSize;


    /*
        第几页，默认：1
         默认值:1    */
    private long? pageNum;


    /*
        mm_xxx_xxx_xxx的第3段数字
            */
    private long? adzoneId;


    /*
        官方提供的权益物料Id。有价券-37104、大额店铺券-37116、天猫店铺券-62191、券券补-61809 更多权益物料id敬请期待！
            */
    private long? promotionId;


    [JsonPropertyName("page_size")]
    public long? PageSize
    {
        get => pageSize;
        set => this.pageSize = value;
    }

    [JsonPropertyName("page_num")]
    public long? PageNum
    {
        get => pageNum;
        set => this.pageNum = value;
    }

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

    [JsonPropertyName("promotion_id")]
    public long? PromotionId
    {
        get => promotionId;
        set => this.promotionId = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.pageSize != null)
        {
            requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
        }
        if(this.pageNum != null)
        {
            requestParam.Add("page_num",TopUtils.ConvertBasicType(this.pageNum));
        }
        if(this.adzoneId != null)
        {
            requestParam.Add("adzone_id",TopUtils.ConvertBasicType(this.adzoneId));
        }
        if(this.promotionId != null)
        {
            requestParam.Add("promotion_id",TopUtils.ConvertBasicType(this.promotionId));
        }
        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.optimus.promotion";
    }

}

