Files
IM-server-new/common/src/main/java/cn/wildfirechat/pojos/OutputGetChannelInfo.java
T

133 lines
2.9 KiB
Java
Raw Normal View History

2020-01-06 14:53:54 +08:00
/*
* This file is part of the Wildfire Chat package.
* (c) Heavyrain2012 <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
package cn.wildfirechat.pojos;
import cn.wildfirechat.proto.WFCMessage;
public class OutputGetChannelInfo {
private String channelId;
private String name;
private String desc;
private String portrait;
private String extra;
private String owner;
2021-11-30 20:12:41 +08:00
private int state;
2021-12-06 09:07:35 +08:00
//此字段已经废弃,为了兼容旧的SDK版本,以后会移除
private int status;
2020-01-06 14:53:54 +08:00
private long updateDt;
private String callback;
private int automatic;
public String getChannelId() {
return channelId;
}
public void setChannelId(String channelId) {
this.channelId = channelId;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getDesc() {
return desc;
}
public void setDesc(String desc) {
this.desc = desc;
}
public String getPortrait() {
return portrait;
}
public void setPortrait(String portrait) {
this.portrait = portrait;
}
public String getExtra() {
return extra;
}
public void setExtra(String extra) {
this.extra = extra;
}
public String getOwner() {
return owner;
}
public void setOwner(String owner) {
this.owner = owner;
}
2021-11-30 20:12:41 +08:00
public int getState() {
return state;
2020-01-06 14:53:54 +08:00
}
2021-11-30 20:12:41 +08:00
public void setState(int state) {
this.state = state;
2020-01-06 14:53:54 +08:00
}
public long getUpdateDt() {
return updateDt;
}
public void setUpdateDt(long updateDt) {
this.updateDt = updateDt;
}
public String getCallback() {
return callback;
}
public void setCallback(String callback) {
this.callback = callback;
}
public int getAutomatic() {
return automatic;
}
public void setAutomatic(int automatic) {
this.automatic = automatic;
}
2020-01-08 14:49:21 +08:00
2021-12-06 09:07:35 +08:00
public int getStatus() {
return status;
}
public void setStatus(int status) {
this.status = status;
}
2020-01-08 14:49:21 +08:00
public static OutputGetChannelInfo fromPbInfo(WFCMessage.ChannelInfo channelInfo) {
OutputGetChannelInfo out = new OutputGetChannelInfo();
out.automatic = channelInfo.getAutomatic();
out.callback = channelInfo.getCallback();
out.channelId = channelInfo.getTargetId();
out.desc = channelInfo.getDesc();
out.extra = channelInfo.getExtra();
out.name = channelInfo.getName();
out.owner = channelInfo.getOwner();
out.portrait = channelInfo.getPortrait();
2021-11-30 20:12:41 +08:00
out.state = channelInfo.getStatus();
2021-12-06 09:07:35 +08:00
out.status = out.state;
2020-01-08 14:49:21 +08:00
out.updateDt = channelInfo.getUpdateDt();
return out;
}
2020-01-06 14:53:54 +08:00
}