OapiImChatControlgroupCreateRequest.php 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. <?php
  2. /**
  3. * dingtalk API: dingtalk.oapi.im.chat.controlgroup.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2020.05.29
  7. */
  8. class OapiImChatControlgroupCreateRequest
  9. {
  10. /**
  11. * 群的管理权限设置,0-所有人可管理(默认),1-仅群主和群管理员可管理
  12. **/
  13. private $authorityType;
  14. /**
  15. * goc模拟群:goc, 网商银行群:eCommerce
  16. **/
  17. private $groupType;
  18. /**
  19. * 建群去重的业务id
  20. **/
  21. private $groupUniqId;
  22. /**
  23. * 群成员在钉钉组织内的userid列表
  24. **/
  25. private $memberUserids;
  26. /**
  27. * 群主在钉钉组织内的userid
  28. **/
  29. private $ownerUserid;
  30. /**
  31. * 群标题
  32. **/
  33. private $title;
  34. private $apiParas = array();
  35. public function setAuthorityType($authorityType)
  36. {
  37. $this->authorityType = $authorityType;
  38. $this->apiParas["authority_type"] = $authorityType;
  39. }
  40. public function getAuthorityType()
  41. {
  42. return $this->authorityType;
  43. }
  44. public function setGroupType($groupType)
  45. {
  46. $this->groupType = $groupType;
  47. $this->apiParas["group_type"] = $groupType;
  48. }
  49. public function getGroupType()
  50. {
  51. return $this->groupType;
  52. }
  53. public function setGroupUniqId($groupUniqId)
  54. {
  55. $this->groupUniqId = $groupUniqId;
  56. $this->apiParas["group_uniq_id"] = $groupUniqId;
  57. }
  58. public function getGroupUniqId()
  59. {
  60. return $this->groupUniqId;
  61. }
  62. public function setMemberUserids($memberUserids)
  63. {
  64. $this->memberUserids = $memberUserids;
  65. $this->apiParas["member_userids"] = $memberUserids;
  66. }
  67. public function getMemberUserids()
  68. {
  69. return $this->memberUserids;
  70. }
  71. public function setOwnerUserid($ownerUserid)
  72. {
  73. $this->ownerUserid = $ownerUserid;
  74. $this->apiParas["owner_userid"] = $ownerUserid;
  75. }
  76. public function getOwnerUserid()
  77. {
  78. return $this->ownerUserid;
  79. }
  80. public function setTitle($title)
  81. {
  82. $this->title = $title;
  83. $this->apiParas["title"] = $title;
  84. }
  85. public function getTitle()
  86. {
  87. return $this->title;
  88. }
  89. public function getApiMethodName()
  90. {
  91. return "dingtalk.oapi.im.chat.controlgroup.create";
  92. }
  93. public function getApiParas()
  94. {
  95. return $this->apiParas;
  96. }
  97. public function check()
  98. {
  99. RequestCheckUtil::checkNotNull($this->memberUserids,"memberUserids");
  100. RequestCheckUtil::checkMaxListSize($this->memberUserids,20,"memberUserids");
  101. RequestCheckUtil::checkNotNull($this->ownerUserid,"ownerUserid");
  102. RequestCheckUtil::checkNotNull($this->title,"title");
  103. RequestCheckUtil::checkMaxLength($this->title,256,"title");
  104. }
  105. public function putOtherTextParam($key, $value) {
  106. $this->apiParas[$key] = $value;
  107. $this->$key = $value;
  108. }
  109. }