using System;
using System.Collections.Generic;
namespace Top.Api
{
    /// 
    /// TOP请求接口。
    /// 
    public interface ITopRequest where T : TopResponse
    {
        /// 
        /// 获取TOP的API名称。
        /// 
        string GetApiName();
        /// 
        /// 获取被调用的目标AppKey
        /// 
        string GetTargetAppKey();
        /// 
        /// 获取所有的Key-Value形式的文本请求参数字典。
        /// 
        IDictionary GetParameters();
        /// 
        /// 获取自定义HTTP请求头参数。
        /// 
        IDictionary GetHeaderParameters();
        /// 
        ///  获取API请求的用户授权码,仅用于批量API调用请求。
        /// 
        string GetBatchApiSession();
        /// 
        /// 设置API请求的用户授权码,仅用于批量API调用请求。
        /// 
        void SetBatchApiSession(string session);
        /// 
        /// 获取API在批量调用中的顺序,仅用于批量API调用请求。
        /// 
        int GetBatchApiOrder();
        /// 
        /// 设置API在批量调用中的顺序,仅用于批量API调用请求。
        /// 
        void SetBatchApiOrder(int order);
        /// 
        /// 客户端参数检查,减少服务端无效调用。
        /// 
        void Validate();
    }
}