Permalink
Browse files

added Thrift-generated Java client bindings

  • Loading branch information...
1 parent f76d0c5 commit 803e3a95f96e6910c08bdaa994ca2e05a7c6918b @ekarak ekarak committed Sep 19, 2012
View
477 gen-java/OpenZWave/Bool_Bool.java
@@ -0,0 +1,477 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0-dev)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package OpenZWave;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Bool_Bool implements org.apache.thrift.TBase<Bool_Bool, Bool_Bool._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bool_Bool");
+
+ private static final org.apache.thrift.protocol.TField RETVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("retval", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField O_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("o_value", org.apache.thrift.protocol.TType.BOOL, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new Bool_BoolStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new Bool_BoolTupleSchemeFactory());
+ }
+
+ public boolean retval; // required
+ public boolean o_value; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RETVAL((short)1, "retval"),
+ O_VALUE((short)2, "o_value");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RETVAL
+ return RETVAL;
+ case 2: // O_VALUE
+ return O_VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __RETVAL_ISSET_ID = 0;
+ private static final int __O_VALUE_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RETVAL, new org.apache.thrift.meta_data.FieldMetaData("retval", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.O_VALUE, new org.apache.thrift.meta_data.FieldMetaData("o_value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bool_Bool.class, metaDataMap);
+ }
+
+ public Bool_Bool() {
+ }
+
+ public Bool_Bool(
+ boolean retval,
+ boolean o_value)
+ {
+ this();
+ this.retval = retval;
+ setRetvalIsSet(true);
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Bool_Bool(Bool_Bool other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.retval = other.retval;
+ this.o_value = other.o_value;
+ }
+
+ public Bool_Bool deepCopy() {
+ return new Bool_Bool(this);
+ }
+
+ @Override
+ public void clear() {
+ setRetvalIsSet(false);
+ this.retval = false;
+ setO_valueIsSet(false);
+ this.o_value = false;
+ }
+
+ public boolean isRetval() {
+ return this.retval;
+ }
+
+ public Bool_Bool setRetval(boolean retval) {
+ this.retval = retval;
+ setRetvalIsSet(true);
+ return this;
+ }
+
+ public void unsetRetval() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ /** Returns true if field retval is set (has been assigned a value) and false otherwise */
+ public boolean isSetRetval() {
+ return EncodingUtils.testBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ public void setRetvalIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETVAL_ISSET_ID, value);
+ }
+
+ public boolean isO_value() {
+ return this.o_value;
+ }
+
+ public Bool_Bool setO_value(boolean o_value) {
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ return this;
+ }
+
+ public void unsetO_value() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ /** Returns true if field o_value is set (has been assigned a value) and false otherwise */
+ public boolean isSetO_value() {
+ return EncodingUtils.testBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ public void setO_valueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __O_VALUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RETVAL:
+ if (value == null) {
+ unsetRetval();
+ } else {
+ setRetval((Boolean)value);
+ }
+ break;
+
+ case O_VALUE:
+ if (value == null) {
+ unsetO_value();
+ } else {
+ setO_value((Boolean)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RETVAL:
+ return Boolean.valueOf(isRetval());
+
+ case O_VALUE:
+ return Boolean.valueOf(isO_value());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RETVAL:
+ return isSetRetval();
+ case O_VALUE:
+ return isSetO_value();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Bool_Bool)
+ return this.equals((Bool_Bool)that);
+ return false;
+ }
+
+ public boolean equals(Bool_Bool that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_retval = true;
+ boolean that_present_retval = true;
+ if (this_present_retval || that_present_retval) {
+ if (!(this_present_retval && that_present_retval))
+ return false;
+ if (this.retval != that.retval)
+ return false;
+ }
+
+ boolean this_present_o_value = true;
+ boolean that_present_o_value = true;
+ if (this_present_o_value || that_present_o_value) {
+ if (!(this_present_o_value && that_present_o_value))
+ return false;
+ if (this.o_value != that.o_value)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Bool_Bool other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Bool_Bool typedOther = (Bool_Bool)other;
+
+ lastComparison = Boolean.valueOf(isSetRetval()).compareTo(typedOther.isSetRetval());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRetval()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retval, typedOther.retval);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO_value()).compareTo(typedOther.isSetO_value());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO_value()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o_value, typedOther.o_value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Bool_Bool(");
+ boolean first = true;
+
+ sb.append("retval:");
+ sb.append(this.retval);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o_value:");
+ sb.append(this.o_value);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class Bool_BoolStandardSchemeFactory implements SchemeFactory {
+ public Bool_BoolStandardScheme getScheme() {
+ return new Bool_BoolStandardScheme();
+ }
+ }
+
+ private static class Bool_BoolStandardScheme extends StandardScheme<Bool_Bool> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Bool_Bool struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RETVAL
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // O_VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.o_value = iprot.readBool();
+ struct.setO_valueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Bool_Bool struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(RETVAL_FIELD_DESC);
+ oprot.writeBool(struct.retval);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(O_VALUE_FIELD_DESC);
+ oprot.writeBool(struct.o_value);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class Bool_BoolTupleSchemeFactory implements SchemeFactory {
+ public Bool_BoolTupleScheme getScheme() {
+ return new Bool_BoolTupleScheme();
+ }
+ }
+
+ private static class Bool_BoolTupleScheme extends TupleScheme<Bool_Bool> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Bool_Bool struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRetval()) {
+ optionals.set(0);
+ }
+ if (struct.isSetO_value()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetRetval()) {
+ oprot.writeBool(struct.retval);
+ }
+ if (struct.isSetO_value()) {
+ oprot.writeBool(struct.o_value);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Bool_Bool struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.o_value = iprot.readBool();
+ struct.setO_valueIsSet(true);
+ }
+ }
+ }
+
+}
+
View
477 gen-java/OpenZWave/Bool_Float.java
@@ -0,0 +1,477 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0-dev)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package OpenZWave;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Bool_Float implements org.apache.thrift.TBase<Bool_Float, Bool_Float._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bool_Float");
+
+ private static final org.apache.thrift.protocol.TField RETVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("retval", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField O_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("o_value", org.apache.thrift.protocol.TType.DOUBLE, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new Bool_FloatStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new Bool_FloatTupleSchemeFactory());
+ }
+
+ public boolean retval; // required
+ public double o_value; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RETVAL((short)1, "retval"),
+ O_VALUE((short)2, "o_value");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RETVAL
+ return RETVAL;
+ case 2: // O_VALUE
+ return O_VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __RETVAL_ISSET_ID = 0;
+ private static final int __O_VALUE_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RETVAL, new org.apache.thrift.meta_data.FieldMetaData("retval", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.O_VALUE, new org.apache.thrift.meta_data.FieldMetaData("o_value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bool_Float.class, metaDataMap);
+ }
+
+ public Bool_Float() {
+ }
+
+ public Bool_Float(
+ boolean retval,
+ double o_value)
+ {
+ this();
+ this.retval = retval;
+ setRetvalIsSet(true);
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Bool_Float(Bool_Float other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.retval = other.retval;
+ this.o_value = other.o_value;
+ }
+
+ public Bool_Float deepCopy() {
+ return new Bool_Float(this);
+ }
+
+ @Override
+ public void clear() {
+ setRetvalIsSet(false);
+ this.retval = false;
+ setO_valueIsSet(false);
+ this.o_value = 0.0;
+ }
+
+ public boolean isRetval() {
+ return this.retval;
+ }
+
+ public Bool_Float setRetval(boolean retval) {
+ this.retval = retval;
+ setRetvalIsSet(true);
+ return this;
+ }
+
+ public void unsetRetval() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ /** Returns true if field retval is set (has been assigned a value) and false otherwise */
+ public boolean isSetRetval() {
+ return EncodingUtils.testBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ public void setRetvalIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETVAL_ISSET_ID, value);
+ }
+
+ public double getO_value() {
+ return this.o_value;
+ }
+
+ public Bool_Float setO_value(double o_value) {
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ return this;
+ }
+
+ public void unsetO_value() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ /** Returns true if field o_value is set (has been assigned a value) and false otherwise */
+ public boolean isSetO_value() {
+ return EncodingUtils.testBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ public void setO_valueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __O_VALUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RETVAL:
+ if (value == null) {
+ unsetRetval();
+ } else {
+ setRetval((Boolean)value);
+ }
+ break;
+
+ case O_VALUE:
+ if (value == null) {
+ unsetO_value();
+ } else {
+ setO_value((Double)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RETVAL:
+ return Boolean.valueOf(isRetval());
+
+ case O_VALUE:
+ return Double.valueOf(getO_value());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RETVAL:
+ return isSetRetval();
+ case O_VALUE:
+ return isSetO_value();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Bool_Float)
+ return this.equals((Bool_Float)that);
+ return false;
+ }
+
+ public boolean equals(Bool_Float that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_retval = true;
+ boolean that_present_retval = true;
+ if (this_present_retval || that_present_retval) {
+ if (!(this_present_retval && that_present_retval))
+ return false;
+ if (this.retval != that.retval)
+ return false;
+ }
+
+ boolean this_present_o_value = true;
+ boolean that_present_o_value = true;
+ if (this_present_o_value || that_present_o_value) {
+ if (!(this_present_o_value && that_present_o_value))
+ return false;
+ if (this.o_value != that.o_value)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Bool_Float other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Bool_Float typedOther = (Bool_Float)other;
+
+ lastComparison = Boolean.valueOf(isSetRetval()).compareTo(typedOther.isSetRetval());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRetval()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retval, typedOther.retval);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO_value()).compareTo(typedOther.isSetO_value());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO_value()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o_value, typedOther.o_value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Bool_Float(");
+ boolean first = true;
+
+ sb.append("retval:");
+ sb.append(this.retval);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o_value:");
+ sb.append(this.o_value);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class Bool_FloatStandardSchemeFactory implements SchemeFactory {
+ public Bool_FloatStandardScheme getScheme() {
+ return new Bool_FloatStandardScheme();
+ }
+ }
+
+ private static class Bool_FloatStandardScheme extends StandardScheme<Bool_Float> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Bool_Float struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RETVAL
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // O_VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) {
+ struct.o_value = iprot.readDouble();
+ struct.setO_valueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Bool_Float struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(RETVAL_FIELD_DESC);
+ oprot.writeBool(struct.retval);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(O_VALUE_FIELD_DESC);
+ oprot.writeDouble(struct.o_value);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class Bool_FloatTupleSchemeFactory implements SchemeFactory {
+ public Bool_FloatTupleScheme getScheme() {
+ return new Bool_FloatTupleScheme();
+ }
+ }
+
+ private static class Bool_FloatTupleScheme extends TupleScheme<Bool_Float> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Bool_Float struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRetval()) {
+ optionals.set(0);
+ }
+ if (struct.isSetO_value()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetRetval()) {
+ oprot.writeBool(struct.retval);
+ }
+ if (struct.isSetO_value()) {
+ oprot.writeDouble(struct.o_value);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Bool_Float struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.o_value = iprot.readDouble();
+ struct.setO_valueIsSet(true);
+ }
+ }
+ }
+
+}
+
View
577 gen-java/OpenZWave/Bool_GetNodeClassInformation.java
@@ -0,0 +1,577 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0-dev)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package OpenZWave;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Bool_GetNodeClassInformation implements org.apache.thrift.TBase<Bool_GetNodeClassInformation, Bool_GetNodeClassInformation._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bool_GetNodeClassInformation");
+
+ private static final org.apache.thrift.protocol.TField RETVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("retval", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField _CLASS_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("_className", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField _CLASS_VERSION_FIELD_DESC = new org.apache.thrift.protocol.TField("_classVersion", org.apache.thrift.protocol.TType.BYTE, (short)3);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new Bool_GetNodeClassInformationStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new Bool_GetNodeClassInformationTupleSchemeFactory());
+ }
+
+ public boolean retval; // required
+ public String _className; // required
+ public byte _classVersion; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RETVAL((short)1, "retval"),
+ _CLASS_NAME((short)2, "_className"),
+ _CLASS_VERSION((short)3, "_classVersion");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RETVAL
+ return RETVAL;
+ case 2: // _CLASS_NAME
+ return _CLASS_NAME;
+ case 3: // _CLASS_VERSION
+ return _CLASS_VERSION;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __RETVAL_ISSET_ID = 0;
+ private static final int ___CLASSVERSION_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RETVAL, new org.apache.thrift.meta_data.FieldMetaData("retval", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields._CLASS_NAME, new org.apache.thrift.meta_data.FieldMetaData("_className", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields._CLASS_VERSION, new org.apache.thrift.meta_data.FieldMetaData("_classVersion", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BYTE)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bool_GetNodeClassInformation.class, metaDataMap);
+ }
+
+ public Bool_GetNodeClassInformation() {
+ }
+
+ public Bool_GetNodeClassInformation(
+ boolean retval,
+ String _className,
+ byte _classVersion)
+ {
+ this();
+ this.retval = retval;
+ setRetvalIsSet(true);
+ this._className = _className;
+ this._classVersion = _classVersion;
+ set_classVersionIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Bool_GetNodeClassInformation(Bool_GetNodeClassInformation other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.retval = other.retval;
+ if (other.isSet_className()) {
+ this._className = other._className;
+ }
+ this._classVersion = other._classVersion;
+ }
+
+ public Bool_GetNodeClassInformation deepCopy() {
+ return new Bool_GetNodeClassInformation(this);
+ }
+
+ @Override
+ public void clear() {
+ setRetvalIsSet(false);
+ this.retval = false;
+ this._className = null;
+ set_classVersionIsSet(false);
+ this._classVersion = 0;
+ }
+
+ public boolean isRetval() {
+ return this.retval;
+ }
+
+ public Bool_GetNodeClassInformation setRetval(boolean retval) {
+ this.retval = retval;
+ setRetvalIsSet(true);
+ return this;
+ }
+
+ public void unsetRetval() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ /** Returns true if field retval is set (has been assigned a value) and false otherwise */
+ public boolean isSetRetval() {
+ return EncodingUtils.testBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ public void setRetvalIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETVAL_ISSET_ID, value);
+ }
+
+ public String get_className() {
+ return this._className;
+ }
+
+ public Bool_GetNodeClassInformation set_className(String _className) {
+ this._className = _className;
+ return this;
+ }
+
+ public void unset_className() {
+ this._className = null;
+ }
+
+ /** Returns true if field _className is set (has been assigned a value) and false otherwise */
+ public boolean isSet_className() {
+ return this._className != null;
+ }
+
+ public void set_classNameIsSet(boolean value) {
+ if (!value) {
+ this._className = null;
+ }
+ }
+
+ public byte get_classVersion() {
+ return this._classVersion;
+ }
+
+ public Bool_GetNodeClassInformation set_classVersion(byte _classVersion) {
+ this._classVersion = _classVersion;
+ set_classVersionIsSet(true);
+ return this;
+ }
+
+ public void unset_classVersion() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, ___CLASSVERSION_ISSET_ID);
+ }
+
+ /** Returns true if field _classVersion is set (has been assigned a value) and false otherwise */
+ public boolean isSet_classVersion() {
+ return EncodingUtils.testBit(__isset_bitfield, ___CLASSVERSION_ISSET_ID);
+ }
+
+ public void set_classVersionIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, ___CLASSVERSION_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RETVAL:
+ if (value == null) {
+ unsetRetval();
+ } else {
+ setRetval((Boolean)value);
+ }
+ break;
+
+ case _CLASS_NAME:
+ if (value == null) {
+ unset_className();
+ } else {
+ set_className((String)value);
+ }
+ break;
+
+ case _CLASS_VERSION:
+ if (value == null) {
+ unset_classVersion();
+ } else {
+ set_classVersion((Byte)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RETVAL:
+ return Boolean.valueOf(isRetval());
+
+ case _CLASS_NAME:
+ return get_className();
+
+ case _CLASS_VERSION:
+ return Byte.valueOf(get_classVersion());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RETVAL:
+ return isSetRetval();
+ case _CLASS_NAME:
+ return isSet_className();
+ case _CLASS_VERSION:
+ return isSet_classVersion();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Bool_GetNodeClassInformation)
+ return this.equals((Bool_GetNodeClassInformation)that);
+ return false;
+ }
+
+ public boolean equals(Bool_GetNodeClassInformation that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_retval = true;
+ boolean that_present_retval = true;
+ if (this_present_retval || that_present_retval) {
+ if (!(this_present_retval && that_present_retval))
+ return false;
+ if (this.retval != that.retval)
+ return false;
+ }
+
+ boolean this_present__className = true && this.isSet_className();
+ boolean that_present__className = true && that.isSet_className();
+ if (this_present__className || that_present__className) {
+ if (!(this_present__className && that_present__className))
+ return false;
+ if (!this._className.equals(that._className))
+ return false;
+ }
+
+ boolean this_present__classVersion = true;
+ boolean that_present__classVersion = true;
+ if (this_present__classVersion || that_present__classVersion) {
+ if (!(this_present__classVersion && that_present__classVersion))
+ return false;
+ if (this._classVersion != that._classVersion)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Bool_GetNodeClassInformation other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Bool_GetNodeClassInformation typedOther = (Bool_GetNodeClassInformation)other;
+
+ lastComparison = Boolean.valueOf(isSetRetval()).compareTo(typedOther.isSetRetval());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRetval()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retval, typedOther.retval);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSet_className()).compareTo(typedOther.isSet_className());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSet_className()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._className, typedOther._className);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSet_classVersion()).compareTo(typedOther.isSet_classVersion());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSet_classVersion()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this._classVersion, typedOther._classVersion);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Bool_GetNodeClassInformation(");
+ boolean first = true;
+
+ sb.append("retval:");
+ sb.append(this.retval);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("_className:");
+ if (this._className == null) {
+ sb.append("null");
+ } else {
+ sb.append(this._className);
+ }
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("_classVersion:");
+ sb.append(this._classVersion);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class Bool_GetNodeClassInformationStandardSchemeFactory implements SchemeFactory {
+ public Bool_GetNodeClassInformationStandardScheme getScheme() {
+ return new Bool_GetNodeClassInformationStandardScheme();
+ }
+ }
+
+ private static class Bool_GetNodeClassInformationStandardScheme extends StandardScheme<Bool_GetNodeClassInformation> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Bool_GetNodeClassInformation struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RETVAL
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // _CLASS_NAME
+ if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+ struct._className = iprot.readString();
+ struct.set_classNameIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 3: // _CLASS_VERSION
+ if (schemeField.type == org.apache.thrift.protocol.TType.BYTE) {
+ struct._classVersion = iprot.readByte();
+ struct.set_classVersionIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Bool_GetNodeClassInformation struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(RETVAL_FIELD_DESC);
+ oprot.writeBool(struct.retval);
+ oprot.writeFieldEnd();
+ if (struct._className != null) {
+ oprot.writeFieldBegin(_CLASS_NAME_FIELD_DESC);
+ oprot.writeString(struct._className);
+ oprot.writeFieldEnd();
+ }
+ oprot.writeFieldBegin(_CLASS_VERSION_FIELD_DESC);
+ oprot.writeByte(struct._classVersion);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class Bool_GetNodeClassInformationTupleSchemeFactory implements SchemeFactory {
+ public Bool_GetNodeClassInformationTupleScheme getScheme() {
+ return new Bool_GetNodeClassInformationTupleScheme();
+ }
+ }
+
+ private static class Bool_GetNodeClassInformationTupleScheme extends TupleScheme<Bool_GetNodeClassInformation> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Bool_GetNodeClassInformation struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRetval()) {
+ optionals.set(0);
+ }
+ if (struct.isSet_className()) {
+ optionals.set(1);
+ }
+ if (struct.isSet_classVersion()) {
+ optionals.set(2);
+ }
+ oprot.writeBitSet(optionals, 3);
+ if (struct.isSetRetval()) {
+ oprot.writeBool(struct.retval);
+ }
+ if (struct.isSet_className()) {
+ oprot.writeString(struct._className);
+ }
+ if (struct.isSet_classVersion()) {
+ oprot.writeByte(struct._classVersion);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Bool_GetNodeClassInformation struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(3);
+ if (incoming.get(0)) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct._className = iprot.readString();
+ struct.set_classNameIsSet(true);
+ }
+ if (incoming.get(2)) {
+ struct._classVersion = iprot.readByte();
+ struct.set_classVersionIsSet(true);
+ }
+ }
+ }
+
+}
+
View
477 gen-java/OpenZWave/Bool_Int.java
@@ -0,0 +1,477 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0-dev)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package OpenZWave;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Bool_Int implements org.apache.thrift.TBase<Bool_Int, Bool_Int._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bool_Int");
+
+ private static final org.apache.thrift.protocol.TField RETVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("retval", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField O_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("o_value", org.apache.thrift.protocol.TType.I32, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new Bool_IntStandardSchemeFactory());
+ schemes.put(TupleScheme.class, new Bool_IntTupleSchemeFactory());
+ }
+
+ public boolean retval; // required
+ public int o_value; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RETVAL((short)1, "retval"),
+ O_VALUE((short)2, "o_value");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RETVAL
+ return RETVAL;
+ case 2: // O_VALUE
+ return O_VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __RETVAL_ISSET_ID = 0;
+ private static final int __O_VALUE_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RETVAL, new org.apache.thrift.meta_data.FieldMetaData("retval", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.O_VALUE, new org.apache.thrift.meta_data.FieldMetaData("o_value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bool_Int.class, metaDataMap);
+ }
+
+ public Bool_Int() {
+ }
+
+ public Bool_Int(
+ boolean retval,
+ int o_value)
+ {
+ this();
+ this.retval = retval;
+ setRetvalIsSet(true);
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Bool_Int(Bool_Int other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.retval = other.retval;
+ this.o_value = other.o_value;
+ }
+
+ public Bool_Int deepCopy() {
+ return new Bool_Int(this);
+ }
+
+ @Override
+ public void clear() {
+ setRetvalIsSet(false);
+ this.retval = false;
+ setO_valueIsSet(false);
+ this.o_value = 0;
+ }
+
+ public boolean isRetval() {
+ return this.retval;
+ }
+
+ public Bool_Int setRetval(boolean retval) {
+ this.retval = retval;
+ setRetvalIsSet(true);
+ return this;
+ }
+
+ public void unsetRetval() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ /** Returns true if field retval is set (has been assigned a value) and false otherwise */
+ public boolean isSetRetval() {
+ return EncodingUtils.testBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ public void setRetvalIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETVAL_ISSET_ID, value);
+ }
+
+ public int getO_value() {
+ return this.o_value;
+ }
+
+ public Bool_Int setO_value(int o_value) {
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ return this;
+ }
+
+ public void unsetO_value() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ /** Returns true if field o_value is set (has been assigned a value) and false otherwise */
+ public boolean isSetO_value() {
+ return EncodingUtils.testBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ public void setO_valueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __O_VALUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RETVAL:
+ if (value == null) {
+ unsetRetval();
+ } else {
+ setRetval((Boolean)value);
+ }
+ break;
+
+ case O_VALUE:
+ if (value == null) {
+ unsetO_value();
+ } else {
+ setO_value((Integer)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RETVAL:
+ return Boolean.valueOf(isRetval());
+
+ case O_VALUE:
+ return Integer.valueOf(getO_value());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RETVAL:
+ return isSetRetval();
+ case O_VALUE:
+ return isSetO_value();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Bool_Int)
+ return this.equals((Bool_Int)that);
+ return false;
+ }
+
+ public boolean equals(Bool_Int that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_retval = true;
+ boolean that_present_retval = true;
+ if (this_present_retval || that_present_retval) {
+ if (!(this_present_retval && that_present_retval))
+ return false;
+ if (this.retval != that.retval)
+ return false;
+ }
+
+ boolean this_present_o_value = true;
+ boolean that_present_o_value = true;
+ if (this_present_o_value || that_present_o_value) {
+ if (!(this_present_o_value && that_present_o_value))
+ return false;
+ if (this.o_value != that.o_value)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Bool_Int other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Bool_Int typedOther = (Bool_Int)other;
+
+ lastComparison = Boolean.valueOf(isSetRetval()).compareTo(typedOther.isSetRetval());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRetval()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retval, typedOther.retval);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO_value()).compareTo(typedOther.isSetO_value());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO_value()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o_value, typedOther.o_value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Bool_Int(");
+ boolean first = true;
+
+ sb.append("retval:");
+ sb.append(this.retval);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o_value:");
+ sb.append(this.o_value);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class Bool_IntStandardSchemeFactory implements SchemeFactory {
+ public Bool_IntStandardScheme getScheme() {
+ return new Bool_IntStandardScheme();
+ }
+ }
+
+ private static class Bool_IntStandardScheme extends StandardScheme<Bool_Int> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Bool_Int struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+ switch (schemeField.id) {
+ case 1: // RETVAL
+ if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 2: // O_VALUE
+ if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+ struct.o_value = iprot.readI32();
+ struct.setO_valueIsSet(true);
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ default:
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ iprot.readFieldEnd();
+ }
+ iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ struct.validate();
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Bool_Int struct) throws org.apache.thrift.TException {
+ struct.validate();
+
+ oprot.writeStructBegin(STRUCT_DESC);
+ oprot.writeFieldBegin(RETVAL_FIELD_DESC);
+ oprot.writeBool(struct.retval);
+ oprot.writeFieldEnd();
+ oprot.writeFieldBegin(O_VALUE_FIELD_DESC);
+ oprot.writeI32(struct.o_value);
+ oprot.writeFieldEnd();
+ oprot.writeFieldStop();
+ oprot.writeStructEnd();
+ }
+
+ }
+
+ private static class Bool_IntTupleSchemeFactory implements SchemeFactory {
+ public Bool_IntTupleScheme getScheme() {
+ return new Bool_IntTupleScheme();
+ }
+ }
+
+ private static class Bool_IntTupleScheme extends TupleScheme<Bool_Int> {
+
+ @Override
+ public void write(org.apache.thrift.protocol.TProtocol prot, Bool_Int struct) throws org.apache.thrift.TException {
+ TTupleProtocol oprot = (TTupleProtocol) prot;
+ BitSet optionals = new BitSet();
+ if (struct.isSetRetval()) {
+ optionals.set(0);
+ }
+ if (struct.isSetO_value()) {
+ optionals.set(1);
+ }
+ oprot.writeBitSet(optionals, 2);
+ if (struct.isSetRetval()) {
+ oprot.writeBool(struct.retval);
+ }
+ if (struct.isSetO_value()) {
+ oprot.writeI32(struct.o_value);
+ }
+ }
+
+ @Override
+ public void read(org.apache.thrift.protocol.TProtocol prot, Bool_Int struct) throws org.apache.thrift.TException {
+ TTupleProtocol iprot = (TTupleProtocol) prot;
+ BitSet incoming = iprot.readBitSet(2);
+ if (incoming.get(0)) {
+ struct.retval = iprot.readBool();
+ struct.setRetvalIsSet(true);
+ }
+ if (incoming.get(1)) {
+ struct.o_value = iprot.readI32();
+ struct.setO_valueIsSet(true);
+ }
+ }
+ }
+
+}
+
View
477 gen-java/OpenZWave/Bool_Int16.java
@@ -0,0 +1,477 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.0-dev)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ * @generated
+ */
+package OpenZWave;
+
+import org.apache.thrift.scheme.IScheme;
+import org.apache.thrift.scheme.SchemeFactory;
+import org.apache.thrift.scheme.StandardScheme;
+
+import org.apache.thrift.scheme.TupleScheme;
+import org.apache.thrift.protocol.TTupleProtocol;
+import org.apache.thrift.protocol.TProtocolException;
+import org.apache.thrift.EncodingUtils;
+import java.util.List;
+import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.EnumMap;
+import java.util.Set;
+import java.util.HashSet;
+import java.util.EnumSet;
+import java.util.Collections;
+import java.util.BitSet;
+import java.nio.ByteBuffer;
+import java.util.Arrays;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+public class Bool_Int16 implements org.apache.thrift.TBase<Bool_Int16, Bool_Int16._Fields>, java.io.Serializable, Cloneable {
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Bool_Int16");
+
+ private static final org.apache.thrift.protocol.TField RETVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("retval", org.apache.thrift.protocol.TType.BOOL, (short)1);
+ private static final org.apache.thrift.protocol.TField O_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("o_value", org.apache.thrift.protocol.TType.I16, (short)2);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ static {
+ schemes.put(StandardScheme.class, new Bool_Int16StandardSchemeFactory());
+ schemes.put(TupleScheme.class, new Bool_Int16TupleSchemeFactory());
+ }
+
+ public boolean retval; // required
+ public short o_value; // required
+
+ /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
+ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
+ RETVAL((short)1, "retval"),
+ O_VALUE((short)2, "o_value");
+
+ private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+
+ static {
+ for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ byName.put(field.getFieldName(), field);
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, or null if its not found.
+ */
+ public static _Fields findByThriftId(int fieldId) {
+ switch(fieldId) {
+ case 1: // RETVAL
+ return RETVAL;
+ case 2: // O_VALUE
+ return O_VALUE;
+ default:
+ return null;
+ }
+ }
+
+ /**
+ * Find the _Fields constant that matches fieldId, throwing an exception
+ * if it is not found.
+ */
+ public static _Fields findByThriftIdOrThrow(int fieldId) {
+ _Fields fields = findByThriftId(fieldId);
+ if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ return fields;
+ }
+
+ /**
+ * Find the _Fields constant that matches name, or null if its not found.
+ */
+ public static _Fields findByName(String name) {
+ return byName.get(name);
+ }
+
+ private final short _thriftId;
+ private final String _fieldName;
+
+ _Fields(short thriftId, String fieldName) {
+ _thriftId = thriftId;
+ _fieldName = fieldName;
+ }
+
+ public short getThriftFieldId() {
+ return _thriftId;
+ }
+
+ public String getFieldName() {
+ return _fieldName;
+ }
+ }
+
+ // isset id assignments
+ private static final int __RETVAL_ISSET_ID = 0;
+ private static final int __O_VALUE_ISSET_ID = 1;
+ private byte __isset_bitfield = 0;
+ public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
+ static {
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.RETVAL, new org.apache.thrift.meta_data.FieldMetaData("retval", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.O_VALUE, new org.apache.thrift.meta_data.FieldMetaData("o_value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I16)));
+ metaDataMap = Collections.unmodifiableMap(tmpMap);
+ org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Bool_Int16.class, metaDataMap);
+ }
+
+ public Bool_Int16() {
+ }
+
+ public Bool_Int16(
+ boolean retval,
+ short o_value)
+ {
+ this();
+ this.retval = retval;
+ setRetvalIsSet(true);
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ }
+
+ /**
+ * Performs a deep copy on <i>other</i>.
+ */
+ public Bool_Int16(Bool_Int16 other) {
+ __isset_bitfield = other.__isset_bitfield;
+ this.retval = other.retval;
+ this.o_value = other.o_value;
+ }
+
+ public Bool_Int16 deepCopy() {
+ return new Bool_Int16(this);
+ }
+
+ @Override
+ public void clear() {
+ setRetvalIsSet(false);
+ this.retval = false;
+ setO_valueIsSet(false);
+ this.o_value = 0;
+ }
+
+ public boolean isRetval() {
+ return this.retval;
+ }
+
+ public Bool_Int16 setRetval(boolean retval) {
+ this.retval = retval;
+ setRetvalIsSet(true);
+ return this;
+ }
+
+ public void unsetRetval() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ /** Returns true if field retval is set (has been assigned a value) and false otherwise */
+ public boolean isSetRetval() {
+ return EncodingUtils.testBit(__isset_bitfield, __RETVAL_ISSET_ID);
+ }
+
+ public void setRetvalIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __RETVAL_ISSET_ID, value);
+ }
+
+ public short getO_value() {
+ return this.o_value;
+ }
+
+ public Bool_Int16 setO_value(short o_value) {
+ this.o_value = o_value;
+ setO_valueIsSet(true);
+ return this;
+ }
+
+ public void unsetO_value() {
+ __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ /** Returns true if field o_value is set (has been assigned a value) and false otherwise */
+ public boolean isSetO_value() {
+ return EncodingUtils.testBit(__isset_bitfield, __O_VALUE_ISSET_ID);
+ }
+
+ public void setO_valueIsSet(boolean value) {
+ __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __O_VALUE_ISSET_ID, value);
+ }
+
+ public void setFieldValue(_Fields field, Object value) {
+ switch (field) {
+ case RETVAL:
+ if (value == null) {
+ unsetRetval();
+ } else {
+ setRetval((Boolean)value);
+ }
+ break;
+
+ case O_VALUE:
+ if (value == null) {
+ unsetO_value();
+ } else {
+ setO_value((Short)value);
+ }
+ break;
+
+ }
+ }
+
+ public Object getFieldValue(_Fields field) {
+ switch (field) {
+ case RETVAL:
+ return Boolean.valueOf(isRetval());
+
+ case O_VALUE:
+ return Short.valueOf(getO_value());
+
+ }
+ throw new IllegalStateException();
+ }
+
+ /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
+ public boolean isSet(_Fields field) {
+ if (field == null) {
+ throw new IllegalArgumentException();
+ }
+
+ switch (field) {
+ case RETVAL:
+ return isSetRetval();
+ case O_VALUE:
+ return isSetO_value();
+ }
+ throw new IllegalStateException();
+ }
+
+ @Override
+ public boolean equals(Object that) {
+ if (that == null)
+ return false;
+ if (that instanceof Bool_Int16)
+ return this.equals((Bool_Int16)that);
+ return false;
+ }
+
+ public boolean equals(Bool_Int16 that) {
+ if (that == null)
+ return false;
+
+ boolean this_present_retval = true;
+ boolean that_present_retval = true;
+ if (this_present_retval || that_present_retval) {
+ if (!(this_present_retval && that_present_retval))
+ return false;
+ if (this.retval != that.retval)
+ return false;
+ }
+
+ boolean this_present_o_value = true;
+ boolean that_present_o_value = true;
+ if (this_present_o_value || that_present_o_value) {
+ if (!(this_present_o_value && that_present_o_value))
+ return false;
+ if (this.o_value != that.o_value)
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ return 0;
+ }
+
+ public int compareTo(Bool_Int16 other) {
+ if (!getClass().equals(other.getClass())) {
+ return getClass().getName().compareTo(other.getClass().getName());
+ }
+
+ int lastComparison = 0;
+ Bool_Int16 typedOther = (Bool_Int16)other;
+
+ lastComparison = Boolean.valueOf(isSetRetval()).compareTo(typedOther.isSetRetval());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetRetval()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.retval, typedOther.retval);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ lastComparison = Boolean.valueOf(isSetO_value()).compareTo(typedOther.isSetO_value());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetO_value()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.o_value, typedOther.o_value);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
+ return 0;
+ }
+
+ public _Fields fieldForId(int fieldId) {
+ return _Fields.findByThriftId(fieldId);
+ }
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ }
+
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder("Bool_Int16(");
+ boolean first = true;
+
+ sb.append("retval:");
+ sb.append(this.retval);
+ first = false;
+ if (!first) sb.append(", ");
+ sb.append("o_value:");
+ sb.append(this.o_value);
+ first = false;
+ sb.append(")");
+ return sb.toString();
+ }
+
+ public void validate() throws org.apache.thrift.TException {
+ // check for required fields
+ // check for sub-struct validity
+ }
+
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
+ try {
+ write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ try {
+ // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
+ __isset_bitfield = 0;
+ read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
+ } catch (org.apache.thrift.TException te) {
+ throw new java.io.IOException(te);
+ }
+ }
+
+ private static class Bool_Int16StandardSchemeFactory implements SchemeFactory {
+ public Bool_Int16StandardScheme getScheme() {
+ return new Bool_Int16StandardScheme();
+ }
+ }
+
+ private static class Bool_Int16StandardScheme extends StandardScheme<Bool_Int16> {
+
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Bool_Int16 struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TField schemeField;
+ iprot.readStructBegin();
+ while (true)
+ {
+ schemeField = iprot.readFieldBegin();
+ if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
+ break;
+ }
+