// Path: src/main/java/cn/jmessage/api/common/model/IModel.java
// public interface IModel {
// 
//     public JsonElement toJSON();
// 
// }
// 
// Path: src/main/java/cn/jmessage/api/common/model/Members.java
// public class Members implements IModel {
// 
//     private JsonArray members;
// 
//     private Members(JsonArray members) {
//         this.members = members;
//     }
// 
//     public static Builder newBuilder() {
//         return new Builder();
//     }
// 
//     @Override
//     public JsonElement toJSON() {
//         return members;
//     }
// 
//     public static class Builder {
// 
//         private JsonArray members = new JsonArray();
// 
//         public Builder addMember(String... usernames) {
// 
//             if( null == usernames ) {
//                 return this;
//             }
// 
//             for (String username : usernames) {
//                 JsonPrimitive member = new JsonPrimitive(username);
//                 this.members.add(member);
//             }
//             return this;
//         }
// 
//         public Members build() {
//             return new Members(members);
//         }
//     }
// }


import cn.jmessage.api.common.model.IModel;
import cn.jmessage.api.common.model.Members;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
package cn.jmessage.api.common.model.chatroom;


public class ChatRoomPayload implements IModel {

    public static final String OWNER = "owner_username";
    public static final String NAME = "name";
    public static final String MEMBERS = "members_username";
    public static final String DESC = "description";
    public static final String FLAG = "flag";

    private static Gson gson = new Gson();

    private String owner;
    private String name;
// Path: src/main/java/cn/jmessage/api/common/model/IModel.java
// public interface IModel {
// 
//     public JsonElement toJSON();
// 
// }
// 
// Path: src/main/java/cn/jmessage/api/common/model/Members.java
// public class Members implements IModel {
// 
//     private JsonArray members;
// 
//     private Members(JsonArray members) {
//         this.members = members;
//     }
// 
//     public static Builder newBuilder() {
//         return new Builder();
//     }
// 
//     @Override
//     public JsonElement toJSON() {
//         return members;
//     }
// 
//     public static class Builder {
// 
//         private JsonArray members = new JsonArray();
// 
//         public Builder addMember(String... usernames) {
// 
//             if( null == usernames ) {
//                 return this;
//             }
// 
//             for (String username : usernames) {
//                 JsonPrimitive member = new JsonPrimitive(username);
//                 this.members.add(member);
//             }
//             return this;
//         }
// 
//         public Members build() {
//             return new Members(members);
//         }
//     }
// }


// Path: src/main/java/cn/jmessage/api/common/model/chatroom/ChatRoomPayload.java
import cn.jmessage.api.common.model.IModel;
import cn.jmessage.api.common.model.Members;
import com.google.gson.Gson;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;

package cn.jmessage.api.common.model.chatroom;


public class ChatRoomPayload implements IModel {

    public static final String OWNER = "owner_username";
    public static final String NAME = "name";
    public static final String MEMBERS = "members_username";
    public static final String DESC = "description";
    public static final String FLAG = "flag";

    private static Gson gson = new Gson();

    private String owner;
    private String name;
    private Members members;