using System;
using System.Collections.Generic;
using Top.Api.Util;

namespace Top.Api.Request
{
    /// <summary>
    /// TOP API: taobao.open.account.index.find
    /// </summary>
    public class OpenAccountIndexFindRequest : BaseTopRequest<Top.Api.Response.OpenAccountIndexFindResponse>
    {
        /// <summary>
        /// int MOBILE         = 1;int EMAIL          = 2;int ISV_ACCOUNT_ID = 3;int LOGIN_ID       = 4;int OPEN_ID        = 5;
        /// </summary>
        public Nullable<long> IndexType { get; set; }

        /// <summary>
        /// 具体值，当索引类型是 OPEN_ID 是，格式为 oauthPlatform|openId，即使用竖线分隔的组合值
        /// </summary>
        public string IndexValue { get; set; }

        #region ITopRequest Members

        public override string GetApiName()
        {
            return "taobao.open.account.index.find";
        }

        public override IDictionary<string, string> GetParameters()
        {
            TopDictionary parameters = new TopDictionary();
            parameters.Add("index_type", this.IndexType);
            parameters.Add("index_value", this.IndexValue);
            if (this.otherParams != null)
            {
                parameters.AddAll(this.otherParams);
            }
            return parameters;
        }

        public override void Validate()
        {
        }

        #endregion
    }
}
