OapiCspaceFilePresignedurlGetRequest.php 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.cspace.file.presignedurl.get request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.11.18
  7. */
  8. class OapiCspaceFilePresignedurlGetRequest
  9. {
  10. /**
  11. * 钉盘文件ID
  12. **/
  13. private $dentryid;
  14. /**
  15. * 签名URL的有效期,不传的话为默认值15分钟
  16. **/
  17. private $expireSeconds;
  18. /**
  19. * 是否为内部调用,统一传false
  20. **/
  21. private $innerInvoke;
  22. /**
  23. * 钉盘空间ID
  24. **/
  25. private $spaceid;
  26. private $apiParas = array();
  27. public function setDentryid($dentryid)
  28. {
  29. $this->dentryid = $dentryid;
  30. $this->apiParas["dentryid"] = $dentryid;
  31. }
  32. public function getDentryid()
  33. {
  34. return $this->dentryid;
  35. }
  36. public function setExpireSeconds($expireSeconds)
  37. {
  38. $this->expireSeconds = $expireSeconds;
  39. $this->apiParas["expire_seconds"] = $expireSeconds;
  40. }
  41. public function getExpireSeconds()
  42. {
  43. return $this->expireSeconds;
  44. }
  45. public function setInnerInvoke($innerInvoke)
  46. {
  47. $this->innerInvoke = $innerInvoke;
  48. $this->apiParas["inner_invoke"] = $innerInvoke;
  49. }
  50. public function getInnerInvoke()
  51. {
  52. return $this->innerInvoke;
  53. }
  54. public function setSpaceid($spaceid)
  55. {
  56. $this->spaceid = $spaceid;
  57. $this->apiParas["spaceid"] = $spaceid;
  58. }
  59. public function getSpaceid()
  60. {
  61. return $this->spaceid;
  62. }
  63. public function getApiMethodName()
  64. {
  65. return "dingtalk.oapi.cspace.file.presignedurl.get";
  66. }
  67. public function getApiParas()
  68. {
  69. return $this->apiParas;
  70. }
  71. public function check()
  72. {
  73. RequestCheckUtil::checkNotNull($this->dentryid,"dentryid");
  74. RequestCheckUtil::checkNotNull($this->spaceid,"spaceid");
  75. }
  76. public function putOtherTextParam($key, $value) {
  77. $this->apiParas[$key] = $value;
  78. $this->$key = $value;
  79. }
  80. }