OapiRoleSimplelistRequest.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.role.simplelist request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2021.04.12
  7. */
  8. class OapiRoleSimplelistRequest
  9. {
  10. /**
  11. * 支持分页查询,与size参数同时设置时才生效,此参数代表偏移量,偏移量从0开始。
  12. **/
  13. private $offset;
  14. /**
  15. * 角色ID
  16. **/
  17. private $roleId;
  18. /**
  19. * 支持分页查询,与offset参数同时设置时才生效,此参数代表分页大小,最大100。
  20. **/
  21. private $size;
  22. private $apiParas = array();
  23. public function setOffset($offset)
  24. {
  25. $this->offset = $offset;
  26. $this->apiParas["offset"] = $offset;
  27. }
  28. public function getOffset()
  29. {
  30. return $this->offset;
  31. }
  32. public function setRoleId($roleId)
  33. {
  34. $this->roleId = $roleId;
  35. $this->apiParas["role_id"] = $roleId;
  36. }
  37. public function getRoleId()
  38. {
  39. return $this->roleId;
  40. }
  41. public function setSize($size)
  42. {
  43. $this->size = $size;
  44. $this->apiParas["size"] = $size;
  45. }
  46. public function getSize()
  47. {
  48. return $this->size;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.role.simplelist";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkMinValue($this->offset,0,"offset");
  61. RequestCheckUtil::checkNotNull($this->roleId,"roleId");
  62. RequestCheckUtil::checkMinValue($this->size,1,"size");
  63. }
  64. public function putOtherTextParam($key, $value) {
  65. $this->apiParas[$key] = $value;
  66. $this->$key = $value;
  67. }
  68. }