OapiImChatbotDeleteRequest.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.im.chatbot.delete request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.03.17
  7. */
  8. class OapiImChatbotDeleteRequest
  9. {
  10. /**
  11. * 开放的机器人userId
  12. **/
  13. private $chatbotUserId;
  14. /**
  15. * 开放的会话conversationId
  16. **/
  17. private $openConversationId;
  18. private $apiParas = array();
  19. public function setChatbotUserId($chatbotUserId)
  20. {
  21. $this->chatbotUserId = $chatbotUserId;
  22. $this->apiParas["chatbot_user_id"] = $chatbotUserId;
  23. }
  24. public function getChatbotUserId()
  25. {
  26. return $this->chatbotUserId;
  27. }
  28. public function setOpenConversationId($openConversationId)
  29. {
  30. $this->openConversationId = $openConversationId;
  31. $this->apiParas["open_conversation_id"] = $openConversationId;
  32. }
  33. public function getOpenConversationId()
  34. {
  35. return $this->openConversationId;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "dingtalk.oapi.im.chatbot.delete";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. RequestCheckUtil::checkNotNull($this->chatbotUserId,"chatbotUserId");
  48. RequestCheckUtil::checkMaxLength($this->chatbotUserId,128,"chatbotUserId");
  49. RequestCheckUtil::checkNotNull($this->openConversationId,"openConversationId");
  50. RequestCheckUtil::checkMaxLength($this->openConversationId,128,"openConversationId");
  51. }
  52. public function putOtherTextParam($key, $value) {
  53. $this->apiParas[$key] = $value;
  54. $this->$key = $value;
  55. }
  56. }