UNPKG

node-thrift-hbase

Version:

Easy to CRUD for hbase by node-thrift-hbase

1,888 lines (1,857 loc) 52.6 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 = module.exports = {}; ttypes.TDeleteType = { 'DELETE_COLUMN' : 0, 'DELETE_COLUMNS' : 1 }; ttypes.TDurability = { 'SKIP_WAL' : 1, 'ASYNC_WAL' : 2, 'SYNC_WAL' : 3, 'FSYNC_WAL' : 4 }; TTimeRange = module.exports.TTimeRange = function(args) { this.minStamp = null; this.maxStamp = null; if (args) { if (args.minStamp !== undefined) { this.minStamp = args.minStamp; } if (args.maxStamp !== undefined) { this.maxStamp = args.maxStamp; } } }; TTimeRange.prototype = {}; TTimeRange.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.I64) { this.minStamp = input.readI64(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.I64) { this.maxStamp = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TTimeRange.prototype.write = function(output) { output.writeStructBegin('TTimeRange'); if (this.minStamp !== null && this.minStamp !== undefined) { output.writeFieldBegin('minStamp', Thrift.Type.I64, 1); output.writeI64(this.minStamp); output.writeFieldEnd(); } if (this.maxStamp !== null && this.maxStamp !== undefined) { output.writeFieldBegin('maxStamp', Thrift.Type.I64, 2); output.writeI64(this.maxStamp); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TColumn = module.exports.TColumn = function(args) { this.family = null; this.qualifier = null; this.timestamp = null; if (args) { if (args.family !== undefined) { this.family = args.family; } if (args.qualifier !== undefined) { this.qualifier = args.qualifier; } if (args.timestamp !== undefined) { this.timestamp = args.timestamp; } } }; TColumn.prototype = {}; TColumn.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.family = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.qualifier = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.timestamp = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TColumn.prototype.write = function(output) { output.writeStructBegin('TColumn'); if (this.family !== null && this.family !== undefined) { output.writeFieldBegin('family', Thrift.Type.STRING, 1); output.writeString(this.family); output.writeFieldEnd(); } if (this.qualifier !== null && this.qualifier !== undefined) { output.writeFieldBegin('qualifier', Thrift.Type.STRING, 2); output.writeString(this.qualifier); output.writeFieldEnd(); } if (this.timestamp !== null && this.timestamp !== undefined) { output.writeFieldBegin('timestamp', Thrift.Type.I64, 3); output.writeI64(this.timestamp); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TColumnValue = module.exports.TColumnValue = function(args) { this.family = null; this.qualifier = null; this.value = null; this.timestamp = null; this.tags = null; if (args) { 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.timestamp !== undefined) { this.timestamp = args.timestamp; } if (args.tags !== undefined) { this.tags = args.tags; } } }; TColumnValue.prototype = {}; TColumnValue.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.family = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.qualifier = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.STRING) { this.value = input.readString(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I64) { this.timestamp = input.readI64(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRING) { this.tags = input.readString(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TColumnValue.prototype.write = function(output) { output.writeStructBegin('TColumnValue'); if (this.family !== null && this.family !== undefined) { output.writeFieldBegin('family', Thrift.Type.STRING, 1); output.writeString(this.family); output.writeFieldEnd(); } if (this.qualifier !== null && this.qualifier !== undefined) { output.writeFieldBegin('qualifier', Thrift.Type.STRING, 2); output.writeString(this.qualifier); output.writeFieldEnd(); } if (this.value !== null && this.value !== undefined) { output.writeFieldBegin('value', Thrift.Type.STRING, 3); output.writeString(this.value); output.writeFieldEnd(); } if (this.timestamp !== null && this.timestamp !== undefined) { output.writeFieldBegin('timestamp', Thrift.Type.I64, 4); output.writeI64(this.timestamp); output.writeFieldEnd(); } if (this.tags !== null && this.tags !== undefined) { output.writeFieldBegin('tags', Thrift.Type.STRING, 5); output.writeString(this.tags); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TColumnIncrement = module.exports.TColumnIncrement = function(args) { this.family = null; this.qualifier = null; this.amount = 1; if (args) { if (args.family !== undefined) { this.family = args.family; } if (args.qualifier !== undefined) { this.qualifier = args.qualifier; } if (args.amount !== undefined) { this.amount = args.amount; } } }; TColumnIncrement.prototype = {}; TColumnIncrement.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.family = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.qualifier = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.amount = input.readI64(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TColumnIncrement.prototype.write = function(output) { output.writeStructBegin('TColumnIncrement'); if (this.family !== null && this.family !== undefined) { output.writeFieldBegin('family', Thrift.Type.STRING, 1); output.writeString(this.family); output.writeFieldEnd(); } if (this.qualifier !== null && this.qualifier !== undefined) { output.writeFieldBegin('qualifier', Thrift.Type.STRING, 2); output.writeString(this.qualifier); output.writeFieldEnd(); } if (this.amount !== null && this.amount !== undefined) { output.writeFieldBegin('amount', Thrift.Type.I64, 3); output.writeI64(this.amount); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TResult = module.exports.TResult = function(args) { this.row = null; this.columnValues = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.columnValues !== undefined) { this.columnValues = args.columnValues; } } }; TResult.prototype = {}; TResult.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size0 = 0; var _rtmp34; this.columnValues = []; var _etype3 = 0; _rtmp34 = input.readListBegin(); _etype3 = _rtmp34.etype; _size0 = _rtmp34.size; for (var _i5 = 0; _i5 < _size0; ++_i5) { var elem6 = null; elem6 = new ttypes.TColumnValue(); elem6.read(input); this.columnValues.push(elem6); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TResult.prototype.write = function(output) { output.writeStructBegin('TResult'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.columnValues !== null && this.columnValues !== undefined) { output.writeFieldBegin('columnValues', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.columnValues.length); for (var iter7 in this.columnValues) { if (this.columnValues.hasOwnProperty(iter7)) { iter7 = this.columnValues[iter7]; iter7.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TAuthorization = module.exports.TAuthorization = function(args) { this.labels = null; if (args) { if (args.labels !== undefined) { this.labels = args.labels; } } }; TAuthorization.prototype = {}; TAuthorization.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.LIST) { var _size8 = 0; var _rtmp312; this.labels = []; var _etype11 = 0; _rtmp312 = input.readListBegin(); _etype11 = _rtmp312.etype; _size8 = _rtmp312.size; for (var _i13 = 0; _i13 < _size8; ++_i13) { var elem14 = null; elem14 = input.readString(); this.labels.push(elem14); } input.readListEnd(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TAuthorization.prototype.write = function(output) { output.writeStructBegin('TAuthorization'); if (this.labels !== null && this.labels !== undefined) { output.writeFieldBegin('labels', Thrift.Type.LIST, 1); output.writeListBegin(Thrift.Type.STRING, this.labels.length); for (var iter15 in this.labels) { if (this.labels.hasOwnProperty(iter15)) { iter15 = this.labels[iter15]; output.writeString(iter15); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TCellVisibility = module.exports.TCellVisibility = function(args) { this.expression = null; if (args) { if (args.expression !== undefined) { this.expression = args.expression; } } }; TCellVisibility.prototype = {}; TCellVisibility.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.expression = input.readString(); } else { input.skip(ftype); } break; case 0: input.skip(ftype); break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TCellVisibility.prototype.write = function(output) { output.writeStructBegin('TCellVisibility'); if (this.expression !== null && this.expression !== undefined) { output.writeFieldBegin('expression', Thrift.Type.STRING, 1); output.writeString(this.expression); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TGet = module.exports.TGet = function(args) { this.row = null; this.columns = null; this.timestamp = null; this.timeRange = null; this.maxVersions = null; this.filterString = null; this.attributes = null; this.authorizations = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.columns !== undefined) { this.columns = args.columns; } if (args.timestamp !== undefined) { this.timestamp = args.timestamp; } if (args.timeRange !== undefined) { this.timeRange = args.timeRange; } if (args.maxVersions !== undefined) { this.maxVersions = args.maxVersions; } if (args.filterString !== undefined) { this.filterString = args.filterString; } if (args.attributes !== undefined) { this.attributes = args.attributes; } if (args.authorizations !== undefined) { this.authorizations = args.authorizations; } } }; TGet.prototype = {}; TGet.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size16 = 0; var _rtmp320; this.columns = []; var _etype19 = 0; _rtmp320 = input.readListBegin(); _etype19 = _rtmp320.etype; _size16 = _rtmp320.size; for (var _i21 = 0; _i21 < _size16; ++_i21) { var elem22 = null; elem22 = new ttypes.TColumn(); elem22.read(input); this.columns.push(elem22); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.timestamp = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.STRUCT) { this.timeRange = new ttypes.TTimeRange(); this.timeRange.read(input); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.maxVersions = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRING) { this.filterString = input.readString(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.MAP) { var _size23 = 0; var _rtmp327; this.attributes = {}; var _ktype24 = 0; var _vtype25 = 0; _rtmp327 = input.readMapBegin(); _ktype24 = _rtmp327.ktype; _vtype25 = _rtmp327.vtype; _size23 = _rtmp327.size; for (var _i28 = 0; _i28 < _size23; ++_i28) { var key29 = null; var val30 = null; key29 = input.readString(); val30 = input.readString(); this.attributes[key29] = val30; } input.readMapEnd(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.STRUCT) { this.authorizations = new ttypes.TAuthorization(); this.authorizations.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TGet.prototype.write = function(output) { output.writeStructBegin('TGet'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); for (var iter31 in this.columns) { if (this.columns.hasOwnProperty(iter31)) { iter31 = this.columns[iter31]; iter31.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.timestamp !== null && this.timestamp !== undefined) { output.writeFieldBegin('timestamp', Thrift.Type.I64, 3); output.writeI64(this.timestamp); output.writeFieldEnd(); } if (this.timeRange !== null && this.timeRange !== undefined) { output.writeFieldBegin('timeRange', Thrift.Type.STRUCT, 4); this.timeRange.write(output); output.writeFieldEnd(); } if (this.maxVersions !== null && this.maxVersions !== undefined) { output.writeFieldBegin('maxVersions', Thrift.Type.I32, 5); output.writeI32(this.maxVersions); output.writeFieldEnd(); } if (this.filterString !== null && this.filterString !== undefined) { output.writeFieldBegin('filterString', Thrift.Type.STRING, 6); output.writeString(this.filterString); output.writeFieldEnd(); } if (this.attributes !== null && this.attributes !== undefined) { output.writeFieldBegin('attributes', Thrift.Type.MAP, 7); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.attributes)); for (var kiter32 in this.attributes) { if (this.attributes.hasOwnProperty(kiter32)) { var viter33 = this.attributes[kiter32]; output.writeString(kiter32); output.writeString(viter33); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.authorizations !== null && this.authorizations !== undefined) { output.writeFieldBegin('authorizations', Thrift.Type.STRUCT, 8); this.authorizations.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TPut = module.exports.TPut = function(args) { this.row = null; this.columnValues = null; this.timestamp = null; this.attributes = null; this.durability = null; this.cellVisibility = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.columnValues !== undefined) { this.columnValues = args.columnValues; } if (args.timestamp !== undefined) { this.timestamp = args.timestamp; } if (args.attributes !== undefined) { this.attributes = args.attributes; } if (args.durability !== undefined) { this.durability = args.durability; } if (args.cellVisibility !== undefined) { this.cellVisibility = args.cellVisibility; } } }; TPut.prototype = {}; TPut.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size34 = 0; var _rtmp338; this.columnValues = []; var _etype37 = 0; _rtmp338 = input.readListBegin(); _etype37 = _rtmp338.etype; _size34 = _rtmp338.size; for (var _i39 = 0; _i39 < _size34; ++_i39) { var elem40 = null; elem40 = new ttypes.TColumnValue(); elem40.read(input); this.columnValues.push(elem40); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.timestamp = input.readI64(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.MAP) { var _size41 = 0; var _rtmp345; this.attributes = {}; var _ktype42 = 0; var _vtype43 = 0; _rtmp345 = input.readMapBegin(); _ktype42 = _rtmp345.ktype; _vtype43 = _rtmp345.vtype; _size41 = _rtmp345.size; for (var _i46 = 0; _i46 < _size41; ++_i46) { var key47 = null; var val48 = null; key47 = input.readString(); val48 = input.readString(); this.attributes[key47] = val48; } input.readMapEnd(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.I32) { this.durability = input.readI32(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRUCT) { this.cellVisibility = new ttypes.TCellVisibility(); this.cellVisibility.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TPut.prototype.write = function(output) { output.writeStructBegin('TPut'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.columnValues !== null && this.columnValues !== undefined) { output.writeFieldBegin('columnValues', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.columnValues.length); for (var iter49 in this.columnValues) { if (this.columnValues.hasOwnProperty(iter49)) { iter49 = this.columnValues[iter49]; iter49.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.timestamp !== null && this.timestamp !== undefined) { output.writeFieldBegin('timestamp', Thrift.Type.I64, 3); output.writeI64(this.timestamp); output.writeFieldEnd(); } if (this.attributes !== null && this.attributes !== undefined) { output.writeFieldBegin('attributes', Thrift.Type.MAP, 5); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.attributes)); for (var kiter50 in this.attributes) { if (this.attributes.hasOwnProperty(kiter50)) { var viter51 = this.attributes[kiter50]; output.writeString(kiter50); output.writeString(viter51); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.durability !== null && this.durability !== undefined) { output.writeFieldBegin('durability', Thrift.Type.I32, 6); output.writeI32(this.durability); output.writeFieldEnd(); } if (this.cellVisibility !== null && this.cellVisibility !== undefined) { output.writeFieldBegin('cellVisibility', Thrift.Type.STRUCT, 7); this.cellVisibility.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TDelete = module.exports.TDelete = function(args) { this.row = null; this.columns = null; this.timestamp = null; this.deleteType = 1; this.attributes = null; this.durability = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.columns !== undefined) { this.columns = args.columns; } if (args.timestamp !== undefined) { this.timestamp = args.timestamp; } if (args.deleteType !== undefined) { this.deleteType = args.deleteType; } if (args.attributes !== undefined) { this.attributes = args.attributes; } if (args.durability !== undefined) { this.durability = args.durability; } } }; TDelete.prototype = {}; TDelete.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size52 = 0; var _rtmp356; this.columns = []; var _etype55 = 0; _rtmp356 = input.readListBegin(); _etype55 = _rtmp356.etype; _size52 = _rtmp356.size; for (var _i57 = 0; _i57 < _size52; ++_i57) { var elem58 = null; elem58 = new ttypes.TColumn(); elem58.read(input); this.columns.push(elem58); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.I64) { this.timestamp = input.readI64(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.deleteType = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.MAP) { var _size59 = 0; var _rtmp363; this.attributes = {}; var _ktype60 = 0; var _vtype61 = 0; _rtmp363 = input.readMapBegin(); _ktype60 = _rtmp363.ktype; _vtype61 = _rtmp363.vtype; _size59 = _rtmp363.size; for (var _i64 = 0; _i64 < _size59; ++_i64) { var key65 = null; var val66 = null; key65 = input.readString(); val66 = input.readString(); this.attributes[key65] = val66; } input.readMapEnd(); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.I32) { this.durability = input.readI32(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TDelete.prototype.write = function(output) { output.writeStructBegin('TDelete'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); for (var iter67 in this.columns) { if (this.columns.hasOwnProperty(iter67)) { iter67 = this.columns[iter67]; iter67.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.timestamp !== null && this.timestamp !== undefined) { output.writeFieldBegin('timestamp', Thrift.Type.I64, 3); output.writeI64(this.timestamp); output.writeFieldEnd(); } if (this.deleteType !== null && this.deleteType !== undefined) { output.writeFieldBegin('deleteType', Thrift.Type.I32, 4); output.writeI32(this.deleteType); output.writeFieldEnd(); } if (this.attributes !== null && this.attributes !== undefined) { output.writeFieldBegin('attributes', Thrift.Type.MAP, 6); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.attributes)); for (var kiter68 in this.attributes) { if (this.attributes.hasOwnProperty(kiter68)) { var viter69 = this.attributes[kiter68]; output.writeString(kiter68); output.writeString(viter69); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.durability !== null && this.durability !== undefined) { output.writeFieldBegin('durability', Thrift.Type.I32, 7); output.writeI32(this.durability); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TIncrement = module.exports.TIncrement = function(args) { this.row = null; this.columns = null; this.attributes = null; this.durability = null; this.cellVisibility = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.columns !== undefined) { this.columns = args.columns; } if (args.attributes !== undefined) { this.attributes = args.attributes; } if (args.durability !== undefined) { this.durability = args.durability; } if (args.cellVisibility !== undefined) { this.cellVisibility = args.cellVisibility; } } }; TIncrement.prototype = {}; TIncrement.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size70 = 0; var _rtmp374; this.columns = []; var _etype73 = 0; _rtmp374 = input.readListBegin(); _etype73 = _rtmp374.etype; _size70 = _rtmp374.size; for (var _i75 = 0; _i75 < _size70; ++_i75) { var elem76 = null; elem76 = new ttypes.TColumnIncrement(); elem76.read(input); this.columns.push(elem76); } input.readListEnd(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.MAP) { var _size77 = 0; var _rtmp381; this.attributes = {}; var _ktype78 = 0; var _vtype79 = 0; _rtmp381 = input.readMapBegin(); _ktype78 = _rtmp381.ktype; _vtype79 = _rtmp381.vtype; _size77 = _rtmp381.size; for (var _i82 = 0; _i82 < _size77; ++_i82) { var key83 = null; var val84 = null; key83 = input.readString(); val84 = input.readString(); this.attributes[key83] = val84; } input.readMapEnd(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.durability = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.cellVisibility = new ttypes.TCellVisibility(); this.cellVisibility.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TIncrement.prototype.write = function(output) { output.writeStructBegin('TIncrement'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); for (var iter85 in this.columns) { if (this.columns.hasOwnProperty(iter85)) { iter85 = this.columns[iter85]; iter85.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.attributes !== null && this.attributes !== undefined) { output.writeFieldBegin('attributes', Thrift.Type.MAP, 4); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.attributes)); for (var kiter86 in this.attributes) { if (this.attributes.hasOwnProperty(kiter86)) { var viter87 = this.attributes[kiter86]; output.writeString(kiter86); output.writeString(viter87); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.durability !== null && this.durability !== undefined) { output.writeFieldBegin('durability', Thrift.Type.I32, 5); output.writeI32(this.durability); output.writeFieldEnd(); } if (this.cellVisibility !== null && this.cellVisibility !== undefined) { output.writeFieldBegin('cellVisibility', Thrift.Type.STRUCT, 6); this.cellVisibility.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TAppend = module.exports.TAppend = function(args) { this.row = null; this.columns = null; this.attributes = null; this.durability = null; this.cellVisibility = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.columns !== undefined) { this.columns = args.columns; } if (args.attributes !== undefined) { this.attributes = args.attributes; } if (args.durability !== undefined) { this.durability = args.durability; } if (args.cellVisibility !== undefined) { this.cellVisibility = args.cellVisibility; } } }; TAppend.prototype = {}; TAppend.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size88 = 0; var _rtmp392; this.columns = []; var _etype91 = 0; _rtmp392 = input.readListBegin(); _etype91 = _rtmp392.etype; _size88 = _rtmp392.size; for (var _i93 = 0; _i93 < _size88; ++_i93) { var elem94 = null; elem94 = new ttypes.TColumnValue(); elem94.read(input); this.columns.push(elem94); } input.readListEnd(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.MAP) { var _size95 = 0; var _rtmp399; this.attributes = {}; var _ktype96 = 0; var _vtype97 = 0; _rtmp399 = input.readMapBegin(); _ktype96 = _rtmp399.ktype; _vtype97 = _rtmp399.vtype; _size95 = _rtmp399.size; for (var _i100 = 0; _i100 < _size95; ++_i100) { var key101 = null; var val102 = null; key101 = input.readString(); val102 = input.readString(); this.attributes[key101] = val102; } input.readMapEnd(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.durability = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.STRUCT) { this.cellVisibility = new ttypes.TCellVisibility(); this.cellVisibility.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TAppend.prototype.write = function(output) { output.writeStructBegin('TAppend'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); for (var iter103 in this.columns) { if (this.columns.hasOwnProperty(iter103)) { iter103 = this.columns[iter103]; iter103.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.attributes !== null && this.attributes !== undefined) { output.writeFieldBegin('attributes', Thrift.Type.MAP, 3); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.attributes)); for (var kiter104 in this.attributes) { if (this.attributes.hasOwnProperty(kiter104)) { var viter105 = this.attributes[kiter104]; output.writeString(kiter104); output.writeString(viter105); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.durability !== null && this.durability !== undefined) { output.writeFieldBegin('durability', Thrift.Type.I32, 4); output.writeI32(this.durability); output.writeFieldEnd(); } if (this.cellVisibility !== null && this.cellVisibility !== undefined) { output.writeFieldBegin('cellVisibility', Thrift.Type.STRUCT, 5); this.cellVisibility.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TScan = module.exports.TScan = function(args) { this.startRow = null; this.stopRow = null; this.columns = null; this.caching = null; this.maxVersions = 1; this.timeRange = null; this.filterString = null; this.batchSize = null; this.attributes = null; this.authorizations = null; if (args) { if (args.startRow !== undefined) { this.startRow = args.startRow; } if (args.stopRow !== undefined) { this.stopRow = args.stopRow; } if (args.columns !== undefined) { this.columns = args.columns; } if (args.caching !== undefined) { this.caching = args.caching; } if (args.maxVersions !== undefined) { this.maxVersions = args.maxVersions; } if (args.timeRange !== undefined) { this.timeRange = args.timeRange; } if (args.filterString !== undefined) { this.filterString = args.filterString; } if (args.batchSize !== undefined) { this.batchSize = args.batchSize; } if (args.attributes !== undefined) { this.attributes = args.attributes; } if (args.authorizations !== undefined) { this.authorizations = args.authorizations; } } }; TScan.prototype = {}; TScan.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.startRow = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.STRING) { this.stopRow = input.readString(); } else { input.skip(ftype); } break; case 3: if (ftype == Thrift.Type.LIST) { var _size106 = 0; var _rtmp3110; this.columns = []; var _etype109 = 0; _rtmp3110 = input.readListBegin(); _etype109 = _rtmp3110.etype; _size106 = _rtmp3110.size; for (var _i111 = 0; _i111 < _size106; ++_i111) { var elem112 = null; elem112 = new ttypes.TColumn(); elem112.read(input); this.columns.push(elem112); } input.readListEnd(); } else { input.skip(ftype); } break; case 4: if (ftype == Thrift.Type.I32) { this.caching = input.readI32(); } else { input.skip(ftype); } break; case 5: if (ftype == Thrift.Type.I32) { this.maxVersions = input.readI32(); } else { input.skip(ftype); } break; case 6: if (ftype == Thrift.Type.STRUCT) { this.timeRange = new ttypes.TTimeRange(); this.timeRange.read(input); } else { input.skip(ftype); } break; case 7: if (ftype == Thrift.Type.STRING) { this.filterString = input.readString(); } else { input.skip(ftype); } break; case 8: if (ftype == Thrift.Type.I32) { this.batchSize = input.readI32(); } else { input.skip(ftype); } break; case 9: if (ftype == Thrift.Type.MAP) { var _size113 = 0; var _rtmp3117; this.attributes = {}; var _ktype114 = 0; var _vtype115 = 0; _rtmp3117 = input.readMapBegin(); _ktype114 = _rtmp3117.ktype; _vtype115 = _rtmp3117.vtype; _size113 = _rtmp3117.size; for (var _i118 = 0; _i118 < _size113; ++_i118) { var key119 = null; var val120 = null; key119 = input.readString(); val120 = input.readString(); this.attributes[key119] = val120; } input.readMapEnd(); } else { input.skip(ftype); } break; case 10: if (ftype == Thrift.Type.STRUCT) { this.authorizations = new ttypes.TAuthorization(); this.authorizations.read(input); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TScan.prototype.write = function(output) { output.writeStructBegin('TScan'); if (this.startRow !== null && this.startRow !== undefined) { output.writeFieldBegin('startRow', Thrift.Type.STRING, 1); output.writeString(this.startRow); output.writeFieldEnd(); } if (this.stopRow !== null && this.stopRow !== undefined) { output.writeFieldBegin('stopRow', Thrift.Type.STRING, 2); output.writeString(this.stopRow); output.writeFieldEnd(); } if (this.columns !== null && this.columns !== undefined) { output.writeFieldBegin('columns', Thrift.Type.LIST, 3); output.writeListBegin(Thrift.Type.STRUCT, this.columns.length); for (var iter121 in this.columns) { if (this.columns.hasOwnProperty(iter121)) { iter121 = this.columns[iter121]; iter121.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } if (this.caching !== null && this.caching !== undefined) { output.writeFieldBegin('caching', Thrift.Type.I32, 4); output.writeI32(this.caching); output.writeFieldEnd(); } if (this.maxVersions !== null && this.maxVersions !== undefined) { output.writeFieldBegin('maxVersions', Thrift.Type.I32, 5); output.writeI32(this.maxVersions); output.writeFieldEnd(); } if (this.timeRange !== null && this.timeRange !== undefined) { output.writeFieldBegin('timeRange', Thrift.Type.STRUCT, 6); this.timeRange.write(output); output.writeFieldEnd(); } if (this.filterString !== null && this.filterString !== undefined) { output.writeFieldBegin('filterString', Thrift.Type.STRING, 7); output.writeString(this.filterString); output.writeFieldEnd(); } if (this.batchSize !== null && this.batchSize !== undefined) { output.writeFieldBegin('batchSize', Thrift.Type.I32, 8); output.writeI32(this.batchSize); output.writeFieldEnd(); } if (this.attributes !== null && this.attributes !== undefined) { output.writeFieldBegin('attributes', Thrift.Type.MAP, 9); output.writeMapBegin(Thrift.Type.STRING, Thrift.Type.STRING, Thrift.objectLength(this.attributes)); for (var kiter122 in this.attributes) { if (this.attributes.hasOwnProperty(kiter122)) { var viter123 = this.attributes[kiter122]; output.writeString(kiter122); output.writeString(viter123); } } output.writeMapEnd(); output.writeFieldEnd(); } if (this.authorizations !== null && this.authorizations !== undefined) { output.writeFieldBegin('authorizations', Thrift.Type.STRUCT, 10); this.authorizations.write(output); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TMutation = module.exports.TMutation = function(args) { this.put = null; this.deleteSingle = null; if (args) { if (args.put !== undefined) { this.put = args.put; } if (args.deleteSingle !== undefined) { this.deleteSingle = args.deleteSingle; } } }; TMutation.prototype = {}; TMutation.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.put = new ttypes.TPut(); this.put.read(input); } 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; }; TMutation.prototype.write = function(output) { output.writeStructBegin('TMutation'); if (this.put !== null && this.put !== undefined) { output.writeFieldBegin('put', Thrift.Type.STRUCT, 1); this.put.write(output); 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; }; TRowMutations = module.exports.TRowMutations = function(args) { this.row = null; this.mutations = null; if (args) { if (args.row !== undefined) { this.row = args.row; } if (args.mutations !== undefined) { this.mutations = args.mutations; } } }; TRowMutations.prototype = {}; TRowMutations.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.row = input.readString(); } else { input.skip(ftype); } break; case 2: if (ftype == Thrift.Type.LIST) { var _size124 = 0; var _rtmp3128; this.mutations = []; var _etype127 = 0; _rtmp3128 = input.readListBegin(); _etype127 = _rtmp3128.etype; _size124 = _rtmp3128.size; for (var _i129 = 0; _i129 < _size124; ++_i129) { var elem130 = null; elem130 = new ttypes.TMutation(); elem130.read(input); this.mutations.push(elem130); } input.readListEnd(); } else { input.skip(ftype); } break; default: input.skip(ftype); } input.readFieldEnd(); } input.readStructEnd(); return; }; TRowMutations.prototype.write = function(output) { output.writeStructBegin('TRowMutations'); if (this.row !== null && this.row !== undefined) { output.writeFieldBegin('row', Thrift.Type.STRING, 1); output.writeString(this.row); output.writeFieldEnd(); } if (this.mutations !== null && this.mutations !== undefined) { output.writeFieldBegin('mutations', Thrift.Type.LIST, 2); output.writeListBegin(Thrift.Type.STRUCT, this.mutations.length); for (var iter131 in this.mutations) { if (this.mutations.hasOwnProperty(iter131)) { iter131 = this.mutations[iter131]; iter131.write(output); } } output.writeListEnd(); output.writeFieldEnd(); } output.writeFieldStop(); output.writeStructEnd(); return; }; TIOError = module.exports.TIOError = function(