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.oapi.workspace.project.notice.send
///
public class OapiWorkspaceProjectNoticeSendRequest : BaseDingTalkRequest
{
///
/// 发送通知入参
///
public string SendNoticeReq { get; set; }
public OpenSendNoticeRequestDtoDomain SendNoticeReq_ { set { this.SendNoticeReq = TopUtils.ObjectToJson(value); } }
#region IDingTalkRequest Members
public override string GetApiName()
{
return "dingtalk.oapi.workspace.project.notice.send";
}
public override string GetApiCallType()
{
return DingTalkConstants.CALL_TYPE_OAPI;
}
public override IDictionary GetParameters()
{
TopDictionary parameters = new TopDictionary();
parameters.Add("send_notice_req", this.SendNoticeReq);
if (this.otherParams != null)
{
parameters.AddAll(this.otherParams);
}
return parameters;
}
public override void Validate()
{
RequestValidator.ValidateRequired("send_notice_req", this.SendNoticeReq);
}
///
/// OpenSendNoticeRequestDtoDomain Data Structure.
///
[Serializable]
public class OpenSendNoticeRequestDtoDomain : TopObject
{
///
/// 圈子corpId+secret方式调用接口,没有agentId可以不传此时透出给用户是以圈子名字发通知。如果是isv方式的圈子应用,在圈子开通时会推送给isv agentID,必须传入agentId,会以圈子内应用的身份发通知
///
[XmlElement("agentid")]
public Nullable Agentid { get; set; }
///
/// 通知点击跳转的手机链接
///
[XmlElement("mobile_url")]
public string MobileUrl { get; set; }
///
/// 通知的下方按钮文案
///
[XmlElement("msg_button")]
public string MsgButton { get; set; }
///
/// 通知文本内容 1-512字符
///
[XmlElement("msg_content")]
public string MsgContent { get; set; }
///
/// 通知点击跳转的pc链接
///
[XmlElement("pc_url")]
public string PcUrl { get; set; }
///
/// 接收人在圈子组织内的userid
///
[XmlArray("receiver_userids")]
[XmlArrayItem("string")]
public List ReceiverUserids { get; set; }
///
/// 是否在圈子入口展示数字红点+1,默认情况只是点进圈子在通知那一栏有数字红点,该值设为true后会在圈子入口也展示数字红点
///
[XmlElement("show_red_point")]
public Nullable ShowRedPoint { get; set; }
///
/// 防重复,如果2个请求传入同样的uuid,第二个请求会返回成功
///
[XmlElement("uuid")]
public string Uuid { get; set; }
}
#endregion
}
}