<commit_before>/**
 * 
 */
package io.spire.api;

import io.spire.api.Api.APIDescriptionModel.APISchemaModel;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;

/**
 * @author <NAME>
 *
 */
public class Message extends Resource {

	/**
	 * 
	 */
	public Message() {
	}

	/**
	 * @param schema
	 */
	public Message(APISchemaModel schema) {
		super(schema);
	}

	/**
	 * @param model
	 * @param schema
	 */
	public Message(ResourceModel model, APISchemaModel schema) {
		super(model, schema);
	}

	/* (non-Javadoc)
	 * @see io.spire.api.Resource#initialize()
	 */
	@Override
	protected void initialize() {
	}

	/* (non-Javadoc)
	 * @see io.spire.api.Resource#addModel(java.util.Map)
	 */
	@Override
	protected void addModel(Map<String, Object> rawModel) {
	}

	/* (non-Javadoc)
	 * @see io.spire.api.Resource#getResourceName()
	 */
	@Override
	public String getResourceName() {
		return this.getClass().getSimpleName().toLowerCase();
	}
	
	public Object getContent(){
		return this.model.getProperty("content", Object.class);
	}
	
	public <T>T getContent(Class<T> type){
		return this.model.getProperty("content", type);
	}
	
	public String getTimestamp(){
		return this.model.getProperty("timestamp", Object.class).toString();
	}
	
	public String channelName(){
		return this.model.getProperty("channel", String.class);
	}
	
	public static class MessageOptions{
		public String timestamp = "0";
		// timeout option of 0 means no long poll,
		public int timeout = 0;
		public MessageOrderBy orderBy = MessageOrderBy.Desc;
		// delay response from the server... ahh??
		public int delay = 0;
		
		public MessageOptions(){
		}
		
		public enum MessageOrderBy{
			Asc,
			Desc
		}
		
		public String getOrderByOptionString(){
			return this.orderBy.toString().toLowerCase(); 
		}
		
		public Map<String, Object> getMapOptions(){
			Map<String, Object> queryParams = new HashMap<String, Object>();
			queryParams.put("last-message", timestamp);
			queryParams.put("timeout", Integer.toString(timeout));
			queryParams.put("delay", delay);
			queryParams.put("order_by", this.getOrderByOptionString());
			
			return queryParams;
		}
	}

}<commit_msg>typo in message query params<commit_after>/**
 * 
 */
package io.spire.api;

import io.spire.api.Api.APIDescriptionModel.APISchemaModel;

import java.math.BigInteger;
import java.util.HashMap;
import java.util.Map;

/**
 * @author <NAME>
 *
 */
public class Message extends Resource {

	/**
	 * 
	 */
	public Message() {
	}

	/**
	 * @param schema
	 */
	public Message(APISchemaModel schema) {
		super(schema);
	}

	/**
	 * @param model
	 * @param schema
	 */
	public Message(ResourceModel model, APISchemaModel schema) {
		super(model, schema);
	}

	/* (non-Javadoc)
	 * @see io.spire.api.Resource#initialize()
	 */
	@Override
	protected void initialize() {
	}

	/* (non-Javadoc)
	 * @see io.spire.api.Resource#addModel(java.util.Map)
	 */
	@Override
	protected void addModel(Map<String, Object> rawModel) {
	}

	/* (non-Javadoc)
	 * @see io.spire.api.Resource#getResourceName()
	 */
	@Override
	public String getResourceName() {
		return this.getClass().getSimpleName().toLowerCase();
	}
	
	public Object getContent(){
		return this.model.getProperty("content", Object.class);
	}
	
	public <T>T getContent(Class<T> type){
		return this.model.getProperty("content", type);
	}
	
	public String getTimestamp(){
		return this.model.getProperty("timestamp", Object.class).toString();
	}
	
	public String channelName(){
		return this.model.getProperty("channel", String.class);
	}
	
	public static class MessageOptions{
		public String timestamp = "0";
		// timeout option of 0 means no long poll,
		public int timeout = 0;
		public MessageOrderBy orderBy = MessageOrderBy.Desc;
		// delay response from the server... ahh??
		public int delay = 0;
		
		public MessageOptions(){
		}
		
		public enum MessageOrderBy{
			Asc,
			Desc
		}
		
		public String getOrderByOptionString(){
			return this.orderBy.toString().toLowerCase(); 
		}
		
		public Map<String, Object> getMapOptions(){
			Map<String, Object> queryParams = new HashMap<String, Object>();
			queryParams.put("last-message", timestamp);
			queryParams.put("timeout", Integer.toString(timeout));
			queryParams.put("delay", delay);
			queryParams.put("order-by", this.getOrderByOptionString());
			
			return queryParams;
		}
	}

}
{'fraction_non_alphanumeric': 0.14200504702913513, 'fraction_numerical': 0.0018352833218628125, 'mean_word_length': 3.780701754385965, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1855930', 'n_tokens_mistral': 1544, 'n_tokens_neox': 1382, 'n_words': 310}