OapiSmartdeviceDevicememberListRequest.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.smartdevice.devicemember.list request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.08.08
  7. */
  8. class OapiSmartdeviceDevicememberListRequest
  9. {
  10. /**
  11. * 查询游标,起始传0,后续传返回值中的cursor字段
  12. **/
  13. private $cursor;
  14. /**
  15. * 设备id
  16. **/
  17. private $deviceId;
  18. /**
  19. * 分页大小
  20. **/
  21. private $size;
  22. private $apiParas = array();
  23. public function setCursor($cursor)
  24. {
  25. $this->cursor = $cursor;
  26. $this->apiParas["cursor"] = $cursor;
  27. }
  28. public function getCursor()
  29. {
  30. return $this->cursor;
  31. }
  32. public function setDeviceId($deviceId)
  33. {
  34. $this->deviceId = $deviceId;
  35. $this->apiParas["device_id"] = $deviceId;
  36. }
  37. public function getDeviceId()
  38. {
  39. return $this->deviceId;
  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.smartdevice.devicemember.list";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->cursor,"cursor");
  61. RequestCheckUtil::checkNotNull($this->deviceId,"deviceId");
  62. RequestCheckUtil::checkNotNull($this->size,"size");
  63. RequestCheckUtil::checkMaxValue($this->size,500,"size");
  64. RequestCheckUtil::checkMinValue($this->size,1,"size");
  65. }
  66. public function putOtherTextParam($key, $value) {
  67. $this->apiParas[$key] = $value;
  68. $this->$key = $value;
  69. }
  70. }