All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.hn.im.easemob.comm.body.ModifyChatGroupBody Maven / Gradle / Ivy

There is a newer version: 1.0.18
Show newest version
package com.hn.im.easemob.comm.body;

import com.fasterxml.jackson.databind.node.ContainerNode;
import com.fasterxml.jackson.databind.node.JsonNodeFactory;
import com.hn.im.easemob.comm.wrapper.BodyWrapper;
import cn.hutool.core.util.StrUtil;

public class ModifyChatGroupBody implements BodyWrapper {
    private String groupName;
    private String desc;
    private Long maxUsers;

    public ModifyChatGroupBody(String groupName, String desc, Long maxUsers) {
        this.groupName = groupName;
        this.desc = desc;
        this.maxUsers = maxUsers;
    }

    public String getGroupName() {
        return groupName;
    }

    public String getDesc() {
        return desc;
    }

    public Long getMaxUsers() {
        return maxUsers;
    }

    public ContainerNode getBody() {
        return JsonNodeFactory.instance.objectNode().put("groupname", groupName).put("description", desc).put("maxusers", maxUsers);
    }

    public Boolean validate() {
        return StrUtil.isNotBlank(groupName) && StrUtil.isNotBlank(desc) && null != maxUsers;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy