OapiProcessCopyRequest.php 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.process.copy request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2019.07.03
  7. */
  8. class OapiProcessCopyRequest
  9. {
  10. /**
  11. * 企业微应用标识
  12. **/
  13. private $agentId;
  14. /**
  15. * 业务分类标识(建议采用JAVA包名的命名方式,)
  16. **/
  17. private $bizCategoryId;
  18. /**
  19. * 复制类型,1 不包含流程信息,2 包含流程信息且审批中员工可见。默认为1
  20. **/
  21. private $copyType;
  22. /**
  23. * 审批流描述
  24. **/
  25. private $description;
  26. /**
  27. * 审批流的唯一码
  28. **/
  29. private $processCode;
  30. /**
  31. * 审批流名称
  32. **/
  33. private $processName;
  34. private $apiParas = array();
  35. public function setAgentId($agentId)
  36. {
  37. $this->agentId = $agentId;
  38. $this->apiParas["agent_id"] = $agentId;
  39. }
  40. public function getAgentId()
  41. {
  42. return $this->agentId;
  43. }
  44. public function setBizCategoryId($bizCategoryId)
  45. {
  46. $this->bizCategoryId = $bizCategoryId;
  47. $this->apiParas["biz_category_id"] = $bizCategoryId;
  48. }
  49. public function getBizCategoryId()
  50. {
  51. return $this->bizCategoryId;
  52. }
  53. public function setCopyType($copyType)
  54. {
  55. $this->copyType = $copyType;
  56. $this->apiParas["copy_type"] = $copyType;
  57. }
  58. public function getCopyType()
  59. {
  60. return $this->copyType;
  61. }
  62. public function setDescription($description)
  63. {
  64. $this->description = $description;
  65. $this->apiParas["description"] = $description;
  66. }
  67. public function getDescription()
  68. {
  69. return $this->description;
  70. }
  71. public function setProcessCode($processCode)
  72. {
  73. $this->processCode = $processCode;
  74. $this->apiParas["process_code"] = $processCode;
  75. }
  76. public function getProcessCode()
  77. {
  78. return $this->processCode;
  79. }
  80. public function setProcessName($processName)
  81. {
  82. $this->processName = $processName;
  83. $this->apiParas["process_name"] = $processName;
  84. }
  85. public function getProcessName()
  86. {
  87. return $this->processName;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "dingtalk.oapi.process.copy";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->agentId,"agentId");
  100. RequestCheckUtil::checkMaxLength($this->bizCategoryId,64,"bizCategoryId");
  101. RequestCheckUtil::checkNotNull($this->processCode,"processCode");
  102. RequestCheckUtil::checkMaxLength($this->processName,64,"processName");
  103. }
  104. public function putOtherTextParam($key, $value) {
  105. $this->apiParas[$key] = $value;
  106. $this->$key = $value;
  107. }
  108. }