OapiChatUpdateRequest.php 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.chat.update request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.03.11
  7. */
  8. class OapiChatUpdateRequest
  9. {
  10. /**
  11. * 添加外部联系人成员列表
  12. **/
  13. private $addExtidlist;
  14. /**
  15. * 添加成员列表
  16. **/
  17. private $addUseridlist;
  18. /**
  19. * 群禁言,0-默认,不禁言,1-全员禁言
  20. **/
  21. private $chatBannedType;
  22. /**
  23. * 群会话id
  24. **/
  25. private $chatid;
  26. /**
  27. * 删除外部联系人成员列表
  28. **/
  29. private $delExtidlist;
  30. /**
  31. * 删除成员列表
  32. **/
  33. private $delUseridlist;
  34. /**
  35. * 群头像mediaId
  36. **/
  37. private $icon;
  38. /**
  39. * 是否禁言
  40. **/
  41. private $isBan;
  42. /**
  43. * 管理类型,0-默认,所有人可管理,1-仅群主可管理
  44. **/
  45. private $managementType;
  46. /**
  47. * @all 权限,0-默认,所有人,1-仅群主可@all
  48. **/
  49. private $mentionAllAuthority;
  50. /**
  51. * 群名称
  52. **/
  53. private $name;
  54. /**
  55. * 群主的userId
  56. **/
  57. private $owner;
  58. /**
  59. * 群主类型,emp:企业员工,ext:外部联系人
  60. **/
  61. private $ownerType;
  62. /**
  63. * 群可搜索,0-默认,不可搜索,1-可搜索
  64. **/
  65. private $searchable;
  66. /**
  67. * 新成员可查看聊天历史 0否 1是
  68. **/
  69. private $showHistoryType;
  70. /**
  71. * 入群验证,0:不入群验证(默认) 1:入群验证
  72. **/
  73. private $validationType;
  74. private $apiParas = array();
  75. public function setAddExtidlist($addExtidlist)
  76. {
  77. $this->addExtidlist = $addExtidlist;
  78. $this->apiParas["add_extidlist"] = $addExtidlist;
  79. }
  80. public function getAddExtidlist()
  81. {
  82. return $this->addExtidlist;
  83. }
  84. public function setAddUseridlist($addUseridlist)
  85. {
  86. $this->addUseridlist = $addUseridlist;
  87. $this->apiParas["add_useridlist"] = $addUseridlist;
  88. }
  89. public function getAddUseridlist()
  90. {
  91. return $this->addUseridlist;
  92. }
  93. public function setChatBannedType($chatBannedType)
  94. {
  95. $this->chatBannedType = $chatBannedType;
  96. $this->apiParas["chatBannedType"] = $chatBannedType;
  97. }
  98. public function getChatBannedType()
  99. {
  100. return $this->chatBannedType;
  101. }
  102. public function setChatid($chatid)
  103. {
  104. $this->chatid = $chatid;
  105. $this->apiParas["chatid"] = $chatid;
  106. }
  107. public function getChatid()
  108. {
  109. return $this->chatid;
  110. }
  111. public function setDelExtidlist($delExtidlist)
  112. {
  113. $this->delExtidlist = $delExtidlist;
  114. $this->apiParas["del_extidlist"] = $delExtidlist;
  115. }
  116. public function getDelExtidlist()
  117. {
  118. return $this->delExtidlist;
  119. }
  120. public function setDelUseridlist($delUseridlist)
  121. {
  122. $this->delUseridlist = $delUseridlist;
  123. $this->apiParas["del_useridlist"] = $delUseridlist;
  124. }
  125. public function getDelUseridlist()
  126. {
  127. return $this->delUseridlist;
  128. }
  129. public function setIcon($icon)
  130. {
  131. $this->icon = $icon;
  132. $this->apiParas["icon"] = $icon;
  133. }
  134. public function getIcon()
  135. {
  136. return $this->icon;
  137. }
  138. public function setIsBan($isBan)
  139. {
  140. $this->isBan = $isBan;
  141. $this->apiParas["isBan"] = $isBan;
  142. }
  143. public function getIsBan()
  144. {
  145. return $this->isBan;
  146. }
  147. public function setManagementType($managementType)
  148. {
  149. $this->managementType = $managementType;
  150. $this->apiParas["managementType"] = $managementType;
  151. }
  152. public function getManagementType()
  153. {
  154. return $this->managementType;
  155. }
  156. public function setMentionAllAuthority($mentionAllAuthority)
  157. {
  158. $this->mentionAllAuthority = $mentionAllAuthority;
  159. $this->apiParas["mentionAllAuthority"] = $mentionAllAuthority;
  160. }
  161. public function getMentionAllAuthority()
  162. {
  163. return $this->mentionAllAuthority;
  164. }
  165. public function setName($name)
  166. {
  167. $this->name = $name;
  168. $this->apiParas["name"] = $name;
  169. }
  170. public function getName()
  171. {
  172. return $this->name;
  173. }
  174. public function setOwner($owner)
  175. {
  176. $this->owner = $owner;
  177. $this->apiParas["owner"] = $owner;
  178. }
  179. public function getOwner()
  180. {
  181. return $this->owner;
  182. }
  183. public function setOwnerType($ownerType)
  184. {
  185. $this->ownerType = $ownerType;
  186. $this->apiParas["ownerType"] = $ownerType;
  187. }
  188. public function getOwnerType()
  189. {
  190. return $this->ownerType;
  191. }
  192. public function setSearchable($searchable)
  193. {
  194. $this->searchable = $searchable;
  195. $this->apiParas["searchable"] = $searchable;
  196. }
  197. public function getSearchable()
  198. {
  199. return $this->searchable;
  200. }
  201. public function setShowHistoryType($showHistoryType)
  202. {
  203. $this->showHistoryType = $showHistoryType;
  204. $this->apiParas["showHistoryType"] = $showHistoryType;
  205. }
  206. public function getShowHistoryType()
  207. {
  208. return $this->showHistoryType;
  209. }
  210. public function setValidationType($validationType)
  211. {
  212. $this->validationType = $validationType;
  213. $this->apiParas["validationType"] = $validationType;
  214. }
  215. public function getValidationType()
  216. {
  217. return $this->validationType;
  218. }
  219. public function getApiMethodName()
  220. {
  221. return "dingtalk.oapi.chat.update";
  222. }
  223. public function getApiParas()
  224. {
  225. return $this->apiParas;
  226. }
  227. public function check()
  228. {
  229. RequestCheckUtil::checkMaxListSize($this->addExtidlist,20,"addExtidlist");
  230. RequestCheckUtil::checkMaxListSize($this->addUseridlist,20,"addUseridlist");
  231. RequestCheckUtil::checkMaxListSize($this->delExtidlist,20,"delExtidlist");
  232. RequestCheckUtil::checkMaxListSize($this->delUseridlist,20,"delUseridlist");
  233. }
  234. public function putOtherTextParam($key, $value) {
  235. $this->apiParas[$key] = $value;
  236. $this->$key = $value;
  237. }
  238. }