OapiImChatScenegroupCreateRequest.php 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.im.chat.scenegroup.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.09.07
  7. */
  8. class OapiImChatScenegroupCreateRequest
  9. {
  10. /**
  11. * 禁止群成员私聊 若开启,普通群成员之间不能够加好友、单聊,且部分功能使用受限(管理员与非管理员之间不受影响)0-不开启,1-开启
  12. **/
  13. private $addFriendForbidden;
  14. /**
  15. * 群日历 若开启,群内容非好友/同事的成员可相互发起钉钉日程 0-不开启,1-开启
  16. **/
  17. private $allMembersCanCreateCalendar;
  18. /**
  19. * 群会议 若开启,群内任意成员可发起视频和语音会议 0-不开启,1-开启
  20. **/
  21. private $allMembersCanCreateMcsConf;
  22. /**
  23. * 群禁言,0-默认,不禁言,1-全员禁言
  24. **/
  25. private $chatBannedType;
  26. /**
  27. * 禁止发送群邮件 若开启,群内成员不可再对本群发送群邮件 0-不开启,1-开启
  28. **/
  29. private $groupEmailDisabled;
  30. /**
  31. * 群直播 若开启,群内任意成员可发起群直播 0-不开启,1-开启
  32. **/
  33. private $groupLiveSwitch;
  34. /**
  35. * 群头像mediaId
  36. **/
  37. private $icon;
  38. /**
  39. * 管理类型,0-默认,所有人可管理,1-仅群主可管理
  40. **/
  41. private $managementType;
  42. /**
  43. * 禁止非管理员向管理员发起单聊 若开启,非管理员不能向管理员发起单聊 0-不开启,1-开启
  44. **/
  45. private $membersToAdminChat;
  46. /**
  47. * @all 权限,0-默认,所有人,1-仅群主可@all
  48. **/
  49. private $mentionAllAuthority;
  50. /**
  51. * 仅群主和管理员可在群内发DING 0-不开启,1-开启
  52. **/
  53. private $onlyAdminCanDing;
  54. /**
  55. * 仅群主和管理员可置顶群消息 0-不开启,1-开启
  56. **/
  57. private $onlyAdminCanSetMsgTop;
  58. /**
  59. * 群主userid
  60. **/
  61. private $ownerUserId;
  62. /**
  63. * 群可搜索,0-默认,不可搜索,1-可搜索
  64. **/
  65. private $searchable;
  66. /**
  67. * 新成员是否可查看聊天历史消息,0-默认,否,1-是
  68. **/
  69. private $showHistoryType;
  70. /**
  71. * 群管理员useridlist
  72. **/
  73. private $subadminIds;
  74. /**
  75. * 群模板id
  76. **/
  77. private $templateId;
  78. /**
  79. * 群名称
  80. **/
  81. private $title;
  82. /**
  83. * 群成员useridlist
  84. **/
  85. private $userIds;
  86. /**
  87. * 建群去重的业务id
  88. **/
  89. private $uuid;
  90. /**
  91. * 入群验证,0:不入群验证(默认) 1:入群验证
  92. **/
  93. private $validationType;
  94. private $apiParas = array();
  95. public function setAddFriendForbidden($addFriendForbidden)
  96. {
  97. $this->addFriendForbidden = $addFriendForbidden;
  98. $this->apiParas["add_friend_forbidden"] = $addFriendForbidden;
  99. }
  100. public function getAddFriendForbidden()
  101. {
  102. return $this->addFriendForbidden;
  103. }
  104. public function setAllMembersCanCreateCalendar($allMembersCanCreateCalendar)
  105. {
  106. $this->allMembersCanCreateCalendar = $allMembersCanCreateCalendar;
  107. $this->apiParas["all_members_can_create_calendar"] = $allMembersCanCreateCalendar;
  108. }
  109. public function getAllMembersCanCreateCalendar()
  110. {
  111. return $this->allMembersCanCreateCalendar;
  112. }
  113. public function setAllMembersCanCreateMcsConf($allMembersCanCreateMcsConf)
  114. {
  115. $this->allMembersCanCreateMcsConf = $allMembersCanCreateMcsConf;
  116. $this->apiParas["all_members_can_create_mcs_conf"] = $allMembersCanCreateMcsConf;
  117. }
  118. public function getAllMembersCanCreateMcsConf()
  119. {
  120. return $this->allMembersCanCreateMcsConf;
  121. }
  122. public function setChatBannedType($chatBannedType)
  123. {
  124. $this->chatBannedType = $chatBannedType;
  125. $this->apiParas["chat_banned_type"] = $chatBannedType;
  126. }
  127. public function getChatBannedType()
  128. {
  129. return $this->chatBannedType;
  130. }
  131. public function setGroupEmailDisabled($groupEmailDisabled)
  132. {
  133. $this->groupEmailDisabled = $groupEmailDisabled;
  134. $this->apiParas["group_email_disabled"] = $groupEmailDisabled;
  135. }
  136. public function getGroupEmailDisabled()
  137. {
  138. return $this->groupEmailDisabled;
  139. }
  140. public function setGroupLiveSwitch($groupLiveSwitch)
  141. {
  142. $this->groupLiveSwitch = $groupLiveSwitch;
  143. $this->apiParas["group_live_switch"] = $groupLiveSwitch;
  144. }
  145. public function getGroupLiveSwitch()
  146. {
  147. return $this->groupLiveSwitch;
  148. }
  149. public function setIcon($icon)
  150. {
  151. $this->icon = $icon;
  152. $this->apiParas["icon"] = $icon;
  153. }
  154. public function getIcon()
  155. {
  156. return $this->icon;
  157. }
  158. public function setManagementType($managementType)
  159. {
  160. $this->managementType = $managementType;
  161. $this->apiParas["management_type"] = $managementType;
  162. }
  163. public function getManagementType()
  164. {
  165. return $this->managementType;
  166. }
  167. public function setMembersToAdminChat($membersToAdminChat)
  168. {
  169. $this->membersToAdminChat = $membersToAdminChat;
  170. $this->apiParas["members_to_admin_chat"] = $membersToAdminChat;
  171. }
  172. public function getMembersToAdminChat()
  173. {
  174. return $this->membersToAdminChat;
  175. }
  176. public function setMentionAllAuthority($mentionAllAuthority)
  177. {
  178. $this->mentionAllAuthority = $mentionAllAuthority;
  179. $this->apiParas["mention_all_authority"] = $mentionAllAuthority;
  180. }
  181. public function getMentionAllAuthority()
  182. {
  183. return $this->mentionAllAuthority;
  184. }
  185. public function setOnlyAdminCanDing($onlyAdminCanDing)
  186. {
  187. $this->onlyAdminCanDing = $onlyAdminCanDing;
  188. $this->apiParas["only_admin_can_ding"] = $onlyAdminCanDing;
  189. }
  190. public function getOnlyAdminCanDing()
  191. {
  192. return $this->onlyAdminCanDing;
  193. }
  194. public function setOnlyAdminCanSetMsgTop($onlyAdminCanSetMsgTop)
  195. {
  196. $this->onlyAdminCanSetMsgTop = $onlyAdminCanSetMsgTop;
  197. $this->apiParas["only_admin_can_set_msg_top"] = $onlyAdminCanSetMsgTop;
  198. }
  199. public function getOnlyAdminCanSetMsgTop()
  200. {
  201. return $this->onlyAdminCanSetMsgTop;
  202. }
  203. public function setOwnerUserId($ownerUserId)
  204. {
  205. $this->ownerUserId = $ownerUserId;
  206. $this->apiParas["owner_user_id"] = $ownerUserId;
  207. }
  208. public function getOwnerUserId()
  209. {
  210. return $this->ownerUserId;
  211. }
  212. public function setSearchable($searchable)
  213. {
  214. $this->searchable = $searchable;
  215. $this->apiParas["searchable"] = $searchable;
  216. }
  217. public function getSearchable()
  218. {
  219. return $this->searchable;
  220. }
  221. public function setShowHistoryType($showHistoryType)
  222. {
  223. $this->showHistoryType = $showHistoryType;
  224. $this->apiParas["show_history_type"] = $showHistoryType;
  225. }
  226. public function getShowHistoryType()
  227. {
  228. return $this->showHistoryType;
  229. }
  230. public function setSubadminIds($subadminIds)
  231. {
  232. $this->subadminIds = $subadminIds;
  233. $this->apiParas["subadmin_ids"] = $subadminIds;
  234. }
  235. public function getSubadminIds()
  236. {
  237. return $this->subadminIds;
  238. }
  239. public function setTemplateId($templateId)
  240. {
  241. $this->templateId = $templateId;
  242. $this->apiParas["template_id"] = $templateId;
  243. }
  244. public function getTemplateId()
  245. {
  246. return $this->templateId;
  247. }
  248. public function setTitle($title)
  249. {
  250. $this->title = $title;
  251. $this->apiParas["title"] = $title;
  252. }
  253. public function getTitle()
  254. {
  255. return $this->title;
  256. }
  257. public function setUserIds($userIds)
  258. {
  259. $this->userIds = $userIds;
  260. $this->apiParas["user_ids"] = $userIds;
  261. }
  262. public function getUserIds()
  263. {
  264. return $this->userIds;
  265. }
  266. public function setUuid($uuid)
  267. {
  268. $this->uuid = $uuid;
  269. $this->apiParas["uuid"] = $uuid;
  270. }
  271. public function getUuid()
  272. {
  273. return $this->uuid;
  274. }
  275. public function setValidationType($validationType)
  276. {
  277. $this->validationType = $validationType;
  278. $this->apiParas["validation_type"] = $validationType;
  279. }
  280. public function getValidationType()
  281. {
  282. return $this->validationType;
  283. }
  284. public function getApiMethodName()
  285. {
  286. return "dingtalk.oapi.im.chat.scenegroup.create";
  287. }
  288. public function getApiParas()
  289. {
  290. return $this->apiParas;
  291. }
  292. public function check()
  293. {
  294. RequestCheckUtil::checkNotNull($this->ownerUserId,"ownerUserId");
  295. RequestCheckUtil::checkMaxListSize($this->subadminIds,999,"subadminIds");
  296. RequestCheckUtil::checkNotNull($this->templateId,"templateId");
  297. RequestCheckUtil::checkNotNull($this->title,"title");
  298. RequestCheckUtil::checkMaxListSize($this->userIds,999,"userIds");
  299. }
  300. public function putOtherTextParam($key, $value) {
  301. $this->apiParas[$key] = $value;
  302. $this->$key = $value;
  303. }
  304. }