package com.cardshifter.api.incoming;

import com.cardshifter.api.messages.Message;

public class ServerQueryMessage extends Message {

	public enum Request {
		USERS, DECK_BUILDER;
	}

	private final Request request;
	private final String message;
	
	ServerQueryMessage() {
		this(Request.USERS);
	}
	
	public ServerQueryMessage(Request request) {
		this(request, "");
	}
	
	public ServerQueryMessage(Request request, String message) {
		super("query");
		this.request = request;
		this.message = message;
	}
	
	public Request getRequest() {
		return request;
	}
	
	public String getMessage() {
		return message;
	}
	
    @Override
    public String toString() {
        return getClass().getSimpleName() + ": Request " + request + " message: " + message;
    }
}

@@ -82,58 +82,444 @@
 e;%0A%0A
-public class ServerQueryMessage extends Message %7B%0A
+/**%0A * Make a specific type of request to the server. %0A * %3Cp%3E%0A * This is used to request an action from the server which requires server-side information.%0A */%0Apublic class ServerQueryMessage extends Message %7B%0A%09%0A%09/**%0A%09 * Types of request available.%0A%09 * %3Cli%3EUSERS : Request list of available users.%0A%09 * %3Cli%3EDECK_BUILDER : Request the deck builder, which queries information both server-side (card sets) and client-side (saved decks).%0A%09 */
 %0A%09pu
@@ -630,16 +630,55 @@
 sage;%0A%09%0A
+%09/** Constructor for USERS request. */%0A
 %09ServerQ
@@ -716,24 +716,82 @@
 USERS);%0A%09%7D%0A%09
+/**%0A%09 * Constructor.%0A%09 * @param request  This request%0A%09 */
 %0A%09public Ser
@@ -846,24 +846,141 @@
 t, %22%22);%0A%09%7D%0A%09
+/**%0A%09 * Constructor. %0A%09 * @param request  This request%0A%09 * @param message  The message accompanying this request%0A%09 */
 %0A%09public Ser
@@ -1100,24 +1100,52 @@
 essage;%0A%09%7D%0A%09
+/** @return  This request */
 %0A%09public Req
@@ -1190,66 +1190,167 @@
 %09%7D%0A%09
-%0A%09public String getMessage() %7B%0A%09%09return message;%0A%09%7D%0A%09%0A    
+/** @return  The message accompanying this request */%0A%09public String getMessage() %7B%0A%09%09return message;%0A%09%7D%0A%09/** @return  This request as converted to String */%0A%09
 @Ove
@@ -1355,20 +1355,17 @@
 verride%0A
-    
+%09
 public S
@@ -1387,16 +1387,10 @@
 ) %7B%0A
-        
+%09%09
 retu
@@ -1474,12 +1474,9 @@
 ge;%0A
-    
+%09
 %7D%0A%7D%0A

Update ServerQueryMessage.java