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

namespace Topsdk.Top.Ability304.Request;

public class TaobaoFilesGetRequest : AbstractTopApiRequest
{

    /*
        下载链接状态。1:未下载。2:已下载
            */
    private long? status;


    /*
        搜索开始时间
            */
    private DateTime? startDate;


    /*
        搜索结束时间
            */
    private DateTime? endDate;


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

    [JsonPropertyName("start_date")]
    public DateTime? StartDate
    {
        get => startDate;
        set => this.startDate = value;
    }

    [JsonPropertyName("end_date")]
    public DateTime? EndDate
    {
        get => endDate;
        set => this.endDate = value;
    }



    public override IDictionary<string, string> ToRequestParam()
    {
        IDictionary<string, string> requestParam = new Dictionary<string, string>();
        if(this.status != null)
        {
            requestParam.Add("status",TopUtils.ConvertBasicType(this.status));
        }
        if(this.startDate != null)
        {
            requestParam.Add("start_date",TopUtils.ConvertBasicType(this.startDate));
        }
        if(this.endDate != null)
        {
            requestParam.Add("end_date",TopUtils.ConvertBasicType(this.endDate));
        }
        return requestParam;
    }

    public override IDictionary<string, TopFileItem> ToFileParam()
    {
        IDictionary<string, TopFileItem> fileParam = new Dictionary<string, TopFileItem>();
        return fileParam;
    }

    public override string GetApiCode()
    {
        return "taobao.files.get";
    }

}

