OpenimTribeCreateRequest.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <?php
  2. /**
  3. * TOP API: taobao.openim.tribe.create request
  4. *
  5. * @author auto create
  6. * @since 1.0, 2017.11.02
  7. */
  8. class OpenimTribeCreateRequest
  9. {
  10. /**
  11. * 创建群时候拉入群的成员tribe_type = 1(即为讨论组类型)时 该参数为必选tribe_type = 0 (即为普通群类型)时,改参数无效,可不填
  12. **/
  13. private $members;
  14. /**
  15. * 群公告
  16. **/
  17. private $notice;
  18. /**
  19. * 群名称
  20. **/
  21. private $tribeName;
  22. /**
  23. * 群类型有两种tribe_type = 0 普通群 普通群有管理员角色,对成员加入有权限控制tribe_type = 1 讨论组 讨论组没有管理员,不能解散
  24. **/
  25. private $tribeType;
  26. /**
  27. * 用户信息
  28. **/
  29. private $user;
  30. private $apiParas = array();
  31. public function setMembers($members)
  32. {
  33. $this->members = $members;
  34. $this->apiParas["members"] = $members;
  35. }
  36. public function getMembers()
  37. {
  38. return $this->members;
  39. }
  40. public function setNotice($notice)
  41. {
  42. $this->notice = $notice;
  43. $this->apiParas["notice"] = $notice;
  44. }
  45. public function getNotice()
  46. {
  47. return $this->notice;
  48. }
  49. public function setTribeName($tribeName)
  50. {
  51. $this->tribeName = $tribeName;
  52. $this->apiParas["tribe_name"] = $tribeName;
  53. }
  54. public function getTribeName()
  55. {
  56. return $this->tribeName;
  57. }
  58. public function setTribeType($tribeType)
  59. {
  60. $this->tribeType = $tribeType;
  61. $this->apiParas["tribe_type"] = $tribeType;
  62. }
  63. public function getTribeType()
  64. {
  65. return $this->tribeType;
  66. }
  67. public function setUser($user)
  68. {
  69. $this->user = $user;
  70. $this->apiParas["user"] = $user;
  71. }
  72. public function getUser()
  73. {
  74. return $this->user;
  75. }
  76. public function getApiMethodName()
  77. {
  78. return "taobao.openim.tribe.create";
  79. }
  80. public function getApiParas()
  81. {
  82. return $this->apiParas;
  83. }
  84. public function check()
  85. {
  86. RequestCheckUtil::checkNotNull($this->notice,"notice");
  87. RequestCheckUtil::checkNotNull($this->tribeName,"tribeName");
  88. RequestCheckUtil::checkNotNull($this->tribeType,"tribeType");
  89. }
  90. public function putOtherTextParam($key, $value) {
  91. $this->apiParas[$key] = $value;
  92. $this->$key = $value;
  93. }
  94. }