RoleManagementRequest.php 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <?php
  2. class RoleManagementRequest extends SdkRequest {
  3. const REQUEST_URL = "/v2/role/manage";
  4. private $role;
  5. private $operate;
  6. private $users;
  7. function getUrl() {
  8. return self::REQUEST_URL;
  9. }
  10. function getHttpParamers() {
  11. $paramSwitcher = ParamSwitcher::instanceParam();
  12. $paramSwitcher->addParam('role', $this->role);
  13. $paramSwitcher->addParam('operate',$this->operate);
  14. $paramSwitcher->addParam('users',$this->users);
  15. $httpParameter = HttpParameter::httpPostParamer();
  16. $httpParameter->setJsonParams(json_encode($paramSwitcher->getParams()));
  17. return $httpParameter;
  18. }
  19. /**
  20. * @return mixed
  21. */
  22. public function getRole()
  23. {
  24. return $this->role;
  25. }
  26. /**
  27. * @param mixed $role
  28. */
  29. public function setRole($role)
  30. {
  31. $this->role = $role;
  32. }
  33. /**
  34. * @return mixed
  35. */
  36. public function getOperate()
  37. {
  38. return $this->operate;
  39. }
  40. /**
  41. * @param mixed $operate
  42. */
  43. public function setOperate($operate)
  44. {
  45. $this->operate = $operate;
  46. }
  47. /**
  48. * @return mixed
  49. */
  50. public function getUsers()
  51. {
  52. return $this->users;
  53. }
  54. /**
  55. * @param mixed $users
  56. */
  57. public function setUsers($users)
  58. {
  59. $this->users = $users;
  60. }
  61. }