UNPKG

jshs2

Version:

Hive Server2 Driver for Javascript

2,099 lines (2,019 loc) 99.7 kB
// // Autogenerated by Thrift Compiler (0.9.2) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // var thrift = require('thrift'); var Thrift = thrift.Thrift; var Q = thrift.Q; var ttypes = require('./TCLIService_types'); //HELPER FUNCTIONS AND STRUCTURES TCLIService_OpenSession_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_OpenSession_args.prototype = {}; TCLIService_OpenSession_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_OpenSession_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_OpenSession_result.prototype = {}; TCLIService_OpenSession_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CloseSession_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_CloseSession_args.prototype = {}; TCLIService_CloseSession_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CloseSession_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_CloseSession_result.prototype = {}; TCLIService_CloseSession_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetInfo_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetInfo_args.prototype = {}; TCLIService_GetInfo_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetInfo_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetInfo_result.prototype = {}; TCLIService_GetInfo_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_ExecuteStatement_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_ExecuteStatement_args.prototype = {}; TCLIService_ExecuteStatement_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_ExecuteStatement_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_ExecuteStatement_result.prototype = {}; TCLIService_ExecuteStatement_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetTypeInfo_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetTypeInfo_args.prototype = {}; TCLIService_GetTypeInfo_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetTypeInfo_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetTypeInfo_result.prototype = {}; TCLIService_GetTypeInfo_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetCatalogs_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetCatalogs_args.prototype = {}; TCLIService_GetCatalogs_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetCatalogs_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetCatalogs_result.prototype = {}; TCLIService_GetCatalogs_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetSchemas_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetSchemas_args.prototype = {}; TCLIService_GetSchemas_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetSchemas_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetSchemas_result.prototype = {}; TCLIService_GetSchemas_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetTables_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetTables_args.prototype = {}; TCLIService_GetTables_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetTables_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetTables_result.prototype = {}; TCLIService_GetTables_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetTableTypes_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetTableTypes_args.prototype = {}; TCLIService_GetTableTypes_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetTableTypes_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetTableTypes_result.prototype = {}; TCLIService_GetTableTypes_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetColumns_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetColumns_args.prototype = {}; TCLIService_GetColumns_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetColumns_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetColumns_result.prototype = {}; TCLIService_GetColumns_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetFunctions_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetFunctions_args.prototype = {}; TCLIService_GetFunctions_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetFunctions_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetFunctions_result.prototype = {}; TCLIService_GetFunctions_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetOperationStatus_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetOperationStatus_args.prototype = {}; TCLIService_GetOperationStatus_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetOperationStatus_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetOperationStatus_result.prototype = {}; TCLIService_GetOperationStatus_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CancelOperation_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_CancelOperation_args.prototype = {}; TCLIService_CancelOperation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CancelOperation_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_CancelOperation_result.prototype = {}; TCLIService_CancelOperation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CloseOperation_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_CloseOperation_args.prototype = {}; TCLIService_CloseOperation_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CloseOperation_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_CloseOperation_result.prototype = {}; TCLIService_CloseOperation_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetResultSetMetadata_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetResultSetMetadata_args.prototype = {}; TCLIService_GetResultSetMetadata_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetResultSetMetadata_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetResultSetMetadata_result.prototype = {}; TCLIService_GetResultSetMetadata_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_FetchResults_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_FetchResults_args.prototype = {}; TCLIService_FetchResults_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_FetchResults_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_FetchResults_result.prototype = {}; TCLIService_FetchResults_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_GetDelegationToken_args.prototype = {}; TCLIService_GetDelegationToken_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_GetDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_GetDelegationToken_result.prototype = {}; TCLIService_GetDelegationToken_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CancelDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_CancelDelegationToken_args.prototype = {}; TCLIService_CancelDelegationToken_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_CancelDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_CancelDelegationToken_result.prototype = {}; TCLIService_CancelDelegationToken_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_RenewDelegationToken_args = function(args) { this.req = null; if (args) { if (args.req !== undefined) { this.req = args.req; } } }; TCLIService_RenewDelegationToken_args.prototype = {}; TCLIService_RenewDelegationToken_args.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; TCLIService_RenewDelegationToken_result = function(args) { this.success = null; if (args) { if (args.success !== undefined) { this.success = args.success; } } }; TCLIService_RenewDelegationToken_result.prototype = {}; TCLIService_RenewDelegationToken_result.prototype.read = function(input) { input.readStructBegin(); while (true) { var ret = input.readFieldBegin(); var fname = ret.fname; 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; }; 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); output.writeMessageBegin('OpenSession', Thrift.MessageType.CALL, this.seqid()); var args = new TCLIService_OpenSession_args(); args.req = req; args.wri