123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?php
- /**
- * dingtalk API: dingtalk.oapi.robot.org.intelligent.message.send request
- *
- * @author auto create
- * @since 1.0, 2021.04.28
- */
- class OapiRobotOrgIntelligentMessageSendRequest
- {
- /**
- * at人的userid列表,英文逗号分隔
- **/
- private $atUserIds;
-
- /**
- * 申请到的消息模板唯一标识符
- **/
- private $msgKey;
-
- /**
- * 消息模板中,变量本次替换的值
- **/
- private $msgParam;
-
- /**
- * 开放的群ID
- **/
- private $openConversationId;
-
- /**
- * 接收者userid列表,英文逗号分隔,不传表示全员接收
- **/
- private $receiverUserIds;
-
- private $apiParas = array();
-
- public function setAtUserIds($atUserIds)
- {
- $this->atUserIds = $atUserIds;
- $this->apiParas["at_user_ids"] = $atUserIds;
- }
- public function getAtUserIds()
- {
- return $this->atUserIds;
- }
- public function setMsgKey($msgKey)
- {
- $this->msgKey = $msgKey;
- $this->apiParas["msg_key"] = $msgKey;
- }
- public function getMsgKey()
- {
- return $this->msgKey;
- }
- public function setMsgParam($msgParam)
- {
- $this->msgParam = $msgParam;
- $this->apiParas["msg_param"] = $msgParam;
- }
- public function getMsgParam()
- {
- return $this->msgParam;
- }
- public function setOpenConversationId($openConversationId)
- {
- $this->openConversationId = $openConversationId;
- $this->apiParas["open_conversation_id"] = $openConversationId;
- }
- public function getOpenConversationId()
- {
- return $this->openConversationId;
- }
- public function setReceiverUserIds($receiverUserIds)
- {
- $this->receiverUserIds = $receiverUserIds;
- $this->apiParas["receiver_user_ids"] = $receiverUserIds;
- }
- public function getReceiverUserIds()
- {
- return $this->receiverUserIds;
- }
- public function getApiMethodName()
- {
- return "dingtalk.oapi.robot.org.intelligent.message.send";
- }
-
- public function getApiParas()
- {
- return $this->apiParas;
- }
-
- public function check()
- {
-
- RequestCheckUtil::checkMaxListSize($this->atUserIds,999,"atUserIds");
- RequestCheckUtil::checkNotNull($this->msgKey,"msgKey");
- RequestCheckUtil::checkNotNull($this->msgParam,"msgParam");
- RequestCheckUtil::checkNotNull($this->openConversationId,"openConversationId");
- RequestCheckUtil::checkMaxListSize($this->receiverUserIds,999,"receiverUserIds");
- }
-
- public function putOtherTextParam($key, $value) {
- $this->apiParas[$key] = $value;
- $this->$key = $value;
- }
- }
|