using System;
using System.Xml.Serialization;
using System.Collections.Generic;
using Top.Api.Util;
using Top.Api;
using Top.Api.DingTalk;
namespace DingTalk.Api.Request
{
///
/// TOP API: dingtalk.corp.chatbot.createorgbot
///
public class CorpChatbotCreateorgbotRequest : BaseDingTalkRequest
{
///
/// 创建机器人modle
///
public string CreateChatBotModel { get; set; }
public CreateChatBotModelDomain CreateChatBotModel_ { set { this.CreateChatBotModel = TopUtils.ObjectToJson(value); } }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.corp.chatbot.createorgbot";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_TOP;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("create_chat_bot_model", this.CreateChatBotModel);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateRequired("create_chat_bot_model", this.CreateChatBotModel);
}
///
/// CreateChatBotModelDomain Data Structure.
///
[Serializable]
public class CreateChatBotModelDomain : TopObject
{
///
/// 2-企业对内机器人,3-企业对外机器人
///
[XmlElement("bot_type")]
public Nullable BotType { get; set; }
///
/// 机器人简介
///
[XmlElement("breif")]
public string Breif { get; set; }
///
/// 开通机器人企业id
///
[XmlElement("corp_id")]
public string CorpId { get; set; }
///
/// 机器人功能详细描述
///
[XmlElement("description")]
public string Description { get; set; }
///
/// 机器人头像
///
[XmlElement("icon")]
public string Icon { get; set; }
///
/// 微应用id
///
[XmlElement("microapp_agent_id")]
public Nullable MicroappAgentId { get; set; }
///
/// 机器人名字
///
[XmlElement("name")]
public string Name { get; set; }
///
/// 机器人安全秘钥
///
[XmlElement("outgoing_token")]
public string OutgoingToken { get; set; }
///
/// 机器人回调URL
///
[XmlElement("outgoing_url")]
public string OutgoingUrl { get; set; }
///
/// 机器人类型(钉钉分配)
///
[XmlElement("type")]
public string Type { get; set; }
}
#endregion
}
}