// Path: src/com/hoiio/sdk/exception/HoiioException.java
// public class HoiioException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 	
// 	private HoiioStatus status;
// 	private String response;
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 */
// 	public HoiioException() {
// 		super();
// 	}
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 * @param e The exception returned by other sources
// 	 */
// 	public HoiioException(Exception e) {
// 		super(e);
// 	}
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 * @param status The error status returned by Hoiio 
// 	 */
// 	public HoiioException(String status) {
// 		super(status);
// 		this.status = HoiioStatus.fromString(status);
// 	}
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 * @param status The error status returned by Hoiio 
// 	 * @param response Full response by Hoiio
// 	 */
// 	public HoiioException(String status, String response) {
// 		super(status);
// 		this.status = HoiioStatus.fromString(status);
// 		this.response = response;
// 	}
// 	
// 	/**
// 	 * Gets the Hoiio error status
// 	 * @return Hoiio error status
// 	 */
// 	public HoiioStatus getStatus() {
// 		return status;
// 	}
// 	
// 	/**
// 	 * Gets the response content by Hoiio
// 	 * @return The response content by Hoiio
// 	 */
// 	public String getContent() {
// 		return response;
// 	}
// }
// 
// Path: src/com/hoiio/sdk/objects/HoiioResponse.java
// public class HoiioResponse {
// 	
// 	protected String response;
// 	
// 	/**
// 	 * Constructs the {@code HoiioResponse} object
// 	 */
// 	public HoiioResponse() {
// 	}
// 	
// 	/**
// 	 * Gets the content of the response
// 	 * @return The raw content of the response
// 	 */
// 	public String getContent() {
// 		return response;
// 	}
// }


import com.hoiio.sdk.exception.HoiioException;
import com.hoiio.sdk.objects.HoiioResponse;
import java.util.ArrayList;
import java.util.List;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;
package com.hoiio.sdk.objects.sms;

/*
Copyright (C) 2012 Hoiio Pte Ltd (http://www.hoiio.com)

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/




public class SmsHistory extends HoiioResponse {
	
	private static enum Params {
		ENTRIES_COUNT, TOTAL_ENTRIES_COUNT, ENTRIES;
		
		public String toString() {
			return this.name().toLowerCase();
		}
	}
	
	private int pageCount;
	private int totalCount;
	private List<Sms> smsList;
	
	/**
	 * Constructs a new {@code SmsHistory} object by decoding the {@code JSONObject} as a response from the HTTP Request 
	 * @param output The response of the HTTP Request
	 */
// Path: src/com/hoiio/sdk/exception/HoiioException.java
// public class HoiioException extends Exception {
// 
// 	private static final long serialVersionUID = 1L;
// 	
// 	private HoiioStatus status;
// 	private String response;
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 */
// 	public HoiioException() {
// 		super();
// 	}
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 * @param e The exception returned by other sources
// 	 */
// 	public HoiioException(Exception e) {
// 		super(e);
// 	}
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 * @param status The error status returned by Hoiio 
// 	 */
// 	public HoiioException(String status) {
// 		super(status);
// 		this.status = HoiioStatus.fromString(status);
// 	}
// 	
// 	/**
// 	 * Constructs the HoiioException object
// 	 * @param status The error status returned by Hoiio 
// 	 * @param response Full response by Hoiio
// 	 */
// 	public HoiioException(String status, String response) {
// 		super(status);
// 		this.status = HoiioStatus.fromString(status);
// 		this.response = response;
// 	}
// 	
// 	/**
// 	 * Gets the Hoiio error status
// 	 * @return Hoiio error status
// 	 */
// 	public HoiioStatus getStatus() {
// 		return status;
// 	}
// 	
// 	/**
// 	 * Gets the response content by Hoiio
// 	 * @return The response content by Hoiio
// 	 */
// 	public String getContent() {
// 		return response;
// 	}
// }
// 
// Path: src/com/hoiio/sdk/objects/HoiioResponse.java
// public class HoiioResponse {
// 	
// 	protected String response;
// 	
// 	/**
// 	 * Constructs the {@code HoiioResponse} object
// 	 */
// 	public HoiioResponse() {
// 	}
// 	
// 	/**
// 	 * Gets the content of the response
// 	 * @return The raw content of the response
// 	 */
// 	public String getContent() {
// 		return response;
// 	}
// }


// Path: src/com/hoiio/sdk/objects/sms/SmsHistory.java
import com.hoiio.sdk.exception.HoiioException;
import com.hoiio.sdk.objects.HoiioResponse;
import java.util.ArrayList;
import java.util.List;
import net.sf.json.JSONArray;
import net.sf.json.JSONObject;

package com.hoiio.sdk.objects.sms;

/*
Copyright (C) 2012 Hoiio Pte Ltd (http://www.hoiio.com)

Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
*/




public class SmsHistory extends HoiioResponse {
	
	private static enum Params {
		ENTRIES_COUNT, TOTAL_ENTRIES_COUNT, ENTRIES;
		
		public String toString() {
			return this.name().toLowerCase();
		}
	}
	
	private int pageCount;
	private int totalCount;
	private List<Sms> smsList;
	
	/**
	 * Constructs a new {@code SmsHistory} object by decoding the {@code JSONObject} as a response from the HTTP Request 
	 * @param output The response of the HTTP Request
	 */
	public SmsHistory(JSONObject output) throws HoiioException {