OapiCalendarV2EventCancelRequest.php 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.calendar.v2.event.cancel request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.07.16
  7. */
  8. class OapiCalendarV2EventCancelRequest
  9. {
  10. /**
  11. * 开放平台应用对应的AgentId
  12. **/
  13. private $agentid;
  14. /**
  15. * 日历id,目前仅支持传“primary”,表示“我的日程”下的日程
  16. **/
  17. private $calendarId;
  18. /**
  19. * 加密后的日程Id
  20. **/
  21. private $eventId;
  22. private $apiParas = array();
  23. public function setAgentid($agentid)
  24. {
  25. $this->agentid = $agentid;
  26. $this->apiParas["agentid"] = $agentid;
  27. }
  28. public function getAgentid()
  29. {
  30. return $this->agentid;
  31. }
  32. public function setCalendarId($calendarId)
  33. {
  34. $this->calendarId = $calendarId;
  35. $this->apiParas["calendar_id"] = $calendarId;
  36. }
  37. public function getCalendarId()
  38. {
  39. return $this->calendarId;
  40. }
  41. public function setEventId($eventId)
  42. {
  43. $this->eventId = $eventId;
  44. $this->apiParas["event_id"] = $eventId;
  45. }
  46. public function getEventId()
  47. {
  48. return $this->eventId;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.calendar.v2.event.cancel";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->calendarId,"calendarId");
  61. RequestCheckUtil::checkMaxLength($this->calendarId,64,"calendarId");
  62. RequestCheckUtil::checkNotNull($this->eventId,"eventId");
  63. RequestCheckUtil::checkMaxLength($this->eventId,64,"eventId");
  64. }
  65. public function putOtherTextParam($key, $value) {
  66. $this->apiParas[$key] = $value;
  67. $this->$key = $value;
  68. }
  69. }