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

namespace Topsdk.Top.Ability370.Request;

public class TaobaoTbkShopGetRequest : AbstractTopApiRequest
{

    /*
        累计推广商品上限
            */
    private long? endAuctionCount;


    /*
        淘客佣金比率上限，1~10000
            */
    private long? endCommissionRate;


    /*
        信用等级上限，1~20
            */
    private long? endCredit;


    /*
        店铺商品总数上限
            */
    private long? endTotalAction;


    /*
        需返回的字段列表
            */
    private string? fields;


    /*
        是否商城的店铺，设置为true表示该是属于淘宝商城的店铺，设置为false或不设置表示不判断这个属性
            */
    private bool? isTmall;


    /*
        第几页，默认1，1~100
         默认值:1    */
    private long? pageNo;


    /*
        页大小，默认20，1~100
         默认值:20    */
    private long? pageSize;


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


    /*
        查询词
            */
    private string? q;


    /*
        排序_des（降序），排序_asc（升序），佣金比率（commission_rate）， 商品数量（auction_count），销售总数量（total_auction）
            */
    private string? sort;


    /*
        累计推广商品下限
            */
    private long? startAuctionCount;


    /*
        淘客佣金比率下限，1~10000
            */
    private long? startCommissionRate;


    /*
        信用等级下限，1~20
            */
    private long? startCredit;


    /*
        店铺商品总数下限
            */
    private long? startTotalAction;


    [JsonPropertyName("end_auction_count")]
    public long? EndAuctionCount
    {
        get => endAuctionCount;
        set => this.endAuctionCount = value;
    }

    [JsonPropertyName("end_commission_rate")]
    public long? EndCommissionRate
    {
        get => endCommissionRate;
        set => this.endCommissionRate = value;
    }

    [JsonPropertyName("end_credit")]
    public long? EndCredit
    {
        get => endCredit;
        set => this.endCredit = value;
    }

    [JsonPropertyName("end_total_action")]
    public long? EndTotalAction
    {
        get => endTotalAction;
        set => this.endTotalAction = value;
    }

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

    [JsonPropertyName("is_tmall")]
    public bool? IsTmall
    {
        get => isTmall;
        set => this.isTmall = value;
    }

    [JsonPropertyName("page_no")]
    public long? PageNo
    {
        get => pageNo;
        set => this.pageNo = value;
    }

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

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

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

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

    [JsonPropertyName("start_auction_count")]
    public long? StartAuctionCount
    {
        get => startAuctionCount;
        set => this.startAuctionCount = value;
    }

    [JsonPropertyName("start_commission_rate")]
    public long? StartCommissionRate
    {
        get => startCommissionRate;
        set => this.startCommissionRate = value;
    }

    [JsonPropertyName("start_credit")]
    public long? StartCredit
    {
        get => startCredit;
        set => this.startCredit = value;
    }

    [JsonPropertyName("start_total_action")]
    public long? StartTotalAction
    {
        get => startTotalAction;
        set => this.startTotalAction = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.endAuctionCount != null)
        {
            requestParam.Add("end_auction_count",TopUtils.ConvertBasicType(this.endAuctionCount));
        }
        if(this.endCommissionRate != null)
        {
            requestParam.Add("end_commission_rate",TopUtils.ConvertBasicType(this.endCommissionRate));
        }
        if(this.endCredit != null)
        {
            requestParam.Add("end_credit",TopUtils.ConvertBasicType(this.endCredit));
        }
        if(this.endTotalAction != null)
        {
            requestParam.Add("end_total_action",TopUtils.ConvertBasicType(this.endTotalAction));
        }
        if(this.fields != null)
        {
            requestParam.Add("fields",TopUtils.ConvertBasicType(this.fields));
        }
        if(this.isTmall != null)
        {
            requestParam.Add("is_tmall",TopUtils.ConvertBasicType(this.isTmall));
        }
        if(this.pageNo != null)
        {
            requestParam.Add("page_no",TopUtils.ConvertBasicType(this.pageNo));
        }
        if(this.pageSize != null)
        {
            requestParam.Add("page_size",TopUtils.ConvertBasicType(this.pageSize));
        }
        if(this.platform != null)
        {
            requestParam.Add("platform",TopUtils.ConvertBasicType(this.platform));
        }
        if(this.q != null)
        {
            requestParam.Add("q",TopUtils.ConvertBasicType(this.q));
        }
        if(this.sort != null)
        {
            requestParam.Add("sort",TopUtils.ConvertBasicType(this.sort));
        }
        if(this.startAuctionCount != null)
        {
            requestParam.Add("start_auction_count",TopUtils.ConvertBasicType(this.startAuctionCount));
        }
        if(this.startCommissionRate != null)
        {
            requestParam.Add("start_commission_rate",TopUtils.ConvertBasicType(this.startCommissionRate));
        }
        if(this.startCredit != null)
        {
            requestParam.Add("start_credit",TopUtils.ConvertBasicType(this.startCredit));
        }
        if(this.startTotalAction != null)
        {
            requestParam.Add("start_total_action",TopUtils.ConvertBasicType(this.startTotalAction));
        }
        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.shop.get";
    }

}

