OapiChatCreateRequest.php 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.chat.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.03.11
  7. */
  8. class OapiChatCreateRequest
  9. {
  10. /**
  11. * 群禁言,0-默认,不禁言,1-全员禁言
  12. **/
  13. private $chatBannedType;
  14. /**
  15. * 群类型,2:企业群,0:普通群
  16. **/
  17. private $conversationTag;
  18. /**
  19. * 外部联系人成员列表
  20. **/
  21. private $extidlist;
  22. /**
  23. * 群头像资源id
  24. **/
  25. private $icon;
  26. /**
  27. * 管理类型,0-默认,所有人可管理,1-仅群主可管理
  28. **/
  29. private $managementType;
  30. /**
  31. * @all 权限,0-默认,所有人,1-仅群主可@all
  32. **/
  33. private $mentionAllAuthority;
  34. /**
  35. * 群名称
  36. **/
  37. private $name;
  38. /**
  39. * 群主的userId
  40. **/
  41. private $owner;
  42. /**
  43. * 群主类型,emp:企业员工,ext:外部联系人
  44. **/
  45. private $ownerType;
  46. /**
  47. * 群可搜索,0-默认,不可搜索,1-可搜索
  48. **/
  49. private $searchable;
  50. /**
  51. * 新成员可查看100条聊天历史消息的类型,1:可查看,默认或0:不可查看
  52. **/
  53. private $showHistoryType;
  54. /**
  55. * 群成员userId列表
  56. **/
  57. private $useridlist;
  58. /**
  59. * 入群验证,0:不入群验证(默认) 1:入群验证
  60. **/
  61. private $validationType;
  62. private $apiParas = array();
  63. public function setChatBannedType($chatBannedType)
  64. {
  65. $this->chatBannedType = $chatBannedType;
  66. $this->apiParas["chatBannedType"] = $chatBannedType;
  67. }
  68. public function getChatBannedType()
  69. {
  70. return $this->chatBannedType;
  71. }
  72. public function setConversationTag($conversationTag)
  73. {
  74. $this->conversationTag = $conversationTag;
  75. $this->apiParas["conversationTag"] = $conversationTag;
  76. }
  77. public function getConversationTag()
  78. {
  79. return $this->conversationTag;
  80. }
  81. public function setExtidlist($extidlist)
  82. {
  83. $this->extidlist = $extidlist;
  84. $this->apiParas["extidlist"] = $extidlist;
  85. }
  86. public function getExtidlist()
  87. {
  88. return $this->extidlist;
  89. }
  90. public function setIcon($icon)
  91. {
  92. $this->icon = $icon;
  93. $this->apiParas["icon"] = $icon;
  94. }
  95. public function getIcon()
  96. {
  97. return $this->icon;
  98. }
  99. public function setManagementType($managementType)
  100. {
  101. $this->managementType = $managementType;
  102. $this->apiParas["managementType"] = $managementType;
  103. }
  104. public function getManagementType()
  105. {
  106. return $this->managementType;
  107. }
  108. public function setMentionAllAuthority($mentionAllAuthority)
  109. {
  110. $this->mentionAllAuthority = $mentionAllAuthority;
  111. $this->apiParas["mentionAllAuthority"] = $mentionAllAuthority;
  112. }
  113. public function getMentionAllAuthority()
  114. {
  115. return $this->mentionAllAuthority;
  116. }
  117. public function setName($name)
  118. {
  119. $this->name = $name;
  120. $this->apiParas["name"] = $name;
  121. }
  122. public function getName()
  123. {
  124. return $this->name;
  125. }
  126. public function setOwner($owner)
  127. {
  128. $this->owner = $owner;
  129. $this->apiParas["owner"] = $owner;
  130. }
  131. public function getOwner()
  132. {
  133. return $this->owner;
  134. }
  135. public function setOwnerType($ownerType)
  136. {
  137. $this->ownerType = $ownerType;
  138. $this->apiParas["ownerType"] = $ownerType;
  139. }
  140. public function getOwnerType()
  141. {
  142. return $this->ownerType;
  143. }
  144. public function setSearchable($searchable)
  145. {
  146. $this->searchable = $searchable;
  147. $this->apiParas["searchable"] = $searchable;
  148. }
  149. public function getSearchable()
  150. {
  151. return $this->searchable;
  152. }
  153. public function setShowHistoryType($showHistoryType)
  154. {
  155. $this->showHistoryType = $showHistoryType;
  156. $this->apiParas["showHistoryType"] = $showHistoryType;
  157. }
  158. public function getShowHistoryType()
  159. {
  160. return $this->showHistoryType;
  161. }
  162. public function setUseridlist($useridlist)
  163. {
  164. $this->useridlist = $useridlist;
  165. $this->apiParas["useridlist"] = $useridlist;
  166. }
  167. public function getUseridlist()
  168. {
  169. return $this->useridlist;
  170. }
  171. public function setValidationType($validationType)
  172. {
  173. $this->validationType = $validationType;
  174. $this->apiParas["validationType"] = $validationType;
  175. }
  176. public function getValidationType()
  177. {
  178. return $this->validationType;
  179. }
  180. public function getApiMethodName()
  181. {
  182. return "dingtalk.oapi.chat.create";
  183. }
  184. public function getApiParas()
  185. {
  186. return $this->apiParas;
  187. }
  188. public function check()
  189. {
  190. RequestCheckUtil::checkMaxListSize($this->extidlist,20,"extidlist");
  191. RequestCheckUtil::checkMaxListSize($this->useridlist,20,"useridlist");
  192. }
  193. public function putOtherTextParam($key, $value) {
  194. $this->apiParas[$key] = $value;
  195. $this->$key = $value;
  196. }
  197. }