You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airavata.apache.org by sh...@apache.org on 2016/10/27 21:32:22 UTC

[29/53] airavata git commit: Adding aurora-client project

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateInstructions.java
----------------------------------------------------------------------
diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateInstructions.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateInstructions.java
new file mode 100644
index 0000000..45a7702
--- /dev/null
+++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateInstructions.java
@@ -0,0 +1,711 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.cloud.aurora.client.sdk;
+
+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 org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+/**
+ * Update configuration and setting details.
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-21")
+public class JobUpdateInstructions implements org.apache.thrift.TBase<JobUpdateInstructions, JobUpdateInstructions._Fields>, java.io.Serializable, Cloneable, Comparable<JobUpdateInstructions> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobUpdateInstructions");
+
+  private static final org.apache.thrift.protocol.TField INITIAL_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("initialState", org.apache.thrift.protocol.TType.SET, (short)1);
+  private static final org.apache.thrift.protocol.TField DESIRED_STATE_FIELD_DESC = new org.apache.thrift.protocol.TField("desiredState", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+  private static final org.apache.thrift.protocol.TField SETTINGS_FIELD_DESC = new org.apache.thrift.protocol.TField("settings", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new JobUpdateInstructionsStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new JobUpdateInstructionsTupleSchemeFactory());
+  }
+
+  /**
+   * Actual InstanceId -> TaskConfig mapping when the update was requested.
+   */
+  public Set<InstanceTaskConfig> initialState; // required
+  /**
+   * Desired configuration when the update completes.
+   */
+  public InstanceTaskConfig desiredState; // required
+  /**
+   * Update specific settings.
+   */
+  public JobUpdateSettings settings; // 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 {
+    /**
+     * Actual InstanceId -> TaskConfig mapping when the update was requested.
+     */
+    INITIAL_STATE((short)1, "initialState"),
+    /**
+     * Desired configuration when the update completes.
+     */
+    DESIRED_STATE((short)2, "desiredState"),
+    /**
+     * Update specific settings.
+     */
+    SETTINGS((short)3, "settings");
+
+    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: // INITIAL_STATE
+          return INITIAL_STATE;
+        case 2: // DESIRED_STATE
+          return DESIRED_STATE;
+        case 3: // SETTINGS
+          return SETTINGS;
+        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
+  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.INITIAL_STATE, new org.apache.thrift.meta_data.FieldMetaData("initialState", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
+            new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InstanceTaskConfig.class))));
+    tmpMap.put(_Fields.DESIRED_STATE, new org.apache.thrift.meta_data.FieldMetaData("desiredState", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, InstanceTaskConfig.class)));
+    tmpMap.put(_Fields.SETTINGS, new org.apache.thrift.meta_data.FieldMetaData("settings", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobUpdateSettings.class)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobUpdateInstructions.class, metaDataMap);
+  }
+
+  public JobUpdateInstructions() {
+  }
+
+  public JobUpdateInstructions(
+    Set<InstanceTaskConfig> initialState,
+    InstanceTaskConfig desiredState,
+    JobUpdateSettings settings)
+  {
+    this();
+    this.initialState = initialState;
+    this.desiredState = desiredState;
+    this.settings = settings;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public JobUpdateInstructions(JobUpdateInstructions other) {
+    if (other.isSetInitialState()) {
+      Set<InstanceTaskConfig> __this__initialState = new HashSet<InstanceTaskConfig>(other.initialState.size());
+      for (InstanceTaskConfig other_element : other.initialState) {
+        __this__initialState.add(new InstanceTaskConfig(other_element));
+      }
+      this.initialState = __this__initialState;
+    }
+    if (other.isSetDesiredState()) {
+      this.desiredState = new InstanceTaskConfig(other.desiredState);
+    }
+    if (other.isSetSettings()) {
+      this.settings = new JobUpdateSettings(other.settings);
+    }
+  }
+
+  public JobUpdateInstructions deepCopy() {
+    return new JobUpdateInstructions(this);
+  }
+
+  @Override
+  public void clear() {
+    this.initialState = null;
+    this.desiredState = null;
+    this.settings = null;
+  }
+
+  public int getInitialStateSize() {
+    return (this.initialState == null) ? 0 : this.initialState.size();
+  }
+
+  public java.util.Iterator<InstanceTaskConfig> getInitialStateIterator() {
+    return (this.initialState == null) ? null : this.initialState.iterator();
+  }
+
+  public void addToInitialState(InstanceTaskConfig elem) {
+    if (this.initialState == null) {
+      this.initialState = new HashSet<InstanceTaskConfig>();
+    }
+    this.initialState.add(elem);
+  }
+
+  /**
+   * Actual InstanceId -> TaskConfig mapping when the update was requested.
+   */
+  public Set<InstanceTaskConfig> getInitialState() {
+    return this.initialState;
+  }
+
+  /**
+   * Actual InstanceId -> TaskConfig mapping when the update was requested.
+   */
+  public JobUpdateInstructions setInitialState(Set<InstanceTaskConfig> initialState) {
+    this.initialState = initialState;
+    return this;
+  }
+
+  public void unsetInitialState() {
+    this.initialState = null;
+  }
+
+  /** Returns true if field initialState is set (has been assigned a value) and false otherwise */
+  public boolean isSetInitialState() {
+    return this.initialState != null;
+  }
+
+  public void setInitialStateIsSet(boolean value) {
+    if (!value) {
+      this.initialState = null;
+    }
+  }
+
+  /**
+   * Desired configuration when the update completes.
+   */
+  public InstanceTaskConfig getDesiredState() {
+    return this.desiredState;
+  }
+
+  /**
+   * Desired configuration when the update completes.
+   */
+  public JobUpdateInstructions setDesiredState(InstanceTaskConfig desiredState) {
+    this.desiredState = desiredState;
+    return this;
+  }
+
+  public void unsetDesiredState() {
+    this.desiredState = null;
+  }
+
+  /** Returns true if field desiredState is set (has been assigned a value) and false otherwise */
+  public boolean isSetDesiredState() {
+    return this.desiredState != null;
+  }
+
+  public void setDesiredStateIsSet(boolean value) {
+    if (!value) {
+      this.desiredState = null;
+    }
+  }
+
+  /**
+   * Update specific settings.
+   */
+  public JobUpdateSettings getSettings() {
+    return this.settings;
+  }
+
+  /**
+   * Update specific settings.
+   */
+  public JobUpdateInstructions setSettings(JobUpdateSettings settings) {
+    this.settings = settings;
+    return this;
+  }
+
+  public void unsetSettings() {
+    this.settings = null;
+  }
+
+  /** Returns true if field settings is set (has been assigned a value) and false otherwise */
+  public boolean isSetSettings() {
+    return this.settings != null;
+  }
+
+  public void setSettingsIsSet(boolean value) {
+    if (!value) {
+      this.settings = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case INITIAL_STATE:
+      if (value == null) {
+        unsetInitialState();
+      } else {
+        setInitialState((Set<InstanceTaskConfig>)value);
+      }
+      break;
+
+    case DESIRED_STATE:
+      if (value == null) {
+        unsetDesiredState();
+      } else {
+        setDesiredState((InstanceTaskConfig)value);
+      }
+      break;
+
+    case SETTINGS:
+      if (value == null) {
+        unsetSettings();
+      } else {
+        setSettings((JobUpdateSettings)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case INITIAL_STATE:
+      return getInitialState();
+
+    case DESIRED_STATE:
+      return getDesiredState();
+
+    case SETTINGS:
+      return getSettings();
+
+    }
+    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 INITIAL_STATE:
+      return isSetInitialState();
+    case DESIRED_STATE:
+      return isSetDesiredState();
+    case SETTINGS:
+      return isSetSettings();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof JobUpdateInstructions)
+      return this.equals((JobUpdateInstructions)that);
+    return false;
+  }
+
+  public boolean equals(JobUpdateInstructions that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_initialState = true && this.isSetInitialState();
+    boolean that_present_initialState = true && that.isSetInitialState();
+    if (this_present_initialState || that_present_initialState) {
+      if (!(this_present_initialState && that_present_initialState))
+        return false;
+      if (!this.initialState.equals(that.initialState))
+        return false;
+    }
+
+    boolean this_present_desiredState = true && this.isSetDesiredState();
+    boolean that_present_desiredState = true && that.isSetDesiredState();
+    if (this_present_desiredState || that_present_desiredState) {
+      if (!(this_present_desiredState && that_present_desiredState))
+        return false;
+      if (!this.desiredState.equals(that.desiredState))
+        return false;
+    }
+
+    boolean this_present_settings = true && this.isSetSettings();
+    boolean that_present_settings = true && that.isSetSettings();
+    if (this_present_settings || that_present_settings) {
+      if (!(this_present_settings && that_present_settings))
+        return false;
+      if (!this.settings.equals(that.settings))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_initialState = true && (isSetInitialState());
+    list.add(present_initialState);
+    if (present_initialState)
+      list.add(initialState);
+
+    boolean present_desiredState = true && (isSetDesiredState());
+    list.add(present_desiredState);
+    if (present_desiredState)
+      list.add(desiredState);
+
+    boolean present_settings = true && (isSetSettings());
+    list.add(present_settings);
+    if (present_settings)
+      list.add(settings);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(JobUpdateInstructions other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetInitialState()).compareTo(other.isSetInitialState());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetInitialState()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.initialState, other.initialState);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetDesiredState()).compareTo(other.isSetDesiredState());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetDesiredState()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.desiredState, other.desiredState);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetSettings()).compareTo(other.isSetSettings());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetSettings()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.settings, other.settings);
+      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("JobUpdateInstructions(");
+    boolean first = true;
+
+    sb.append("initialState:");
+    if (this.initialState == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.initialState);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("desiredState:");
+    if (this.desiredState == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.desiredState);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("settings:");
+    if (this.settings == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.settings);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+    if (desiredState != null) {
+      desiredState.validate();
+    }
+    if (settings != null) {
+      settings.validate();
+    }
+  }
+
+  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 {
+      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 JobUpdateInstructionsStandardSchemeFactory implements SchemeFactory {
+    public JobUpdateInstructionsStandardScheme getScheme() {
+      return new JobUpdateInstructionsStandardScheme();
+    }
+  }
+
+  private static class JobUpdateInstructionsStandardScheme extends StandardScheme<JobUpdateInstructions> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, JobUpdateInstructions 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: // INITIAL_STATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set214 = iprot.readSetBegin();
+                struct.initialState = new HashSet<InstanceTaskConfig>(2*_set214.size);
+                InstanceTaskConfig _elem215;
+                for (int _i216 = 0; _i216 < _set214.size; ++_i216)
+                {
+                  _elem215 = new InstanceTaskConfig();
+                  _elem215.read(iprot);
+                  struct.initialState.add(_elem215);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setInitialStateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // DESIRED_STATE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.desiredState = new InstanceTaskConfig();
+              struct.desiredState.read(iprot);
+              struct.setDesiredStateIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // SETTINGS
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.settings = new JobUpdateSettings();
+              struct.settings.read(iprot);
+              struct.setSettingsIsSet(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, JobUpdateInstructions struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.initialState != null) {
+        oprot.writeFieldBegin(INITIAL_STATE_FIELD_DESC);
+        {
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, struct.initialState.size()));
+          for (InstanceTaskConfig _iter217 : struct.initialState)
+          {
+            _iter217.write(oprot);
+          }
+          oprot.writeSetEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      if (struct.desiredState != null) {
+        oprot.writeFieldBegin(DESIRED_STATE_FIELD_DESC);
+        struct.desiredState.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.settings != null) {
+        oprot.writeFieldBegin(SETTINGS_FIELD_DESC);
+        struct.settings.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class JobUpdateInstructionsTupleSchemeFactory implements SchemeFactory {
+    public JobUpdateInstructionsTupleScheme getScheme() {
+      return new JobUpdateInstructionsTupleScheme();
+    }
+  }
+
+  private static class JobUpdateInstructionsTupleScheme extends TupleScheme<JobUpdateInstructions> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, JobUpdateInstructions struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetInitialState()) {
+        optionals.set(0);
+      }
+      if (struct.isSetDesiredState()) {
+        optionals.set(1);
+      }
+      if (struct.isSetSettings()) {
+        optionals.set(2);
+      }
+      oprot.writeBitSet(optionals, 3);
+      if (struct.isSetInitialState()) {
+        {
+          oprot.writeI32(struct.initialState.size());
+          for (InstanceTaskConfig _iter218 : struct.initialState)
+          {
+            _iter218.write(oprot);
+          }
+        }
+      }
+      if (struct.isSetDesiredState()) {
+        struct.desiredState.write(oprot);
+      }
+      if (struct.isSetSettings()) {
+        struct.settings.write(oprot);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, JobUpdateInstructions struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(3);
+      if (incoming.get(0)) {
+        {
+          org.apache.thrift.protocol.TSet _set219 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+          struct.initialState = new HashSet<InstanceTaskConfig>(2*_set219.size);
+          InstanceTaskConfig _elem220;
+          for (int _i221 = 0; _i221 < _set219.size; ++_i221)
+          {
+            _elem220 = new InstanceTaskConfig();
+            _elem220.read(iprot);
+            struct.initialState.add(_elem220);
+          }
+        }
+        struct.setInitialStateIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.desiredState = new InstanceTaskConfig();
+        struct.desiredState.read(iprot);
+        struct.setDesiredStateIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.settings = new JobUpdateSettings();
+        struct.settings.read(iprot);
+        struct.setSettingsIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateKey.java
----------------------------------------------------------------------
diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateKey.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateKey.java
new file mode 100644
index 0000000..db0b9cb
--- /dev/null
+++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateKey.java
@@ -0,0 +1,535 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.cloud.aurora.client.sdk;
+
+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 org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+/**
+ * Job update key.
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-21")
+public class JobUpdateKey implements org.apache.thrift.TBase<JobUpdateKey, JobUpdateKey._Fields>, java.io.Serializable, Cloneable, Comparable<JobUpdateKey> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobUpdateKey");
+
+  private static final org.apache.thrift.protocol.TField JOB_FIELD_DESC = new org.apache.thrift.protocol.TField("job", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+  private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.STRING, (short)2);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new JobUpdateKeyStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new JobUpdateKeyTupleSchemeFactory());
+  }
+
+  /**
+   * Job being updated
+   */
+  public JobKey job; // required
+  /**
+   * Update ID.
+   */
+  public String id; // 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 {
+    /**
+     * Job being updated
+     */
+    JOB((short)1, "job"),
+    /**
+     * Update ID.
+     */
+    ID((short)2, "id");
+
+    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: // JOB
+          return JOB;
+        case 2: // ID
+          return ID;
+        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
+  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.JOB, new org.apache.thrift.meta_data.FieldMetaData("job", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobKey.class)));
+    tmpMap.put(_Fields.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    metaDataMap = Collections.unmodifiableMap(tmpMap);
+    org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(JobUpdateKey.class, metaDataMap);
+  }
+
+  public JobUpdateKey() {
+  }
+
+  public JobUpdateKey(
+    JobKey job,
+    String id)
+  {
+    this();
+    this.job = job;
+    this.id = id;
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public JobUpdateKey(JobUpdateKey other) {
+    if (other.isSetJob()) {
+      this.job = new JobKey(other.job);
+    }
+    if (other.isSetId()) {
+      this.id = other.id;
+    }
+  }
+
+  public JobUpdateKey deepCopy() {
+    return new JobUpdateKey(this);
+  }
+
+  @Override
+  public void clear() {
+    this.job = null;
+    this.id = null;
+  }
+
+  /**
+   * Job being updated
+   */
+  public JobKey getJob() {
+    return this.job;
+  }
+
+  /**
+   * Job being updated
+   */
+  public JobUpdateKey setJob(JobKey job) {
+    this.job = job;
+    return this;
+  }
+
+  public void unsetJob() {
+    this.job = null;
+  }
+
+  /** Returns true if field job is set (has been assigned a value) and false otherwise */
+  public boolean isSetJob() {
+    return this.job != null;
+  }
+
+  public void setJobIsSet(boolean value) {
+    if (!value) {
+      this.job = null;
+    }
+  }
+
+  /**
+   * Update ID.
+   */
+  public String getId() {
+    return this.id;
+  }
+
+  /**
+   * Update ID.
+   */
+  public JobUpdateKey setId(String id) {
+    this.id = id;
+    return this;
+  }
+
+  public void unsetId() {
+    this.id = null;
+  }
+
+  /** Returns true if field id is set (has been assigned a value) and false otherwise */
+  public boolean isSetId() {
+    return this.id != null;
+  }
+
+  public void setIdIsSet(boolean value) {
+    if (!value) {
+      this.id = null;
+    }
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case JOB:
+      if (value == null) {
+        unsetJob();
+      } else {
+        setJob((JobKey)value);
+      }
+      break;
+
+    case ID:
+      if (value == null) {
+        unsetId();
+      } else {
+        setId((String)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case JOB:
+      return getJob();
+
+    case ID:
+      return getId();
+
+    }
+    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 JOB:
+      return isSetJob();
+    case ID:
+      return isSetId();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof JobUpdateKey)
+      return this.equals((JobUpdateKey)that);
+    return false;
+  }
+
+  public boolean equals(JobUpdateKey that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_job = true && this.isSetJob();
+    boolean that_present_job = true && that.isSetJob();
+    if (this_present_job || that_present_job) {
+      if (!(this_present_job && that_present_job))
+        return false;
+      if (!this.job.equals(that.job))
+        return false;
+    }
+
+    boolean this_present_id = true && this.isSetId();
+    boolean that_present_id = true && that.isSetId();
+    if (this_present_id || that_present_id) {
+      if (!(this_present_id && that_present_id))
+        return false;
+      if (!this.id.equals(that.id))
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_job = true && (isSetJob());
+    list.add(present_job);
+    if (present_job)
+      list.add(job);
+
+    boolean present_id = true && (isSetId());
+    list.add(present_id);
+    if (present_id)
+      list.add(id);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(JobUpdateKey other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetJob()).compareTo(other.isSetJob());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetJob()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.job, other.job);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetId()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.id, other.id);
+      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("JobUpdateKey(");
+    boolean first = true;
+
+    sb.append("job:");
+    if (this.job == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.job);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("id:");
+    if (this.id == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.id);
+    }
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+    if (job != null) {
+      job.validate();
+    }
+  }
+
+  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 {
+      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 JobUpdateKeyStandardSchemeFactory implements SchemeFactory {
+    public JobUpdateKeyStandardScheme getScheme() {
+      return new JobUpdateKeyStandardScheme();
+    }
+  }
+
+  private static class JobUpdateKeyStandardScheme extends StandardScheme<JobUpdateKey> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, JobUpdateKey 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: // JOB
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.job = new JobKey();
+              struct.job.read(iprot);
+              struct.setJobIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 2: // ID
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.id = iprot.readString();
+              struct.setIdIsSet(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, JobUpdateKey struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.job != null) {
+        oprot.writeFieldBegin(JOB_FIELD_DESC);
+        struct.job.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.id != null) {
+        oprot.writeFieldBegin(ID_FIELD_DESC);
+        oprot.writeString(struct.id);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class JobUpdateKeyTupleSchemeFactory implements SchemeFactory {
+    public JobUpdateKeyTupleScheme getScheme() {
+      return new JobUpdateKeyTupleScheme();
+    }
+  }
+
+  private static class JobUpdateKeyTupleScheme extends TupleScheme<JobUpdateKey> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, JobUpdateKey struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetJob()) {
+        optionals.set(0);
+      }
+      if (struct.isSetId()) {
+        optionals.set(1);
+      }
+      oprot.writeBitSet(optionals, 2);
+      if (struct.isSetJob()) {
+        struct.job.write(oprot);
+      }
+      if (struct.isSetId()) {
+        oprot.writeString(struct.id);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, JobUpdateKey struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(2);
+      if (incoming.get(0)) {
+        struct.job = new JobKey();
+        struct.job.read(iprot);
+        struct.setJobIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.id = iprot.readString();
+        struct.setIdIsSet(true);
+      }
+    }
+  }
+
+}
+

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdatePulseStatus.java
----------------------------------------------------------------------
diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdatePulseStatus.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdatePulseStatus.java
new file mode 100644
index 0000000..5311bcf
--- /dev/null
+++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdatePulseStatus.java
@@ -0,0 +1,55 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.cloud.aurora.client.sdk;
+
+
+import java.util.Map;
+import java.util.HashMap;
+import org.apache.thrift.TEnum;
+
+/**
+ * Status of the coordinated update. Intended as a response to pulseJobUpdate RPC.
+ */
+public enum JobUpdatePulseStatus implements org.apache.thrift.TEnum {
+  /**
+   * Update is active. See ACTIVE_JOB_UPDATE_STATES for statuses considered active.
+   */
+  OK(1),
+  /**
+   * Update has reached terminal state. See TERMINAL_JOB_UPDATE_STATES for statuses
+   * considered terminal.
+   */
+  FINISHED(2);
+
+  private final int value;
+
+  private JobUpdatePulseStatus(int value) {
+    this.value = value;
+  }
+
+  /**
+   * Get the integer value of this enum value, as defined in the Thrift IDL.
+   */
+  public int getValue() {
+    return value;
+  }
+
+  /**
+   * Find a the enum type by its integer value, as defined in the Thrift IDL.
+   * @return null if the value is not found.
+   */
+  public static JobUpdatePulseStatus findByValue(int value) { 
+    switch (value) {
+      case 1:
+        return OK;
+      case 2:
+        return FINISHED;
+      default:
+        return null;
+    }
+  }
+}

http://git-wip-us.apache.org/repos/asf/airavata/blob/0f781b2e/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateQuery.java
----------------------------------------------------------------------
diff --git a/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateQuery.java b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateQuery.java
new file mode 100644
index 0000000..379f109
--- /dev/null
+++ b/modules/cloud/aurora-client/src/main/java/org/apache/airavata/cloud/aurora/client/sdk/JobUpdateQuery.java
@@ -0,0 +1,1170 @@
+/**
+ * Autogenerated by Thrift Compiler (0.9.3)
+ *
+ * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
+ *  @generated
+ */
+package org.apache.airavata.cloud.aurora.client.sdk;
+
+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 org.apache.thrift.TException;
+import org.apache.thrift.async.AsyncMethodCallback;
+import org.apache.thrift.server.AbstractNonblockingServer.*;
+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 javax.annotation.Generated;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+/**
+ * Contains a set of restrictions on matching job updates where all restrictions must be met
+ * (terms are AND'ed together).
+ */
+@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2016-10-21")
+public class JobUpdateQuery implements org.apache.thrift.TBase<JobUpdateQuery, JobUpdateQuery._Fields>, java.io.Serializable, Cloneable, Comparable<JobUpdateQuery> {
+  private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("JobUpdateQuery");
+
+  private static final org.apache.thrift.protocol.TField ROLE_FIELD_DESC = new org.apache.thrift.protocol.TField("role", org.apache.thrift.protocol.TType.STRING, (short)2);
+  private static final org.apache.thrift.protocol.TField KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("key", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+  private static final org.apache.thrift.protocol.TField JOB_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("jobKey", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+  private static final org.apache.thrift.protocol.TField USER_FIELD_DESC = new org.apache.thrift.protocol.TField("user", org.apache.thrift.protocol.TType.STRING, (short)4);
+  private static final org.apache.thrift.protocol.TField UPDATE_STATUSES_FIELD_DESC = new org.apache.thrift.protocol.TField("updateStatuses", org.apache.thrift.protocol.TType.SET, (short)5);
+  private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short)6);
+  private static final org.apache.thrift.protocol.TField LIMIT_FIELD_DESC = new org.apache.thrift.protocol.TField("limit", org.apache.thrift.protocol.TType.I32, (short)7);
+
+  private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
+  static {
+    schemes.put(StandardScheme.class, new JobUpdateQueryStandardSchemeFactory());
+    schemes.put(TupleScheme.class, new JobUpdateQueryTupleSchemeFactory());
+  }
+
+  /**
+   * Job role.
+   */
+  public String role; // required
+  /**
+   * Unique identifier for a job update.
+   */
+  public JobUpdateKey key; // required
+  /**
+   * Job key.
+   */
+  public JobKey jobKey; // required
+  /**
+   * User who created the update.
+   */
+  public String user; // required
+  /**
+   * Set of update statuses.
+   */
+  public Set<JobUpdateStatus> updateStatuses; // required
+  /**
+   * Offset to serve data from. Used by pagination.
+   */
+  public int offset; // required
+  /**
+   * Number or records to serve. Used by pagination.
+   */
+  public int limit; // 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 {
+    /**
+     * Job role.
+     */
+    ROLE((short)2, "role"),
+    /**
+     * Unique identifier for a job update.
+     */
+    KEY((short)8, "key"),
+    /**
+     * Job key.
+     */
+    JOB_KEY((short)3, "jobKey"),
+    /**
+     * User who created the update.
+     */
+    USER((short)4, "user"),
+    /**
+     * Set of update statuses.
+     */
+    UPDATE_STATUSES((short)5, "updateStatuses"),
+    /**
+     * Offset to serve data from. Used by pagination.
+     */
+    OFFSET((short)6, "offset"),
+    /**
+     * Number or records to serve. Used by pagination.
+     */
+    LIMIT((short)7, "limit");
+
+    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 2: // ROLE
+          return ROLE;
+        case 8: // KEY
+          return KEY;
+        case 3: // JOB_KEY
+          return JOB_KEY;
+        case 4: // USER
+          return USER;
+        case 5: // UPDATE_STATUSES
+          return UPDATE_STATUSES;
+        case 6: // OFFSET
+          return OFFSET;
+        case 7: // LIMIT
+          return LIMIT;
+        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 __OFFSET_ISSET_ID = 0;
+  private static final int __LIMIT_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.ROLE, new org.apache.thrift.meta_data.FieldMetaData("role", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.KEY, new org.apache.thrift.meta_data.FieldMetaData("key", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobUpdateKey.class)));
+    tmpMap.put(_Fields.JOB_KEY, new org.apache.thrift.meta_data.FieldMetaData("jobKey", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, JobKey.class)));
+    tmpMap.put(_Fields.USER, new org.apache.thrift.meta_data.FieldMetaData("user", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+    tmpMap.put(_Fields.UPDATE_STATUSES, new org.apache.thrift.meta_data.FieldMetaData("updateStatuses", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.SetMetaData(org.apache.thrift.protocol.TType.SET, 
+            new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, JobUpdateStatus.class))));
+    tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.DEFAULT, 
+        new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+    tmpMap.put(_Fields.LIMIT, new org.apache.thrift.meta_data.FieldMetaData("limit", 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(JobUpdateQuery.class, metaDataMap);
+  }
+
+  public JobUpdateQuery() {
+  }
+
+  public JobUpdateQuery(
+    String role,
+    JobUpdateKey key,
+    JobKey jobKey,
+    String user,
+    Set<JobUpdateStatus> updateStatuses,
+    int offset,
+    int limit)
+  {
+    this();
+    this.role = role;
+    this.key = key;
+    this.jobKey = jobKey;
+    this.user = user;
+    this.updateStatuses = updateStatuses;
+    this.offset = offset;
+    setOffsetIsSet(true);
+    this.limit = limit;
+    setLimitIsSet(true);
+  }
+
+  /**
+   * Performs a deep copy on <i>other</i>.
+   */
+  public JobUpdateQuery(JobUpdateQuery other) {
+    __isset_bitfield = other.__isset_bitfield;
+    if (other.isSetRole()) {
+      this.role = other.role;
+    }
+    if (other.isSetKey()) {
+      this.key = new JobUpdateKey(other.key);
+    }
+    if (other.isSetJobKey()) {
+      this.jobKey = new JobKey(other.jobKey);
+    }
+    if (other.isSetUser()) {
+      this.user = other.user;
+    }
+    if (other.isSetUpdateStatuses()) {
+      Set<JobUpdateStatus> __this__updateStatuses = new HashSet<JobUpdateStatus>(other.updateStatuses.size());
+      for (JobUpdateStatus other_element : other.updateStatuses) {
+        __this__updateStatuses.add(other_element);
+      }
+      this.updateStatuses = __this__updateStatuses;
+    }
+    this.offset = other.offset;
+    this.limit = other.limit;
+  }
+
+  public JobUpdateQuery deepCopy() {
+    return new JobUpdateQuery(this);
+  }
+
+  @Override
+  public void clear() {
+    this.role = null;
+    this.key = null;
+    this.jobKey = null;
+    this.user = null;
+    this.updateStatuses = null;
+    setOffsetIsSet(false);
+    this.offset = 0;
+    setLimitIsSet(false);
+    this.limit = 0;
+  }
+
+  /**
+   * Job role.
+   */
+  public String getRole() {
+    return this.role;
+  }
+
+  /**
+   * Job role.
+   */
+  public JobUpdateQuery setRole(String role) {
+    this.role = role;
+    return this;
+  }
+
+  public void unsetRole() {
+    this.role = null;
+  }
+
+  /** Returns true if field role is set (has been assigned a value) and false otherwise */
+  public boolean isSetRole() {
+    return this.role != null;
+  }
+
+  public void setRoleIsSet(boolean value) {
+    if (!value) {
+      this.role = null;
+    }
+  }
+
+  /**
+   * Unique identifier for a job update.
+   */
+  public JobUpdateKey getKey() {
+    return this.key;
+  }
+
+  /**
+   * Unique identifier for a job update.
+   */
+  public JobUpdateQuery setKey(JobUpdateKey key) {
+    this.key = key;
+    return this;
+  }
+
+  public void unsetKey() {
+    this.key = null;
+  }
+
+  /** Returns true if field key is set (has been assigned a value) and false otherwise */
+  public boolean isSetKey() {
+    return this.key != null;
+  }
+
+  public void setKeyIsSet(boolean value) {
+    if (!value) {
+      this.key = null;
+    }
+  }
+
+  /**
+   * Job key.
+   */
+  public JobKey getJobKey() {
+    return this.jobKey;
+  }
+
+  /**
+   * Job key.
+   */
+  public JobUpdateQuery setJobKey(JobKey jobKey) {
+    this.jobKey = jobKey;
+    return this;
+  }
+
+  public void unsetJobKey() {
+    this.jobKey = null;
+  }
+
+  /** Returns true if field jobKey is set (has been assigned a value) and false otherwise */
+  public boolean isSetJobKey() {
+    return this.jobKey != null;
+  }
+
+  public void setJobKeyIsSet(boolean value) {
+    if (!value) {
+      this.jobKey = null;
+    }
+  }
+
+  /**
+   * User who created the update.
+   */
+  public String getUser() {
+    return this.user;
+  }
+
+  /**
+   * User who created the update.
+   */
+  public JobUpdateQuery setUser(String user) {
+    this.user = user;
+    return this;
+  }
+
+  public void unsetUser() {
+    this.user = null;
+  }
+
+  /** Returns true if field user is set (has been assigned a value) and false otherwise */
+  public boolean isSetUser() {
+    return this.user != null;
+  }
+
+  public void setUserIsSet(boolean value) {
+    if (!value) {
+      this.user = null;
+    }
+  }
+
+  public int getUpdateStatusesSize() {
+    return (this.updateStatuses == null) ? 0 : this.updateStatuses.size();
+  }
+
+  public java.util.Iterator<JobUpdateStatus> getUpdateStatusesIterator() {
+    return (this.updateStatuses == null) ? null : this.updateStatuses.iterator();
+  }
+
+  public void addToUpdateStatuses(JobUpdateStatus elem) {
+    if (this.updateStatuses == null) {
+      this.updateStatuses = new HashSet<JobUpdateStatus>();
+    }
+    this.updateStatuses.add(elem);
+  }
+
+  /**
+   * Set of update statuses.
+   */
+  public Set<JobUpdateStatus> getUpdateStatuses() {
+    return this.updateStatuses;
+  }
+
+  /**
+   * Set of update statuses.
+   */
+  public JobUpdateQuery setUpdateStatuses(Set<JobUpdateStatus> updateStatuses) {
+    this.updateStatuses = updateStatuses;
+    return this;
+  }
+
+  public void unsetUpdateStatuses() {
+    this.updateStatuses = null;
+  }
+
+  /** Returns true if field updateStatuses is set (has been assigned a value) and false otherwise */
+  public boolean isSetUpdateStatuses() {
+    return this.updateStatuses != null;
+  }
+
+  public void setUpdateStatusesIsSet(boolean value) {
+    if (!value) {
+      this.updateStatuses = null;
+    }
+  }
+
+  /**
+   * Offset to serve data from. Used by pagination.
+   */
+  public int getOffset() {
+    return this.offset;
+  }
+
+  /**
+   * Offset to serve data from. Used by pagination.
+   */
+  public JobUpdateQuery setOffset(int offset) {
+    this.offset = offset;
+    setOffsetIsSet(true);
+    return this;
+  }
+
+  public void unsetOffset() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __OFFSET_ISSET_ID);
+  }
+
+  /** Returns true if field offset is set (has been assigned a value) and false otherwise */
+  public boolean isSetOffset() {
+    return EncodingUtils.testBit(__isset_bitfield, __OFFSET_ISSET_ID);
+  }
+
+  public void setOffsetIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
+  }
+
+  /**
+   * Number or records to serve. Used by pagination.
+   */
+  public int getLimit() {
+    return this.limit;
+  }
+
+  /**
+   * Number or records to serve. Used by pagination.
+   */
+  public JobUpdateQuery setLimit(int limit) {
+    this.limit = limit;
+    setLimitIsSet(true);
+    return this;
+  }
+
+  public void unsetLimit() {
+    __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __LIMIT_ISSET_ID);
+  }
+
+  /** Returns true if field limit is set (has been assigned a value) and false otherwise */
+  public boolean isSetLimit() {
+    return EncodingUtils.testBit(__isset_bitfield, __LIMIT_ISSET_ID);
+  }
+
+  public void setLimitIsSet(boolean value) {
+    __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __LIMIT_ISSET_ID, value);
+  }
+
+  public void setFieldValue(_Fields field, Object value) {
+    switch (field) {
+    case ROLE:
+      if (value == null) {
+        unsetRole();
+      } else {
+        setRole((String)value);
+      }
+      break;
+
+    case KEY:
+      if (value == null) {
+        unsetKey();
+      } else {
+        setKey((JobUpdateKey)value);
+      }
+      break;
+
+    case JOB_KEY:
+      if (value == null) {
+        unsetJobKey();
+      } else {
+        setJobKey((JobKey)value);
+      }
+      break;
+
+    case USER:
+      if (value == null) {
+        unsetUser();
+      } else {
+        setUser((String)value);
+      }
+      break;
+
+    case UPDATE_STATUSES:
+      if (value == null) {
+        unsetUpdateStatuses();
+      } else {
+        setUpdateStatuses((Set<JobUpdateStatus>)value);
+      }
+      break;
+
+    case OFFSET:
+      if (value == null) {
+        unsetOffset();
+      } else {
+        setOffset((Integer)value);
+      }
+      break;
+
+    case LIMIT:
+      if (value == null) {
+        unsetLimit();
+      } else {
+        setLimit((Integer)value);
+      }
+      break;
+
+    }
+  }
+
+  public Object getFieldValue(_Fields field) {
+    switch (field) {
+    case ROLE:
+      return getRole();
+
+    case KEY:
+      return getKey();
+
+    case JOB_KEY:
+      return getJobKey();
+
+    case USER:
+      return getUser();
+
+    case UPDATE_STATUSES:
+      return getUpdateStatuses();
+
+    case OFFSET:
+      return getOffset();
+
+    case LIMIT:
+      return getLimit();
+
+    }
+    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 ROLE:
+      return isSetRole();
+    case KEY:
+      return isSetKey();
+    case JOB_KEY:
+      return isSetJobKey();
+    case USER:
+      return isSetUser();
+    case UPDATE_STATUSES:
+      return isSetUpdateStatuses();
+    case OFFSET:
+      return isSetOffset();
+    case LIMIT:
+      return isSetLimit();
+    }
+    throw new IllegalStateException();
+  }
+
+  @Override
+  public boolean equals(Object that) {
+    if (that == null)
+      return false;
+    if (that instanceof JobUpdateQuery)
+      return this.equals((JobUpdateQuery)that);
+    return false;
+  }
+
+  public boolean equals(JobUpdateQuery that) {
+    if (that == null)
+      return false;
+
+    boolean this_present_role = true && this.isSetRole();
+    boolean that_present_role = true && that.isSetRole();
+    if (this_present_role || that_present_role) {
+      if (!(this_present_role && that_present_role))
+        return false;
+      if (!this.role.equals(that.role))
+        return false;
+    }
+
+    boolean this_present_key = true && this.isSetKey();
+    boolean that_present_key = true && that.isSetKey();
+    if (this_present_key || that_present_key) {
+      if (!(this_present_key && that_present_key))
+        return false;
+      if (!this.key.equals(that.key))
+        return false;
+    }
+
+    boolean this_present_jobKey = true && this.isSetJobKey();
+    boolean that_present_jobKey = true && that.isSetJobKey();
+    if (this_present_jobKey || that_present_jobKey) {
+      if (!(this_present_jobKey && that_present_jobKey))
+        return false;
+      if (!this.jobKey.equals(that.jobKey))
+        return false;
+    }
+
+    boolean this_present_user = true && this.isSetUser();
+    boolean that_present_user = true && that.isSetUser();
+    if (this_present_user || that_present_user) {
+      if (!(this_present_user && that_present_user))
+        return false;
+      if (!this.user.equals(that.user))
+        return false;
+    }
+
+    boolean this_present_updateStatuses = true && this.isSetUpdateStatuses();
+    boolean that_present_updateStatuses = true && that.isSetUpdateStatuses();
+    if (this_present_updateStatuses || that_present_updateStatuses) {
+      if (!(this_present_updateStatuses && that_present_updateStatuses))
+        return false;
+      if (!this.updateStatuses.equals(that.updateStatuses))
+        return false;
+    }
+
+    boolean this_present_offset = true;
+    boolean that_present_offset = true;
+    if (this_present_offset || that_present_offset) {
+      if (!(this_present_offset && that_present_offset))
+        return false;
+      if (this.offset != that.offset)
+        return false;
+    }
+
+    boolean this_present_limit = true;
+    boolean that_present_limit = true;
+    if (this_present_limit || that_present_limit) {
+      if (!(this_present_limit && that_present_limit))
+        return false;
+      if (this.limit != that.limit)
+        return false;
+    }
+
+    return true;
+  }
+
+  @Override
+  public int hashCode() {
+    List<Object> list = new ArrayList<Object>();
+
+    boolean present_role = true && (isSetRole());
+    list.add(present_role);
+    if (present_role)
+      list.add(role);
+
+    boolean present_key = true && (isSetKey());
+    list.add(present_key);
+    if (present_key)
+      list.add(key);
+
+    boolean present_jobKey = true && (isSetJobKey());
+    list.add(present_jobKey);
+    if (present_jobKey)
+      list.add(jobKey);
+
+    boolean present_user = true && (isSetUser());
+    list.add(present_user);
+    if (present_user)
+      list.add(user);
+
+    boolean present_updateStatuses = true && (isSetUpdateStatuses());
+    list.add(present_updateStatuses);
+    if (present_updateStatuses)
+      list.add(updateStatuses);
+
+    boolean present_offset = true;
+    list.add(present_offset);
+    if (present_offset)
+      list.add(offset);
+
+    boolean present_limit = true;
+    list.add(present_limit);
+    if (present_limit)
+      list.add(limit);
+
+    return list.hashCode();
+  }
+
+  @Override
+  public int compareTo(JobUpdateQuery other) {
+    if (!getClass().equals(other.getClass())) {
+      return getClass().getName().compareTo(other.getClass().getName());
+    }
+
+    int lastComparison = 0;
+
+    lastComparison = Boolean.valueOf(isSetRole()).compareTo(other.isSetRole());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetRole()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.role, other.role);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetKey()).compareTo(other.isSetKey());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetKey()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.key, other.key);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetJobKey()).compareTo(other.isSetJobKey());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetJobKey()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.jobKey, other.jobKey);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUser()).compareTo(other.isSetUser());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUser()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.user, other.user);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetUpdateStatuses()).compareTo(other.isSetUpdateStatuses());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetUpdateStatuses()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.updateStatuses, other.updateStatuses);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetOffset()).compareTo(other.isSetOffset());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetOffset()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.offset, other.offset);
+      if (lastComparison != 0) {
+        return lastComparison;
+      }
+    }
+    lastComparison = Boolean.valueOf(isSetLimit()).compareTo(other.isSetLimit());
+    if (lastComparison != 0) {
+      return lastComparison;
+    }
+    if (isSetLimit()) {
+      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.limit, other.limit);
+      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("JobUpdateQuery(");
+    boolean first = true;
+
+    sb.append("role:");
+    if (this.role == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.role);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("key:");
+    if (this.key == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.key);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("jobKey:");
+    if (this.jobKey == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.jobKey);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("user:");
+    if (this.user == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.user);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("updateStatuses:");
+    if (this.updateStatuses == null) {
+      sb.append("null");
+    } else {
+      sb.append(this.updateStatuses);
+    }
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("offset:");
+    sb.append(this.offset);
+    first = false;
+    if (!first) sb.append(", ");
+    sb.append("limit:");
+    sb.append(this.limit);
+    first = false;
+    sb.append(")");
+    return sb.toString();
+  }
+
+  public void validate() throws org.apache.thrift.TException {
+    // check for required fields
+    // check for sub-struct validity
+    if (key != null) {
+      key.validate();
+    }
+    if (jobKey != null) {
+      jobKey.validate();
+    }
+  }
+
+  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 JobUpdateQueryStandardSchemeFactory implements SchemeFactory {
+    public JobUpdateQueryStandardScheme getScheme() {
+      return new JobUpdateQueryStandardScheme();
+    }
+  }
+
+  private static class JobUpdateQueryStandardScheme extends StandardScheme<JobUpdateQuery> {
+
+    public void read(org.apache.thrift.protocol.TProtocol iprot, JobUpdateQuery 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 2: // ROLE
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.role = iprot.readString();
+              struct.setRoleIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 8: // KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.key = new JobUpdateKey();
+              struct.key.read(iprot);
+              struct.setKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 3: // JOB_KEY
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
+              struct.jobKey = new JobKey();
+              struct.jobKey.read(iprot);
+              struct.setJobKeyIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 4: // USER
+            if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
+              struct.user = iprot.readString();
+              struct.setUserIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 5: // UPDATE_STATUSES
+            if (schemeField.type == org.apache.thrift.protocol.TType.SET) {
+              {
+                org.apache.thrift.protocol.TSet _set246 = iprot.readSetBegin();
+                struct.updateStatuses = new HashSet<JobUpdateStatus>(2*_set246.size);
+                JobUpdateStatus _elem247;
+                for (int _i248 = 0; _i248 < _set246.size; ++_i248)
+                {
+                  _elem247 = org.apache.airavata.cloud.aurora.client.sdk.JobUpdateStatus.findByValue(iprot.readI32());
+                  struct.updateStatuses.add(_elem247);
+                }
+                iprot.readSetEnd();
+              }
+              struct.setUpdateStatusesIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 6: // OFFSET
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.offset = iprot.readI32();
+              struct.setOffsetIsSet(true);
+            } else { 
+              org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+            }
+            break;
+          case 7: // LIMIT
+            if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
+              struct.limit = iprot.readI32();
+              struct.setLimitIsSet(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, JobUpdateQuery struct) throws org.apache.thrift.TException {
+      struct.validate();
+
+      oprot.writeStructBegin(STRUCT_DESC);
+      if (struct.role != null) {
+        oprot.writeFieldBegin(ROLE_FIELD_DESC);
+        oprot.writeString(struct.role);
+        oprot.writeFieldEnd();
+      }
+      if (struct.jobKey != null) {
+        oprot.writeFieldBegin(JOB_KEY_FIELD_DESC);
+        struct.jobKey.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      if (struct.user != null) {
+        oprot.writeFieldBegin(USER_FIELD_DESC);
+        oprot.writeString(struct.user);
+        oprot.writeFieldEnd();
+      }
+      if (struct.updateStatuses != null) {
+        oprot.writeFieldBegin(UPDATE_STATUSES_FIELD_DESC);
+        {
+          oprot.writeSetBegin(new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, struct.updateStatuses.size()));
+          for (JobUpdateStatus _iter249 : struct.updateStatuses)
+          {
+            oprot.writeI32(_iter249.getValue());
+          }
+          oprot.writeSetEnd();
+        }
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldBegin(OFFSET_FIELD_DESC);
+      oprot.writeI32(struct.offset);
+      oprot.writeFieldEnd();
+      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
+      oprot.writeI32(struct.limit);
+      oprot.writeFieldEnd();
+      if (struct.key != null) {
+        oprot.writeFieldBegin(KEY_FIELD_DESC);
+        struct.key.write(oprot);
+        oprot.writeFieldEnd();
+      }
+      oprot.writeFieldStop();
+      oprot.writeStructEnd();
+    }
+
+  }
+
+  private static class JobUpdateQueryTupleSchemeFactory implements SchemeFactory {
+    public JobUpdateQueryTupleScheme getScheme() {
+      return new JobUpdateQueryTupleScheme();
+    }
+  }
+
+  private static class JobUpdateQueryTupleScheme extends TupleScheme<JobUpdateQuery> {
+
+    @Override
+    public void write(org.apache.thrift.protocol.TProtocol prot, JobUpdateQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol oprot = (TTupleProtocol) prot;
+      BitSet optionals = new BitSet();
+      if (struct.isSetRole()) {
+        optionals.set(0);
+      }
+      if (struct.isSetKey()) {
+        optionals.set(1);
+      }
+      if (struct.isSetJobKey()) {
+        optionals.set(2);
+      }
+      if (struct.isSetUser()) {
+        optionals.set(3);
+      }
+      if (struct.isSetUpdateStatuses()) {
+        optionals.set(4);
+      }
+      if (struct.isSetOffset()) {
+        optionals.set(5);
+      }
+      if (struct.isSetLimit()) {
+        optionals.set(6);
+      }
+      oprot.writeBitSet(optionals, 7);
+      if (struct.isSetRole()) {
+        oprot.writeString(struct.role);
+      }
+      if (struct.isSetKey()) {
+        struct.key.write(oprot);
+      }
+      if (struct.isSetJobKey()) {
+        struct.jobKey.write(oprot);
+      }
+      if (struct.isSetUser()) {
+        oprot.writeString(struct.user);
+      }
+      if (struct.isSetUpdateStatuses()) {
+        {
+          oprot.writeI32(struct.updateStatuses.size());
+          for (JobUpdateStatus _iter250 : struct.updateStatuses)
+          {
+            oprot.writeI32(_iter250.getValue());
+          }
+        }
+      }
+      if (struct.isSetOffset()) {
+        oprot.writeI32(struct.offset);
+      }
+      if (struct.isSetLimit()) {
+        oprot.writeI32(struct.limit);
+      }
+    }
+
+    @Override
+    public void read(org.apache.thrift.protocol.TProtocol prot, JobUpdateQuery struct) throws org.apache.thrift.TException {
+      TTupleProtocol iprot = (TTupleProtocol) prot;
+      BitSet incoming = iprot.readBitSet(7);
+      if (incoming.get(0)) {
+        struct.role = iprot.readString();
+        struct.setRoleIsSet(true);
+      }
+      if (incoming.get(1)) {
+        struct.key = new JobUpdateKey();
+        struct.key.read(iprot);
+        struct.setKeyIsSet(true);
+      }
+      if (incoming.get(2)) {
+        struct.jobKey = new JobKey();
+        struct.jobKey.read(iprot);
+        struct.setJobKeyIsSet(true);
+      }
+      if (incoming.get(3)) {
+        struct.user = iprot.readString();
+        struct.setUserIsSet(true);
+      }
+      if (incoming.get(4)) {
+        {
+          org.apache.thrift.protocol.TSet _set251 = new org.apache.thrift.protocol.TSet(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+          struct.updateStatuses = new HashSet<JobUpdateStatus>(2*_set251.size);
+          JobUpdateStatus _elem252;
+          for (int _i253 = 0; _i253 < _set251.size; ++_i253)
+          {
+            _elem252 = org.apache.airavata.cloud.aurora.client.sdk.JobUpdateStatus.findByValue(iprot.readI32());
+            struct.updateStatuses.add(_elem252);
+          }
+        }
+        struct.setUpdateStatusesIsSet(true);
+      }
+      if (incoming.get(5)) {
+        struct.offset = iprot.readI32();
+        struct.setOffsetIsSet(true);
+      }
+      if (incoming.get(6)) {
+        struct.limit = iprot.readI32();
+        struct.setLimitIsSet(true);
+      }
+    }
+  }
+
+}
+