//
// Autogenerated by Thrift Compiler (0.13.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
if (typeof Int64 === 'undefined' && typeof require === 'function') {
  var Int64 = require('node-int64');
}


//HELPER FUNCTIONS AND STRUCTURES

Hawk_createInstance_args = function(args) {
  this.name = null;
  this.backend = null;
  this.minimumDelayMillis = null;
  this.maximumDelayMillis = null;
  this.enabledPlugins = null;
  this.indexFactory = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.backend !== undefined && args.backend !== null) {
      this.backend = args.backend;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field backend is unset!');
    }
    if (args.minimumDelayMillis !== undefined && args.minimumDelayMillis !== null) {
      this.minimumDelayMillis = args.minimumDelayMillis;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field minimumDelayMillis is unset!');
    }
    if (args.maximumDelayMillis !== undefined && args.maximumDelayMillis !== null) {
      this.maximumDelayMillis = args.maximumDelayMillis;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field maximumDelayMillis is unset!');
    }
    if (args.enabledPlugins !== undefined && args.enabledPlugins !== null) {
      this.enabledPlugins = Thrift.copyList(args.enabledPlugins, [null]);
    }
    if (args.indexFactory !== undefined && args.indexFactory !== null) {
      this.indexFactory = args.indexFactory;
    }
  }
};
Hawk_createInstance_args.prototype = {};
Hawk_createInstance_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.backend = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I32) {
        this.minimumDelayMillis = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I32) {
        this.maximumDelayMillis = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.LIST) {
        this.enabledPlugins = [];
        var _rtmp3146 = input.readListBegin();
        var _size145 = _rtmp3146.size || 0;
        for (var _i147 = 0; _i147 < _size145; ++_i147) {
          var elem148 = null;
          elem148 = input.readString().value;
          this.enabledPlugins.push(elem148);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 6:
      if (ftype == Thrift.Type.STRING) {
        this.indexFactory = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_createInstance_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_createInstance_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.backend !== null && this.backend !== undefined) {
    output.writeFieldBegin('backend', Thrift.Type.STRING, 2);
    output.writeString(this.backend);
    output.writeFieldEnd();
  }
  if (this.minimumDelayMillis !== null && this.minimumDelayMillis !== undefined) {
    output.writeFieldBegin('minimumDelayMillis', Thrift.Type.I32, 3);
    output.writeI32(this.minimumDelayMillis);
    output.writeFieldEnd();
  }
  if (this.maximumDelayMillis !== null && this.maximumDelayMillis !== undefined) {
    output.writeFieldBegin('maximumDelayMillis', Thrift.Type.I32, 4);
    output.writeI32(this.maximumDelayMillis);
    output.writeFieldEnd();
  }
  if (this.enabledPlugins !== null && this.enabledPlugins !== undefined) {
    output.writeFieldBegin('enabledPlugins', Thrift.Type.LIST, 5);
    output.writeListBegin(Thrift.Type.STRING, this.enabledPlugins.length);
    for (var iter149 in this.enabledPlugins) {
      if (this.enabledPlugins.hasOwnProperty(iter149)) {
        iter149 = this.enabledPlugins[iter149];
        output.writeString(iter149);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.indexFactory !== null && this.indexFactory !== undefined) {
    output.writeFieldBegin('indexFactory', Thrift.Type.STRING, 6);
    output.writeString(this.indexFactory);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_createInstance_result = function(args) {
  this.err1 = null;
  if (args instanceof HawkFactoryNotFound) {
    this.err1 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
  }
};
Hawk_createInstance_result.prototype = {};
Hawk_createInstance_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkFactoryNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_createInstance_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_createInstance_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listBackends_args = function(args) {
};
Hawk_listBackends_args.prototype = {};
Hawk_listBackends_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listBackends_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listBackends_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listBackends_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
  }
};
Hawk_listBackends_result.prototype = {};
Hawk_listBackends_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3151 = input.readListBegin();
        var _size150 = _rtmp3151.size || 0;
        for (var _i152 = 0; _i152 < _size150; ++_i152) {
          var elem153 = null;
          elem153 = input.readString().value;
          this.success.push(elem153);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listBackends_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listBackends_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter154 in this.success) {
      if (this.success.hasOwnProperty(iter154)) {
        iter154 = this.success[iter154];
        output.writeString(iter154);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listPlugins_args = function(args) {
};
Hawk_listPlugins_args.prototype = {};
Hawk_listPlugins_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listPlugins_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listPlugins_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listPlugins_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
  }
};
Hawk_listPlugins_result.prototype = {};
Hawk_listPlugins_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3156 = input.readListBegin();
        var _size155 = _rtmp3156.size || 0;
        for (var _i157 = 0; _i157 < _size155; ++_i157) {
          var elem158 = null;
          elem158 = input.readString().value;
          this.success.push(elem158);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listPlugins_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listPlugins_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter159 in this.success) {
      if (this.success.hasOwnProperty(iter159)) {
        iter159 = this.success[iter159];
        output.writeString(iter159);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listPluginDetails_args = function(args) {
};
Hawk_listPluginDetails_args.prototype = {};
Hawk_listPluginDetails_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listPluginDetails_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listPluginDetails_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listPluginDetails_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [HawkPlugin]);
    }
  }
};
Hawk_listPluginDetails_result.prototype = {};
Hawk_listPluginDetails_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3161 = input.readListBegin();
        var _size160 = _rtmp3161.size || 0;
        for (var _i162 = 0; _i162 < _size160; ++_i162) {
          var elem163 = null;
          elem163 = new HawkPlugin();
          elem163.read(input);
          this.success.push(elem163);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listPluginDetails_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listPluginDetails_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter164 in this.success) {
      if (this.success.hasOwnProperty(iter164)) {
        iter164 = this.success[iter164];
        iter164.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listInstances_args = function(args) {
};
Hawk_listInstances_args.prototype = {};
Hawk_listInstances_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listInstances_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listInstances_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listInstances_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [HawkInstance]);
    }
  }
};
Hawk_listInstances_result.prototype = {};
Hawk_listInstances_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3166 = input.readListBegin();
        var _size165 = _rtmp3166.size || 0;
        for (var _i167 = 0; _i167 < _size165; ++_i167) {
          var elem168 = null;
          elem168 = new HawkInstance();
          elem168.read(input);
          this.success.push(elem168);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listInstances_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listInstances_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter169 in this.success) {
      if (this.success.hasOwnProperty(iter169)) {
        iter169 = this.success[iter169];
        iter169.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeInstance_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_removeInstance_args.prototype = {};
Hawk_removeInstance_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeInstance_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeInstance_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeInstance_result = function(args) {
  this.err1 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
  }
};
Hawk_removeInstance_result.prototype = {};
Hawk_removeInstance_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeInstance_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeInstance_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_startInstance_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_startInstance_args.prototype = {};
Hawk_startInstance_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_startInstance_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_startInstance_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_startInstance_result = function(args) {
  this.err1 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
  }
};
Hawk_startInstance_result.prototype = {};
Hawk_startInstance_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_startInstance_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_startInstance_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_stopInstance_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_stopInstance_args.prototype = {};
Hawk_stopInstance_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_stopInstance_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_stopInstance_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_stopInstance_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_stopInstance_result.prototype = {};
Hawk_stopInstance_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_stopInstance_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_stopInstance_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_syncInstance_args = function(args) {
  this.name = null;
  this.blockUntilDone = false;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.blockUntilDone !== undefined && args.blockUntilDone !== null) {
      this.blockUntilDone = args.blockUntilDone;
    }
  }
};
Hawk_syncInstance_args.prototype = {};
Hawk_syncInstance_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.BOOL) {
        this.blockUntilDone = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_syncInstance_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_syncInstance_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.blockUntilDone !== null && this.blockUntilDone !== undefined) {
    output.writeFieldBegin('blockUntilDone', Thrift.Type.BOOL, 2);
    output.writeBool(this.blockUntilDone);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_syncInstance_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_syncInstance_result.prototype = {};
Hawk_syncInstance_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_syncInstance_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_syncInstance_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_registerMetamodels_args = function(args) {
  this.name = null;
  this.metamodel = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.metamodel !== undefined && args.metamodel !== null) {
      this.metamodel = Thrift.copyList(args.metamodel, [File]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodel is unset!');
    }
  }
};
Hawk_registerMetamodels_args.prototype = {};
Hawk_registerMetamodels_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.metamodel = [];
        var _rtmp3171 = input.readListBegin();
        var _size170 = _rtmp3171.size || 0;
        for (var _i172 = 0; _i172 < _size170; ++_i172) {
          var elem173 = null;
          elem173 = new File();
          elem173.read(input);
          this.metamodel.push(elem173);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_registerMetamodels_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_registerMetamodels_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.metamodel !== null && this.metamodel !== undefined) {
    output.writeFieldBegin('metamodel', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRUCT, this.metamodel.length);
    for (var iter174 in this.metamodel) {
      if (this.metamodel.hasOwnProperty(iter174)) {
        iter174 = this.metamodel[iter174];
        iter174.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_registerMetamodels_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof InvalidMetamodel) {
    this.err2 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err3 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
  }
};
Hawk_registerMetamodels_result.prototype = {};
Hawk_registerMetamodels_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new InvalidMetamodel();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new HawkInstanceNotRunning();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_registerMetamodels_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_registerMetamodels_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_unregisterMetamodels_args = function(args) {
  this.name = null;
  this.metamodel = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.metamodel !== undefined && args.metamodel !== null) {
      this.metamodel = Thrift.copyList(args.metamodel, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodel is unset!');
    }
  }
};
Hawk_unregisterMetamodels_args.prototype = {};
Hawk_unregisterMetamodels_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.metamodel = [];
        var _rtmp3176 = input.readListBegin();
        var _size175 = _rtmp3176.size || 0;
        for (var _i177 = 0; _i177 < _size175; ++_i177) {
          var elem178 = null;
          elem178 = input.readString().value;
          this.metamodel.push(elem178);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_unregisterMetamodels_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_unregisterMetamodels_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.metamodel !== null && this.metamodel !== undefined) {
    output.writeFieldBegin('metamodel', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.metamodel.length);
    for (var iter179 in this.metamodel) {
      if (this.metamodel.hasOwnProperty(iter179)) {
        iter179 = this.metamodel[iter179];
        output.writeString(iter179);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_unregisterMetamodels_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_unregisterMetamodels_result.prototype = {};
Hawk_unregisterMetamodels_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_unregisterMetamodels_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_unregisterMetamodels_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listMetamodels_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_listMetamodels_args.prototype = {};
Hawk_listMetamodels_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listMetamodels_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listMetamodels_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listMetamodels_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_listMetamodels_result.prototype = {};
Hawk_listMetamodels_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3181 = input.readListBegin();
        var _size180 = _rtmp3181.size || 0;
        for (var _i182 = 0; _i182 < _size180; ++_i182) {
          var elem183 = null;
          elem183 = input.readString().value;
          this.success.push(elem183);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listMetamodels_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listMetamodels_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter184 in this.success) {
      if (this.success.hasOwnProperty(iter184)) {
        iter184 = this.success[iter184];
        output.writeString(iter184);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listTypeNames_args = function(args) {
  this.hawkInstanceName = null;
  this.metamodelURI = null;
  if (args) {
    if (args.hawkInstanceName !== undefined && args.hawkInstanceName !== null) {
      this.hawkInstanceName = args.hawkInstanceName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field hawkInstanceName is unset!');
    }
    if (args.metamodelURI !== undefined && args.metamodelURI !== null) {
      this.metamodelURI = args.metamodelURI;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelURI is unset!');
    }
  }
};
Hawk_listTypeNames_args.prototype = {};
Hawk_listTypeNames_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.hawkInstanceName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelURI = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listTypeNames_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listTypeNames_args');
  if (this.hawkInstanceName !== null && this.hawkInstanceName !== undefined) {
    output.writeFieldBegin('hawkInstanceName', Thrift.Type.STRING, 1);
    output.writeString(this.hawkInstanceName);
    output.writeFieldEnd();
  }
  if (this.metamodelURI !== null && this.metamodelURI !== undefined) {
    output.writeFieldBegin('metamodelURI', Thrift.Type.STRING, 2);
    output.writeString(this.metamodelURI);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listTypeNames_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof HawkMetamodelNotFound) {
    this.err3 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
  }
};
Hawk_listTypeNames_result.prototype = {};
Hawk_listTypeNames_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3186 = input.readListBegin();
        var _size185 = _rtmp3186.size || 0;
        for (var _i187 = 0; _i187 < _size185; ++_i187) {
          var elem188 = null;
          elem188 = input.readString().value;
          this.success.push(elem188);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new HawkMetamodelNotFound();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listTypeNames_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listTypeNames_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter189 in this.success) {
      if (this.success.hasOwnProperty(iter189)) {
        iter189 = this.success[iter189];
        output.writeString(iter189);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listAttributeNames_args = function(args) {
  this.hawkInstanceName = null;
  this.metamodelURI = null;
  this.typeName = null;
  if (args) {
    if (args.hawkInstanceName !== undefined && args.hawkInstanceName !== null) {
      this.hawkInstanceName = args.hawkInstanceName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field hawkInstanceName is unset!');
    }
    if (args.metamodelURI !== undefined && args.metamodelURI !== null) {
      this.metamodelURI = args.metamodelURI;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field metamodelURI is unset!');
    }
    if (args.typeName !== undefined && args.typeName !== null) {
      this.typeName = args.typeName;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field typeName is unset!');
    }
  }
};
Hawk_listAttributeNames_args.prototype = {};
Hawk_listAttributeNames_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.hawkInstanceName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.metamodelURI = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.typeName = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listAttributeNames_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listAttributeNames_args');
  if (this.hawkInstanceName !== null && this.hawkInstanceName !== undefined) {
    output.writeFieldBegin('hawkInstanceName', Thrift.Type.STRING, 1);
    output.writeString(this.hawkInstanceName);
    output.writeFieldEnd();
  }
  if (this.metamodelURI !== null && this.metamodelURI !== undefined) {
    output.writeFieldBegin('metamodelURI', Thrift.Type.STRING, 2);
    output.writeString(this.metamodelURI);
    output.writeFieldEnd();
  }
  if (this.typeName !== null && this.typeName !== undefined) {
    output.writeFieldBegin('typeName', Thrift.Type.STRING, 3);
    output.writeString(this.typeName);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listAttributeNames_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  this.err4 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof HawkMetamodelNotFound) {
    this.err3 = args;
    return;
  }
  if (args instanceof HawkTypeNotFound) {
    this.err4 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
    if (args.err4 !== undefined && args.err4 !== null) {
      this.err4 = args.err4;
    }
  }
};
Hawk_listAttributeNames_result.prototype = {};
Hawk_listAttributeNames_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3191 = input.readListBegin();
        var _size190 = _rtmp3191.size || 0;
        for (var _i192 = 0; _i192 < _size190; ++_i192) {
          var elem193 = null;
          elem193 = input.readString().value;
          this.success.push(elem193);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new HawkMetamodelNotFound();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.err4 = new HawkTypeNotFound();
        this.err4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listAttributeNames_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listAttributeNames_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter194 in this.success) {
      if (this.success.hasOwnProperty(iter194)) {
        iter194 = this.success[iter194];
        output.writeString(iter194);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  if (this.err4 !== null && this.err4 !== undefined) {
    output.writeFieldBegin('err4', Thrift.Type.STRUCT, 4);
    this.err4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listMetamodelParsers_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_listMetamodelParsers_args.prototype = {};
Hawk_listMetamodelParsers_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listMetamodelParsers_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listMetamodelParsers_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listMetamodelParsers_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [MetamodelParserDetails]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_listMetamodelParsers_result.prototype = {};
Hawk_listMetamodelParsers_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3196 = input.readListBegin();
        var _size195 = _rtmp3196.size || 0;
        for (var _i197 = 0; _i197 < _size195; ++_i197) {
          var elem198 = null;
          elem198 = new MetamodelParserDetails();
          elem198.read(input);
          this.success.push(elem198);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listMetamodelParsers_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listMetamodelParsers_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter199 in this.success) {
      if (this.success.hasOwnProperty(iter199)) {
        iter199 = this.success[iter199];
        iter199.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listQueryLanguages_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_listQueryLanguages_args.prototype = {};
Hawk_listQueryLanguages_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listQueryLanguages_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listQueryLanguages_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listQueryLanguages_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
  }
};
Hawk_listQueryLanguages_result.prototype = {};
Hawk_listQueryLanguages_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3201 = input.readListBegin();
        var _size200 = _rtmp3201.size || 0;
        for (var _i202 = 0; _i202 < _size200; ++_i202) {
          var elem203 = null;
          elem203 = input.readString().value;
          this.success.push(elem203);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listQueryLanguages_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listQueryLanguages_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter204 in this.success) {
      if (this.success.hasOwnProperty(iter204)) {
        iter204 = this.success[iter204];
        output.writeString(iter204);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_query_args = function(args) {
  this.name = null;
  this.query = null;
  this.language = null;
  this.options = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.query !== undefined && args.query !== null) {
      this.query = args.query;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field query is unset!');
    }
    if (args.language !== undefined && args.language !== null) {
      this.language = args.language;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field language is unset!');
    }
    if (args.options !== undefined && args.options !== null) {
      this.options = new HawkQueryOptions(args.options);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field options is unset!');
    }
  }
};
Hawk_query_args.prototype = {};
Hawk_query_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.query = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.language = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.options = new HawkQueryOptions();
        this.options.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_query_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_query_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.query !== null && this.query !== undefined) {
    output.writeFieldBegin('query', Thrift.Type.STRING, 2);
    output.writeString(this.query);
    output.writeFieldEnd();
  }
  if (this.language !== null && this.language !== undefined) {
    output.writeFieldBegin('language', Thrift.Type.STRING, 3);
    output.writeString(this.language);
    output.writeFieldEnd();
  }
  if (this.options !== null && this.options !== undefined) {
    output.writeFieldBegin('options', Thrift.Type.STRUCT, 4);
    this.options.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_query_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  this.err4 = null;
  this.err5 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof UnknownQueryLanguage) {
    this.err3 = args;
    return;
  }
  if (args instanceof InvalidQuery) {
    this.err4 = args;
    return;
  }
  if (args instanceof FailedQuery) {
    this.err5 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new QueryResult(args.success);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
    if (args.err4 !== undefined && args.err4 !== null) {
      this.err4 = args.err4;
    }
    if (args.err5 !== undefined && args.err5 !== null) {
      this.err5 = args.err5;
    }
  }
};
Hawk_query_result.prototype = {};
Hawk_query_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.STRUCT) {
        this.success = new QueryResult();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new UnknownQueryLanguage();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.err4 = new InvalidQuery();
        this.err4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.err5 = new FailedQuery();
        this.err5.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_query_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_query_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  if (this.err4 !== null && this.err4 !== undefined) {
    output.writeFieldBegin('err4', Thrift.Type.STRUCT, 4);
    this.err4.write(output);
    output.writeFieldEnd();
  }
  if (this.err5 !== null && this.err5 !== undefined) {
    output.writeFieldBegin('err5', Thrift.Type.STRUCT, 5);
    this.err5.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_timedQuery_args = function(args) {
  this.name = null;
  this.query = null;
  this.language = null;
  this.options = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.query !== undefined && args.query !== null) {
      this.query = args.query;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field query is unset!');
    }
    if (args.language !== undefined && args.language !== null) {
      this.language = args.language;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field language is unset!');
    }
    if (args.options !== undefined && args.options !== null) {
      this.options = new HawkQueryOptions(args.options);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field options is unset!');
    }
  }
};
Hawk_timedQuery_args.prototype = {};
Hawk_timedQuery_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.query = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.language = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.options = new HawkQueryOptions();
        this.options.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_timedQuery_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_timedQuery_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.query !== null && this.query !== undefined) {
    output.writeFieldBegin('query', Thrift.Type.STRING, 2);
    output.writeString(this.query);
    output.writeFieldEnd();
  }
  if (this.language !== null && this.language !== undefined) {
    output.writeFieldBegin('language', Thrift.Type.STRING, 3);
    output.writeString(this.language);
    output.writeFieldEnd();
  }
  if (this.options !== null && this.options !== undefined) {
    output.writeFieldBegin('options', Thrift.Type.STRUCT, 4);
    this.options.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_timedQuery_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  this.err4 = null;
  this.err5 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof UnknownQueryLanguage) {
    this.err3 = args;
    return;
  }
  if (args instanceof InvalidQuery) {
    this.err4 = args;
    return;
  }
  if (args instanceof FailedQuery) {
    this.err5 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new QueryReport(args.success);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
    if (args.err4 !== undefined && args.err4 !== null) {
      this.err4 = args.err4;
    }
    if (args.err5 !== undefined && args.err5 !== null) {
      this.err5 = args.err5;
    }
  }
};
Hawk_timedQuery_result.prototype = {};
Hawk_timedQuery_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.STRUCT) {
        this.success = new QueryReport();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new UnknownQueryLanguage();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.err4 = new InvalidQuery();
        this.err4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRUCT) {
        this.err5 = new FailedQuery();
        this.err5.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_timedQuery_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_timedQuery_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  if (this.err4 !== null && this.err4 !== undefined) {
    output.writeFieldBegin('err4', Thrift.Type.STRUCT, 4);
    this.err4.write(output);
    output.writeFieldEnd();
  }
  if (this.err5 !== null && this.err5 !== undefined) {
    output.writeFieldBegin('err5', Thrift.Type.STRUCT, 5);
    this.err5.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_resolveProxies_args = function(args) {
  this.name = null;
  this.ids = null;
  this.options = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.ids !== undefined && args.ids !== null) {
      this.ids = Thrift.copyList(args.ids, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field ids is unset!');
    }
    if (args.options !== undefined && args.options !== null) {
      this.options = new HawkQueryOptions(args.options);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field options is unset!');
    }
  }
};
Hawk_resolveProxies_args.prototype = {};
Hawk_resolveProxies_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.ids = [];
        var _rtmp3206 = input.readListBegin();
        var _size205 = _rtmp3206.size || 0;
        for (var _i207 = 0; _i207 < _size205; ++_i207) {
          var elem208 = null;
          elem208 = input.readString().value;
          this.ids.push(elem208);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.options = new HawkQueryOptions();
        this.options.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_resolveProxies_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_resolveProxies_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.ids !== null && this.ids !== undefined) {
    output.writeFieldBegin('ids', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.ids.length);
    for (var iter209 in this.ids) {
      if (this.ids.hasOwnProperty(iter209)) {
        iter209 = this.ids[iter209];
        output.writeString(iter209);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.options !== null && this.options !== undefined) {
    output.writeFieldBegin('options', Thrift.Type.STRUCT, 3);
    this.options.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_resolveProxies_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [ModelElement]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_resolveProxies_result.prototype = {};
Hawk_resolveProxies_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3211 = input.readListBegin();
        var _size210 = _rtmp3211.size || 0;
        for (var _i212 = 0; _i212 < _size210; ++_i212) {
          var elem213 = null;
          elem213 = new ModelElement();
          elem213.read(input);
          this.success.push(elem213);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_resolveProxies_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_resolveProxies_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter214 in this.success) {
      if (this.success.hasOwnProperty(iter214)) {
        iter214 = this.success[iter214];
        iter214.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_asyncQuery_args = function(args) {
  this.name = null;
  this.query = null;
  this.language = null;
  this.options = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.query !== undefined && args.query !== null) {
      this.query = args.query;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field query is unset!');
    }
    if (args.language !== undefined && args.language !== null) {
      this.language = args.language;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field language is unset!');
    }
    if (args.options !== undefined && args.options !== null) {
      this.options = new HawkQueryOptions(args.options);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field options is unset!');
    }
  }
};
Hawk_asyncQuery_args.prototype = {};
Hawk_asyncQuery_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.query = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.language = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.options = new HawkQueryOptions();
        this.options.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_asyncQuery_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_asyncQuery_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.query !== null && this.query !== undefined) {
    output.writeFieldBegin('query', Thrift.Type.STRING, 2);
    output.writeString(this.query);
    output.writeFieldEnd();
  }
  if (this.language !== null && this.language !== undefined) {
    output.writeFieldBegin('language', Thrift.Type.STRING, 3);
    output.writeString(this.language);
    output.writeFieldEnd();
  }
  if (this.options !== null && this.options !== undefined) {
    output.writeFieldBegin('options', Thrift.Type.STRUCT, 4);
    this.options.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_asyncQuery_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  this.err4 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof UnknownQueryLanguage) {
    this.err3 = args;
    return;
  }
  if (args instanceof InvalidQuery) {
    this.err4 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = args.success;
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
    if (args.err4 !== undefined && args.err4 !== null) {
      this.err4 = args.err4;
    }
  }
};
Hawk_asyncQuery_result.prototype = {};
Hawk_asyncQuery_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.STRING) {
        this.success = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new UnknownQueryLanguage();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.err4 = new InvalidQuery();
        this.err4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_asyncQuery_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_asyncQuery_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRING, 0);
    output.writeString(this.success);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  if (this.err4 !== null && this.err4 !== undefined) {
    output.writeFieldBegin('err4', Thrift.Type.STRUCT, 4);
    this.err4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_cancelAsyncQuery_args = function(args) {
  this.queryID = null;
  if (args) {
    if (args.queryID !== undefined && args.queryID !== null) {
      this.queryID = args.queryID;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field queryID is unset!');
    }
  }
};
Hawk_cancelAsyncQuery_args.prototype = {};
Hawk_cancelAsyncQuery_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.queryID = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_cancelAsyncQuery_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_cancelAsyncQuery_args');
  if (this.queryID !== null && this.queryID !== undefined) {
    output.writeFieldBegin('queryID', Thrift.Type.STRING, 1);
    output.writeString(this.queryID);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_cancelAsyncQuery_result = function(args) {
  this.err1 = null;
  if (args instanceof InvalidQuery) {
    this.err1 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
  }
};
Hawk_cancelAsyncQuery_result.prototype = {};
Hawk_cancelAsyncQuery_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new InvalidQuery();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_cancelAsyncQuery_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_cancelAsyncQuery_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_fetchAsyncQueryResults_args = function(args) {
  this.queryID = null;
  if (args) {
    if (args.queryID !== undefined && args.queryID !== null) {
      this.queryID = args.queryID;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field queryID is unset!');
    }
  }
};
Hawk_fetchAsyncQueryResults_args.prototype = {};
Hawk_fetchAsyncQueryResults_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.queryID = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_fetchAsyncQueryResults_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_fetchAsyncQueryResults_args');
  if (this.queryID !== null && this.queryID !== undefined) {
    output.writeFieldBegin('queryID', Thrift.Type.STRING, 1);
    output.writeString(this.queryID);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_fetchAsyncQueryResults_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof InvalidQuery) {
    this.err1 = args;
    return;
  }
  if (args instanceof FailedQuery) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new QueryReport(args.success);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_fetchAsyncQueryResults_result.prototype = {};
Hawk_fetchAsyncQueryResults_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.STRUCT) {
        this.success = new QueryReport();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new InvalidQuery();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new FailedQuery();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_fetchAsyncQueryResults_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_fetchAsyncQueryResults_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_addRepository_args = function(args) {
  this.name = null;
  this.repo = null;
  this.credentials = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.repo !== undefined && args.repo !== null) {
      this.repo = new Repository(args.repo);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field repo is unset!');
    }
    if (args.credentials !== undefined && args.credentials !== null) {
      this.credentials = new Credentials(args.credentials);
    }
  }
};
Hawk_addRepository_args.prototype = {};
Hawk_addRepository_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.repo = new Repository();
        this.repo.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.credentials = new Credentials();
        this.credentials.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_addRepository_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_addRepository_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.repo !== null && this.repo !== undefined) {
    output.writeFieldBegin('repo', Thrift.Type.STRUCT, 2);
    this.repo.write(output);
    output.writeFieldEnd();
  }
  if (this.credentials !== null && this.credentials !== undefined) {
    output.writeFieldBegin('credentials', Thrift.Type.STRUCT, 3);
    this.credentials.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_addRepository_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  this.err4 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof UnknownRepositoryType) {
    this.err3 = args;
    return;
  }
  if (args instanceof VCSAuthenticationFailed) {
    this.err4 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
    if (args.err4 !== undefined && args.err4 !== null) {
      this.err4 = args.err4;
    }
  }
};
Hawk_addRepository_result.prototype = {};
Hawk_addRepository_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new UnknownRepositoryType();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRUCT) {
        this.err4 = new VCSAuthenticationFailed();
        this.err4.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_addRepository_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_addRepository_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  if (this.err4 !== null && this.err4 !== undefined) {
    output.writeFieldBegin('err4', Thrift.Type.STRUCT, 4);
    this.err4.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_isFrozen_args = function(args) {
  this.name = null;
  this.uri = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.uri !== undefined && args.uri !== null) {
      this.uri = args.uri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uri is unset!');
    }
  }
};
Hawk_isFrozen_args.prototype = {};
Hawk_isFrozen_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.uri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_isFrozen_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_isFrozen_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.uri !== null && this.uri !== undefined) {
    output.writeFieldBegin('uri', Thrift.Type.STRING, 2);
    output.writeString(this.uri);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_isFrozen_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = args.success;
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_isFrozen_result.prototype = {};
Hawk_isFrozen_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.BOOL) {
        this.success = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_isFrozen_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_isFrozen_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.BOOL, 0);
    output.writeBool(this.success);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_setFrozen_args = function(args) {
  this.name = null;
  this.uri = null;
  this.isFrozen = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.uri !== undefined && args.uri !== null) {
      this.uri = args.uri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uri is unset!');
    }
    if (args.isFrozen !== undefined && args.isFrozen !== null) {
      this.isFrozen = args.isFrozen;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field isFrozen is unset!');
    }
  }
};
Hawk_setFrozen_args.prototype = {};
Hawk_setFrozen_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.uri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.isFrozen = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_setFrozen_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_setFrozen_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.uri !== null && this.uri !== undefined) {
    output.writeFieldBegin('uri', Thrift.Type.STRING, 2);
    output.writeString(this.uri);
    output.writeFieldEnd();
  }
  if (this.isFrozen !== null && this.isFrozen !== undefined) {
    output.writeFieldBegin('isFrozen', Thrift.Type.BOOL, 3);
    output.writeBool(this.isFrozen);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_setFrozen_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_setFrozen_result.prototype = {};
Hawk_setFrozen_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_setFrozen_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_setFrozen_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeRepository_args = function(args) {
  this.name = null;
  this.uri = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.uri !== undefined && args.uri !== null) {
      this.uri = args.uri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uri is unset!');
    }
  }
};
Hawk_removeRepository_args.prototype = {};
Hawk_removeRepository_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.uri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeRepository_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeRepository_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.uri !== null && this.uri !== undefined) {
    output.writeFieldBegin('uri', Thrift.Type.STRING, 2);
    output.writeString(this.uri);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeRepository_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_removeRepository_result.prototype = {};
Hawk_removeRepository_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeRepository_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeRepository_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_updateRepositoryCredentials_args = function(args) {
  this.name = null;
  this.uri = null;
  this.cred = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.uri !== undefined && args.uri !== null) {
      this.uri = args.uri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field uri is unset!');
    }
    if (args.cred !== undefined && args.cred !== null) {
      this.cred = new Credentials(args.cred);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field cred is unset!');
    }
  }
};
Hawk_updateRepositoryCredentials_args.prototype = {};
Hawk_updateRepositoryCredentials_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.uri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.cred = new Credentials();
        this.cred.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_updateRepositoryCredentials_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_updateRepositoryCredentials_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.uri !== null && this.uri !== undefined) {
    output.writeFieldBegin('uri', Thrift.Type.STRING, 2);
    output.writeString(this.uri);
    output.writeFieldEnd();
  }
  if (this.cred !== null && this.cred !== undefined) {
    output.writeFieldBegin('cred', Thrift.Type.STRUCT, 3);
    this.cred.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_updateRepositoryCredentials_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_updateRepositoryCredentials_result.prototype = {};
Hawk_updateRepositoryCredentials_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_updateRepositoryCredentials_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_updateRepositoryCredentials_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listRepositories_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_listRepositories_args.prototype = {};
Hawk_listRepositories_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listRepositories_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listRepositories_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listRepositories_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [Repository]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_listRepositories_result.prototype = {};
Hawk_listRepositories_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3216 = input.readListBegin();
        var _size215 = _rtmp3216.size || 0;
        for (var _i217 = 0; _i217 < _size215; ++_i217) {
          var elem218 = null;
          elem218 = new Repository();
          elem218.read(input);
          this.success.push(elem218);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listRepositories_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listRepositories_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter219 in this.success) {
      if (this.success.hasOwnProperty(iter219)) {
        iter219 = this.success[iter219];
        iter219.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listRepositoryTypes_args = function(args) {
};
Hawk_listRepositoryTypes_args.prototype = {};
Hawk_listRepositoryTypes_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listRepositoryTypes_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listRepositoryTypes_args');
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listRepositoryTypes_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
  }
};
Hawk_listRepositoryTypes_result.prototype = {};
Hawk_listRepositoryTypes_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3221 = input.readListBegin();
        var _size220 = _rtmp3221.size || 0;
        for (var _i222 = 0; _i222 < _size220; ++_i222) {
          var elem223 = null;
          elem223 = input.readString().value;
          this.success.push(elem223);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listRepositoryTypes_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listRepositoryTypes_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter224 in this.success) {
      if (this.success.hasOwnProperty(iter224)) {
        iter224 = this.success[iter224];
        output.writeString(iter224);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listFiles_args = function(args) {
  this.name = null;
  this.repository = null;
  this.filePatterns = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.repository !== undefined && args.repository !== null) {
      this.repository = Thrift.copyList(args.repository, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field repository is unset!');
    }
    if (args.filePatterns !== undefined && args.filePatterns !== null) {
      this.filePatterns = Thrift.copyList(args.filePatterns, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field filePatterns is unset!');
    }
  }
};
Hawk_listFiles_args.prototype = {};
Hawk_listFiles_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.LIST) {
        this.repository = [];
        var _rtmp3226 = input.readListBegin();
        var _size225 = _rtmp3226.size || 0;
        for (var _i227 = 0; _i227 < _size225; ++_i227) {
          var elem228 = null;
          elem228 = input.readString().value;
          this.repository.push(elem228);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.filePatterns = [];
        var _rtmp3230 = input.readListBegin();
        var _size229 = _rtmp3230.size || 0;
        for (var _i231 = 0; _i231 < _size229; ++_i231) {
          var elem232 = null;
          elem232 = input.readString().value;
          this.filePatterns.push(elem232);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listFiles_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listFiles_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.repository !== null && this.repository !== undefined) {
    output.writeFieldBegin('repository', Thrift.Type.LIST, 2);
    output.writeListBegin(Thrift.Type.STRING, this.repository.length);
    for (var iter233 in this.repository) {
      if (this.repository.hasOwnProperty(iter233)) {
        iter233 = this.repository[iter233];
        output.writeString(iter233);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.filePatterns !== null && this.filePatterns !== undefined) {
    output.writeFieldBegin('filePatterns', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.filePatterns.length);
    for (var iter234 in this.filePatterns) {
      if (this.filePatterns.hasOwnProperty(iter234)) {
        iter234 = this.filePatterns[iter234];
        output.writeString(iter234);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listFiles_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [null]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_listFiles_result.prototype = {};
Hawk_listFiles_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3236 = input.readListBegin();
        var _size235 = _rtmp3236.size || 0;
        for (var _i237 = 0; _i237 < _size235; ++_i237) {
          var elem238 = null;
          elem238 = input.readString().value;
          this.success.push(elem238);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listFiles_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listFiles_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRING, this.success.length);
    for (var iter239 in this.success) {
      if (this.success.hasOwnProperty(iter239)) {
        iter239 = this.success[iter239];
        output.writeString(iter239);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_configurePolling_args = function(args) {
  this.name = null;
  this.base = null;
  this.max = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.base !== undefined && args.base !== null) {
      this.base = args.base;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field base is unset!');
    }
    if (args.max !== undefined && args.max !== null) {
      this.max = args.max;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field max is unset!');
    }
  }
};
Hawk_configurePolling_args.prototype = {};
Hawk_configurePolling_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I32) {
        this.base = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I32) {
        this.max = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_configurePolling_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_configurePolling_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.base !== null && this.base !== undefined) {
    output.writeFieldBegin('base', Thrift.Type.I32, 2);
    output.writeI32(this.base);
    output.writeFieldEnd();
  }
  if (this.max !== null && this.max !== undefined) {
    output.writeFieldBegin('max', Thrift.Type.I32, 3);
    output.writeI32(this.max);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_configurePolling_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof InvalidPollingConfiguration) {
    this.err3 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
  }
};
Hawk_configurePolling_result.prototype = {};
Hawk_configurePolling_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new InvalidPollingConfiguration();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_configurePolling_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_configurePolling_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_addDerivedAttribute_args = function(args) {
  this.name = null;
  this.spec = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.spec !== undefined && args.spec !== null) {
      this.spec = new DerivedAttributeSpec(args.spec);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field spec is unset!');
    }
  }
};
Hawk_addDerivedAttribute_args.prototype = {};
Hawk_addDerivedAttribute_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.spec = new DerivedAttributeSpec();
        this.spec.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_addDerivedAttribute_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_addDerivedAttribute_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.spec !== null && this.spec !== undefined) {
    output.writeFieldBegin('spec', Thrift.Type.STRUCT, 2);
    this.spec.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_addDerivedAttribute_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof InvalidDerivedAttributeSpec) {
    this.err3 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
  }
};
Hawk_addDerivedAttribute_result.prototype = {};
Hawk_addDerivedAttribute_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new InvalidDerivedAttributeSpec();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_addDerivedAttribute_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_addDerivedAttribute_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeDerivedAttribute_args = function(args) {
  this.name = null;
  this.spec = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.spec !== undefined && args.spec !== null) {
      this.spec = new DerivedAttributeSpec(args.spec);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field spec is unset!');
    }
  }
};
Hawk_removeDerivedAttribute_args.prototype = {};
Hawk_removeDerivedAttribute_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.spec = new DerivedAttributeSpec();
        this.spec.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeDerivedAttribute_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeDerivedAttribute_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.spec !== null && this.spec !== undefined) {
    output.writeFieldBegin('spec', Thrift.Type.STRUCT, 2);
    this.spec.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeDerivedAttribute_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_removeDerivedAttribute_result.prototype = {};
Hawk_removeDerivedAttribute_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeDerivedAttribute_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeDerivedAttribute_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listDerivedAttributes_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_listDerivedAttributes_args.prototype = {};
Hawk_listDerivedAttributes_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listDerivedAttributes_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listDerivedAttributes_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listDerivedAttributes_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [DerivedAttributeSpec]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_listDerivedAttributes_result.prototype = {};
Hawk_listDerivedAttributes_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3241 = input.readListBegin();
        var _size240 = _rtmp3241.size || 0;
        for (var _i242 = 0; _i242 < _size240; ++_i242) {
          var elem243 = null;
          elem243 = new DerivedAttributeSpec();
          elem243.read(input);
          this.success.push(elem243);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listDerivedAttributes_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listDerivedAttributes_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter244 in this.success) {
      if (this.success.hasOwnProperty(iter244)) {
        iter244 = this.success[iter244];
        iter244.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_addIndexedAttribute_args = function(args) {
  this.name = null;
  this.spec = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.spec !== undefined && args.spec !== null) {
      this.spec = new IndexedAttributeSpec(args.spec);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field spec is unset!');
    }
  }
};
Hawk_addIndexedAttribute_args.prototype = {};
Hawk_addIndexedAttribute_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.spec = new IndexedAttributeSpec();
        this.spec.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_addIndexedAttribute_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_addIndexedAttribute_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.spec !== null && this.spec !== undefined) {
    output.writeFieldBegin('spec', Thrift.Type.STRUCT, 2);
    this.spec.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_addIndexedAttribute_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  this.err3 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args instanceof InvalidIndexedAttributeSpec) {
    this.err3 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
    if (args.err3 !== undefined && args.err3 !== null) {
      this.err3 = args.err3;
    }
  }
};
Hawk_addIndexedAttribute_result.prototype = {};
Hawk_addIndexedAttribute_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRUCT) {
        this.err3 = new InvalidIndexedAttributeSpec();
        this.err3.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_addIndexedAttribute_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_addIndexedAttribute_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  if (this.err3 !== null && this.err3 !== undefined) {
    output.writeFieldBegin('err3', Thrift.Type.STRUCT, 3);
    this.err3.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeIndexedAttribute_args = function(args) {
  this.name = null;
  this.spec = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.spec !== undefined && args.spec !== null) {
      this.spec = new IndexedAttributeSpec(args.spec);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field spec is unset!');
    }
  }
};
Hawk_removeIndexedAttribute_args.prototype = {};
Hawk_removeIndexedAttribute_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.spec = new IndexedAttributeSpec();
        this.spec.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeIndexedAttribute_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeIndexedAttribute_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.spec !== null && this.spec !== undefined) {
    output.writeFieldBegin('spec', Thrift.Type.STRUCT, 2);
    this.spec.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_removeIndexedAttribute_result = function(args) {
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_removeIndexedAttribute_result.prototype = {};
Hawk_removeIndexedAttribute_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_removeIndexedAttribute_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_removeIndexedAttribute_result');
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listIndexedAttributes_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_listIndexedAttributes_args.prototype = {};
Hawk_listIndexedAttributes_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listIndexedAttributes_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listIndexedAttributes_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_listIndexedAttributes_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [IndexedAttributeSpec]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_listIndexedAttributes_result.prototype = {};
Hawk_listIndexedAttributes_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3246 = input.readListBegin();
        var _size245 = _rtmp3246.size || 0;
        for (var _i247 = 0; _i247 < _size245; ++_i247) {
          var elem248 = null;
          elem248 = new IndexedAttributeSpec();
          elem248.read(input);
          this.success.push(elem248);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_listIndexedAttributes_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_listIndexedAttributes_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter249 in this.success) {
      if (this.success.hasOwnProperty(iter249)) {
        iter249 = this.success[iter249];
        iter249.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_getModel_args = function(args) {
  this.name = null;
  this.options = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.options !== undefined && args.options !== null) {
      this.options = new HawkQueryOptions(args.options);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field options is unset!');
    }
  }
};
Hawk_getModel_args.prototype = {};
Hawk_getModel_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.options = new HawkQueryOptions();
        this.options.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_getModel_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_getModel_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.options !== null && this.options !== undefined) {
    output.writeFieldBegin('options', Thrift.Type.STRUCT, 2);
    this.options.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_getModel_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [ModelElement]);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_getModel_result.prototype = {};
Hawk_getModel_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3251 = input.readListBegin();
        var _size250 = _rtmp3251.size || 0;
        for (var _i252 = 0; _i252 < _size250; ++_i252) {
          var elem253 = null;
          elem253 = new ModelElement();
          elem253.read(input);
          this.success.push(elem253);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_getModel_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_getModel_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter254 in this.success) {
      if (this.success.hasOwnProperty(iter254)) {
        iter254 = this.success[iter254];
        iter254.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_getRootElements_args = function(args) {
  this.name = null;
  this.options = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.options !== undefined && args.options !== null) {
      this.options = new HawkQueryOptions(args.options);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field options is unset!');
    }
  }
};
Hawk_getRootElements_args.prototype = {};
Hawk_getRootElements_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.options = new HawkQueryOptions();
        this.options.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_getRootElements_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_getRootElements_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.options !== null && this.options !== undefined) {
    output.writeFieldBegin('options', Thrift.Type.STRUCT, 2);
    this.options.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_getRootElements_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = Thrift.copyList(args.success, [ModelElement]);
    }
  }
};
Hawk_getRootElements_result.prototype = {};
Hawk_getRootElements_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.LIST) {
        this.success = [];
        var _rtmp3256 = input.readListBegin();
        var _size255 = _rtmp3256.size || 0;
        for (var _i257 = 0; _i257 < _size255; ++_i257) {
          var elem258 = null;
          elem258 = new ModelElement();
          elem258.read(input);
          this.success.push(elem258);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_getRootElements_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_getRootElements_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.LIST, 0);
    output.writeListBegin(Thrift.Type.STRUCT, this.success.length);
    for (var iter259 in this.success) {
      if (this.success.hasOwnProperty(iter259)) {
        iter259 = this.success[iter259];
        iter259.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_watchStateChanges_args = function(args) {
  this.name = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
  }
};
Hawk_watchStateChanges_args.prototype = {};
Hawk_watchStateChanges_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_watchStateChanges_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_watchStateChanges_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_watchStateChanges_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new Subscription(args.success);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_watchStateChanges_result.prototype = {};
Hawk_watchStateChanges_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.STRUCT) {
        this.success = new Subscription();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_watchStateChanges_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_watchStateChanges_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_watchModelChanges_args = function(args) {
  this.name = null;
  this.repositoryUri = null;
  this.filePath = null;
  this.clientID = null;
  this.durableEvents = null;
  if (args) {
    if (args.name !== undefined && args.name !== null) {
      this.name = args.name;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field name is unset!');
    }
    if (args.repositoryUri !== undefined && args.repositoryUri !== null) {
      this.repositoryUri = args.repositoryUri;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field repositoryUri is unset!');
    }
    if (args.filePath !== undefined && args.filePath !== null) {
      this.filePath = Thrift.copyList(args.filePath, [null]);
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field filePath is unset!');
    }
    if (args.clientID !== undefined && args.clientID !== null) {
      this.clientID = args.clientID;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field clientID is unset!');
    }
    if (args.durableEvents !== undefined && args.durableEvents !== null) {
      this.durableEvents = args.durableEvents;
    } else {
      throw new Thrift.TProtocolException(Thrift.TProtocolExceptionType.UNKNOWN, 'Required field durableEvents is unset!');
    }
  }
};
Hawk_watchModelChanges_args.prototype = {};
Hawk_watchModelChanges_args.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 1:
      if (ftype == Thrift.Type.STRING) {
        this.name = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.repositoryUri = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.LIST) {
        this.filePath = [];
        var _rtmp3261 = input.readListBegin();
        var _size260 = _rtmp3261.size || 0;
        for (var _i262 = 0; _i262 < _size260; ++_i262) {
          var elem263 = null;
          elem263 = input.readString().value;
          this.filePath.push(elem263);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.clientID = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.I32) {
        this.durableEvents = input.readI32().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_watchModelChanges_args.prototype.write = function(output) {
  output.writeStructBegin('Hawk_watchModelChanges_args');
  if (this.name !== null && this.name !== undefined) {
    output.writeFieldBegin('name', Thrift.Type.STRING, 1);
    output.writeString(this.name);
    output.writeFieldEnd();
  }
  if (this.repositoryUri !== null && this.repositoryUri !== undefined) {
    output.writeFieldBegin('repositoryUri', Thrift.Type.STRING, 2);
    output.writeString(this.repositoryUri);
    output.writeFieldEnd();
  }
  if (this.filePath !== null && this.filePath !== undefined) {
    output.writeFieldBegin('filePath', Thrift.Type.LIST, 3);
    output.writeListBegin(Thrift.Type.STRING, this.filePath.length);
    for (var iter264 in this.filePath) {
      if (this.filePath.hasOwnProperty(iter264)) {
        iter264 = this.filePath[iter264];
        output.writeString(iter264);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  if (this.clientID !== null && this.clientID !== undefined) {
    output.writeFieldBegin('clientID', Thrift.Type.STRING, 4);
    output.writeString(this.clientID);
    output.writeFieldEnd();
  }
  if (this.durableEvents !== null && this.durableEvents !== undefined) {
    output.writeFieldBegin('durableEvents', Thrift.Type.I32, 5);
    output.writeI32(this.durableEvents);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

Hawk_watchModelChanges_result = function(args) {
  this.success = null;
  this.err1 = null;
  this.err2 = null;
  if (args instanceof HawkInstanceNotFound) {
    this.err1 = args;
    return;
  }
  if (args instanceof HawkInstanceNotRunning) {
    this.err2 = args;
    return;
  }
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new Subscription(args.success);
    }
    if (args.err1 !== undefined && args.err1 !== null) {
      this.err1 = args.err1;
    }
    if (args.err2 !== undefined && args.err2 !== null) {
      this.err2 = args.err2;
    }
  }
};
Hawk_watchModelChanges_result.prototype = {};
Hawk_watchModelChanges_result.prototype.read = function(input) {
  input.readStructBegin();
  while (true) {
    var ret = input.readFieldBegin();
    var ftype = ret.ftype;
    var fid = ret.fid;
    if (ftype == Thrift.Type.STOP) {
      break;
    }
    switch (fid) {
      case 0:
      if (ftype == Thrift.Type.STRUCT) {
        this.success = new Subscription();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 1:
      if (ftype == Thrift.Type.STRUCT) {
        this.err1 = new HawkInstanceNotFound();
        this.err1.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRUCT) {
        this.err2 = new HawkInstanceNotRunning();
        this.err2.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

Hawk_watchModelChanges_result.prototype.write = function(output) {
  output.writeStructBegin('Hawk_watchModelChanges_result');
  if (this.success !== null && this.success !== undefined) {
    output.writeFieldBegin('success', Thrift.Type.STRUCT, 0);
    this.success.write(output);
    output.writeFieldEnd();
  }
  if (this.err1 !== null && this.err1 !== undefined) {
    output.writeFieldBegin('err1', Thrift.Type.STRUCT, 1);
    this.err1.write(output);
    output.writeFieldEnd();
  }
  if (this.err2 !== null && this.err2 !== undefined) {
    output.writeFieldBegin('err2', Thrift.Type.STRUCT, 2);
    this.err2.write(output);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

HawkClient = function(input, output) {
  this.input = input;
  this.output = (!output) ? input : output;
  this.seqid = 0;
};
HawkClient.prototype = {};

HawkClient.prototype.createInstance = function(name, backend, minimumDelayMillis, maximumDelayMillis, enabledPlugins, indexFactory, callback) {
  this.send_createInstance(name, backend, minimumDelayMillis, maximumDelayMillis, enabledPlugins, indexFactory, callback); 
  if (!callback) {
  this.recv_createInstance();
  }
};

HawkClient.prototype.send_createInstance = function(name, backend, minimumDelayMillis, maximumDelayMillis, enabledPlugins, indexFactory, callback) {
  var params = {
    name: name,
    backend: backend,
    minimumDelayMillis: minimumDelayMillis,
    maximumDelayMillis: maximumDelayMillis,
    enabledPlugins: enabledPlugins,
    indexFactory: indexFactory
  };
  var args = new Hawk_createInstance_args(params);
  try {
    this.output.writeMessageBegin('createInstance', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_createInstance();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_createInstance = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_createInstance_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  return;
};

HawkClient.prototype.listBackends = function(callback) {
  this.send_listBackends(callback); 
  if (!callback) {
    return this.recv_listBackends();
  }
};

HawkClient.prototype.send_listBackends = function(callback) {
  var args = new Hawk_listBackends_args();
  try {
    this.output.writeMessageBegin('listBackends', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listBackends();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listBackends = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listBackends_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'listBackends failed: unknown result';
};

HawkClient.prototype.listPlugins = function(callback) {
  this.send_listPlugins(callback); 
  if (!callback) {
    return this.recv_listPlugins();
  }
};

HawkClient.prototype.send_listPlugins = function(callback) {
  var args = new Hawk_listPlugins_args();
  try {
    this.output.writeMessageBegin('listPlugins', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listPlugins();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listPlugins = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listPlugins_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'listPlugins failed: unknown result';
};

HawkClient.prototype.listPluginDetails = function(callback) {
  this.send_listPluginDetails(callback); 
  if (!callback) {
    return this.recv_listPluginDetails();
  }
};

HawkClient.prototype.send_listPluginDetails = function(callback) {
  var args = new Hawk_listPluginDetails_args();
  try {
    this.output.writeMessageBegin('listPluginDetails', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listPluginDetails();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listPluginDetails = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listPluginDetails_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'listPluginDetails failed: unknown result';
};

HawkClient.prototype.listInstances = function(callback) {
  this.send_listInstances(callback); 
  if (!callback) {
    return this.recv_listInstances();
  }
};

HawkClient.prototype.send_listInstances = function(callback) {
  var args = new Hawk_listInstances_args();
  try {
    this.output.writeMessageBegin('listInstances', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listInstances();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listInstances = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listInstances_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'listInstances failed: unknown result';
};

HawkClient.prototype.removeInstance = function(name, callback) {
  this.send_removeInstance(name, callback); 
  if (!callback) {
  this.recv_removeInstance();
  }
};

HawkClient.prototype.send_removeInstance = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_removeInstance_args(params);
  try {
    this.output.writeMessageBegin('removeInstance', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_removeInstance();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_removeInstance = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_removeInstance_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  return;
};

HawkClient.prototype.startInstance = function(name, callback) {
  this.send_startInstance(name, callback); 
  if (!callback) {
  this.recv_startInstance();
  }
};

HawkClient.prototype.send_startInstance = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_startInstance_args(params);
  try {
    this.output.writeMessageBegin('startInstance', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_startInstance();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_startInstance = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_startInstance_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  return;
};

HawkClient.prototype.stopInstance = function(name, callback) {
  this.send_stopInstance(name, callback); 
  if (!callback) {
  this.recv_stopInstance();
  }
};

HawkClient.prototype.send_stopInstance = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_stopInstance_args(params);
  try {
    this.output.writeMessageBegin('stopInstance', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_stopInstance();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_stopInstance = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_stopInstance_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.syncInstance = function(name, blockUntilDone, callback) {
  this.send_syncInstance(name, blockUntilDone, callback); 
  if (!callback) {
  this.recv_syncInstance();
  }
};

HawkClient.prototype.send_syncInstance = function(name, blockUntilDone, callback) {
  var params = {
    name: name,
    blockUntilDone: blockUntilDone
  };
  var args = new Hawk_syncInstance_args(params);
  try {
    this.output.writeMessageBegin('syncInstance', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_syncInstance();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_syncInstance = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_syncInstance_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.registerMetamodels = function(name, metamodel, callback) {
  this.send_registerMetamodels(name, metamodel, callback); 
  if (!callback) {
  this.recv_registerMetamodels();
  }
};

HawkClient.prototype.send_registerMetamodels = function(name, metamodel, callback) {
  var params = {
    name: name,
    metamodel: metamodel
  };
  var args = new Hawk_registerMetamodels_args(params);
  try {
    this.output.writeMessageBegin('registerMetamodels', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_registerMetamodels();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_registerMetamodels = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_registerMetamodels_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  return;
};

HawkClient.prototype.unregisterMetamodels = function(name, metamodel, callback) {
  this.send_unregisterMetamodels(name, metamodel, callback); 
  if (!callback) {
  this.recv_unregisterMetamodels();
  }
};

HawkClient.prototype.send_unregisterMetamodels = function(name, metamodel, callback) {
  var params = {
    name: name,
    metamodel: metamodel
  };
  var args = new Hawk_unregisterMetamodels_args(params);
  try {
    this.output.writeMessageBegin('unregisterMetamodels', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_unregisterMetamodels();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_unregisterMetamodels = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_unregisterMetamodels_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.listMetamodels = function(name, callback) {
  this.send_listMetamodels(name, callback); 
  if (!callback) {
    return this.recv_listMetamodels();
  }
};

HawkClient.prototype.send_listMetamodels = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_listMetamodels_args(params);
  try {
    this.output.writeMessageBegin('listMetamodels', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listMetamodels();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listMetamodels = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listMetamodels_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listMetamodels failed: unknown result';
};

HawkClient.prototype.listTypeNames = function(hawkInstanceName, metamodelURI, callback) {
  this.send_listTypeNames(hawkInstanceName, metamodelURI, callback); 
  if (!callback) {
    return this.recv_listTypeNames();
  }
};

HawkClient.prototype.send_listTypeNames = function(hawkInstanceName, metamodelURI, callback) {
  var params = {
    hawkInstanceName: hawkInstanceName,
    metamodelURI: metamodelURI
  };
  var args = new Hawk_listTypeNames_args(params);
  try {
    this.output.writeMessageBegin('listTypeNames', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listTypeNames();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listTypeNames = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listTypeNames_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listTypeNames failed: unknown result';
};

HawkClient.prototype.listAttributeNames = function(hawkInstanceName, metamodelURI, typeName, callback) {
  this.send_listAttributeNames(hawkInstanceName, metamodelURI, typeName, callback); 
  if (!callback) {
    return this.recv_listAttributeNames();
  }
};

HawkClient.prototype.send_listAttributeNames = function(hawkInstanceName, metamodelURI, typeName, callback) {
  var params = {
    hawkInstanceName: hawkInstanceName,
    metamodelURI: metamodelURI,
    typeName: typeName
  };
  var args = new Hawk_listAttributeNames_args(params);
  try {
    this.output.writeMessageBegin('listAttributeNames', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listAttributeNames();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listAttributeNames = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listAttributeNames_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  if (null !== result.err4) {
    throw result.err4;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listAttributeNames failed: unknown result';
};

HawkClient.prototype.listMetamodelParsers = function(name, callback) {
  this.send_listMetamodelParsers(name, callback); 
  if (!callback) {
    return this.recv_listMetamodelParsers();
  }
};

HawkClient.prototype.send_listMetamodelParsers = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_listMetamodelParsers_args(params);
  try {
    this.output.writeMessageBegin('listMetamodelParsers', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listMetamodelParsers();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listMetamodelParsers = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listMetamodelParsers_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listMetamodelParsers failed: unknown result';
};

HawkClient.prototype.listQueryLanguages = function(name, callback) {
  this.send_listQueryLanguages(name, callback); 
  if (!callback) {
    return this.recv_listQueryLanguages();
  }
};

HawkClient.prototype.send_listQueryLanguages = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_listQueryLanguages_args(params);
  try {
    this.output.writeMessageBegin('listQueryLanguages', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listQueryLanguages();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listQueryLanguages = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listQueryLanguages_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'listQueryLanguages failed: unknown result';
};

HawkClient.prototype.query = function(name, query, language, options, callback) {
  this.send_query(name, query, language, options, callback); 
  if (!callback) {
    return this.recv_query();
  }
};

HawkClient.prototype.send_query = function(name, query, language, options, callback) {
  var params = {
    name: name,
    query: query,
    language: language,
    options: options
  };
  var args = new Hawk_query_args(params);
  try {
    this.output.writeMessageBegin('query', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_query();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_query = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_query_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  if (null !== result.err4) {
    throw result.err4;
  }
  if (null !== result.err5) {
    throw result.err5;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'query failed: unknown result';
};

HawkClient.prototype.timedQuery = function(name, query, language, options, callback) {
  this.send_timedQuery(name, query, language, options, callback); 
  if (!callback) {
    return this.recv_timedQuery();
  }
};

HawkClient.prototype.send_timedQuery = function(name, query, language, options, callback) {
  var params = {
    name: name,
    query: query,
    language: language,
    options: options
  };
  var args = new Hawk_timedQuery_args(params);
  try {
    this.output.writeMessageBegin('timedQuery', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_timedQuery();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_timedQuery = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_timedQuery_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  if (null !== result.err4) {
    throw result.err4;
  }
  if (null !== result.err5) {
    throw result.err5;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'timedQuery failed: unknown result';
};

HawkClient.prototype.resolveProxies = function(name, ids, options, callback) {
  this.send_resolveProxies(name, ids, options, callback); 
  if (!callback) {
    return this.recv_resolveProxies();
  }
};

HawkClient.prototype.send_resolveProxies = function(name, ids, options, callback) {
  var params = {
    name: name,
    ids: ids,
    options: options
  };
  var args = new Hawk_resolveProxies_args(params);
  try {
    this.output.writeMessageBegin('resolveProxies', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_resolveProxies();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_resolveProxies = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_resolveProxies_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'resolveProxies failed: unknown result';
};

HawkClient.prototype.asyncQuery = function(name, query, language, options, callback) {
  this.send_asyncQuery(name, query, language, options, callback); 
  if (!callback) {
    return this.recv_asyncQuery();
  }
};

HawkClient.prototype.send_asyncQuery = function(name, query, language, options, callback) {
  var params = {
    name: name,
    query: query,
    language: language,
    options: options
  };
  var args = new Hawk_asyncQuery_args(params);
  try {
    this.output.writeMessageBegin('asyncQuery', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_asyncQuery();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_asyncQuery = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_asyncQuery_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  if (null !== result.err4) {
    throw result.err4;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'asyncQuery failed: unknown result';
};

HawkClient.prototype.cancelAsyncQuery = function(queryID, callback) {
  this.send_cancelAsyncQuery(queryID, callback); 
  if (!callback) {
  this.recv_cancelAsyncQuery();
  }
};

HawkClient.prototype.send_cancelAsyncQuery = function(queryID, callback) {
  var params = {
    queryID: queryID
  };
  var args = new Hawk_cancelAsyncQuery_args(params);
  try {
    this.output.writeMessageBegin('cancelAsyncQuery', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_cancelAsyncQuery();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_cancelAsyncQuery = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_cancelAsyncQuery_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  return;
};

HawkClient.prototype.fetchAsyncQueryResults = function(queryID, callback) {
  this.send_fetchAsyncQueryResults(queryID, callback); 
  if (!callback) {
    return this.recv_fetchAsyncQueryResults();
  }
};

HawkClient.prototype.send_fetchAsyncQueryResults = function(queryID, callback) {
  var params = {
    queryID: queryID
  };
  var args = new Hawk_fetchAsyncQueryResults_args(params);
  try {
    this.output.writeMessageBegin('fetchAsyncQueryResults', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_fetchAsyncQueryResults();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_fetchAsyncQueryResults = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_fetchAsyncQueryResults_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'fetchAsyncQueryResults failed: unknown result';
};

HawkClient.prototype.addRepository = function(name, repo, credentials, callback) {
  this.send_addRepository(name, repo, credentials, callback); 
  if (!callback) {
  this.recv_addRepository();
  }
};

HawkClient.prototype.send_addRepository = function(name, repo, credentials, callback) {
  var params = {
    name: name,
    repo: repo,
    credentials: credentials
  };
  var args = new Hawk_addRepository_args(params);
  try {
    this.output.writeMessageBegin('addRepository', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_addRepository();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_addRepository = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_addRepository_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  if (null !== result.err4) {
    throw result.err4;
  }
  return;
};

HawkClient.prototype.isFrozen = function(name, uri, callback) {
  this.send_isFrozen(name, uri, callback); 
  if (!callback) {
    return this.recv_isFrozen();
  }
};

HawkClient.prototype.send_isFrozen = function(name, uri, callback) {
  var params = {
    name: name,
    uri: uri
  };
  var args = new Hawk_isFrozen_args(params);
  try {
    this.output.writeMessageBegin('isFrozen', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_isFrozen();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_isFrozen = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_isFrozen_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'isFrozen failed: unknown result';
};

HawkClient.prototype.setFrozen = function(name, uri, isFrozen, callback) {
  this.send_setFrozen(name, uri, isFrozen, callback); 
  if (!callback) {
  this.recv_setFrozen();
  }
};

HawkClient.prototype.send_setFrozen = function(name, uri, isFrozen, callback) {
  var params = {
    name: name,
    uri: uri,
    isFrozen: isFrozen
  };
  var args = new Hawk_setFrozen_args(params);
  try {
    this.output.writeMessageBegin('setFrozen', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_setFrozen();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_setFrozen = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_setFrozen_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.removeRepository = function(name, uri, callback) {
  this.send_removeRepository(name, uri, callback); 
  if (!callback) {
  this.recv_removeRepository();
  }
};

HawkClient.prototype.send_removeRepository = function(name, uri, callback) {
  var params = {
    name: name,
    uri: uri
  };
  var args = new Hawk_removeRepository_args(params);
  try {
    this.output.writeMessageBegin('removeRepository', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_removeRepository();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_removeRepository = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_removeRepository_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.updateRepositoryCredentials = function(name, uri, cred, callback) {
  this.send_updateRepositoryCredentials(name, uri, cred, callback); 
  if (!callback) {
  this.recv_updateRepositoryCredentials();
  }
};

HawkClient.prototype.send_updateRepositoryCredentials = function(name, uri, cred, callback) {
  var params = {
    name: name,
    uri: uri,
    cred: cred
  };
  var args = new Hawk_updateRepositoryCredentials_args(params);
  try {
    this.output.writeMessageBegin('updateRepositoryCredentials', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_updateRepositoryCredentials();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_updateRepositoryCredentials = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_updateRepositoryCredentials_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.listRepositories = function(name, callback) {
  this.send_listRepositories(name, callback); 
  if (!callback) {
    return this.recv_listRepositories();
  }
};

HawkClient.prototype.send_listRepositories = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_listRepositories_args(params);
  try {
    this.output.writeMessageBegin('listRepositories', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listRepositories();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listRepositories = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listRepositories_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listRepositories failed: unknown result';
};

HawkClient.prototype.listRepositoryTypes = function(callback) {
  this.send_listRepositoryTypes(callback); 
  if (!callback) {
    return this.recv_listRepositoryTypes();
  }
};

HawkClient.prototype.send_listRepositoryTypes = function(callback) {
  var args = new Hawk_listRepositoryTypes_args();
  try {
    this.output.writeMessageBegin('listRepositoryTypes', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listRepositoryTypes();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listRepositoryTypes = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listRepositoryTypes_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'listRepositoryTypes failed: unknown result';
};

HawkClient.prototype.listFiles = function(name, repository, filePatterns, callback) {
  this.send_listFiles(name, repository, filePatterns, callback); 
  if (!callback) {
    return this.recv_listFiles();
  }
};

HawkClient.prototype.send_listFiles = function(name, repository, filePatterns, callback) {
  var params = {
    name: name,
    repository: repository,
    filePatterns: filePatterns
  };
  var args = new Hawk_listFiles_args(params);
  try {
    this.output.writeMessageBegin('listFiles', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listFiles();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listFiles = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listFiles_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listFiles failed: unknown result';
};

HawkClient.prototype.configurePolling = function(name, base, max, callback) {
  this.send_configurePolling(name, base, max, callback); 
  if (!callback) {
  this.recv_configurePolling();
  }
};

HawkClient.prototype.send_configurePolling = function(name, base, max, callback) {
  var params = {
    name: name,
    base: base,
    max: max
  };
  var args = new Hawk_configurePolling_args(params);
  try {
    this.output.writeMessageBegin('configurePolling', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_configurePolling();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_configurePolling = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_configurePolling_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  return;
};

HawkClient.prototype.addDerivedAttribute = function(name, spec, callback) {
  this.send_addDerivedAttribute(name, spec, callback); 
  if (!callback) {
  this.recv_addDerivedAttribute();
  }
};

HawkClient.prototype.send_addDerivedAttribute = function(name, spec, callback) {
  var params = {
    name: name,
    spec: spec
  };
  var args = new Hawk_addDerivedAttribute_args(params);
  try {
    this.output.writeMessageBegin('addDerivedAttribute', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_addDerivedAttribute();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_addDerivedAttribute = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_addDerivedAttribute_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  return;
};

HawkClient.prototype.removeDerivedAttribute = function(name, spec, callback) {
  this.send_removeDerivedAttribute(name, spec, callback); 
  if (!callback) {
  this.recv_removeDerivedAttribute();
  }
};

HawkClient.prototype.send_removeDerivedAttribute = function(name, spec, callback) {
  var params = {
    name: name,
    spec: spec
  };
  var args = new Hawk_removeDerivedAttribute_args(params);
  try {
    this.output.writeMessageBegin('removeDerivedAttribute', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_removeDerivedAttribute();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_removeDerivedAttribute = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_removeDerivedAttribute_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.listDerivedAttributes = function(name, callback) {
  this.send_listDerivedAttributes(name, callback); 
  if (!callback) {
    return this.recv_listDerivedAttributes();
  }
};

HawkClient.prototype.send_listDerivedAttributes = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_listDerivedAttributes_args(params);
  try {
    this.output.writeMessageBegin('listDerivedAttributes', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listDerivedAttributes();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listDerivedAttributes = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listDerivedAttributes_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listDerivedAttributes failed: unknown result';
};

HawkClient.prototype.addIndexedAttribute = function(name, spec, callback) {
  this.send_addIndexedAttribute(name, spec, callback); 
  if (!callback) {
  this.recv_addIndexedAttribute();
  }
};

HawkClient.prototype.send_addIndexedAttribute = function(name, spec, callback) {
  var params = {
    name: name,
    spec: spec
  };
  var args = new Hawk_addIndexedAttribute_args(params);
  try {
    this.output.writeMessageBegin('addIndexedAttribute', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_addIndexedAttribute();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_addIndexedAttribute = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_addIndexedAttribute_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.err3) {
    throw result.err3;
  }
  return;
};

HawkClient.prototype.removeIndexedAttribute = function(name, spec, callback) {
  this.send_removeIndexedAttribute(name, spec, callback); 
  if (!callback) {
  this.recv_removeIndexedAttribute();
  }
};

HawkClient.prototype.send_removeIndexedAttribute = function(name, spec, callback) {
  var params = {
    name: name,
    spec: spec
  };
  var args = new Hawk_removeIndexedAttribute_args(params);
  try {
    this.output.writeMessageBegin('removeIndexedAttribute', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_removeIndexedAttribute();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_removeIndexedAttribute = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_removeIndexedAttribute_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  return;
};

HawkClient.prototype.listIndexedAttributes = function(name, callback) {
  this.send_listIndexedAttributes(name, callback); 
  if (!callback) {
    return this.recv_listIndexedAttributes();
  }
};

HawkClient.prototype.send_listIndexedAttributes = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_listIndexedAttributes_args(params);
  try {
    this.output.writeMessageBegin('listIndexedAttributes', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_listIndexedAttributes();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_listIndexedAttributes = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_listIndexedAttributes_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'listIndexedAttributes failed: unknown result';
};

HawkClient.prototype.getModel = function(name, options, callback) {
  this.send_getModel(name, options, callback); 
  if (!callback) {
    return this.recv_getModel();
  }
};

HawkClient.prototype.send_getModel = function(name, options, callback) {
  var params = {
    name: name,
    options: options
  };
  var args = new Hawk_getModel_args(params);
  try {
    this.output.writeMessageBegin('getModel', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_getModel();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_getModel = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_getModel_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'getModel failed: unknown result';
};

HawkClient.prototype.getRootElements = function(name, options, callback) {
  this.send_getRootElements(name, options, callback); 
  if (!callback) {
    return this.recv_getRootElements();
  }
};

HawkClient.prototype.send_getRootElements = function(name, options, callback) {
  var params = {
    name: name,
    options: options
  };
  var args = new Hawk_getRootElements_args(params);
  try {
    this.output.writeMessageBegin('getRootElements', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_getRootElements();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_getRootElements = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_getRootElements_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'getRootElements failed: unknown result';
};

HawkClient.prototype.watchStateChanges = function(name, callback) {
  this.send_watchStateChanges(name, callback); 
  if (!callback) {
    return this.recv_watchStateChanges();
  }
};

HawkClient.prototype.send_watchStateChanges = function(name, callback) {
  var params = {
    name: name
  };
  var args = new Hawk_watchStateChanges_args(params);
  try {
    this.output.writeMessageBegin('watchStateChanges', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_watchStateChanges();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_watchStateChanges = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_watchStateChanges_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'watchStateChanges failed: unknown result';
};

HawkClient.prototype.watchModelChanges = function(name, repositoryUri, filePath, clientID, durableEvents, callback) {
  this.send_watchModelChanges(name, repositoryUri, filePath, clientID, durableEvents, callback); 
  if (!callback) {
    return this.recv_watchModelChanges();
  }
};

HawkClient.prototype.send_watchModelChanges = function(name, repositoryUri, filePath, clientID, durableEvents, callback) {
  var params = {
    name: name,
    repositoryUri: repositoryUri,
    filePath: filePath,
    clientID: clientID,
    durableEvents: durableEvents
  };
  var args = new Hawk_watchModelChanges_args(params);
  try {
    this.output.writeMessageBegin('watchModelChanges', Thrift.MessageType.CALL, this.seqid);
    args.write(this.output);
    this.output.writeMessageEnd();
    if (callback) {
      var self = this;
      this.output.getTransport().flush(true, function() {
        var result = null;
        try {
          result = self.recv_watchModelChanges();
        } catch (e) {
          result = e;
        }
        callback(result);
      });
    } else {
      return this.output.getTransport().flush();
    }
  }
  catch (e) {
    if (typeof this.output.getTransport().reset === 'function') {
      this.output.getTransport().reset();
    }
    throw e;
  }
};

HawkClient.prototype.recv_watchModelChanges = function() {
  var ret = this.input.readMessageBegin();
  var mtype = ret.mtype;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new Hawk_watchModelChanges_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.err1) {
    throw result.err1;
  }
  if (null !== result.err2) {
    throw result.err2;
  }
  if (null !== result.success) {
    return result.success;
  }
  throw 'watchModelChanges failed: unknown result';
};
