OapiUserListsimpleRequest.php 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.user.listsimple request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.09.13
  7. */
  8. class OapiUserListsimpleRequest
  9. {
  10. /**
  11. * 是否返回访问受限的员工
  12. **/
  13. private $containAccessLimit;
  14. /**
  15. * 游标
  16. **/
  17. private $cursor;
  18. /**
  19. * 部门id
  20. **/
  21. private $deptId;
  22. /**
  23. * 语言
  24. **/
  25. private $language;
  26. /**
  27. * 排序字段,默认custom。或者以下取值entry_asc、entry_desc、modify_asc、modify_desc、custom
  28. **/
  29. private $orderField;
  30. /**
  31. * 分页长度
  32. **/
  33. private $size;
  34. private $apiParas = array();
  35. public function setContainAccessLimit($containAccessLimit)
  36. {
  37. $this->containAccessLimit = $containAccessLimit;
  38. $this->apiParas["contain_access_limit"] = $containAccessLimit;
  39. }
  40. public function getContainAccessLimit()
  41. {
  42. return $this->containAccessLimit;
  43. }
  44. public function setCursor($cursor)
  45. {
  46. $this->cursor = $cursor;
  47. $this->apiParas["cursor"] = $cursor;
  48. }
  49. public function getCursor()
  50. {
  51. return $this->cursor;
  52. }
  53. public function setDeptId($deptId)
  54. {
  55. $this->deptId = $deptId;
  56. $this->apiParas["dept_id"] = $deptId;
  57. }
  58. public function getDeptId()
  59. {
  60. return $this->deptId;
  61. }
  62. public function setLanguage($language)
  63. {
  64. $this->language = $language;
  65. $this->apiParas["language"] = $language;
  66. }
  67. public function getLanguage()
  68. {
  69. return $this->language;
  70. }
  71. public function setOrderField($orderField)
  72. {
  73. $this->orderField = $orderField;
  74. $this->apiParas["order_field"] = $orderField;
  75. }
  76. public function getOrderField()
  77. {
  78. return $this->orderField;
  79. }
  80. public function setSize($size)
  81. {
  82. $this->size = $size;
  83. $this->apiParas["size"] = $size;
  84. }
  85. public function getSize()
  86. {
  87. return $this->size;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "dingtalk.oapi.user.listsimple";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->cursor,"cursor");
  100. RequestCheckUtil::checkMaxValue($this->cursor,100000,"cursor");
  101. RequestCheckUtil::checkMinValue($this->cursor,0,"cursor");
  102. RequestCheckUtil::checkNotNull($this->deptId,"deptId");
  103. RequestCheckUtil::checkMinValue($this->deptId,1,"deptId");
  104. RequestCheckUtil::checkMaxLength($this->language,6,"language");
  105. RequestCheckUtil::checkNotNull($this->size,"size");
  106. RequestCheckUtil::checkMaxValue($this->size,100,"size");
  107. RequestCheckUtil::checkMinValue($this->size,1,"size");
  108. }
  109. public function putOtherTextParam($key, $value) {
  110. $this->apiParas[$key] = $value;
  111. $this->$key = $value;
  112. }
  113. }