Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update model #188

Merged
merged 1 commit into from
Sep 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you're using Maven, just add the following dependency in `pom.xml`.
<dependency>
<groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId>
<version>0.4.06</version>
<version>0.4.07</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
<dependency>
<groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId>
<version>0.4.06</version>
<version>0.4.07</version>
</dependency>
```

Expand Down
2 changes: 1 addition & 1 deletion docs/guide/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# 介绍

本文档基于腾讯云 IM Server SDK Java <Badge type="tip" text="v0.4.06" vertical="top" /> 编写。
本文档基于腾讯云 IM Server SDK Java <Badge type="tip" text="v0.4.07" vertical="top" /> 编写。

## 前提条件

Expand Down
4 changes: 2 additions & 2 deletions docs/guide/quickstart.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
<dependency>
<groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId>
<version>0.4.06</version>
<version>0.4.07</version>
</dependency>
```

### Gradle

```gradle
implementation group: 'io.github.doocs', name: 'im-server-sdk-java', version: '0.4.06'
implementation group: 'io.github.doocs', name: 'im-server-sdk-java', version: '0.4.07'
```

### 下载 JAR
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "qcloud-im-server-sdk-java",
"version": "0.4.06",
"version": "0.4.07",
"description": "腾讯云 IM 服务端 SDK API 文档 Java 版",
"main": "index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<groupId>io.github.doocs</groupId>
<artifactId>im-server-sdk-java</artifactId>
<version>0.4.06</version>
<version>0.4.07</version>
<packaging>jar</packaging>

<name>qcloud-im-server-sdk-java</name>
Expand Down
46 changes: 45 additions & 1 deletion src/main/java/io/github/doocs/im/model/group/GroupInfo.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ public class GroupInfo implements Serializable {
@JsonProperty("InviteJoinOption")
private String inviteJoinOption;

/**
* 是否启用权限组作为权限判断依据
*/
@JsonProperty("EnablePermission")
private Integer enablePermission;

/**
* 群成员拥有的默认权限
*/
@JsonProperty("DefaultPermission")
private Integer defaultPermission;

/**
* 群全员禁言状态
*/
Expand Down Expand Up @@ -146,7 +158,8 @@ public GroupInfo(String groupId, String type, String name, String introduction,
Integer lastInfoTime, Integer lastMsgTime, Long nextMsgSeq, Integer memberNum,
Integer maxMemberNum, String applyJoinOption, String inviteJoinOption, String muteAllMember,
List<AppDefinedDataItem> appDefinedData, List<MemberProfile> memberList,
List<AppMemberDefinedDataItem> appMemberDefinedData) {
List<AppMemberDefinedDataItem> appMemberDefinedData,
Integer enablePermission, Integer defaultPermission) {
this.groupId = groupId;
this.type = type;
this.name = name;
Expand All @@ -167,6 +180,8 @@ public GroupInfo(String groupId, String type, String name, String introduction,
this.appDefinedData = appDefinedData;
this.memberList = memberList;
this.appMemberDefinedData = appMemberDefinedData;
this.enablePermission = enablePermission;
this.defaultPermission = defaultPermission;
}

private GroupInfo(Builder builder) {
Expand All @@ -190,6 +205,8 @@ private GroupInfo(Builder builder) {
this.appDefinedData = builder.appDefinedData;
this.memberList = builder.memberList;
this.appMemberDefinedData = builder.appMemberDefinedData;
this.enablePermission = builder.enablePermission;
this.defaultPermission = builder.defaultPermission;
}

public static Builder builder() {
Expand Down Expand Up @@ -356,6 +373,21 @@ public void setAppMemberDefinedData(List<AppMemberDefinedDataItem> appMemberDefi
this.appMemberDefinedData = appMemberDefinedData;
}

public Integer getEnablePermission() {
return enablePermission;
}

public void setEnablePermission(Integer enablePermission) {
this.enablePermission = enablePermission;
}

public Integer getDefaultPermission() {
return defaultPermission;
}

public void setDefaultPermission(Integer defaultPermission) {
this.defaultPermission = defaultPermission;
}

public static final class Builder {
private String groupId;
Expand All @@ -378,6 +410,8 @@ public static final class Builder {
private List<AppDefinedDataItem> appDefinedData;
private List<MemberProfile> memberList;
private List<AppMemberDefinedDataItem> appMemberDefinedData;
private Integer enablePermission;
private Integer defaultPermission;

private Builder() {
}
Expand Down Expand Up @@ -485,5 +519,15 @@ public Builder appMemberDefinedData(List<AppMemberDefinedDataItem> appMemberDefi
this.appMemberDefinedData = appMemberDefinedData;
return this;
}

public Builder enablePermission(Integer enablePermission) {
this.enablePermission = enablePermission;
return this;
}

public Builder defaultPermission(Integer defaultPermission) {
this.defaultPermission = defaultPermission;
return this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ public class ChangeGroupOwnerRequest extends GenericRequest implements Serializa
@JsonProperty("NewOwner_Account")
private String newOwnerAccount;

/**
* 指定的操作者账号
*/
@JsonProperty("From_Account")
private String fromAccount;

public ChangeGroupOwnerRequest() {
}

Expand All @@ -34,9 +40,16 @@ public ChangeGroupOwnerRequest(String groupId, String newOwnerAccount) {
this.newOwnerAccount = newOwnerAccount;
}

public ChangeGroupOwnerRequest(String groupId, String newOwnerAccount, String fromAccount) {
this.groupId = groupId;
this.newOwnerAccount = newOwnerAccount;
this.fromAccount = fromAccount;
}

private ChangeGroupOwnerRequest(Builder builder) {
this.groupId = builder.groupId;
this.newOwnerAccount = builder.newOwnerAccount;
this.fromAccount = builder.fromAccount;
}

public static Builder builder() {
Expand All @@ -59,10 +72,18 @@ public void setNewOwnerAccount(String newOwnerAccount) {
this.newOwnerAccount = newOwnerAccount;
}

public String getFromAccount() {
return fromAccount;
}

public void setFromAccount(String fromAccount) {
this.fromAccount = fromAccount;
}

public static final class Builder {
private String groupId;
private String newOwnerAccount;
private String fromAccount;

private Builder() {
}
Expand All @@ -80,5 +101,10 @@ public Builder newOwnerAccount(String newOwnerAccount) {
this.newOwnerAccount = newOwnerAccount;
return this;
}

public Builder fromAccount(String fromAccount) {
this.fromAccount = fromAccount;
return this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,22 @@ public class CreateGroupRequest implements Serializable {
@JsonProperty("SupportTopic")
private Integer supportTopic;

/**
* 仅支持话题的社群可以设置该字段
* 是否启用权限组作为权限判断依据
* 0:不启用
* 1:启用
*/
@JsonProperty("EnablePermission")
private Integer enablePermission;

/**
* 仅启用权限组作为权限判断依据的群可以设置该字段
* 群成员在该群中的默认权限
*/
@JsonProperty("DefaultPermission")
private Integer defaultPermission;

public CreateGroupRequest() {
}

Expand All @@ -119,7 +135,8 @@ public CreateGroupRequest(String ownerAccount, String type, String groupId, Stri
String notification, String faceUrl, Integer maxMemberCount,
String applyJoinOption, String inviteJoinOption,
List<AppDefinedDataItem> appDefinedData, List<MemberProfile> memberList,
List<AppMemberDefinedDataItem> appMemberDefinedData, Integer supportTopic) {
List<AppMemberDefinedDataItem> appMemberDefinedData, Integer supportTopic,
Integer enablePermission, Integer defaultPermission) {
this.ownerAccount = ownerAccount;
this.type = type;
this.groupId = groupId;
Expand All @@ -134,6 +151,8 @@ public CreateGroupRequest(String ownerAccount, String type, String groupId, Stri
this.memberList = memberList;
this.appMemberDefinedData = appMemberDefinedData;
this.supportTopic = supportTopic;
this.enablePermission = enablePermission;
this.defaultPermission = defaultPermission;
}

private CreateGroupRequest(Builder builder) {
Expand All @@ -151,6 +170,8 @@ private CreateGroupRequest(Builder builder) {
this.memberList = builder.memberList;
this.appMemberDefinedData = builder.appMemberDefinedData;
this.supportTopic = builder.supportTopic;
this.enablePermission = builder.enablePermission;
this.defaultPermission = builder.defaultPermission;
}

public static Builder builder() {
Expand Down Expand Up @@ -269,6 +290,21 @@ public void setSupportTopic(Integer supportTopic) {
this.supportTopic = supportTopic;
}

public Integer getEnablePermission() {
return enablePermission;
}

public void setEnablePermission(Integer enablePermission) {
this.enablePermission = enablePermission;
}

public Integer getDefaultPermission() {
return defaultPermission;
}

public void setDefaultPermission(Integer defaultPermission) {
this.defaultPermission = defaultPermission;
}

public static final class Builder {
private String ownerAccount;
Expand All @@ -285,6 +321,8 @@ public static final class Builder {
private List<MemberProfile> memberList;
private List<AppMemberDefinedDataItem> appMemberDefinedData;
private Integer supportTopic;
private Integer enablePermission;
private Integer defaultPermission;

private Builder() {
}
Expand Down Expand Up @@ -362,5 +400,15 @@ public Builder supportTopic(Integer supportTopic) {
this.supportTopic = supportTopic;
return this;
}

public Builder enablePermission(Integer enablePermission) {
this.enablePermission = enablePermission;
return this;
}

public Builder defaultPermission(Integer defaultPermission) {
this.defaultPermission = defaultPermission;
return this;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ public class GetAppIdGroupListRequest extends GenericRequest implements Serializ

/**
* 群太多时分页拉取标志,第一次填0,以后填上一次返回的值,返回的 Next 为0代表拉完了
* 注意:
* 该数字需为64位无符号整数,如果使用32位整数解析,可能会有溢出问题导致无法完整拉取列表。
*/
@JsonProperty("Next")
private Long next;
Expand Down
Loading
Loading