Unverified Commit 8fb27159 authored by Yang Libin's avatar Yang Libin Committed by GitHub

fix: request and response entities (#45)

parent 456d3cca
package io.github.doocs.im.constant;
/**
* 登录的平台类型
*
* @author bingo
* @since 2021/10/31 20:06
*/
public class Platform {
public static final String IPHONE = "iPhone";
public static final String ANDROID = "Android";
public static final String WEB = "Web";
public static final String PC = "PC";
public static final String IPAD = "iPad";
public static final String MAC = "Mac";
}
package io.github.doocs.im.constant;
/**
* 用户状态
*
* @author bingo
* @since 2021/10/31 20:04
*/
public class QueryResultStatus {
/**
* 前台运行状态
*/
public static final String ONLINE = "Online";
/**
* 后台运行状态
*/
public static final String PUSH_ONLINE = "PushOnline";
/**
* 未登录状态
*/
public static final String OFFLINE = "Offline";
}
...@@ -20,7 +20,7 @@ public class Account { ...@@ -20,7 +20,7 @@ public class Account {
private static final String ACCOUNT_DELETE_COMMAND = "account_delete"; private static final String ACCOUNT_DELETE_COMMAND = "account_delete";
private static final String ACCOUNT_CHECK_COMMAND = "account_check"; private static final String ACCOUNT_CHECK_COMMAND = "account_check";
private static final String KICK_COMMAND = "kick"; private static final String KICK_COMMAND = "kick";
private static final String QUERY_STATE_COMMAND = "querystate"; private static final String QUERY_ONLINE_STATUS_COMMAND = "query_online_status";
private final IMClient imClient; private final IMClient imClient;
...@@ -53,8 +53,8 @@ public class Account { ...@@ -53,8 +53,8 @@ public class Account {
return HttpUtil.post(url, kickRequest, KickResult.class); return HttpUtil.post(url, kickRequest, KickResult.class);
} }
public QueryStateResult queryState(QueryStateRequest queryStateRequest) throws IOException { public QueryOnlineStatusResult queryOnlineStatus(QueryOnlineStatus queryOnlineStatus) throws IOException {
String url = imClient.getUrl(SERVICE_NAME_OPEN_IM, QUERY_STATE_COMMAND); String url = imClient.getUrl(SERVICE_NAME_OPEN_IM, QUERY_ONLINE_STATUS_COMMAND);
return HttpUtil.post(url, queryStateRequest, QueryStateResult.class); return HttpUtil.post(url, queryOnlineStatus, QueryOnlineStatusResult.class);
} }
} }
...@@ -58,7 +58,7 @@ public class Message { ...@@ -58,7 +58,7 @@ public class Message {
return HttpUtil.post(url, adminSetMsgReadRequest, AdminSetMsgReadResult.class); return HttpUtil.post(url, adminSetMsgReadRequest, AdminSetMsgReadResult.class);
} }
public C2cUnreadMsgNumResult getC2cUnreadMsgRequest(GetC2cUnreadMsgRequest getC2cUnreadMsgRequest) throws IOException { public C2cUnreadMsgNumResult getC2cUnreadMsgNum(GetC2cUnreadMsgRequest getC2cUnreadMsgRequest) throws IOException {
String url = imClient.getUrl(SERVICE_NAME, GET_C2C_UNREAD_MSG_NUM_COMMAND); String url = imClient.getUrl(SERVICE_NAME, GET_C2C_UNREAD_MSG_NUM_COMMAND);
return HttpUtil.post(url, getC2cUnreadMsgRequest, C2cUnreadMsgNumResult.class); return HttpUtil.post(url, getC2cUnreadMsgRequest, C2cUnreadMsgNumResult.class);
} }
......
package io.github.doocs.im.model.group;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author bingo
* @since 2021/10/31 20:57
*/
public class AppDefinedDataItem {
@JsonProperty("Key")
private String key;
@JsonProperty("Value")
private Object value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
@Override
public String toString() {
return "AppDefinedDataItem{" +
"key='" + key + '\'' +
", value=" + value +
'}';
}
}
package io.github.doocs.im.model.group;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author bingo
* @since 2021/10/31 21:18
*/
public class AppMemberDefinedDataItem {
@JsonProperty("Key")
private String key;
@JsonProperty("Value")
private Object value;
public String getKey() {
return key;
}
public void setKey(String key) {
this.key = key;
}
public Object getValue() {
return value;
}
public void setValue(Object value) {
this.value = value;
}
@Override
public String toString() {
return "AppDefinedDataItem{" +
"key='" + key + '\'' +
", value=" + value +
'}';
}
}
package io.github.doocs.im.model.group;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* @author bingo
* @since 2021/10/31 21:02
*/
public class GroupInfo {
@JsonProperty("Owner_Account")
private String ownerAccount;
@JsonProperty("Type")
private String type;
@JsonProperty("GroupId")
private String groupId;
@JsonProperty("Name")
private String name;
@JsonProperty("Introduction")
private String introduction;
@JsonProperty("Notification")
private String notification;
@JsonProperty("FaceUrl")
private String faceUrl;
@JsonProperty("MaxMemberCount")
private Integer maxMemberCount;
@JsonProperty("ApplyJoinOption")
private String applyJoinOption;
@JsonProperty("AppDefinedData")
private List<AppDefinedDataItem> appDefinedData;
@JsonProperty("MemberList")
private List<MemberProfile> memberList;
@JsonProperty("AppMemberDefinedData")
private List<AppMemberDefinedDataItem> appMemberDefinedData;
public GroupInfo() {
}
public GroupInfo(String ownerAccount, String type, String groupId, String name, String introduction, String notification, String faceUrl, Integer maxMemberCount, String applyJoinOption, List<AppDefinedDataItem> appDefinedData, List<MemberProfile> memberList, List<AppMemberDefinedDataItem> appMemberDefinedData) {
this.ownerAccount = ownerAccount;
this.type = type;
this.groupId = groupId;
this.name = name;
this.introduction = introduction;
this.notification = notification;
this.faceUrl = faceUrl;
this.maxMemberCount = maxMemberCount;
this.applyJoinOption = applyJoinOption;
this.appDefinedData = appDefinedData;
this.memberList = memberList;
this.appMemberDefinedData = appMemberDefinedData;
}
public String getOwnerAccount() {
return ownerAccount;
}
public void setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public String getNotification() {
return notification;
}
public void setNotification(String notification) {
this.notification = notification;
}
public String getFaceUrl() {
return faceUrl;
}
public void setFaceUrl(String faceUrl) {
this.faceUrl = faceUrl;
}
public Integer getMaxMemberCount() {
return maxMemberCount;
}
public void setMaxMemberCount(Integer maxMemberCount) {
this.maxMemberCount = maxMemberCount;
}
public String getApplyJoinOption() {
return applyJoinOption;
}
public void setApplyJoinOption(String applyJoinOption) {
this.applyJoinOption = applyJoinOption;
}
public List<AppDefinedDataItem> getAppDefinedData() {
return appDefinedData;
}
public void setAppDefinedData(List<AppDefinedDataItem> appDefinedData) {
this.appDefinedData = appDefinedData;
}
public List<MemberProfile> getMemberList() {
return memberList;
}
public void setMemberList(List<MemberProfile> memberList) {
this.memberList = memberList;
}
public List<AppMemberDefinedDataItem> getAppMemberDefinedData() {
return appMemberDefinedData;
}
public void setAppMemberDefinedData(List<AppMemberDefinedDataItem> appMemberDefinedData) {
this.appMemberDefinedData = appMemberDefinedData;
}
@Override
public String toString() {
return "GroupInfo{" +
"ownerAccount='" + ownerAccount + '\'' +
", type='" + type + '\'' +
", groupId='" + groupId + '\'' +
", name='" + name + '\'' +
", introduction='" + introduction + '\'' +
", notification='" + notification + '\'' +
", faceUrl='" + faceUrl + '\'' +
", maxMemberCount=" + maxMemberCount +
", applyJoinOption='" + applyJoinOption + '\'' +
", appDefinedData=" + appDefinedData +
", memberList=" + memberList +
", appMemberDefinedData=" + appMemberDefinedData +
'}';
}
}
package io.github.doocs.im.model.request; package io.github.doocs.im.model.group;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** /**
* @author bingo * @author bingo
* @since 2021/8/1 11:20 * @since 2021/8/1 11:20
...@@ -27,20 +29,28 @@ public class MemberProfile { ...@@ -27,20 +29,28 @@ public class MemberProfile {
@JsonProperty("LastSendMsgTime") @JsonProperty("LastSendMsgTime")
private Integer lastSendMsgTime; private Integer lastSendMsgTime;
@JsonProperty("ShutUpUntil")
private Integer shutUpUntil;
@JsonProperty("NameCard") @JsonProperty("NameCard")
private String nameCard; private String nameCard;
@JsonProperty("AppMemberDefinedData")
private List<AppMemberDefinedDataItem> appMemberDefinedData;
public MemberProfile() { public MemberProfile() {
} }
public MemberProfile(String memberAccount, String role, Integer joinTime, Integer msgSeq, String msgFlag, Integer lastSendMsgTime, String nameCard) { public MemberProfile(String memberAccount, String role, Integer joinTime, Integer msgSeq, String msgFlag, Integer lastSendMsgTime, Integer shutUpUntil, String nameCard, List<AppMemberDefinedDataItem> appMemberDefinedData) {
this.memberAccount = memberAccount; this.memberAccount = memberAccount;
this.role = role; this.role = role;
this.joinTime = joinTime; this.joinTime = joinTime;
this.msgSeq = msgSeq; this.msgSeq = msgSeq;
this.msgFlag = msgFlag; this.msgFlag = msgFlag;
this.lastSendMsgTime = lastSendMsgTime; this.lastSendMsgTime = lastSendMsgTime;
this.shutUpUntil = shutUpUntil;
this.nameCard = nameCard; this.nameCard = nameCard;
this.appMemberDefinedData = appMemberDefinedData;
} }
public String getMemberAccount() { public String getMemberAccount() {
...@@ -91,6 +101,14 @@ public class MemberProfile { ...@@ -91,6 +101,14 @@ public class MemberProfile {
this.lastSendMsgTime = lastSendMsgTime; this.lastSendMsgTime = lastSendMsgTime;
} }
public Integer getShutUpUntil() {
return shutUpUntil;
}
public void setShutUpUntil(Integer shutUpUntil) {
this.shutUpUntil = shutUpUntil;
}
public String getNameCard() { public String getNameCard() {
return nameCard; return nameCard;
} }
...@@ -98,4 +116,27 @@ public class MemberProfile { ...@@ -98,4 +116,27 @@ public class MemberProfile {
public void setNameCard(String nameCard) { public void setNameCard(String nameCard) {
this.nameCard = nameCard; this.nameCard = nameCard;
} }
public List<AppMemberDefinedDataItem> getAppMemberDefinedData() {
return appMemberDefinedData;
}
public void setAppMemberDefinedData(List<AppMemberDefinedDataItem> appMemberDefinedData) {
this.appMemberDefinedData = appMemberDefinedData;
}
@Override
public String toString() {
return "MemberProfile{" +
"memberAccount='" + memberAccount + '\'' +
", role='" + role + '\'' +
", joinTime=" + joinTime +
", msgSeq=" + msgSeq +
", msgFlag='" + msgFlag + '\'' +
", lastSendMsgTime=" + lastSendMsgTime +
", shutUpUntil=" + shutUpUntil +
", nameCard='" + nameCard + '\'' +
", appMemberDefinedData=" + appMemberDefinedData +
'}';
}
} }
package io.github.doocs.im.model.request; package io.github.doocs.im.model.request;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import io.github.doocs.im.model.group.GroupInfo;
import java.util.List;
import java.util.Map;
/** /**
* @author bingo * @author bingo
* @since 2021/8/1 11:12 * @since 2021/8/1 11:12
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class CreateGroupRequest extends GenericRequest { public class CreateGroupRequest extends GroupInfo {
@JsonProperty("Owner_Account")
private String ownerAccount;
@JsonProperty("Type")
private String type;
@JsonProperty("GroupId")
private String groupId;
@JsonProperty("Name")
private String name;
@JsonProperty("Introduction")
private String introduction;
@JsonProperty("Notification")
private String notification;
@JsonProperty("FaceUrl")
private String faceUrl;
@JsonProperty("MaxMemberCount")
private Integer maxMemberCount;
@JsonProperty("ApplyJoinOption")
private String applyJoinOption;
@JsonProperty("AppDefinedData")
private List<Map<String, Object>> appDefinedData;
@JsonProperty("MemberList")
private List<MemberProfile> memberList;
@JsonProperty("AppMemberDefinedData")
private List<Map<String, Object>> appMemberDefinedData;
public CreateGroupRequest(String type, String name) {
this(null, type, null, name, null, null, null, null, null, null, null, null);
}
public CreateGroupRequest(String ownerAccount, String type, String groupId, String name, String introduction,
String notification, String faceUrl, Integer maxMemberCount, String applyJoinOption,
List<Map<String, Object>> appDefinedData, List<MemberProfile> memberList,
List<Map<String, Object>> appMemberDefinedData) {
this.ownerAccount = ownerAccount;
this.type = type;
this.groupId = groupId;
this.name = name;
this.introduction = introduction;
this.notification = notification;
this.faceUrl = faceUrl;
this.maxMemberCount = maxMemberCount;
this.applyJoinOption = applyJoinOption;
this.appDefinedData = appDefinedData;
this.memberList = memberList;
this.appMemberDefinedData = appMemberDefinedData;
}
public String getOwnerAccount() {
return ownerAccount;
}
public void setOwnerAccount(String ownerAccount) {
this.ownerAccount = ownerAccount;
}
public String getType() {
return type;
}
public void setType(String type) {
this.type = type;
}
public String getGroupId() {
return groupId;
}
public void setGroupId(String groupId) {
this.groupId = groupId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getIntroduction() {
return introduction;
}
public void setIntroduction(String introduction) {
this.introduction = introduction;
}
public String getNotification() {
return notification;
}
public void setNotification(String notification) {
this.notification = notification;
}
public String getFaceUrl() {
return faceUrl;
}
public void setFaceUrl(String faceUrl) {
this.faceUrl = faceUrl;
}
public Integer getMaxMemberCount() {
return maxMemberCount;
}
public void setMaxMemberCount(Integer maxMemberCount) {
this.maxMemberCount = maxMemberCount;
}
public String getApplyJoinOption() {
return applyJoinOption;
}
public void setApplyJoinOption(String applyJoinOption) {
this.applyJoinOption = applyJoinOption;
}
public List<Map<String, Object>> getAppDefinedData() {
return appDefinedData;
}
public void setAppDefinedData(List<Map<String, Object>> appDefinedData) {
this.appDefinedData = appDefinedData;
}
public List<MemberProfile> getMemberList() {
return memberList;
}
public void setMemberList(List<MemberProfile> memberList) {
this.memberList = memberList;
}
public List<Map<String, Object>> getAppMemberDefinedData() {
return appMemberDefinedData;
}
public void setAppMemberDefinedData(List<Map<String, Object>> appMemberDefinedData) {
this.appMemberDefinedData = appMemberDefinedData;
}
} }
...@@ -2,9 +2,9 @@ package io.github.doocs.im.model.request; ...@@ -2,9 +2,9 @@ package io.github.doocs.im.model.request;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.github.doocs.im.model.group.AppDefinedDataItem;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @author hyh * @author hyh
...@@ -37,13 +37,13 @@ public class ModifyGroupBaseInfoRequest extends GenericRequest { ...@@ -37,13 +37,13 @@ public class ModifyGroupBaseInfoRequest extends GenericRequest {
private String shutUpAllMember; private String shutUpAllMember;
@JsonProperty("AppDefinedData") @JsonProperty("AppDefinedData")
private List<Map<String, Object>> appDefinedData; private List<AppDefinedDataItem> appDefinedData;
public ModifyGroupBaseInfoRequest(String groupId) { public ModifyGroupBaseInfoRequest(String groupId) {
this.groupId = groupId; this.groupId = groupId;
} }
public ModifyGroupBaseInfoRequest(String groupId, String name, String introduction, String notification, String faceUrl, Integer maxMemberNum, String applyJoinOption, String shutUpAllMember, List<Map<String, Object>> appDefinedData) { public ModifyGroupBaseInfoRequest(String groupId, String name, String introduction, String notification, String faceUrl, Integer maxMemberNum, String applyJoinOption, String shutUpAllMember, List<AppDefinedDataItem> appDefinedData) {
this.groupId = groupId; this.groupId = groupId;
this.name = name; this.name = name;
this.introduction = introduction; this.introduction = introduction;
...@@ -119,11 +119,11 @@ public class ModifyGroupBaseInfoRequest extends GenericRequest { ...@@ -119,11 +119,11 @@ public class ModifyGroupBaseInfoRequest extends GenericRequest {
this.shutUpAllMember = shutUpAllMember; this.shutUpAllMember = shutUpAllMember;
} }
public List<Map<String, Object>> getAppDefinedData() { public List<AppDefinedDataItem> getAppDefinedData() {
return appDefinedData; return appDefinedData;
} }
public void setAppDefinedData(List<Map<String, Object>> appDefinedData) { public void setAppDefinedData(List<AppDefinedDataItem> appDefinedData) {
this.appDefinedData = appDefinedData; this.appDefinedData = appDefinedData;
} }
} }
...@@ -10,18 +10,18 @@ import java.util.List; ...@@ -10,18 +10,18 @@ import java.util.List;
* @since 2021/7/30 17:35 * @since 2021/7/30 17:35
*/ */
@JsonInclude(JsonInclude.Include.NON_NULL) @JsonInclude(JsonInclude.Include.NON_NULL)
public class QueryStateRequest extends GenericRequest { public class QueryOnlineStatus extends GenericRequest {
@JsonProperty("IsNeedDetail") @JsonProperty("IsNeedDetail")
private Integer isNeedDetail; private Integer isNeedDetail;
@JsonProperty("To_Account") @JsonProperty("To_Account")
private List<String> toAccount; private List<String> toAccount;
public QueryStateRequest(List<String> toAccount) { public QueryOnlineStatus(List<String> toAccount) {
this(null, toAccount); this(null, toAccount);
} }
public QueryStateRequest(Integer isNeedDetail, List<String> toAccount) { public QueryOnlineStatus(Integer isNeedDetail, List<String> toAccount) {
this.isNeedDetail = isNeedDetail; this.isNeedDetail = isNeedDetail;
this.toAccount = toAccount; this.toAccount = toAccount;
} }
......
...@@ -11,7 +11,7 @@ public class BatchSendMsgErrorItem { ...@@ -11,7 +11,7 @@ public class BatchSendMsgErrorItem {
private String toAccount; private String toAccount;
@JsonProperty("ErrorCode") @JsonProperty("ErrorCode")
private String errorCode; private Integer errorCode;
public String getToAccount() { public String getToAccount() {
return toAccount; return toAccount;
...@@ -21,11 +21,11 @@ public class BatchSendMsgErrorItem { ...@@ -21,11 +21,11 @@ public class BatchSendMsgErrorItem {
this.toAccount = toAccount; this.toAccount = toAccount;
} }
public String getErrorCode() { public Integer getErrorCode() {
return errorCode; return errorCode;
} }
public void setErrorCode(String errorCode) { public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode; this.errorCode = errorCode;
} }
...@@ -33,7 +33,7 @@ public class BatchSendMsgErrorItem { ...@@ -33,7 +33,7 @@ public class BatchSendMsgErrorItem {
public String toString() { public String toString() {
return "BatchSendMsgErrorItem{" + return "BatchSendMsgErrorItem{" +
"toAccount='" + toAccount + '\'' + "toAccount='" + toAccount + '\'' +
", errorCode='" + errorCode + '\'' + ", errorCode=" + errorCode +
'}'; '}';
} }
} }
...@@ -50,4 +50,14 @@ public class BlackListCheckItem { ...@@ -50,4 +50,14 @@ public class BlackListCheckItem {
public void setResultInfo(String resultInfo) { public void setResultInfo(String resultInfo) {
this.resultInfo = resultInfo; this.resultInfo = resultInfo;
} }
@Override
public String toString() {
return "BlackListCheckItem{" +
"toAccount='" + toAccount + '\'' +
", relation='" + relation + '\'' +
", resultCode=" + resultCode +
", resultInfo='" + resultInfo + '\'' +
'}';
}
} }
...@@ -28,4 +28,12 @@ public class BlackListItem { ...@@ -28,4 +28,12 @@ public class BlackListItem {
public void setAddBlackTimeStamp(Integer addBlackTimeStamp) { public void setAddBlackTimeStamp(Integer addBlackTimeStamp) {
this.addBlackTimeStamp = addBlackTimeStamp; this.addBlackTimeStamp = addBlackTimeStamp;
} }
@Override
public String toString() {
return "BlackListItem{" +
"toAccount='" + toAccount + '\'' +
", addBlackTimeStamp=" + addBlackTimeStamp +
'}';
}
} }
package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author bingo
* @since 2021/10/31 20:21
*/
public class C2cUnreadMsgErrorListItem {
@JsonProperty("Peer_Account")
private String peerAccount;
@JsonProperty("ErrorCode")
private Integer errorCode;
public String getPeerAccount() {
return peerAccount;
}
public void setPeerAccount(String peerAccount) {
this.peerAccount = peerAccount;
}
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
@Override
public String toString() {
return "C2cUnreadMsgErrorListItem{" +
"peerAccount='" + peerAccount + '\'' +
", errorCode=" + errorCode +
'}';
}
}
...@@ -11,7 +11,7 @@ public class C2cUnreadMsgNumListItem { ...@@ -11,7 +11,7 @@ public class C2cUnreadMsgNumListItem {
private String peerAccount; private String peerAccount;
@JsonProperty("C2CUnreadMsgNum") @JsonProperty("C2CUnreadMsgNum")
private String unreadMsgNum; private Integer unreadMsgNum;
public String getPeerAccount() { public String getPeerAccount() {
return peerAccount; return peerAccount;
...@@ -21,11 +21,11 @@ public class C2cUnreadMsgNumListItem { ...@@ -21,11 +21,11 @@ public class C2cUnreadMsgNumListItem {
this.peerAccount = peerAccount; this.peerAccount = peerAccount;
} }
public String getUnreadMsgNum() { public Integer getUnreadMsgNum() {
return unreadMsgNum; return unreadMsgNum;
} }
public void setUnreadMsgNum(String unreadMsgNum) { public void setUnreadMsgNum(Integer unreadMsgNum) {
this.unreadMsgNum = unreadMsgNum; this.unreadMsgNum = unreadMsgNum;
} }
...@@ -33,7 +33,7 @@ public class C2cUnreadMsgNumListItem { ...@@ -33,7 +33,7 @@ public class C2cUnreadMsgNumListItem {
public String toString() { public String toString() {
return "C2cUnreadMsgNumListItem{" + return "C2cUnreadMsgNumListItem{" +
"peerAccount='" + peerAccount + '\'' + "peerAccount='" + peerAccount + '\'' +
", unreadMsgNum='" + unreadMsgNum + '\'' + ", unreadMsgNum=" + unreadMsgNum +
'}'; '}';
} }
} }
...@@ -9,9 +9,23 @@ import java.util.List; ...@@ -9,9 +9,23 @@ import java.util.List;
* @since 2021/07/28 20:34 * @since 2021/07/28 20:34
*/ */
public class C2cUnreadMsgNumResult extends GenericResult { public class C2cUnreadMsgNumResult extends GenericResult {
@JsonProperty("AllC2CUnreadMsgNum")
private Integer allC2cUnreadMsgNum;
@JsonProperty("C2CUnreadMsgNumList") @JsonProperty("C2CUnreadMsgNumList")
private List<C2cUnreadMsgNumListItem> unreadMsgNumList; private List<C2cUnreadMsgNumListItem> unreadMsgNumList;
@JsonProperty("ErrorList")
private List<C2cUnreadMsgErrorListItem> errorList;
public Integer getAllC2cUnreadMsgNum() {
return allC2cUnreadMsgNum;
}
public void setAllC2cUnreadMsgNum(Integer allC2cUnreadMsgNum) {
this.allC2cUnreadMsgNum = allC2cUnreadMsgNum;
}
public List<C2cUnreadMsgNumListItem> getUnreadMsgNumList() { public List<C2cUnreadMsgNumListItem> getUnreadMsgNumList() {
return unreadMsgNumList; return unreadMsgNumList;
} }
...@@ -20,10 +34,20 @@ public class C2cUnreadMsgNumResult extends GenericResult { ...@@ -20,10 +34,20 @@ public class C2cUnreadMsgNumResult extends GenericResult {
this.unreadMsgNumList = unreadMsgNumList; this.unreadMsgNumList = unreadMsgNumList;
} }
public List<C2cUnreadMsgErrorListItem> getErrorList() {
return errorList;
}
public void setErrorList(List<C2cUnreadMsgErrorListItem> errorList) {
this.errorList = errorList;
}
@Override @Override
public String toString() { public String toString() {
return "C2cUnreadMsgNumResult{" + return "C2cUnreadMsgNumResult{" +
"unreadMsgNumList=" + unreadMsgNumList + "allC2cUnreadMsgNum=" + allC2cUnreadMsgNum +
", unreadMsgNumList=" + unreadMsgNumList +
", errorList=" + errorList +
'}'; '}';
} }
} }
...@@ -14,13 +14,13 @@ public class FileResultItem { ...@@ -14,13 +14,13 @@ public class FileResultItem {
private String expireTime; private String expireTime;
@JsonProperty("FileSize") @JsonProperty("FileSize")
private String fileSize; private Integer fileSize;
@JsonProperty("FileMD5") @JsonProperty("FileMD5")
private String fileMd5; private String fileMd5;
@JsonProperty("GzipSize") @JsonProperty("GzipSize")
private String gzipSize; private Integer gzipSize;
@JsonProperty("GzipMD5") @JsonProperty("GzipMD5")
private String gzipMd5; private String gzipMd5;
...@@ -41,11 +41,11 @@ public class FileResultItem { ...@@ -41,11 +41,11 @@ public class FileResultItem {
this.expireTime = expireTime; this.expireTime = expireTime;
} }
public String getFileSize() { public Integer getFileSize() {
return fileSize; return fileSize;
} }
public void setFileSize(String fileSize) { public void setFileSize(Integer fileSize) {
this.fileSize = fileSize; this.fileSize = fileSize;
} }
...@@ -57,11 +57,11 @@ public class FileResultItem { ...@@ -57,11 +57,11 @@ public class FileResultItem {
this.fileMd5 = fileMd5; this.fileMd5 = fileMd5;
} }
public String getGzipSize() { public Integer getGzipSize() {
return gzipSize; return gzipSize;
} }
public void setGzipSize(String gzipSize) { public void setGzipSize(Integer gzipSize) {
this.gzipSize = gzipSize; this.gzipSize = gzipSize;
} }
......
...@@ -12,9 +12,6 @@ public class FriendAddResult extends GenericResult { ...@@ -12,9 +12,6 @@ public class FriendAddResult extends GenericResult {
@JsonProperty("ResultItem") @JsonProperty("ResultItem")
private List<ResultItem> resultItemList; private List<ResultItem> resultItemList;
@JsonProperty("ActionStatus")
private String actionStatus;
@JsonProperty("ErrorDisplay") @JsonProperty("ErrorDisplay")
private String errorDisplay; private String errorDisplay;
...@@ -26,16 +23,6 @@ public class FriendAddResult extends GenericResult { ...@@ -26,16 +23,6 @@ public class FriendAddResult extends GenericResult {
this.resultItemList = resultItemList; this.resultItemList = resultItemList;
} }
@Override
public String getActionStatus() {
return actionStatus;
}
@Override
public void setActionStatus(String actionStatus) {
this.actionStatus = actionStatus;
}
public String getErrorDisplay() { public String getErrorDisplay() {
return errorDisplay; return errorDisplay;
} }
...@@ -48,7 +35,6 @@ public class FriendAddResult extends GenericResult { ...@@ -48,7 +35,6 @@ public class FriendAddResult extends GenericResult {
public String toString() { public String toString() {
return "FriendAddResult{" + return "FriendAddResult{" +
"resultItemList=" + resultItemList + "resultItemList=" + resultItemList +
", actionStatus='" + actionStatus + '\'' +
", errorDisplay='" + errorDisplay + '\'' + ", errorDisplay='" + errorDisplay + '\'' +
'}'; '}';
} }
......
...@@ -30,4 +30,12 @@ public class FriendDeleteResult extends GenericResult { ...@@ -30,4 +30,12 @@ public class FriendDeleteResult extends GenericResult {
public void setResultItemList(List<ResultItem> resultItemList) { public void setResultItemList(List<ResultItem> resultItemList) {
this.resultItemList = resultItemList; this.resultItemList = resultItemList;
} }
@Override
public String toString() {
return "FriendDeleteResult{" +
"errorDisplay='" + errorDisplay + '\'' +
", resultItemList=" + resultItemList +
'}';
}
} }
...@@ -15,6 +15,9 @@ public class FriendGetListResult extends GroupGetResult { ...@@ -15,6 +15,9 @@ public class FriendGetListResult extends GroupGetResult {
@JsonProperty("Fail_Account") @JsonProperty("Fail_Account")
private List<String> failAccount; private List<String> failAccount;
@JsonProperty("ErrorDisplay")
private String errorDisplay;
public List<FriendGetListInfoItem> getInfoItemList() { public List<FriendGetListInfoItem> getInfoItemList() {
return infoItemList; return infoItemList;
} }
...@@ -32,10 +35,21 @@ public class FriendGetListResult extends GroupGetResult { ...@@ -32,10 +35,21 @@ public class FriendGetListResult extends GroupGetResult {
} }
@Override @Override
public String getErrorDisplay() {
return errorDisplay;
}
@Override
public void setErrorDisplay(String errorDisplay) {
this.errorDisplay = errorDisplay;
}
@Override
public String toString() { public String toString() {
return "FriendGetListResult{" + return "FriendGetListResult{" +
"infoItemList=" + infoItemList + "infoItemList=" + infoItemList +
", failAccount=" + failAccount + ", failAccount=" + failAccount +
", errorDisplay='" + errorDisplay + '\'' +
'}'; '}';
} }
} }
...@@ -28,7 +28,7 @@ public class FriendGetResult extends GenericResult { ...@@ -28,7 +28,7 @@ public class FriendGetResult extends GenericResult {
private Integer nextStartIndex; private Integer nextStartIndex;
@JsonProperty("ErrorDisplay") @JsonProperty("ErrorDisplay")
private Integer errorDisplay; private String errorDisplay;
public List<UserDataItem> getUserDataItemList() { public List<UserDataItem> getUserDataItemList() {
return userDataItemList; return userDataItemList;
...@@ -78,11 +78,24 @@ public class FriendGetResult extends GenericResult { ...@@ -78,11 +78,24 @@ public class FriendGetResult extends GenericResult {
this.nextStartIndex = nextStartIndex; this.nextStartIndex = nextStartIndex;
} }
public Integer getErrorDisplay() { public String getErrorDisplay() {
return errorDisplay; return errorDisplay;
} }
public void setErrorDisplay(Integer errorDisplay) { public void setErrorDisplay(String errorDisplay) {
this.errorDisplay = errorDisplay; this.errorDisplay = errorDisplay;
} }
@Override
public String toString() {
return "FriendGetResult{" +
"userDataItemList=" + userDataItemList +
", standardSequence=" + standardSequence +
", customSequence=" + customSequence +
", friendNum=" + friendNum +
", completeFlag=" + completeFlag +
", nextStartIndex=" + nextStartIndex +
", errorDisplay='" + errorDisplay + '\'' +
'}';
}
} }
...@@ -15,6 +15,9 @@ public class FriendImportResult extends GenericResult { ...@@ -15,6 +15,9 @@ public class FriendImportResult extends GenericResult {
@JsonProperty("ErrorDisplay") @JsonProperty("ErrorDisplay")
private String errorDisplay; private String errorDisplay;
@JsonProperty("Fail_Account")
private List<String> failAccount;
public List<ResultItem> getResultItemList() { public List<ResultItem> getResultItemList() {
return resultItemList; return resultItemList;
} }
...@@ -31,11 +34,20 @@ public class FriendImportResult extends GenericResult { ...@@ -31,11 +34,20 @@ public class FriendImportResult extends GenericResult {
this.errorDisplay = errorDisplay; this.errorDisplay = errorDisplay;
} }
public List<String> getFailAccount() {
return failAccount;
}
public void setFailAccount(List<String> failAccount) {
this.failAccount = failAccount;
}
@Override @Override
public String toString() { public String toString() {
return "FriendImportResult{" + return "FriendImportResult{" +
"resultItemList=" + resultItemList + "resultItemList=" + resultItemList +
", errorDisplay='" + errorDisplay + '\'' + ", errorDisplay='" + errorDisplay + '\'' +
", failAccount=" + failAccount +
'}'; '}';
} }
} }
...@@ -41,4 +41,13 @@ public class FriendUpdateResult extends GenericResult { ...@@ -41,4 +41,13 @@ public class FriendUpdateResult extends GenericResult {
public void setFailAccount(List<String> failAccount) { public void setFailAccount(List<String> failAccount) {
this.failAccount = failAccount; this.failAccount = failAccount;
} }
@Override
public String toString() {
return "FriendUpdateResult{" +
"resultItemList=" + resultItemList +
", errorDisplay='" + errorDisplay + '\'' +
", failAccount=" + failAccount +
'}';
}
} }
...@@ -15,6 +15,9 @@ public class GetAppidGroupListResult extends GenericResult { ...@@ -15,6 +15,9 @@ public class GetAppidGroupListResult extends GenericResult {
@JsonProperty("GroupIdList") @JsonProperty("GroupIdList")
private List<GroupIdItem> groupIdList; private List<GroupIdItem> groupIdList;
@JsonProperty("Next")
private Integer next;
public Integer getTotalCount() { public Integer getTotalCount() {
return totalCount; return totalCount;
} }
...@@ -31,11 +34,20 @@ public class GetAppidGroupListResult extends GenericResult { ...@@ -31,11 +34,20 @@ public class GetAppidGroupListResult extends GenericResult {
this.groupIdList = groupIdList; this.groupIdList = groupIdList;
} }
public Integer getNext() {
return next;
}
public void setNext(Integer next) {
this.next = next;
}
@Override @Override
public String toString() { public String toString() {
return "GetAppidGroupListResult{" + return "GetAppidGroupListResult{" +
"totalCount=" + totalCount + "totalCount=" + totalCount +
", groupIdList=" + groupIdList + ", groupIdList=" + groupIdList +
", next=" + next +
'}'; '}';
} }
} }
package io.github.doocs.im.model.response; package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.github.doocs.im.model.group.GroupInfo;
import java.util.List; import java.util.List;
...@@ -10,13 +11,13 @@ import java.util.List; ...@@ -10,13 +11,13 @@ import java.util.List;
*/ */
public class GetGroupInfoResult extends GenericResult { public class GetGroupInfoResult extends GenericResult {
@JsonProperty("GroupInfo") @JsonProperty("GroupInfo")
private List<GroupInfoResultItem> groupInfo; private List<GroupInfo> groupInfo;
public List<GroupInfoResultItem> getGroupInfo() { public List<GroupInfo> getGroupInfo() {
return groupInfo; return groupInfo;
} }
public void setGroupInfo(List<GroupInfoResultItem> groupInfo) { public void setGroupInfo(List<GroupInfo> groupInfo) {
this.groupInfo = groupInfo; this.groupInfo = groupInfo;
} }
......
package io.github.doocs.im.model.response; package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import io.github.doocs.im.model.group.MemberProfile;
import java.util.List; import java.util.List;
...@@ -13,7 +14,7 @@ public class GetGroupMemberInfoResult extends GenericResult { ...@@ -13,7 +14,7 @@ public class GetGroupMemberInfoResult extends GenericResult {
private Integer memberNum; private Integer memberNum;
@JsonProperty("MemberList") @JsonProperty("MemberList")
private List<MemberInfoItem> memberList; private List<MemberProfile> memberList;
public Integer getMemberNum() { public Integer getMemberNum() {
return memberNum; return memberNum;
...@@ -23,11 +24,11 @@ public class GetGroupMemberInfoResult extends GenericResult { ...@@ -23,11 +24,11 @@ public class GetGroupMemberInfoResult extends GenericResult {
this.memberNum = memberNum; this.memberNum = memberNum;
} }
public List<MemberInfoItem> getMemberList() { public List<MemberProfile> getMemberList() {
return memberList; return memberList;
} }
public void setMemberList(List<MemberInfoItem> memberList) { public void setMemberList(List<MemberProfile> memberList) {
this.memberList = memberList; this.memberList = memberList;
} }
......
...@@ -8,32 +8,10 @@ import java.util.List; ...@@ -8,32 +8,10 @@ import java.util.List;
* @author bingo * @author bingo
* @since 2021/7/31 20:31 * @since 2021/7/31 20:31
*/ */
public class GetIpListResult { public class GetIpListResult extends GenericResult {
@JsonProperty("ErrorCode")
private Integer errorCode;
@JsonProperty("errorInfo")
private String errorInfo;
@JsonProperty("IPList") @JsonProperty("IPList")
private List<String> ipList; private List<String> ipList;
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
public String getErrorInfo() {
return errorInfo;
}
public void setErrorInfo(String errorInfo) {
this.errorInfo = errorInfo;
}
public List<String> getIpList() { public List<String> getIpList() {
return ipList; return ipList;
} }
...@@ -45,9 +23,7 @@ public class GetIpListResult { ...@@ -45,9 +23,7 @@ public class GetIpListResult {
@Override @Override
public String toString() { public String toString() {
return "GetIpListResult{" + return "GetIpListResult{" +
"errorCode=" + errorCode + "ipList=" + ipList +
", errorInfo='" + errorInfo + '\'' +
", ipList=" + ipList +
'}'; '}';
} }
} }
...@@ -13,7 +13,7 @@ public class GetJoinGroupListResult extends GenericResult { ...@@ -13,7 +13,7 @@ public class GetJoinGroupListResult extends GenericResult {
private Integer totalCount; private Integer totalCount;
@JsonProperty("GroupIdList") @JsonProperty("GroupIdList")
private List<GroupIdListIResultItem> groupIdList; private List<GroupIdListResultItem> groupIdList;
@Override @Override
public String toString() { public String toString() {
......
...@@ -6,19 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; ...@@ -6,19 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @author xy * @author xy
* @since 2021/07/31 11:51:01 * @since 2021/07/31 11:51:01
*/ */
public class GetNoSpeakingResult { public class GetNoSpeakingResult extends GenericResult {
/**
* 失败原因
*/
@JsonProperty("ErrorInfo")
private String errorInfo;
/**
* 错误码,0为成功,其他为失败,错误码表:https://cloud.tencent.com/document/product/269/1671
*/
@JsonProperty("ErrorCode")
private Integer errorCode;
/** /**
* 单聊消息禁言时长,单位为秒 * 单聊消息禁言时长,单位为秒
*/ */
...@@ -32,22 +20,6 @@ public class GetNoSpeakingResult { ...@@ -32,22 +20,6 @@ public class GetNoSpeakingResult {
private Long groupMsgNoSpeakingTime; private Long groupMsgNoSpeakingTime;
public String getErrorInfo() {
return errorInfo;
}
public void setErrorInfo(String errorInfo) {
this.errorInfo = errorInfo;
}
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
public Long getC2CMsgNoSpeakingTime() { public Long getC2CMsgNoSpeakingTime() {
return c2CMsgNoSpeakingTime; return c2CMsgNoSpeakingTime;
} }
...@@ -66,16 +38,9 @@ public class GetNoSpeakingResult { ...@@ -66,16 +38,9 @@ public class GetNoSpeakingResult {
@Override @Override
public String toString() { public String toString() {
return "GetNoSpeakingResult{" return "GetNoSpeakingResult{" +
+ "errorInfo='" "c2CMsgNoSpeakingTime=" + c2CMsgNoSpeakingTime +
+ errorInfo ", groupMsgNoSpeakingTime=" + groupMsgNoSpeakingTime +
+ '\'' '}';
+ ", errorCode="
+ errorCode
+ ", c2CMsgNoSpeakingTime="
+ c2CMsgNoSpeakingTime
+ ", groupMsgNoSpeakingTime="
+ groupMsgNoSpeakingTime
+ '}';
} }
} }
...@@ -2,6 +2,8 @@ package io.github.doocs.im.model.response; ...@@ -2,6 +2,8 @@ package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** /**
* @author hyh * @author hyh
* @since 2021/07/30 17:43 * @since 2021/07/30 17:43
...@@ -13,6 +15,9 @@ public class GroupGetResultItem { ...@@ -13,6 +15,9 @@ public class GroupGetResultItem {
@JsonProperty("FriendNumber") @JsonProperty("FriendNumber")
private Integer friendNumber; private Integer friendNumber;
@JsonProperty("To_Account")
private List<String> toAccount;
public String getGroupName() { public String getGroupName() {
return groupName; return groupName;
} }
...@@ -28,4 +33,21 @@ public class GroupGetResultItem { ...@@ -28,4 +33,21 @@ public class GroupGetResultItem {
public void setFriendNumber(Integer friendNumber) { public void setFriendNumber(Integer friendNumber) {
this.friendNumber = friendNumber; this.friendNumber = friendNumber;
} }
public List<String> getToAccount() {
return toAccount;
}
public void setToAccount(List<String> toAccount) {
this.toAccount = toAccount;
}
@Override
public String toString() {
return "GroupGetResultItem{" +
"groupName='" + groupName + '\'' +
", friendNumber=" + friendNumber +
", toAccount=" + toAccount +
'}';
}
} }
package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author bingo
* @since 2021/8/4 10:48
*/
public class GroupIdListIResultItem {
@JsonProperty("GroupId")
private String groupId;
@JsonProperty("Type")
private String type;
@JsonProperty("Name")
private String name;
@JsonProperty("Introduction")
private String introduction;
@JsonProperty("Notification")
private String notification;
@JsonProperty("FaceUrl")
private String faceUrl;
@JsonProperty("Owner_Account")
private String ownerAccount;
@JsonProperty("CreateTime")
private Integer createTime;
@JsonProperty("InfoSeq")
private Integer infoSeq;
@JsonProperty("LastInfoTime")
private Integer lastInfoTime;
@JsonProperty("LastMsgTime")
private Integer lastMsgTime;
@JsonProperty("NextMsgSeq")
private Integer nextMsgSeq;
@JsonProperty("MemberNum")
private Integer memberNum;
@JsonProperty("MaxMemberNum")
private Integer maxMemberNum;
@JsonProperty("ApplyJoinOption")
private String applyJoinOption;
@Override
public String toString() {
return "GroupIdListIResultItem{" +
"groupId='" + groupId + '\'' +
", type='" + type + '\'' +
", name='" + name + '\'' +
", introduction='" + introduction + '\'' +
", notification='" + notification + '\'' +
", faceUrl='" + faceUrl + '\'' +
", ownerAccount='" + ownerAccount + '\'' +
", createTime=" + createTime +
", infoSeq=" + infoSeq +
", lastInfoTime=" + lastInfoTime +
", lastMsgTime=" + lastMsgTime +
", nextMsgSeq=" + nextMsgSeq +
", memberNum=" + memberNum +
", maxMemberNum=" + maxMemberNum +
", applyJoinOption='" + applyJoinOption + '\'' +
'}';
}
}
...@@ -3,13 +3,10 @@ package io.github.doocs.im.model.response; ...@@ -3,13 +3,10 @@ package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* 群基础资料
* https://cloud.tencent.com/document/product/269/1502#.E7.BE.A4.E7.BB.84.E6.95.B0.E6.8D.AE.E7.BB.93.E6.9E.84.E4.BB.8B.E7.BB.8D
*
* @author bingo * @author bingo
* @since 2021/8/1 11:39 * @since 2021/8/4 10:48
*/ */
public class GroupInfoResultItem { public class GroupIdListResultItem {
@JsonProperty("GroupId") @JsonProperty("GroupId")
private String groupId; private String groupId;
...@@ -177,7 +174,7 @@ public class GroupInfoResultItem { ...@@ -177,7 +174,7 @@ public class GroupInfoResultItem {
@Override @Override
public String toString() { public String toString() {
return "GroupInfoResultItem{" + return "GroupIdListIResultItem{" +
"groupId='" + groupId + '\'' + "groupId='" + groupId + '\'' +
", type='" + type + '\'' + ", type='" + type + '\'' +
", name='" + name + '\'' + ", name='" + name + '\'' +
......
...@@ -12,6 +12,14 @@ public class GroupMsgRecallResult extends GenericResult { ...@@ -12,6 +12,14 @@ public class GroupMsgRecallResult extends GenericResult {
@JsonProperty("RecallRetList") @JsonProperty("RecallRetList")
private List<RecallRetItem> recallRetList; private List<RecallRetItem> recallRetList;
public List<RecallRetItem> getRecallRetList() {
return recallRetList;
}
public void setRecallRetList(List<RecallRetItem> recallRetList) {
this.recallRetList = recallRetList;
}
@Override @Override
public String toString() { public String toString() {
return "GroupMsgRecallResult{" + return "GroupMsgRecallResult{" +
......
...@@ -12,6 +12,14 @@ public class ImportGroupMemberResult extends GenericResult { ...@@ -12,6 +12,14 @@ public class ImportGroupMemberResult extends GenericResult {
@JsonProperty("MemberList") @JsonProperty("MemberList")
private List<MemberListResultItem> memberList; private List<MemberListResultItem> memberList;
public List<MemberListResultItem> getMemberList() {
return memberList;
}
public void setMemberList(List<MemberListResultItem> memberList) {
this.memberList = memberList;
}
@Override @Override
public String toString() { public String toString() {
return "ImportGroupMemberResult{" + return "ImportGroupMemberResult{" +
......
...@@ -12,6 +12,14 @@ public class ImportGroupMsgResult extends GenericResult { ...@@ -12,6 +12,14 @@ public class ImportGroupMsgResult extends GenericResult {
@JsonProperty("ImportMsgResult") @JsonProperty("ImportMsgResult")
private List<ImportMsgResultItem> importMsgResult; private List<ImportMsgResultItem> importMsgResult;
public List<ImportMsgResultItem> getImportMsgResult() {
return importMsgResult;
}
public void setImportMsgResult(List<ImportMsgResultItem> importMsgResult) {
this.importMsgResult = importMsgResult;
}
@Override @Override
public String toString() { public String toString() {
return "ImportGroupMsgResult{" + return "ImportGroupMsgResult{" +
......
...@@ -16,6 +16,30 @@ public class ImportMsgResultItem { ...@@ -16,6 +16,30 @@ public class ImportMsgResultItem {
@JsonProperty("Result") @JsonProperty("Result")
private Integer result; private Integer result;
public Integer getMsgSeq() {
return msgSeq;
}
public void setMsgSeq(Integer msgSeq) {
this.msgSeq = msgSeq;
}
public Integer getMsgTime() {
return msgTime;
}
public void setMsgTime(Integer msgTime) {
this.msgTime = msgTime;
}
public Integer getResult() {
return result;
}
public void setResult(Integer result) {
this.result = result;
}
@Override @Override
public String toString() { public String toString() {
return "ImportMsgResultItem{" + return "ImportMsgResultItem{" +
......
package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
import java.util.Map;
/**
* @author hyh
* @since 2021/08/02 19:22
*/
public class MemberInfoItem {
@JsonProperty("Member_Account")
private String memberAccount;
@JsonProperty("Role")
private String role;
@JsonProperty("JoinTime")
private Integer joinTime;
@JsonProperty("MsgSeq")
private Integer msgSeq;
@JsonProperty("MsgFlag")
private String msgFlag;
@JsonProperty("LastSendMsgTime")
private Integer lastSendMsgTime;
@JsonProperty("ShutUpUntil")
private Integer shutUpUntil;
@JsonProperty("AppMemberDefinedData")
private List<Map<String, Object>> appMemberDefinedData;
public String getMemberAccount() {
return memberAccount;
}
public void setMemberAccount(String memberAccount) {
this.memberAccount = memberAccount;
}
public String getRole() {
return role;
}
public void setRole(String role) {
this.role = role;
}
public Integer getJoinTime() {
return joinTime;
}
public void setJoinTime(Integer joinTime) {
this.joinTime = joinTime;
}
public Integer getMsgSeq() {
return msgSeq;
}
public void setMsgSeq(Integer msgSeq) {
this.msgSeq = msgSeq;
}
public String getMsgFlag() {
return msgFlag;
}
public void setMsgFlag(String msgFlag) {
this.msgFlag = msgFlag;
}
public Integer getLastSendMsgTime() {
return lastSendMsgTime;
}
public void setLastSendMsgTime(Integer lastSendMsgTime) {
this.lastSendMsgTime = lastSendMsgTime;
}
public Integer getShutUpUntil() {
return shutUpUntil;
}
public void setShutUpUntil(Integer shutUpUntil) {
this.shutUpUntil = shutUpUntil;
}
public List<Map<String, Object>> getAppMemberDefinedData() {
return appMemberDefinedData;
}
public void setAppMemberDefinedData(List<Map<String, Object>> appMemberDefinedData) {
this.appMemberDefinedData = appMemberDefinedData;
}
@Override
public String toString() {
return "MemberInfoItem{" +
"memberAccount='" + memberAccount + '\'' +
", role='" + role + '\'' +
", joinTime=" + joinTime +
", msgSeq=" + msgSeq +
", msgFlag='" + msgFlag + '\'' +
", lastSendMsgTime=" + lastSendMsgTime +
", shutUpUntil=" + shutUpUntil +
", appMemberDefinedData=" + appMemberDefinedData +
'}';
}
}
...@@ -13,6 +13,22 @@ public class MemberListResultItem { ...@@ -13,6 +13,22 @@ public class MemberListResultItem {
@JsonProperty("Result") @JsonProperty("Result")
private Integer result; private Integer result;
public String getMemberAccount() {
return memberAccount;
}
public void setMemberAccount(String memberAccount) {
this.memberAccount = memberAccount;
}
public Integer getResult() {
return result;
}
public void setResult(Integer result) {
this.result = result;
}
@Override @Override
public String toString() { public String toString() {
return "MemberListResultItem{" + return "MemberListResultItem{" +
......
...@@ -123,4 +123,19 @@ public class MsgListItem { ...@@ -123,4 +123,19 @@ public class MsgListItem {
public void setCloudCustomData(String cloudCustomData) { public void setCloudCustomData(String cloudCustomData) {
this.cloudCustomData = cloudCustomData; this.cloudCustomData = cloudCustomData;
} }
@Override
public String toString() {
return "MsgListItem{" +
"fromAccount='" + fromAccount + '\'' +
", toAccount='" + toAccount + '\'' +
", msgSeq=" + msgSeq +
", msgRandom=" + msgRandom +
", msgTimeStamp=" + msgTimeStamp +
", msgFlagBits=" + msgFlagBits +
", msgKey='" + msgKey + '\'' +
", msgBody=" + msgBody +
", cloudCustomData='" + cloudCustomData + '\'' +
'}';
}
} }
package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* @author bingo
* @since 2021/7/28 11:07
*/
public class QueryOnlineStatusResult extends GenericResult {
@JsonProperty("QueryResult")
private List<QueryResultItem> queryResult;
@JsonProperty("ErrorList")
private List<QueryResultErrorItem> errorList;
public List<QueryResultItem> getQueryResult() {
return queryResult;
}
public void setQueryResult(List<QueryResultItem> queryResult) {
this.queryResult = queryResult;
}
public List<QueryResultErrorItem> getErrorList() {
return errorList;
}
public void setErrorList(List<QueryResultErrorItem> errorList) {
this.errorList = errorList;
}
@Override
public String toString() {
return "QueryOnlineStatusResult{" +
"queryResult=" + queryResult +
", errorList=" + errorList +
'}';
}
}
package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
/**
* @author bingo
* @since 2021/10/31 19:57
*/
public class QueryResultDetailItem {
@JsonProperty("Platform")
private String platform;
@JsonProperty("Status")
private String status;
public String getPlatform() {
return platform;
}
public void setPlatform(String platform) {
this.platform = platform;
}
public String getStatus() {
return status;
}
public void setStatus(String status) {
this.status = status;
}
@Override
public String toString() {
return "QueryResultDetailItem{" +
"platform='" + platform + '\'' +
", status='" + status + '\'' +
'}';
}
}
...@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty; ...@@ -6,7 +6,7 @@ import com.fasterxml.jackson.annotation.JsonProperty;
* @author bingo * @author bingo
* @since 2021/7/28 11:11 * @since 2021/7/28 11:11
*/ */
public class QueryStateErrorItem { public class QueryResultErrorItem {
@JsonProperty("To_Account") @JsonProperty("To_Account")
private String toAccount; private String toAccount;
...@@ -31,7 +31,7 @@ public class QueryStateErrorItem { ...@@ -31,7 +31,7 @@ public class QueryStateErrorItem {
@Override @Override
public String toString() { public String toString() {
return "QueryStateErrorItem{" + return "QueryResultErrorItem{" +
"toAccount='" + toAccount + '\'' + "toAccount='" + toAccount + '\'' +
", errorCode=" + errorCode + ", errorCode=" + errorCode +
'}'; '}';
......
...@@ -2,17 +2,22 @@ package io.github.doocs.im.model.response; ...@@ -2,17 +2,22 @@ package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/** /**
* @author bingo * @author bingo
* @since 2021/7/28 11:10 * @since 2021/7/28 11:10
*/ */
public class QueryStateResultItem { public class QueryResultItem {
@JsonProperty("To_Account") @JsonProperty("To_Account")
private String toAccount; private String toAccount;
@JsonProperty("Status") @JsonProperty("Status")
private String status; private String status;
@JsonProperty("Detail")
private List<QueryResultDetailItem> detail;
public String getToAccount() { public String getToAccount() {
return toAccount; return toAccount;
} }
...@@ -29,11 +34,20 @@ public class QueryStateResultItem { ...@@ -29,11 +34,20 @@ public class QueryStateResultItem {
this.status = status; this.status = status;
} }
public List<QueryResultDetailItem> getDetail() {
return detail;
}
public void setDetail(List<QueryResultDetailItem> detail) {
this.detail = detail;
}
@Override @Override
public String toString() { public String toString() {
return "QueryStateResultItem{" + return "QueryResultItem{" +
"toAccount='" + toAccount + '\'' + "toAccount='" + toAccount + '\'' +
", status='" + status + '\'' + ", status='" + status + '\'' +
", detail=" + detail +
'}'; '}';
} }
} }
package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.List;
/**
* @author bingo
* @since 2021/7/28 11:07
*/
public class QueryStateResult extends GenericResult {
@JsonProperty("QueryStateResult")
private List<QueryStateResultItem> queryStateResult;
@JsonProperty("QueryStateErrorList")
private List<QueryStateErrorItem> queryStateErrorList;
public List<QueryStateResultItem> getQueryStateResult() {
return queryStateResult;
}
public void setQueryStateResult(List<QueryStateResultItem> queryStateResult) {
this.queryStateResult = queryStateResult;
}
public List<QueryStateErrorItem> getQueryStateErrorList() {
return queryStateErrorList;
}
public void setQueryStateErrorList(List<QueryStateErrorItem> queryStateErrorList) {
this.queryStateErrorList = queryStateErrorList;
}
@Override
public String toString() {
return "QueryStateResult{" +
"queryStateResult=" + queryStateResult +
", queryStateErrorList=" + queryStateErrorList +
'}';
}
}
...@@ -17,7 +17,7 @@ public class RecentContactSessionItem { ...@@ -17,7 +17,7 @@ public class RecentContactSessionItem {
private String groupId; private String groupId;
@JsonProperty("MsgTime") @JsonProperty("MsgTime")
private String msgTime; private Integer msgTime;
@JsonProperty("TopFlag") @JsonProperty("TopFlag")
private Integer topFlag; private Integer topFlag;
...@@ -46,11 +46,11 @@ public class RecentContactSessionItem { ...@@ -46,11 +46,11 @@ public class RecentContactSessionItem {
this.groupId = groupId; this.groupId = groupId;
} }
public String getMsgTime() { public Integer getMsgTime() {
return msgTime; return msgTime;
} }
public void setMsgTime(String msgTime) { public void setMsgTime(Integer msgTime) {
this.msgTime = msgTime; this.msgTime = msgTime;
} }
......
package io.github.doocs.im.model.response; package io.github.doocs.im.model.response;
import com.fasterxml.jackson.annotation.JsonProperty;
/** /**
* @author xy * @author xy
* @since 2021/07/31 11:51:01 * @since 2021/07/31 11:51:01
*/ */
public class SetNoSpeakingResult { public class SetNoSpeakingResult extends GenericResult {
/**
* 失败原因
*/
@JsonProperty("ErrorInfo")
private String errorInfo;
/**
* 错误码,0为成功,其他为失败,错误码表:https://cloud.tencent.com/document/product/269/1671
*/
@JsonProperty("ErrorCode")
private Integer errorCode;
public String getErrorInfo() {
return errorInfo;
}
public void setErrorInfo(String errorInfo) {
this.errorInfo = errorInfo;
}
public Integer getErrorCode() {
return errorCode;
}
public void setErrorCode(Integer errorCode) {
this.errorCode = errorCode;
}
@Override
public String toString() {
return "SetNoSpeakingResult{" +
"errorInfo='" + errorInfo + '\'' +
", errorCode=" + errorCode +
'}';
}
} }
...@@ -85,9 +85,9 @@ public class AccountTest { ...@@ -85,9 +85,9 @@ public class AccountTest {
@Test @Test
public void testQueryState() throws IOException { public void testQueryState() throws IOException {
List<String> toAccount = Collections.singletonList("bingo"); List<String> toAccount = Collections.singletonList("bingo");
QueryStateRequest request = new QueryStateRequest(toAccount); QueryOnlineStatus request = new QueryOnlineStatus(toAccount);
request.setIsNeedDetail(IsNeedDetail.YES); request.setIsNeedDetail(IsNeedDetail.YES);
QueryStateResult result = client.account.queryState(request); QueryOnlineStatusResult result = client.account.queryOnlineStatus(request);
System.out.println(result); System.out.println(result);
Assert.assertEquals("OK", result.getActionStatus()); Assert.assertEquals("OK", result.getActionStatus());
} }
......
...@@ -50,7 +50,9 @@ public class GroupTest { ...@@ -50,7 +50,9 @@ public class GroupTest {
@Test @Test
public void testCreateGroup() throws IOException { public void testCreateGroup() throws IOException {
CreateGroupRequest request = new CreateGroupRequest(GroupType.PUBLIC, "TestGroup"); CreateGroupRequest request = new CreateGroupRequest();
request.setType(GroupType.PUBLIC);
request.setName("TestGroup");
request.setOwnerAccount("bingo"); request.setOwnerAccount("bingo");
request.setGroupId("MyFirstGroup"); request.setGroupId("MyFirstGroup");
request.setIntroduction("This is group Introduction"); request.setIntroduction("This is group Introduction");
......
...@@ -99,7 +99,7 @@ public class MessageTest { ...@@ -99,7 +99,7 @@ public class MessageTest {
public void testGetC2CUnreadMsgNum() throws IOException { public void testGetC2CUnreadMsgNum() throws IOException {
GetC2cUnreadMsgRequest request = new GetC2cUnreadMsgRequest("test2"); GetC2cUnreadMsgRequest request = new GetC2cUnreadMsgRequest("test2");
request.setPeerAccount(Arrays.asList("test1", "bingo")); request.setPeerAccount(Arrays.asList("test1", "bingo"));
C2cUnreadMsgNumResult result = client.message.getC2cUnreadMsgRequest(request); C2cUnreadMsgNumResult result = client.message.getC2cUnreadMsgNum(request);
System.out.println(result); System.out.println(result);
Assert.assertEquals("OK", result.getActionStatus()); Assert.assertEquals("OK", result.getActionStatus());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment