UNPKG

@databricks/sql

Version:

Driver for connection to Databricks SQL via Thrift API.

4,201 lines 124 kB
//
// Autogenerated by Thrift Compiler (0.19.0)
//
// DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
//
"use strict";

var thrift = require('thrift');
var Thrift = thrift.Thrift;
var Q = thrift.Q;
var Int64 = require('node-int64');


var ttypes = require('./TCLIService_types');
//HELPER FUNCTIONS AND STRUCTURES

var TCLIService_OpenSession_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TOpenSessionReq(args.req);
    }
  }
};
TCLIService_OpenSession_args.prototype = {};
TCLIService_OpenSession_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.STRUCT) {
        this.req = new ttypes.TOpenSessionReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_OpenSession_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TOpenSessionResp(args.success);
    }
  }
};
TCLIService_OpenSession_result.prototype = {};
TCLIService_OpenSession_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 ttypes.TOpenSessionResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CloseSession_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TCloseSessionReq(args.req);
    }
  }
};
TCLIService_CloseSession_args.prototype = {};
TCLIService_CloseSession_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.STRUCT) {
        this.req = new ttypes.TCloseSessionReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CloseSession_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TCloseSessionResp(args.success);
    }
  }
};
TCLIService_CloseSession_result.prototype = {};
TCLIService_CloseSession_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 ttypes.TCloseSessionResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetInfo_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetInfoReq(args.req);
    }
  }
};
TCLIService_GetInfo_args.prototype = {};
TCLIService_GetInfo_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.STRUCT) {
        this.req = new ttypes.TGetInfoReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetInfo_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetInfoResp(args.success);
    }
  }
};
TCLIService_GetInfo_result.prototype = {};
TCLIService_GetInfo_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 ttypes.TGetInfoResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_ExecuteStatement_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TExecuteStatementReq(args.req);
    }
  }
};
TCLIService_ExecuteStatement_args.prototype = {};
TCLIService_ExecuteStatement_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.STRUCT) {
        this.req = new ttypes.TExecuteStatementReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_ExecuteStatement_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TExecuteStatementResp(args.success);
    }
  }
};
TCLIService_ExecuteStatement_result.prototype = {};
TCLIService_ExecuteStatement_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 ttypes.TExecuteStatementResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetTypeInfo_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetTypeInfoReq(args.req);
    }
  }
};
TCLIService_GetTypeInfo_args.prototype = {};
TCLIService_GetTypeInfo_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.STRUCT) {
        this.req = new ttypes.TGetTypeInfoReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetTypeInfo_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetTypeInfoResp(args.success);
    }
  }
};
TCLIService_GetTypeInfo_result.prototype = {};
TCLIService_GetTypeInfo_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 ttypes.TGetTypeInfoResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetCatalogs_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetCatalogsReq(args.req);
    }
  }
};
TCLIService_GetCatalogs_args.prototype = {};
TCLIService_GetCatalogs_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.STRUCT) {
        this.req = new ttypes.TGetCatalogsReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetCatalogs_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetCatalogsResp(args.success);
    }
  }
};
TCLIService_GetCatalogs_result.prototype = {};
TCLIService_GetCatalogs_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 ttypes.TGetCatalogsResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetSchemas_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetSchemasReq(args.req);
    }
  }
};
TCLIService_GetSchemas_args.prototype = {};
TCLIService_GetSchemas_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.STRUCT) {
        this.req = new ttypes.TGetSchemasReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetSchemas_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetSchemasResp(args.success);
    }
  }
};
TCLIService_GetSchemas_result.prototype = {};
TCLIService_GetSchemas_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 ttypes.TGetSchemasResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetTables_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetTablesReq(args.req);
    }
  }
};
TCLIService_GetTables_args.prototype = {};
TCLIService_GetTables_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.STRUCT) {
        this.req = new ttypes.TGetTablesReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetTables_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetTablesResp(args.success);
    }
  }
};
TCLIService_GetTables_result.prototype = {};
TCLIService_GetTables_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 ttypes.TGetTablesResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetTableTypes_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetTableTypesReq(args.req);
    }
  }
};
TCLIService_GetTableTypes_args.prototype = {};
TCLIService_GetTableTypes_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.STRUCT) {
        this.req = new ttypes.TGetTableTypesReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetTableTypes_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetTableTypesResp(args.success);
    }
  }
};
TCLIService_GetTableTypes_result.prototype = {};
TCLIService_GetTableTypes_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 ttypes.TGetTableTypesResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetColumns_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetColumnsReq(args.req);
    }
  }
};
TCLIService_GetColumns_args.prototype = {};
TCLIService_GetColumns_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.STRUCT) {
        this.req = new ttypes.TGetColumnsReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetColumns_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetColumnsResp(args.success);
    }
  }
};
TCLIService_GetColumns_result.prototype = {};
TCLIService_GetColumns_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 ttypes.TGetColumnsResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetFunctions_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetFunctionsReq(args.req);
    }
  }
};
TCLIService_GetFunctions_args.prototype = {};
TCLIService_GetFunctions_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.STRUCT) {
        this.req = new ttypes.TGetFunctionsReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetFunctions_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetFunctionsResp(args.success);
    }
  }
};
TCLIService_GetFunctions_result.prototype = {};
TCLIService_GetFunctions_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 ttypes.TGetFunctionsResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetPrimaryKeys_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetPrimaryKeysReq(args.req);
    }
  }
};
TCLIService_GetPrimaryKeys_args.prototype = {};
TCLIService_GetPrimaryKeys_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.STRUCT) {
        this.req = new ttypes.TGetPrimaryKeysReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetPrimaryKeys_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetPrimaryKeysResp(args.success);
    }
  }
};
TCLIService_GetPrimaryKeys_result.prototype = {};
TCLIService_GetPrimaryKeys_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 ttypes.TGetPrimaryKeysResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetCrossReference_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetCrossReferenceReq(args.req);
    }
  }
};
TCLIService_GetCrossReference_args.prototype = {};
TCLIService_GetCrossReference_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.STRUCT) {
        this.req = new ttypes.TGetCrossReferenceReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetCrossReference_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetCrossReferenceResp(args.success);
    }
  }
};
TCLIService_GetCrossReference_result.prototype = {};
TCLIService_GetCrossReference_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 ttypes.TGetCrossReferenceResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetOperationStatus_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetOperationStatusReq(args.req);
    }
  }
};
TCLIService_GetOperationStatus_args.prototype = {};
TCLIService_GetOperationStatus_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.STRUCT) {
        this.req = new ttypes.TGetOperationStatusReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetOperationStatus_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetOperationStatusResp(args.success);
    }
  }
};
TCLIService_GetOperationStatus_result.prototype = {};
TCLIService_GetOperationStatus_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 ttypes.TGetOperationStatusResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CancelOperation_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TCancelOperationReq(args.req);
    }
  }
};
TCLIService_CancelOperation_args.prototype = {};
TCLIService_CancelOperation_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.STRUCT) {
        this.req = new ttypes.TCancelOperationReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CancelOperation_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TCancelOperationResp(args.success);
    }
  }
};
TCLIService_CancelOperation_result.prototype = {};
TCLIService_CancelOperation_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 ttypes.TCancelOperationResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CloseOperation_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TCloseOperationReq(args.req);
    }
  }
};
TCLIService_CloseOperation_args.prototype = {};
TCLIService_CloseOperation_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.STRUCT) {
        this.req = new ttypes.TCloseOperationReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CloseOperation_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TCloseOperationResp(args.success);
    }
  }
};
TCLIService_CloseOperation_result.prototype = {};
TCLIService_CloseOperation_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 ttypes.TCloseOperationResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetResultSetMetadata_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetResultSetMetadataReq(args.req);
    }
  }
};
TCLIService_GetResultSetMetadata_args.prototype = {};
TCLIService_GetResultSetMetadata_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.STRUCT) {
        this.req = new ttypes.TGetResultSetMetadataReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetResultSetMetadata_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetResultSetMetadataResp(args.success);
    }
  }
};
TCLIService_GetResultSetMetadata_result.prototype = {};
TCLIService_GetResultSetMetadata_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 ttypes.TGetResultSetMetadataResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_FetchResults_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TFetchResultsReq(args.req);
    }
  }
};
TCLIService_FetchResults_args.prototype = {};
TCLIService_FetchResults_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.STRUCT) {
        this.req = new ttypes.TFetchResultsReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_FetchResults_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TFetchResultsResp(args.success);
    }
  }
};
TCLIService_FetchResults_result.prototype = {};
TCLIService_FetchResults_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 ttypes.TFetchResultsResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetDelegationToken_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TGetDelegationTokenReq(args.req);
    }
  }
};
TCLIService_GetDelegationToken_args.prototype = {};
TCLIService_GetDelegationToken_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.STRUCT) {
        this.req = new ttypes.TGetDelegationTokenReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_GetDelegationToken_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TGetDelegationTokenResp(args.success);
    }
  }
};
TCLIService_GetDelegationToken_result.prototype = {};
TCLIService_GetDelegationToken_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 ttypes.TGetDelegationTokenResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CancelDelegationToken_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TCancelDelegationTokenReq(args.req);
    }
  }
};
TCLIService_CancelDelegationToken_args.prototype = {};
TCLIService_CancelDelegationToken_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.STRUCT) {
        this.req = new ttypes.TCancelDelegationTokenReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_CancelDelegationToken_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TCancelDelegationTokenResp(args.success);
    }
  }
};
TCLIService_CancelDelegationToken_result.prototype = {};
TCLIService_CancelDelegationToken_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 ttypes.TCancelDelegationTokenResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_RenewDelegationToken_args = function(args) {
  this.req = null;
  if (args) {
    if (args.req !== undefined && args.req !== null) {
      this.req = new ttypes.TRenewDelegationTokenReq(args.req);
    }
  }
};
TCLIService_RenewDelegationToken_args.prototype = {};
TCLIService_RenewDelegationToken_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.STRUCT) {
        this.req = new ttypes.TRenewDelegationTokenReq();
        this.req.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIService_RenewDelegationToken_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined && args.success !== null) {
      this.success = new ttypes.TRenewDelegationTokenResp(args.success);
    }
  }
};
TCLIService_RenewDelegationToken_result.prototype = {};
TCLIService_RenewDelegationToken_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 ttypes.TRenewDelegationTokenResp();
        this.success.read(input);
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

var TCLIServiceClient = exports.Client = function(output, pClass) {
  this.output = output;
  this.pClass = pClass;
  this._seqid = 0;
  this._reqs = {};
};
TCLIServiceClient.prototype = {};
TCLIServiceClient.prototype.seqid = function() { return this._seqid; };
TCLIServiceClient.prototype.new_seqid = function() { return this._seqid += 1; };

TCLIServiceClient.prototype.OpenSession = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_OpenSession(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_OpenSession(req);
  }
};

TCLIServiceClient.prototype.send_OpenSession = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_OpenSession_args(params);
  try {
    output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_OpenSession = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_OpenSession_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('OpenSession failed: unknown result');
};

TCLIServiceClient.prototype.CloseSession = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_CloseSession(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_CloseSession(req);
  }
};

TCLIServiceClient.prototype.send_CloseSession = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_CloseSession_args(params);
  try {
    output.writeMessageBegin('CloseSession', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_CloseSession = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_CloseSession_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('CloseSession failed: unknown result');
};

TCLIServiceClient.prototype.GetInfo = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetInfo(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetInfo(req);
  }
};

TCLIServiceClient.prototype.send_GetInfo = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetInfo_args(params);
  try {
    output.writeMessageBegin('GetInfo', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetInfo = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetInfo_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetInfo failed: unknown result');
};

TCLIServiceClient.prototype.ExecuteStatement = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_ExecuteStatement(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_ExecuteStatement(req);
  }
};

TCLIServiceClient.prototype.send_ExecuteStatement = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_ExecuteStatement_args(params);
  try {
    output.writeMessageBegin('ExecuteStatement', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_ExecuteStatement = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_ExecuteStatement_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('ExecuteStatement failed: unknown result');
};

TCLIServiceClient.prototype.GetTypeInfo = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetTypeInfo(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetTypeInfo(req);
  }
};

TCLIServiceClient.prototype.send_GetTypeInfo = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetTypeInfo_args(params);
  try {
    output.writeMessageBegin('GetTypeInfo', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetTypeInfo = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetTypeInfo_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetTypeInfo failed: unknown result');
};

TCLIServiceClient.prototype.GetCatalogs = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetCatalogs(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetCatalogs(req);
  }
};

TCLIServiceClient.prototype.send_GetCatalogs = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetCatalogs_args(params);
  try {
    output.writeMessageBegin('GetCatalogs', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetCatalogs = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetCatalogs_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetCatalogs failed: unknown result');
};

TCLIServiceClient.prototype.GetSchemas = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetSchemas(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetSchemas(req);
  }
};

TCLIServiceClient.prototype.send_GetSchemas = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetSchemas_args(params);
  try {
    output.writeMessageBegin('GetSchemas', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetSchemas = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetSchemas_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetSchemas failed: unknown result');
};

TCLIServiceClient.prototype.GetTables = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetTables(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetTables(req);
  }
};

TCLIServiceClient.prototype.send_GetTables = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetTables_args(params);
  try {
    output.writeMessageBegin('GetTables', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetTables = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetTables_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetTables failed: unknown result');
};

TCLIServiceClient.prototype.GetTableTypes = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetTableTypes(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetTableTypes(req);
  }
};

TCLIServiceClient.prototype.send_GetTableTypes = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetTableTypes_args(params);
  try {
    output.writeMessageBegin('GetTableTypes', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetTableTypes = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetTableTypes_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetTableTypes failed: unknown result');
};

TCLIServiceClient.prototype.GetColumns = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetColumns(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetColumns(req);
  }
};

TCLIServiceClient.prototype.send_GetColumns = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetColumns_args(params);
  try {
    output.writeMessageBegin('GetColumns', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetColumns = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetColumns_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetColumns failed: unknown result');
};

TCLIServiceClient.prototype.GetFunctions = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetFunctions(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetFunctions(req);
  }
};

TCLIServiceClient.prototype.send_GetFunctions = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetFunctions_args(params);
  try {
    output.writeMessageBegin('GetFunctions', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetFunctions = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetFunctions_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetFunctions failed: unknown result');
};

TCLIServiceClient.prototype.GetPrimaryKeys = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetPrimaryKeys(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetPrimaryKeys(req);
  }
};

TCLIServiceClient.prototype.send_GetPrimaryKeys = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetPrimaryKeys_args(params);
  try {
    output.writeMessageBegin('GetPrimaryKeys', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetPrimaryKeys = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetPrimaryKeys_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetPrimaryKeys failed: unknown result');
};

TCLIServiceClient.prototype.GetCrossReference = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetCrossReference(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetCrossReference(req);
  }
};

TCLIServiceClient.prototype.send_GetCrossReference = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetCrossReference_args(params);
  try {
    output.writeMessageBegin('GetCrossReference', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetCrossReference = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetCrossReference_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetCrossReference failed: unknown result');
};

TCLIServiceClient.prototype.GetOperationStatus = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetOperationStatus(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetOperationStatus(req);
  }
};

TCLIServiceClient.prototype.send_GetOperationStatus = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetOperationStatus_args(params);
  try {
    output.writeMessageBegin('GetOperationStatus', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetOperationStatus = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetOperationStatus_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetOperationStatus failed: unknown result');
};

TCLIServiceClient.prototype.CancelOperation = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_CancelOperation(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_CancelOperation(req);
  }
};

TCLIServiceClient.prototype.send_CancelOperation = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_CancelOperation_args(params);
  try {
    output.writeMessageBegin('CancelOperation', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_CancelOperation = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_CancelOperation_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('CancelOperation failed: unknown result');
};

TCLIServiceClient.prototype.CloseOperation = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_CloseOperation(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_CloseOperation(req);
  }
};

TCLIServiceClient.prototype.send_CloseOperation = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_CloseOperation_args(params);
  try {
    output.writeMessageBegin('CloseOperation', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_CloseOperation = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_CloseOperation_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('CloseOperation failed: unknown result');
};

TCLIServiceClient.prototype.GetResultSetMetadata = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetResultSetMetadata(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetResultSetMetadata(req);
  }
};

TCLIServiceClient.prototype.send_GetResultSetMetadata = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetResultSetMetadata_args(params);
  try {
    output.writeMessageBegin('GetResultSetMetadata', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetResultSetMetadata = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetResultSetMetadata_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetResultSetMetadata failed: unknown result');
};

TCLIServiceClient.prototype.FetchResults = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_FetchResults(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_FetchResults(req);
  }
};

TCLIServiceClient.prototype.send_FetchResults = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_FetchResults_args(params);
  try {
    output.writeMessageBegin('FetchResults', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_FetchResults = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_FetchResults_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('FetchResults failed: unknown result');
};

TCLIServiceClient.prototype.GetDelegationToken = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_GetDelegationToken(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_GetDelegationToken(req);
  }
};

TCLIServiceClient.prototype.send_GetDelegationToken = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_GetDelegationToken_args(params);
  try {
    output.writeMessageBegin('GetDelegationToken', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_GetDelegationToken = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_GetDelegationToken_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('GetDelegationToken failed: unknown result');
};

TCLIServiceClient.prototype.CancelDelegationToken = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_CancelDelegationToken(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_CancelDelegationToken(req);
  }
};

TCLIServiceClient.prototype.send_CancelDelegationToken = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_CancelDelegationToken_args(params);
  try {
    output.writeMessageBegin('CancelDelegationToken', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_CancelDelegationToken = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_CancelDelegationToken_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('CancelDelegationToken failed: unknown result');
};

TCLIServiceClient.prototype.RenewDelegationToken = function(req, callback) {
  this._seqid = this.new_seqid();
  if (callback === undefined) {
    var _defer = Q.defer();
    this._reqs[this.seqid()] = function(error, result) {
      if (error) {
        _defer.reject(error);
      } else {
        _defer.resolve(result);
      }
    };
    this.send_RenewDelegationToken(req);
    return _defer.promise;
  } else {
    this._reqs[this.seqid()] = callback;
    this.send_RenewDelegationToken(req);
  }
};

TCLIServiceClient.prototype.send_RenewDelegationToken = function(req) {
  var output = new this.pClass(this.output);
  var params = {
    req: req
  };
  var args = new TCLIService_RenewDelegationToken_args(params);
  try {
    output.writeMessageBegin('RenewDelegationToken', Thrift.MessageType.CALL, this.seqid());
    args.write(output);
    output.writeMessageEnd();
    return this.output.flush();
  }
  catch (e) {
    delete this._reqs[this.seqid()];
    if (typeof output.reset === 'function') {
      output.reset();
    }
    throw e;
  }
};

TCLIServiceClient.prototype.recv_RenewDelegationToken = function(input,mtype,rseqid) {
  var callback = this._reqs[rseqid] || function() {};
  delete this._reqs[rseqid];
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(input);
    input.readMessageEnd();
    return callback(x);
  }
  var result = new TCLIService_RenewDelegationToken_result();
  result.read(input);
  input.readMessageEnd();

  if (null !== result.success) {
    return callback(null, result.success);
  }
  return callback('RenewDelegationToken failed: unknown result');
};
var TCLIServiceProcessor = exports.Processor = function(handler) {
  this._handler = handler;
};
TCLIServiceProcessor.prototype.process = function(input, output) {
  var r = input.readMessageBegin();
  if (this['process_' + r.fname]) {
    return this['process_' + r.fname].call(this, r.rseqid, input, output);
  } else {
    input.skip(Thrift.Type.STRUCT);
    input.readMessageEnd();
    var x = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN_METHOD, 'Unknown function ' + r.fname);
    output.writeMessageBegin(r.fname, Thrift.MessageType.EXCEPTION, r.rseqid);
    x.write(output);
    output.writeMessageEnd();
    output.flush();
  }
};
TCLIServiceProcessor.prototype.process_OpenSession = function(seqid, input, output) {
  var args = new TCLIService_OpenSession_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.OpenSession.length === 1) {
    Q.fcall(this._handler.OpenSession.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_OpenSession_result({success: result});
      output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.OpenSession(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_OpenSession_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("OpenSession", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("OpenSession", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_CloseSession = function(seqid, input, output) {
  var args = new TCLIService_CloseSession_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.CloseSession.length === 1) {
    Q.fcall(this._handler.CloseSession.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_CloseSession_result({success: result});
      output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.CloseSession(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_CloseSession_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("CloseSession", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("CloseSession", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetInfo = function(seqid, input, output) {
  var args = new TCLIService_GetInfo_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetInfo.length === 1) {
    Q.fcall(this._handler.GetInfo.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetInfo_result({success: result});
      output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetInfo(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetInfo", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetInfo", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_ExecuteStatement = function(seqid, input, output) {
  var args = new TCLIService_ExecuteStatement_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.ExecuteStatement.length === 1) {
    Q.fcall(this._handler.ExecuteStatement.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_ExecuteStatement_result({success: result});
      output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.ExecuteStatement(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_ExecuteStatement_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("ExecuteStatement", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetTypeInfo = function(seqid, input, output) {
  var args = new TCLIService_GetTypeInfo_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetTypeInfo.length === 1) {
    Q.fcall(this._handler.GetTypeInfo.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetTypeInfo_result({success: result});
      output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetTypeInfo(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetTypeInfo_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetTypeInfo", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetCatalogs = function(seqid, input, output) {
  var args = new TCLIService_GetCatalogs_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetCatalogs.length === 1) {
    Q.fcall(this._handler.GetCatalogs.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetCatalogs_result({success: result});
      output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetCatalogs(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetCatalogs_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetCatalogs", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetCatalogs", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetSchemas = function(seqid, input, output) {
  var args = new TCLIService_GetSchemas_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetSchemas.length === 1) {
    Q.fcall(this._handler.GetSchemas.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetSchemas_result({success: result});
      output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetSchemas(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetSchemas_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetSchemas", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetSchemas", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetTables = function(seqid, input, output) {
  var args = new TCLIService_GetTables_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetTables.length === 1) {
    Q.fcall(this._handler.GetTables.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetTables_result({success: result});
      output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetTables(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetTables_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetTables", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetTables", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetTableTypes = function(seqid, input, output) {
  var args = new TCLIService_GetTableTypes_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetTableTypes.length === 1) {
    Q.fcall(this._handler.GetTableTypes.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetTableTypes_result({success: result});
      output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetTableTypes(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetTableTypes_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetTableTypes", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetTableTypes", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetColumns = function(seqid, input, output) {
  var args = new TCLIService_GetColumns_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetColumns.length === 1) {
    Q.fcall(this._handler.GetColumns.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetColumns_result({success: result});
      output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetColumns(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetColumns_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetColumns", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetColumns", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetFunctions = function(seqid, input, output) {
  var args = new TCLIService_GetFunctions_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetFunctions.length === 1) {
    Q.fcall(this._handler.GetFunctions.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetFunctions_result({success: result});
      output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetFunctions(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetFunctions_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetFunctions", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetFunctions", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetPrimaryKeys = function(seqid, input, output) {
  var args = new TCLIService_GetPrimaryKeys_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetPrimaryKeys.length === 1) {
    Q.fcall(this._handler.GetPrimaryKeys.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetPrimaryKeys_result({success: result});
      output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetPrimaryKeys(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetPrimaryKeys_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetPrimaryKeys", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetCrossReference = function(seqid, input, output) {
  var args = new TCLIService_GetCrossReference_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetCrossReference.length === 1) {
    Q.fcall(this._handler.GetCrossReference.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetCrossReference_result({success: result});
      output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetCrossReference(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetCrossReference_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetCrossReference", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetCrossReference", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetOperationStatus = function(seqid, input, output) {
  var args = new TCLIService_GetOperationStatus_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetOperationStatus.length === 1) {
    Q.fcall(this._handler.GetOperationStatus.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetOperationStatus_result({success: result});
      output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetOperationStatus(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetOperationStatus_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetOperationStatus", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_CancelOperation = function(seqid, input, output) {
  var args = new TCLIService_CancelOperation_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.CancelOperation.length === 1) {
    Q.fcall(this._handler.CancelOperation.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_CancelOperation_result({success: result});
      output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.CancelOperation(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_CancelOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("CancelOperation", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("CancelOperation", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_CloseOperation = function(seqid, input, output) {
  var args = new TCLIService_CloseOperation_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.CloseOperation.length === 1) {
    Q.fcall(this._handler.CloseOperation.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_CloseOperation_result({success: result});
      output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.CloseOperation(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_CloseOperation_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("CloseOperation", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("CloseOperation", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetResultSetMetadata = function(seqid, input, output) {
  var args = new TCLIService_GetResultSetMetadata_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetResultSetMetadata.length === 1) {
    Q.fcall(this._handler.GetResultSetMetadata.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetResultSetMetadata_result({success: result});
      output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetResultSetMetadata(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetResultSetMetadata_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetResultSetMetadata", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_FetchResults = function(seqid, input, output) {
  var args = new TCLIService_FetchResults_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.FetchResults.length === 1) {
    Q.fcall(this._handler.FetchResults.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_FetchResults_result({success: result});
      output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.FetchResults(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_FetchResults_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("FetchResults", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("FetchResults", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_GetDelegationToken = function(seqid, input, output) {
  var args = new TCLIService_GetDelegationToken_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.GetDelegationToken.length === 1) {
    Q.fcall(this._handler.GetDelegationToken.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_GetDelegationToken_result({success: result});
      output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.GetDelegationToken(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_GetDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("GetDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_CancelDelegationToken = function(seqid, input, output) {
  var args = new TCLIService_CancelDelegationToken_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.CancelDelegationToken.length === 1) {
    Q.fcall(this._handler.CancelDelegationToken.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_CancelDelegationToken_result({success: result});
      output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.CancelDelegationToken(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_CancelDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("CancelDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};
TCLIServiceProcessor.prototype.process_RenewDelegationToken = function(seqid, input, output) {
  var args = new TCLIService_RenewDelegationToken_args();
  args.read(input);
  input.readMessageEnd();
  if (this._handler.RenewDelegationToken.length === 1) {
    Q.fcall(this._handler.RenewDelegationToken.bind(this._handler),
      args.req
    ).then(function(result) {
      var result_obj = new TCLIService_RenewDelegationToken_result({success: result});
      output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid);
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    }).catch(function (err) {
      var result;
      result = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
      output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
      result.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  } else {
    this._handler.RenewDelegationToken(args.req, function (err, result) {
      var result_obj;
      if ((err === null || typeof err === 'undefined')) {
        result_obj = new TCLIService_RenewDelegationToken_result((err !== null || typeof err === 'undefined') ? err : {success: result});
        output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.REPLY, seqid);
      } else {
        result_obj = new Thrift.TApplicationException(Thrift.TApplicationExceptionType.UNKNOWN, err.message);
        output.writeMessageBegin("RenewDelegationToken", Thrift.MessageType.EXCEPTION, seqid);
      }
      result_obj.write(output);
      output.writeMessageEnd();
      output.flush();
    });
  }
};