OapiWorkspaceProjectCreateV2Request.php 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.workspace.project.create.v2 request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2022.01.19
  7. */
  8. class OapiWorkspaceProjectCreateV2Request
  9. {
  10. /**
  11. * 项目创建人userid
  12. **/
  13. private $belongCorpUserid;
  14. /**
  15. * 是否创建群
  16. **/
  17. private $createGroup;
  18. /**
  19. * 描述,长度256字符以内
  20. **/
  21. private $desc;
  22. /**
  23. * 项目logo media id
  24. **/
  25. private $logoMediaId;
  26. /**
  27. * 组织名,长度3-50个字符以内,不允许中划线、下划线、逗号、空格
  28. **/
  29. private $name;
  30. /**
  31. * 群ID
  32. **/
  33. private $openConversationId;
  34. /**
  35. * sourceid
  36. **/
  37. private $outerId;
  38. /**
  39. * 默认创建项目,可不用入参
  40. **/
  41. private $type;
  42. private $apiParas = array();
  43. public function setBelongCorpUserid($belongCorpUserid)
  44. {
  45. $this->belongCorpUserid = $belongCorpUserid;
  46. $this->apiParas["belong_corp_userid"] = $belongCorpUserid;
  47. }
  48. public function getBelongCorpUserid()
  49. {
  50. return $this->belongCorpUserid;
  51. }
  52. public function setCreateGroup($createGroup)
  53. {
  54. $this->createGroup = $createGroup;
  55. $this->apiParas["create_group"] = $createGroup;
  56. }
  57. public function getCreateGroup()
  58. {
  59. return $this->createGroup;
  60. }
  61. public function setDesc($desc)
  62. {
  63. $this->desc = $desc;
  64. $this->apiParas["desc"] = $desc;
  65. }
  66. public function getDesc()
  67. {
  68. return $this->desc;
  69. }
  70. public function setLogoMediaId($logoMediaId)
  71. {
  72. $this->logoMediaId = $logoMediaId;
  73. $this->apiParas["logo_media_id"] = $logoMediaId;
  74. }
  75. public function getLogoMediaId()
  76. {
  77. return $this->logoMediaId;
  78. }
  79. public function setName($name)
  80. {
  81. $this->name = $name;
  82. $this->apiParas["name"] = $name;
  83. }
  84. public function getName()
  85. {
  86. return $this->name;
  87. }
  88. public function setOpenConversationId($openConversationId)
  89. {
  90. $this->openConversationId = $openConversationId;
  91. $this->apiParas["open_conversation_id"] = $openConversationId;
  92. }
  93. public function getOpenConversationId()
  94. {
  95. return $this->openConversationId;
  96. }
  97. public function setOuterId($outerId)
  98. {
  99. $this->outerId = $outerId;
  100. $this->apiParas["outer_id"] = $outerId;
  101. }
  102. public function getOuterId()
  103. {
  104. return $this->outerId;
  105. }
  106. public function setType($type)
  107. {
  108. $this->type = $type;
  109. $this->apiParas["type"] = $type;
  110. }
  111. public function getType()
  112. {
  113. return $this->type;
  114. }
  115. public function getApiMethodName()
  116. {
  117. return "dingtalk.oapi.workspace.project.create.v2";
  118. }
  119. public function getApiParas()
  120. {
  121. return $this->apiParas;
  122. }
  123. public function check()
  124. {
  125. RequestCheckUtil::checkNotNull($this->name,"name");
  126. }
  127. public function putOtherTextParam($key, $value) {
  128. $this->apiParas[$key] = $value;
  129. $this->$key = $value;
  130. }
  131. }