using System; using System.Collections.Generic; using Top.Api.Util; using Top.Api; using Top.Api.DingTalk; namespace DingTalk.Api.Request { /// /// TOP API: dingtalk.corp.chatbot.listorgbot /// public class CorpChatbotListorgbotRequest : BaseDingTalkRequest { /// /// 微应用id /// public Nullable AgentId { get; set; } /// /// 钉钉分配的类型 /// public string Type { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.corp.chatbot.listorgbot"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_TOP; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("agent_id", this.AgentId); parameters.Add("type", this.Type); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateRequired("agent_id", this.AgentId); RequestValidator.ValidateRequired("type", this.Type); } #endregion } }