AutoReplyResultJson.cs 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. #region Apache License Version 2.0
  2. /*----------------------------------------------------------------
  3. Copyright 2019 Jeffrey Su & Suzhou Senparc Network Technology Co.,Ltd.
  4. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
  5. except in compliance with the License. You may obtain a copy of the License at
  6. http://www.apache.org/licenses/LICENSE-2.0
  7. Unless required by applicable law or agreed to in writing, software distributed under the
  8. License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
  9. either express or implied. See the License for the specific language governing permissions
  10. and limitations under the License.
  11. Detail: https://github.com/JeffreySu/WeiXinMPSDK/blob/master/license.md
  12. ----------------------------------------------------------------*/
  13. #endregion Apache License Version 2.0
  14. /*----------------------------------------------------------------
  15. Copyright (C) 2019 Senparc
  16. 文件名:AutoReplyResultJson.cs
  17. 文件功能描述:获取自动回复规则返回结果
  18. 创建标识:Senparc - 20150907
  19. 修改标识:Senparc - 20170322
  20. 修改描述:v14.3.136 增加 KeywordAutoReplyInfo_Item.reply_list_info 属性
  21. ----------------------------------------------------------------*/
  22. using System.Collections.Generic;
  23. //using System.Security.AccessControl;
  24. using Senparc.Weixin.Entities;
  25. namespace Senparc.Weixin.MP.AdvancedAPIs.AutoReply
  26. {
  27. public class GetCurrentAutoreplyInfoResult : WxJsonResult
  28. {
  29. /// <summary>
  30. /// 关注后自动回复是否开启,0代表未开启,1代表开启
  31. /// </summary>
  32. public int is_add_friend_reply_open { get; set; }
  33. /// <summary>
  34. /// 消息自动回复是否开启,0代表未开启,1代表开启
  35. /// </summary>
  36. public int is_autoreply_open { get; set; }
  37. /// <summary>
  38. /// 关注后自动回复的信息
  39. /// </summary>
  40. public AddFriendAutoReplyInfo add_friend_autoreply_info { get; set; }
  41. /// <summary>
  42. /// 消息自动回复的信息
  43. /// </summary>
  44. public MessageDefaultAutoReplyInfo message_default_autoreply_info { get; set; }
  45. /// <summary>
  46. /// 关键词自动回复的信息
  47. /// </summary>
  48. public KeywordAutoReplyInfo keyword_autoreply_info { get; set; }
  49. }
  50. public class AddFriendAutoReplyInfo
  51. {
  52. /// <summary>
  53. /// 自动回复的类型。关注后自动回复和消息自动回复的类型仅支持文本(text)、图片(img)、语音(voice)、视频(video),关键词自动回复则还多了图文消息(news)
  54. /// </summary>
  55. public AutoReplyType type { get; set; }
  56. /// <summary>
  57. /// 对于文本类型,content是文本内容,对于图文、图片、语音、视频类型,content是mediaID
  58. /// </summary>
  59. public string content { get; set; }
  60. }
  61. public class MessageDefaultAutoReplyInfo
  62. {
  63. /// <summary>
  64. /// 自动回复的类型。关注后自动回复和消息自动回复的类型仅支持文本(text)、图片(img)、语音(voice)、视频(video),关键词自动回复则还多了图文消息(news)
  65. /// </summary>
  66. public AutoReplyType type { get; set; }
  67. /// <summary>
  68. /// 对于文本类型,content是文本内容,对于图文、图片、语音、视频类型,content是mediaID
  69. /// </summary>
  70. public string content { get; set; }
  71. }
  72. public class KeywordAutoReplyInfo
  73. {
  74. /// <summary>
  75. /// 关键词自动回复的信息列表
  76. /// </summary>
  77. public List<KeywordAutoReplyInfo_Item> list { get; set; }
  78. }
  79. public class KeywordAutoReplyInfo_Item
  80. {
  81. /// <summary>
  82. /// 规则名称
  83. /// </summary>
  84. public string rule_name { get; set; }
  85. /// <summary>
  86. /// 创建时间
  87. /// </summary>
  88. public long create_time { get; set; }
  89. /// <summary>
  90. /// 回复模式,reply_all代表全部回复,random_one代表随机回复其中一条
  91. /// </summary>
  92. public AutoReplyMode reply_mode { get; set; }
  93. /// <summary>
  94. /// 匹配的关键词列表
  95. /// </summary>
  96. public List<KeywordListInfoItem> keyword_list_info { get; set; }
  97. /// <summary>
  98. /// 回复内容
  99. /// </summary>
  100. public List<ReplyListInfoItem> reply_list_info { get; set; }
  101. }
  102. public class KeywordListInfoItem
  103. {
  104. /// <summary>
  105. /// 自动回复的类型。关注后自动回复和消息自动回复的类型仅支持文本(text)、图片(img)、语音(voice)、视频(video),关键词自动回复则还多了图文消息(news)
  106. /// </summary>
  107. public AutoReplyType type { get; set; }
  108. /// <summary>
  109. /// 回复模式,reply_all代表全部回复,random_one代表随机回复其中一条
  110. /// </summary>
  111. public AutoReplyMatchMode match_mode { get; set; }
  112. /// <summary>
  113. /// 对于文本类型,content是文本内容,对于图文、图片、语音、视频类型,content是mediaID
  114. /// </summary>
  115. public string content { get; set; }
  116. }
  117. public class ReplyListInfoItem
  118. {
  119. /// <summary>
  120. /// 自动回复的类型。关注后自动回复和消息自动回复的类型仅支持文本(text)、图片(img)、语音(voice)、视频(video),关键词自动回复则还多了图文消息(news)
  121. /// </summary>
  122. public AutoReplyType type { get; set; }
  123. /// <summary>
  124. /// 图文消息的信息
  125. /// </summary>
  126. public NewsInfo news_info { get; set; }
  127. /// <summary>
  128. /// 对于文本类型,content是文本内容,对于图文、图片、语音、视频类型,content是mediaID
  129. /// </summary>
  130. public string content { get; set; }
  131. }
  132. public class NewsInfo
  133. {
  134. /// <summary>
  135. /// 图文消息的信息列表
  136. /// </summary>
  137. public List<NewsInfoItem> list { get; set; }
  138. }
  139. public class NewsInfoItem
  140. {
  141. /// <summary>
  142. /// 图文消息的标题
  143. /// </summary>
  144. public string title { get; set; }
  145. /// <summary>
  146. /// 作者
  147. /// </summary>
  148. public string author { get; set; }
  149. /// <summary>
  150. /// 摘要
  151. /// </summary>
  152. public string digest { get; set; }
  153. /// <summary>
  154. /// 是否显示封面,0为不显示,1为显示
  155. /// </summary>
  156. public int show_cover { get; set; }
  157. /// <summary>
  158. /// 封面图片的URL
  159. /// </summary>
  160. public string cover_url { get; set; }
  161. /// <summary>
  162. /// 正文的URL
  163. /// </summary>
  164. public string content_url { get; set; }
  165. /// <summary>
  166. /// 原文的URL,若置空则无查看原文入口
  167. /// </summary>
  168. public string source_url { get; set; }
  169. }
  170. }