// Path: AndroidApp/SparkPixels/src/org/solemnsilence/util/Py.java
// public static boolean truthy(Object obj) {
// 	if (obj == null) {
// 		return false;
// 
// 	} else if (obj instanceof Truthiable) {
// 		return ((Truthiable) obj).isTruthy();
// 
// 	} else if (obj instanceof Collection) {
// 		return (!((Collection<?>) obj).isEmpty());
// 
// 	} else if (obj instanceof Iterable) {
// 		return (((Iterable<?>) obj).iterator().hasNext());
// 
// 	} else if (obj instanceof Object[]) {
// 		return (((Object[]) obj).length > 0);
// 
// 	} else if (obj instanceof Number) {
// 		return (((Number) obj).longValue() != 0);
// 
// 	} else if (obj instanceof CharSequence) {
// 		return (((CharSequence) obj).length() > 0);
// 
// 	} else if (obj instanceof JSONArray) {
// 		return (((JSONArray) obj).length() > 0);
// 
// 	} else if (obj instanceof Boolean) {
// 		return (((Boolean) obj).booleanValue());
// 
// 	} else if (obj instanceof long[]) {
// 		return (((long[]) obj).length > 0);
// 
// 	} else if (obj instanceof int[]) {
// 		return (((int[]) obj).length > 0);
// 
// 	} else if (obj instanceof short[]) {
// 		return (((short[]) obj).length > 0);
// 
// 	} else if (obj instanceof byte[]) {
// 		return (((byte[]) obj).length > 0);
// 
// 	} else if (obj instanceof char[]) {
// 		return (((char[]) obj).length > 0);
// 
// 	} else if (obj instanceof boolean[]) {
// 		return (((boolean[]) obj).length > 0);
// 
// 	} else if (obj instanceof float[]) {
// 		return (((float[]) obj).length > 0);
// 
// 	} else if (obj instanceof double[]) {
// 		return (((double[]) obj).length > 0);
// 	}
// 
// 	return true;
// }


import static org.solemnsilence.util.Py.truthy;
import android.os.Parcel;
import android.os.Parcelable;
package kc.spark.pixels.android.cloud.api;



public class TinkerResponse implements Parcelable {

	public static final int RESPONSE_TYPE_DIGITAL = 1;
	public static final int RESPONSE_TYPE_ANALOG = 2;

	public static final int REQUEST_TYPE_READ = 3;
	public static final int REQUEST_TYPE_WRITE = 4;



	public final int requestType;
	public final String coreId;
	public final String pin;
	public final int responseValue;
	public final int responseType;
	public final boolean errorMakingRequest;


	public TinkerResponse(int requestType, String coreId, String pin, int responseType,
			int responseValue, boolean requestError) {
		this.requestType = requestType;
		this.coreId = coreId;
		this.pin = pin;
		this.responseType = responseType;
		this.responseValue = responseValue;
		this.errorMakingRequest = requestError;
	}

	public TinkerResponse(Parcel in) {
		this.requestType = in.readInt();
		this.coreId = in.readString();
		this.pin = in.readString();
		this.responseType = in.readInt();
		this.responseValue = in.readInt();
// Path: AndroidApp/SparkPixels/src/org/solemnsilence/util/Py.java
// public static boolean truthy(Object obj) {
// 	if (obj == null) {
// 		return false;
// 
// 	} else if (obj instanceof Truthiable) {
// 		return ((Truthiable) obj).isTruthy();
// 
// 	} else if (obj instanceof Collection) {
// 		return (!((Collection<?>) obj).isEmpty());
// 
// 	} else if (obj instanceof Iterable) {
// 		return (((Iterable<?>) obj).iterator().hasNext());
// 
// 	} else if (obj instanceof Object[]) {
// 		return (((Object[]) obj).length > 0);
// 
// 	} else if (obj instanceof Number) {
// 		return (((Number) obj).longValue() != 0);
// 
// 	} else if (obj instanceof CharSequence) {
// 		return (((CharSequence) obj).length() > 0);
// 
// 	} else if (obj instanceof JSONArray) {
// 		return (((JSONArray) obj).length() > 0);
// 
// 	} else if (obj instanceof Boolean) {
// 		return (((Boolean) obj).booleanValue());
// 
// 	} else if (obj instanceof long[]) {
// 		return (((long[]) obj).length > 0);
// 
// 	} else if (obj instanceof int[]) {
// 		return (((int[]) obj).length > 0);
// 
// 	} else if (obj instanceof short[]) {
// 		return (((short[]) obj).length > 0);
// 
// 	} else if (obj instanceof byte[]) {
// 		return (((byte[]) obj).length > 0);
// 
// 	} else if (obj instanceof char[]) {
// 		return (((char[]) obj).length > 0);
// 
// 	} else if (obj instanceof boolean[]) {
// 		return (((boolean[]) obj).length > 0);
// 
// 	} else if (obj instanceof float[]) {
// 		return (((float[]) obj).length > 0);
// 
// 	} else if (obj instanceof double[]) {
// 		return (((double[]) obj).length > 0);
// 	}
// 
// 	return true;
// }


// Path: AndroidApp/SparkPixels/src/kc/spark/pixels/android/cloud/api/TinkerResponse.java
import static org.solemnsilence.util.Py.truthy;
import android.os.Parcel;
import android.os.Parcelable;

package kc.spark.pixels.android.cloud.api;



public class TinkerResponse implements Parcelable {

	public static final int RESPONSE_TYPE_DIGITAL = 1;
	public static final int RESPONSE_TYPE_ANALOG = 2;

	public static final int REQUEST_TYPE_READ = 3;
	public static final int REQUEST_TYPE_WRITE = 4;



	public final int requestType;
	public final String coreId;
	public final String pin;
	public final int responseValue;
	public final int responseType;
	public final boolean errorMakingRequest;


	public TinkerResponse(int requestType, String coreId, String pin, int responseType,
			int responseValue, boolean requestError) {
		this.requestType = requestType;
		this.coreId = coreId;
		this.pin = pin;
		this.responseType = responseType;
		this.responseValue = responseValue;
		this.errorMakingRequest = requestError;
	}

	public TinkerResponse(Parcel in) {
		this.requestType = in.readInt();
		this.coreId = in.readString();
		this.pin = in.readString();
		this.responseType = in.readInt();
		this.responseValue = in.readInt();
		this.errorMakingRequest = truthy(in.readInt());