OapiWorkspaceProjectCreateRequest.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.workspace.project.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.01.09
  7. */
  8. class OapiWorkspaceProjectCreateRequest
  9. {
  10. /**
  11. * 创建人(主管理员)在归属组织内的userId
  12. **/
  13. private $belongCorpUserid;
  14. /**
  15. * 是否建圈自动建群
  16. **/
  17. private $createGroup;
  18. /**
  19. * 描述,长度256字符以内
  20. **/
  21. private $desc;
  22. /**
  23. * 组织名,长度3-50个字符以内,不允许中划线、下划线、逗号、空格
  24. **/
  25. private $name;
  26. /**
  27. * 开放的cid,如果有值会把该群作为组织的默认群,否则会新创建1个默认群
  28. **/
  29. private $openConversationId;
  30. /**
  31. * 允许调用者传入外部id用于做系统关联
  32. **/
  33. private $outerId;
  34. /**
  35. * 模板id
  36. **/
  37. private $templateId;
  38. /**
  39. * 1项目组织 2圈子组织
  40. **/
  41. private $type;
  42. /**
  43. * 可以指定创建人在项目/圈子组织内的userId,如果不填系统随机生成
  44. **/
  45. private $userid;
  46. private $apiParas = array();
  47. public function setBelongCorpUserid($belongCorpUserid)
  48. {
  49. $this->belongCorpUserid = $belongCorpUserid;
  50. $this->apiParas["belong_corp_userid"] = $belongCorpUserid;
  51. }
  52. public function getBelongCorpUserid()
  53. {
  54. return $this->belongCorpUserid;
  55. }
  56. public function setCreateGroup($createGroup)
  57. {
  58. $this->createGroup = $createGroup;
  59. $this->apiParas["create_group"] = $createGroup;
  60. }
  61. public function getCreateGroup()
  62. {
  63. return $this->createGroup;
  64. }
  65. public function setDesc($desc)
  66. {
  67. $this->desc = $desc;
  68. $this->apiParas["desc"] = $desc;
  69. }
  70. public function getDesc()
  71. {
  72. return $this->desc;
  73. }
  74. public function setName($name)
  75. {
  76. $this->name = $name;
  77. $this->apiParas["name"] = $name;
  78. }
  79. public function getName()
  80. {
  81. return $this->name;
  82. }
  83. public function setOpenConversationId($openConversationId)
  84. {
  85. $this->openConversationId = $openConversationId;
  86. $this->apiParas["open_conversation_id"] = $openConversationId;
  87. }
  88. public function getOpenConversationId()
  89. {
  90. return $this->openConversationId;
  91. }
  92. public function setOuterId($outerId)
  93. {
  94. $this->outerId = $outerId;
  95. $this->apiParas["outer_id"] = $outerId;
  96. }
  97. public function getOuterId()
  98. {
  99. return $this->outerId;
  100. }
  101. public function setTemplateId($templateId)
  102. {
  103. $this->templateId = $templateId;
  104. $this->apiParas["template_id"] = $templateId;
  105. }
  106. public function getTemplateId()
  107. {
  108. return $this->templateId;
  109. }
  110. public function setType($type)
  111. {
  112. $this->type = $type;
  113. $this->apiParas["type"] = $type;
  114. }
  115. public function getType()
  116. {
  117. return $this->type;
  118. }
  119. public function setUserid($userid)
  120. {
  121. $this->userid = $userid;
  122. $this->apiParas["userid"] = $userid;
  123. }
  124. public function getUserid()
  125. {
  126. return $this->userid;
  127. }
  128. public function getApiMethodName()
  129. {
  130. return "dingtalk.oapi.workspace.project.create";
  131. }
  132. public function getApiParas()
  133. {
  134. return $this->apiParas;
  135. }
  136. public function check()
  137. {
  138. RequestCheckUtil::checkNotNull($this->belongCorpUserid,"belongCorpUserid");
  139. RequestCheckUtil::checkNotNull($this->name,"name");
  140. RequestCheckUtil::checkNotNull($this->type,"type");
  141. }
  142. public function putOtherTextParam($key, $value) {
  143. $this->apiParas[$key] = $value;
  144. $this->$key = $value;
  145. }
  146. }