using System; using System.Collections.Generic; using Top.Api.Util; using Top.Api; using Top.Api.DingTalk; namespace DingTalk.Api.Request { /// /// TOP API: dingtalk.oapi.ccoservice.entrance.sendnotify /// public class OapiCcoserviceEntranceSendnotifyRequest : BaseDingTalkRequest { /// /// 微应用ID /// public Nullable AppId { get; set; } /// /// 文本的通知 /// public string Content { get; set; } /// /// 员工ID /// public string Userid { get; set; } #region IDingTalkRequest Members public override string GetApiName() { return "dingtalk.oapi.ccoservice.entrance.sendnotify"; } public override string GetApiCallType() { return DingTalkConstants.CALL_TYPE_OAPI; } public override IDictionary GetParameters() { TopDictionary parameters = new TopDictionary(); parameters.Add("app_id", this.AppId); parameters.Add("content", this.Content); parameters.Add("userid", this.Userid); if (this.otherParams != null) { parameters.AddAll(this.otherParams); } return parameters; } public override void Validate() { RequestValidator.ValidateRequired("app_id", this.AppId); RequestValidator.ValidateRequired("content", this.Content); RequestValidator.ValidateRequired("userid", this.Userid); } #endregion } }