OapiProcessinstanceFileDownloadRequest.php 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.processinstance.file.download request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.01.03
  7. */
  8. class OapiProcessinstanceFileDownloadRequest
  9. {
  10. /**
  11. * 企业应用标识
  12. **/
  13. private $agentId;
  14. /**
  15. * 文件id
  16. **/
  17. private $fileId;
  18. /**
  19. * 流程实例id
  20. **/
  21. private $processInstanceId;
  22. private $apiParas = array();
  23. public function setAgentId($agentId)
  24. {
  25. $this->agentId = $agentId;
  26. $this->apiParas["agent_id"] = $agentId;
  27. }
  28. public function getAgentId()
  29. {
  30. return $this->agentId;
  31. }
  32. public function setFileId($fileId)
  33. {
  34. $this->fileId = $fileId;
  35. $this->apiParas["file_id"] = $fileId;
  36. }
  37. public function getFileId()
  38. {
  39. return $this->fileId;
  40. }
  41. public function setProcessInstanceId($processInstanceId)
  42. {
  43. $this->processInstanceId = $processInstanceId;
  44. $this->apiParas["process_instance_id"] = $processInstanceId;
  45. }
  46. public function getProcessInstanceId()
  47. {
  48. return $this->processInstanceId;
  49. }
  50. public function getApiMethodName()
  51. {
  52. return "dingtalk.oapi.processinstance.file.download";
  53. }
  54. public function getApiParas()
  55. {
  56. return $this->apiParas;
  57. }
  58. public function check()
  59. {
  60. RequestCheckUtil::checkNotNull($this->agentId,"agentId");
  61. RequestCheckUtil::checkNotNull($this->fileId,"fileId");
  62. RequestCheckUtil::checkNotNull($this->processInstanceId,"processInstanceId");
  63. }
  64. public function putOtherTextParam($key, $value) {
  65. $this->apiParas[$key] = $value;
  66. $this->$key = $value;
  67. }
  68. }