UNPKG

node-thrift-hbase

Version:

Easy to CRUD for hbase by node-thrift-hbase

2,027 lines (1,973 loc) 89.5 kB
// // Autogenerated by Thrift Compiler (0.9.1) // // DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING // var Thrift = require('thrift').Thrift; var ttypes = require('./hbase_types'); //HELPER FUNCTIONS AND STRUCTURES THBaseService_exists_args = function(args) { this.table = null; this.get = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.get !== undefined) { this.get = args.get; } } }; THBaseService_exists_args.prototype = {}; THBaseService_exists_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.get = new ttypes.TGet(); this.get.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_exists_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_exists_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.get !== null && this.get !== undefined) { output.writeFieldBegin('get', Thrift.Type.STRUCT, 2); this.get.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_exists_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_exists_result.prototype = {}; THBaseService_exists_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.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_exists_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_exists_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_get_args = function(args) { this.table = null; this.get = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.get !== undefined) { this.get = args.get; } } }; THBaseService_get_args.prototype = {}; THBaseService_get_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.get = new ttypes.TGet(); this.get.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_get_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_get_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.get !== null && this.get !== undefined) { output.writeFieldBegin('get', Thrift.Type.STRUCT, 2); this.get.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_get_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_get_result.prototype = {}; THBaseService_get_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.TResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_get_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_get_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_getMultiple_args = function(args) { this.table = null; this.gets = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.gets !== undefined) { this.gets = args.gets; } } }; THBaseService_getMultiple_args.prototype = {}; THBaseService_getMultiple_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size132 = 0; var _rtmp3136; this.gets = []; var _etype135 = 0; _rtmp3136 = input.readListBegin(); _etype135 = _rtmp3136.etype; _size132 = _rtmp3136.size; for (var _i137 = 0; _i137 < _size132; ++_i137) { var elem138 = null; elem138 = new ttypes.TGet(); elem138.read(input); this.gets.push(elem138); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_getMultiple_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_getMultiple_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.gets !== null && this.gets !== undefined) { output.writeFieldBegin('gets', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.gets.length); for (var iter139 in this.gets) { if (this.gets.hasOwnProperty(iter139)) { iter139 = this.gets[iter139]; iter139.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_getMultiple_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_getMultiple_result.prototype = {}; THBaseService_getMultiple_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.LIST) { var _size140 = 0; var _rtmp3144; this.success = []; var _etype143 = 0; _rtmp3144 = input.readListBegin(); _etype143 = _rtmp3144.etype; _size140 = _rtmp3144.size; for (var _i145 = 0; _i145 < _size140; ++_i145) { var elem146 = null; elem146 = new ttypes.TResult(); elem146.read(input); this.success.push(elem146); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_getMultiple_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_getMultiple_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter147 in this.success) { if (this.success.hasOwnProperty(iter147)) { iter147 = this.success[iter147]; iter147.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_put_args = function(args) { this.table = null; this.put = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.put !== undefined) { this.put = args.put; } } }; THBaseService_put_args.prototype = {}; THBaseService_put_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.put = new ttypes.TPut(); this.put.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_put_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_put_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.put !== null && this.put !== undefined) { output.writeFieldBegin('put', Thrift.Type.STRUCT, 2); this.put.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_put_result = function(args) { this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_put_result.prototype = {}; THBaseService_put_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 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_put_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_put_result'); if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_checkAndPut_args = function(args) { this.table = null; this.row = null; this.family = null; this.qualifier = null; this.value = null; this.put = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.row !== undefined) { this.row = args.row; } if (args.family !== undefined) { this.family = args.family; } if (args.qualifier !== undefined) { this.qualifier = args.qualifier; } if (args.value !== undefined) { this.value = args.value; } if (args.put !== undefined) { this.put = args.put; } } }; THBaseService_checkAndPut_args.prototype = {}; THBaseService_checkAndPut_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.row = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.family = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.qualifier = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.put = new ttypes.TPut(); this.put.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_checkAndPut_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_checkAndPut_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 2); output.writeString(this.row); output.writeFieldEnd(); } if (this.family !== null && this.family !== undefined) { output.writeFieldBegin('family', Thrift.Type.STRING, 3); output.writeString(this.family); output.writeFieldEnd(); } if (this.qualifier !== null && this.qualifier !== undefined) { output.writeFieldBegin('qualifier', Thrift.Type.STRING, 4); output.writeString(this.qualifier); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 5); output.writeString(this.value); output.writeFieldEnd(); } if (this.put !== null && this.put !== undefined) { output.writeFieldBegin('put', Thrift.Type.STRUCT, 6); this.put.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_checkAndPut_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_checkAndPut_result.prototype = {}; THBaseService_checkAndPut_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.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_checkAndPut_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_checkAndPut_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_putMultiple_args = function(args) { this.table = null; this.puts = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.puts !== undefined) { this.puts = args.puts; } } }; THBaseService_putMultiple_args.prototype = {}; THBaseService_putMultiple_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size148 = 0; var _rtmp3152; this.puts = []; var _etype151 = 0; _rtmp3152 = input.readListBegin(); _etype151 = _rtmp3152.etype; _size148 = _rtmp3152.size; for (var _i153 = 0; _i153 < _size148; ++_i153) { var elem154 = null; elem154 = new ttypes.TPut(); elem154.read(input); this.puts.push(elem154); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_putMultiple_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_putMultiple_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.puts !== null && this.puts !== undefined) { output.writeFieldBegin('puts', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.puts.length); for (var iter155 in this.puts) { if (this.puts.hasOwnProperty(iter155)) { iter155 = this.puts[iter155]; iter155.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_putMultiple_result = function(args) { this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_putMultiple_result.prototype = {}; THBaseService_putMultiple_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 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_putMultiple_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_putMultiple_result'); if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_deleteSingle_args = function(args) { this.table = null; this.deleteSingle = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.deleteSingle !== undefined) { this.deleteSingle = args.deleteSingle; } } }; THBaseService_deleteSingle_args.prototype = {}; THBaseService_deleteSingle_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.deleteSingle = new ttypes.TDelete(); this.deleteSingle.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_deleteSingle_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_deleteSingle_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.deleteSingle !== null && this.deleteSingle !== undefined) { output.writeFieldBegin('deleteSingle', Thrift.Type.STRUCT, 2); this.deleteSingle.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_deleteSingle_result = function(args) { this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_deleteSingle_result.prototype = {}; THBaseService_deleteSingle_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 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_deleteSingle_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_deleteSingle_result'); if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_deleteMultiple_args = function(args) { this.table = null; this.deletes = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.deletes !== undefined) { this.deletes = args.deletes; } } }; THBaseService_deleteMultiple_args.prototype = {}; THBaseService_deleteMultiple_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size156 = 0; var _rtmp3160; this.deletes = []; var _etype159 = 0; _rtmp3160 = input.readListBegin(); _etype159 = _rtmp3160.etype; _size156 = _rtmp3160.size; for (var _i161 = 0; _i161 < _size156; ++_i161) { var elem162 = null; elem162 = new ttypes.TDelete(); elem162.read(input); this.deletes.push(elem162); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_deleteMultiple_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_deleteMultiple_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.deletes !== null && this.deletes !== undefined) { output.writeFieldBegin('deletes', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.deletes.length); for (var iter163 in this.deletes) { if (this.deletes.hasOwnProperty(iter163)) { iter163 = this.deletes[iter163]; iter163.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_deleteMultiple_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_deleteMultiple_result.prototype = {}; THBaseService_deleteMultiple_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.LIST) { var _size164 = 0; var _rtmp3168; this.success = []; var _etype167 = 0; _rtmp3168 = input.readListBegin(); _etype167 = _rtmp3168.etype; _size164 = _rtmp3168.size; for (var _i169 = 0; _i169 < _size164; ++_i169) { var elem170 = null; elem170 = new ttypes.TDelete(); elem170.read(input); this.success.push(elem170); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_deleteMultiple_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_deleteMultiple_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter171 in this.success) { if (this.success.hasOwnProperty(iter171)) { iter171 = this.success[iter171]; iter171.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_checkAndDelete_args = function(args) { this.table = null; this.row = null; this.family = null; this.qualifier = null; this.value = null; this.deleteSingle = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.row !== undefined) { this.row = args.row; } if (args.family !== undefined) { this.family = args.family; } if (args.qualifier !== undefined) { this.qualifier = args.qualifier; } if (args.value !== undefined) { this.value = args.value; } if (args.deleteSingle !== undefined) { this.deleteSingle = args.deleteSingle; } } }; THBaseService_checkAndDelete_args.prototype = {}; THBaseService_checkAndDelete_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.row = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.family = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRING) { this.qualifier = input.readString(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.deleteSingle = new ttypes.TDelete(); this.deleteSingle.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_checkAndDelete_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_checkAndDelete_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 2); output.writeString(this.row); output.writeFieldEnd(); } if (this.family !== null && this.family !== undefined) { output.writeFieldBegin('family', Thrift.Type.STRING, 3); output.writeString(this.family); output.writeFieldEnd(); } if (this.qualifier !== null && this.qualifier !== undefined) { output.writeFieldBegin('qualifier', Thrift.Type.STRING, 4); output.writeString(this.qualifier); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 5); output.writeString(this.value); output.writeFieldEnd(); } if (this.deleteSingle !== null && this.deleteSingle !== undefined) { output.writeFieldBegin('deleteSingle', Thrift.Type.STRUCT, 6); this.deleteSingle.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_checkAndDelete_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_checkAndDelete_result.prototype = {}; THBaseService_checkAndDelete_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.BOOL) { this.success = input.readBool(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_checkAndDelete_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_checkAndDelete_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.BOOL, 0); output.writeBool(this.success); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_increment_args = function(args) { this.table = null; this.increment = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.increment !== undefined) { this.increment = args.increment; } } }; THBaseService_increment_args.prototype = {}; THBaseService_increment_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.increment = new ttypes.TIncrement(); this.increment.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_increment_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_increment_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.increment !== null && this.increment !== undefined) { output.writeFieldBegin('increment', Thrift.Type.STRUCT, 2); this.increment.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_increment_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_increment_result.prototype = {}; THBaseService_increment_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.TResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_increment_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_increment_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_append_args = function(args) { this.table = null; this.append = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.append !== undefined) { this.append = args.append; } } }; THBaseService_append_args.prototype = {}; THBaseService_append_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.append = new ttypes.TAppend(); this.append.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_append_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_append_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.append !== null && this.append !== undefined) { output.writeFieldBegin('append', Thrift.Type.STRUCT, 2); this.append.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_append_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_append_result.prototype = {}; THBaseService_append_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.TResult(); this.success.read(input); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_append_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_append_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.STRUCT, 0); this.success.write(output); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_openScanner_args = function(args) { this.table = null; this.scan = null; if (args) { if (args.table !== undefined) { this.table = args.table; } if (args.scan !== undefined) { this.scan = args.scan; } } }; THBaseService_openScanner_args.prototype = {}; THBaseService_openScanner_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.STRING) { this.table = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.scan = new ttypes.TScan(); this.scan.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_openScanner_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_openScanner_args'); if (this.table !== null && this.table !== undefined) { output.writeFieldBegin('table', Thrift.Type.STRING, 1); output.writeString(this.table); output.writeFieldEnd(); } if (this.scan !== null && this.scan !== undefined) { output.writeFieldBegin('scan', Thrift.Type.STRUCT, 2); this.scan.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_openScanner_result = function(args) { this.success = null; this.io = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } } }; THBaseService_openScanner_result.prototype = {}; THBaseService_openScanner_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.I32) { this.success = input.readI32(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_openScanner_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_openScanner_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.I32, 0); output.writeI32(this.success); output.writeFieldEnd(); } if (this.io !== null && this.io !== undefined) { output.writeFieldBegin('io', Thrift.Type.STRUCT, 1); this.io.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_getScannerRows_args = function(args) { this.scannerId = null; this.numRows = 1; if (args) { if (args.scannerId !== undefined) { this.scannerId = args.scannerId; } if (args.numRows !== undefined) { this.numRows = args.numRows; } } }; THBaseService_getScannerRows_args.prototype = {}; THBaseService_getScannerRows_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.I32) { this.scannerId = input.readI32(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I32) { this.numRows = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_getScannerRows_args.prototype.write = function(output) { output.writeStructBegin('THBaseService_getScannerRows_args'); if (this.scannerId !== null && this.scannerId !== undefined) { output.writeFieldBegin('scannerId', Thrift.Type.I32, 1); output.writeI32(this.scannerId); output.writeFieldEnd(); } if (this.numRows !== null && this.numRows !== undefined) { output.writeFieldBegin('numRows', Thrift.Type.I32, 2); output.writeI32(this.numRows); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; THBaseService_getScannerRows_result = function(args) { this.success = null; this.io = null; this.ia = null; if (args instanceof ttypes.TIOError) { this.io = args; return; } if (args instanceof ttypes.TIllegalArgument) { this.ia = args; return; } if (args) { if (args.success !== undefined) { this.success = args.success; } if (args.io !== undefined) { this.io = args.io; } if (args.ia !== undefined) { this.ia = args.ia; } } }; THBaseService_getScannerRows_result.prototype = {}; THBaseService_getScannerRows_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.LIST) { var _size172 = 0; var _rtmp3176; this.success = []; var _etype175 = 0; _rtmp3176 = input.readListBegin(); _etype175 = _rtmp3176.etype; _size172 = _rtmp3176.size; for (var _i177 = 0; _i177 < _size172; ++_i177) { var elem178 = null; elem178 = new ttypes.TResult(); elem178.read(input); this.success.push(elem178); } input.readListEnd(); } else { input.skip(ftype); } break; case 1: if (ftype == Thrift.Type.STRUCT) { this.io = new ttypes.TIOError(); this.io.read(input); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRUCT) { this.ia = new ttypes.TIllegalArgument(); this.ia.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; THBaseService_getScannerRows_result.prototype.write = function(output) { output.writeStructBegin('THBaseService_getScannerRows_result'); if (this.success !== null && this.success !== undefined) { output.writeFieldBegin('success', Thrift.Type.LIST, 0); output.writeListBegin(Thrift.Type.STRUCT, this.success.length); for (var iter179 in this.success)