CorpDeviceManageGetRequest.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.corp.device.manage.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.03
  7. */
  8. class CorpDeviceManageGetRequest
  9. {
  10. /**
  11. * 设备ID
  12. **/
  13. private $deviceId;
  14. /**
  15. * 设备服务商ID
  16. **/
  17. private $deviceServiceId;
  18. private $apiParas = array();
  19. public function setDeviceId($deviceId)
  20. {
  21. $this->deviceId = $deviceId;
  22. $this->apiParas["device_id"] = $deviceId;
  23. }
  24. public function getDeviceId()
  25. {
  26. return $this->deviceId;
  27. }
  28. public function setDeviceServiceId($deviceServiceId)
  29. {
  30. $this->deviceServiceId = $deviceServiceId;
  31. $this->apiParas["device_service_id"] = $deviceServiceId;
  32. }
  33. public function getDeviceServiceId()
  34. {
  35. return $this->deviceServiceId;
  36. }
  37. public function getApiMethodName()
  38. {
  39. return "dingtalk.corp.device.manage.get";
  40. }
  41. public function getApiParas()
  42. {
  43. return $this->apiParas;
  44. }
  45. public function check()
  46. {
  47. RequestCheckUtil::checkNotNull($this->deviceId,"deviceId");
  48. RequestCheckUtil::checkNotNull($this->deviceServiceId,"deviceServiceId");
  49. }
  50. public function putOtherTextParam($key, $value) {
  51. $this->apiParas[$key] = $value;
  52. $this->$key = $value;
  53. }
  54. }