OapiUserSeniorSettingRequest.php 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.user.senior.setting request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.12.07
  7. */
  8. class OapiUserSeniorSettingRequest
  9. {
  10. /**
  11. * 高管模式是否开启
  12. **/
  13. private $open;
  14. /**
  15. * 高管联系人白名单
  16. **/
  17. private $permitStaffIds;
  18. /**
  19. * 高管保护开关,例如DING_SMS,保护高管不受短信DING打扰
  20. **/
  21. private $protectScenes;
  22. /**
  23. * 高管工号
  24. **/
  25. private $seniorStaffId;
  26. private $apiParas = array();
  27. public function setOpen($open)
  28. {
  29. $this->open = $open;
  30. $this->apiParas["open"] = $open;
  31. }
  32. public function getOpen()
  33. {
  34. return $this->open;
  35. }
  36. public function setPermitStaffIds($permitStaffIds)
  37. {
  38. $this->permitStaffIds = $permitStaffIds;
  39. $this->apiParas["permit_staffIds"] = $permitStaffIds;
  40. }
  41. public function getPermitStaffIds()
  42. {
  43. return $this->permitStaffIds;
  44. }
  45. public function setProtectScenes($protectScenes)
  46. {
  47. $this->protectScenes = $protectScenes;
  48. $this->apiParas["protect_scenes"] = $protectScenes;
  49. }
  50. public function getProtectScenes()
  51. {
  52. return $this->protectScenes;
  53. }
  54. public function setSeniorStaffId($seniorStaffId)
  55. {
  56. $this->seniorStaffId = $seniorStaffId;
  57. $this->apiParas["senior_staffId"] = $seniorStaffId;
  58. }
  59. public function getSeniorStaffId()
  60. {
  61. return $this->seniorStaffId;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.user.senior.setting";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkMaxListSize($this->permitStaffIds,999,"permitStaffIds");
  74. RequestCheckUtil::checkMaxListSize($this->protectScenes,999,"protectScenes");
  75. }
  76. public function putOtherTextParam($key, $value) {
  77. $this->apiParas[$key] = $value;
  78. $this->$key = $value;
  79. }
  80. }