text:
kibitz.RecommenderService_createNewIndividualServer_args = function(args) {
  this.key = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
  }
};
kibitz.RecommenderService_createNewIndividualServer_args.prototype = {};
kibitz.RecommenderService_createNewIndividualServer_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_createNewIndividualServer_result = function(args) {
};
kibitz.RecommenderService_createNewIndividualServer_result.prototype = {};
kibitz.RecommenderService_createNewIndividualServer_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;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_terminateSession_args = function(args) {
  this.key = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
  }
};
kibitz.RecommenderService_terminateSession_args.prototype = {};
kibitz.RecommenderService_terminateSession_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_terminateSession_result = function(args) {
};
kibitz.RecommenderService_terminateSession_result.prototype = {};
kibitz.RecommenderService_terminateSession_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;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_makeRecommendation_args = function(args) {
  this.key = null;
  this.userId = null;
  this.numRecs = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.userId !== undefined) {
      this.userId = args.userId;
    }
    if (args.numRecs !== undefined) {
      this.numRecs = args.numRecs;
    }
  }
};
kibitz.RecommenderService_makeRecommendation_args.prototype = {};
kibitz.RecommenderService_makeRecommendation_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I64) {
        this.userId = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I64) {
        this.numRecs = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_makeRecommendation_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_makeRecommendation_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.userId !== null && this.userId !== undefined) {
    output.writeFieldBegin('userId', Thrift.Type.I64, 2);
    output.writeI64(this.userId);
    output.writeFieldEnd();
  }
  if (this.numRecs !== null && this.numRecs !== undefined) {
    output.writeFieldBegin('numRecs', Thrift.Type.I64, 3);
    output.writeI64(this.numRecs);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_makeRecommendation_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_makeRecommendation_result.prototype = {};
kibitz.RecommenderService_makeRecommendation_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 _size0 = 0;
        var _rtmp34;
        this.success = [];
        var _etype3 = 0;
        _rtmp34 = input.readListBegin();
        _etype3 = _rtmp34.etype;
        _size0 = _rtmp34.size;
        for (var _i5 = 0; _i5 < _size0; ++_i5)
        {
          var elem6 = null;
          elem6 = new kibitz.Item();
          elem6.read(input);
          this.success.push(elem6);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_makeRecommendation_result.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_makeRecommendation_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 iter7 in this.success)
    {
      if (this.success.hasOwnProperty(iter7))
      {
        iter7 = this.success[iter7];
        iter7.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_getItems_args = function(args) {
  this.key = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
  }
};
kibitz.RecommenderService_getItems_args.prototype = {};
kibitz.RecommenderService_getItems_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_getItems_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_getItems_result.prototype = {};
kibitz.RecommenderService_getItems_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 _size8 = 0;
        var _rtmp312;
        this.success = [];
        var _etype11 = 0;
        _rtmp312 = input.readListBegin();
        _etype11 = _rtmp312.etype;
        _size8 = _rtmp312.size;
        for (var _i13 = 0; _i13 < _size8; ++_i13)
        {
          var elem14 = null;
          elem14 = new kibitz.Item();
          elem14.read(input);
          this.success.push(elem14);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_getItems_result.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_getItems_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 iter15 in this.success)
    {
      if (this.success.hasOwnProperty(iter15))
      {
        iter15 = this.success[iter15];
        iter15.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_getPageItems_args = function(args) {
  this.key = null;
  this.page = null;
  this.numPerPage = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.page !== undefined) {
      this.page = args.page;
    }
    if (args.numPerPage !== undefined) {
      this.numPerPage = args.numPerPage;
    }
  }
};
kibitz.RecommenderService_getPageItems_args.prototype = {};
kibitz.RecommenderService_getPageItems_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I64) {
        this.page = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I64) {
        this.numPerPage = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_getPageItems_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_getPageItems_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.page !== null && this.page !== undefined) {
    output.writeFieldBegin('page', Thrift.Type.I64, 2);
    output.writeI64(this.page);
    output.writeFieldEnd();
  }
  if (this.numPerPage !== null && this.numPerPage !== undefined) {
    output.writeFieldBegin('numPerPage', Thrift.Type.I64, 3);
    output.writeI64(this.numPerPage);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_getPageItems_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_getPageItems_result.prototype = {};
kibitz.RecommenderService_getPageItems_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 _size16 = 0;
        var _rtmp320;
        this.success = [];
        var _etype19 = 0;
        _rtmp320 = input.readListBegin();
        _etype19 = _rtmp320.etype;
        _size16 = _rtmp320.size;
        for (var _i21 = 0; _i21 < _size16; ++_i21)
        {
          var elem22 = null;
          elem22 = new kibitz.Item();
          elem22.read(input);
          this.success.push(elem22);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_getPageItems_result.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_getPageItems_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 iter23 in this.success)
    {
      if (this.success.hasOwnProperty(iter23))
      {
        iter23 = this.success[iter23];
        iter23.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_getItemCount_args = function(args) {
  this.key = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
  }
};
kibitz.RecommenderService_getItemCount_args.prototype = {};
kibitz.RecommenderService_getItemCount_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_getItemCount_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_getItemCount_result.prototype = {};
kibitz.RecommenderService_getItemCount_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.I64) {
        this.success = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_recordRatings_args = function(args) {
  this.key = null;
  this.userId = null;
  this.itemId = null;
  this.rating = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.userId !== undefined) {
      this.userId = args.userId;
    }
    if (args.itemId !== undefined) {
      this.itemId = args.itemId;
    }
    if (args.rating !== undefined) {
      this.rating = args.rating;
    }
  }
};
kibitz.RecommenderService_recordRatings_args.prototype = {};
kibitz.RecommenderService_recordRatings_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I64) {
        this.userId = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I64) {
        this.itemId = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.I64) {
        this.rating = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_recordRatings_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_recordRatings_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.userId !== null && this.userId !== undefined) {
    output.writeFieldBegin('userId', Thrift.Type.I64, 2);
    output.writeI64(this.userId);
    output.writeFieldEnd();
  }
  if (this.itemId !== null && this.itemId !== undefined) {
    output.writeFieldBegin('itemId', Thrift.Type.I64, 3);
    output.writeI64(this.itemId);
    output.writeFieldEnd();
  }
  if (this.rating !== null && this.rating !== undefined) {
    output.writeFieldBegin('rating', Thrift.Type.I64, 4);
    output.writeI64(this.rating);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_recordRatings_result = function(args) {
};
kibitz.RecommenderService_recordRatings_result.prototype = {};
kibitz.RecommenderService_recordRatings_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;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_deleteRatings_args = function(args) {
  this.key = null;
  this.userId = null;
  this.itemId = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.userId !== undefined) {
      this.userId = args.userId;
    }
    if (args.itemId !== undefined) {
      this.itemId = args.itemId;
    }
  }
};
kibitz.RecommenderService_deleteRatings_args.prototype = {};
kibitz.RecommenderService_deleteRatings_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I64) {
        this.userId = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.I64) {
        this.itemId = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_deleteRatings_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_deleteRatings_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.userId !== null && this.userId !== undefined) {
    output.writeFieldBegin('userId', Thrift.Type.I64, 2);
    output.writeI64(this.userId);
    output.writeFieldEnd();
  }
  if (this.itemId !== null && this.itemId !== undefined) {
    output.writeFieldBegin('itemId', Thrift.Type.I64, 3);
    output.writeI64(this.itemId);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_deleteRatings_result = function(args) {
};
kibitz.RecommenderService_deleteRatings_result.prototype = {};
kibitz.RecommenderService_deleteRatings_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;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_createNewUser_args = function(args) {
  this.key = null;
  this.username = null;
  this.email = null;
  this.password = null;
  this.iskibitzuser = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.username !== undefined) {
      this.username = args.username;
    }
    if (args.email !== undefined) {
      this.email = args.email;
    }
    if (args.password !== undefined) {
      this.password = args.password;
    }
    if (args.iskibitzuser !== undefined) {
      this.iskibitzuser = args.iskibitzuser;
    }
  }
};
kibitz.RecommenderService_createNewUser_args.prototype = {};
kibitz.RecommenderService_createNewUser_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.email = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.password = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.BOOL) {
        this.iskibitzuser = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_createNewUser_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_createNewUser_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 2);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.email !== null && this.email !== undefined) {
    output.writeFieldBegin('email', Thrift.Type.STRING, 3);
    output.writeString(this.email);
    output.writeFieldEnd();
  }
  if (this.password !== null && this.password !== undefined) {
    output.writeFieldBegin('password', Thrift.Type.STRING, 4);
    output.writeString(this.password);
    output.writeFieldEnd();
  }
  if (this.iskibitzuser !== null && this.iskibitzuser !== undefined) {
    output.writeFieldBegin('iskibitzuser', Thrift.Type.BOOL, 5);
    output.writeBool(this.iskibitzuser);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_createNewUser_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_createNewUser_result.prototype = {};
kibitz.RecommenderService_createNewUser_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.STRING) {
        this.success = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_checkUsername_args = function(args) {
  this.key = null;
  this.username = null;
  this.iskibitzuser = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.username !== undefined) {
      this.username = args.username;
    }
    if (args.iskibitzuser !== undefined) {
      this.iskibitzuser = args.iskibitzuser;
    }
  }
};
kibitz.RecommenderService_checkUsername_args.prototype = {};
kibitz.RecommenderService_checkUsername_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.BOOL) {
        this.iskibitzuser = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_checkUsername_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_checkUsername_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 2);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.iskibitzuser !== null && this.iskibitzuser !== undefined) {
    output.writeFieldBegin('iskibitzuser', Thrift.Type.BOOL, 3);
    output.writeBool(this.iskibitzuser);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_checkUsername_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_checkUsername_result.prototype = {};
kibitz.RecommenderService_checkUsername_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().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_checkLogin_args = function(args) {
  this.key = null;
  this.username = null;
  this.password = null;
  this.iskibitzuser = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.username !== undefined) {
      this.username = args.username;
    }
    if (args.password !== undefined) {
      this.password = args.password;
    }
    if (args.iskibitzuser !== undefined) {
      this.iskibitzuser = args.iskibitzuser;
    }
  }
};
kibitz.RecommenderService_checkLogin_args.prototype = {};
kibitz.RecommenderService_checkLogin_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.password = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.BOOL) {
        this.iskibitzuser = input.readBool().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_checkLogin_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_checkLogin_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 2);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.password !== null && this.password !== undefined) {
    output.writeFieldBegin('password', Thrift.Type.STRING, 3);
    output.writeString(this.password);
    output.writeFieldEnd();
  }
  if (this.iskibitzuser !== null && this.iskibitzuser !== undefined) {
    output.writeFieldBegin('iskibitzuser', Thrift.Type.BOOL, 4);
    output.writeBool(this.iskibitzuser);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_checkLogin_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_checkLogin_result.prototype = {};
kibitz.RecommenderService_checkLogin_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().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_retrieveUserId_args = function(args) {
  this.key = null;
  this.username = null;
  this.password = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.username !== undefined) {
      this.username = args.username;
    }
    if (args.password !== undefined) {
      this.password = args.password;
    }
  }
};
kibitz.RecommenderService_retrieveUserId_args.prototype = {};
kibitz.RecommenderService_retrieveUserId_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.password = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_retrieveUserId_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_retrieveUserId_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 2);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.password !== null && this.password !== undefined) {
    output.writeFieldBegin('password', Thrift.Type.STRING, 3);
    output.writeString(this.password);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_retrieveUserId_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_retrieveUserId_result.prototype = {};
kibitz.RecommenderService_retrieveUserId_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.I64) {
        this.success = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_createNewRecommender_args = function(args) {
  this.username = null;
  this.password = null;
  this.database = null;
  this.table = null;
  if (args) {
    if (args.username !== undefined) {
      this.username = args.username;
    }
    if (args.password !== undefined) {
      this.password = args.password;
    }
    if (args.database !== undefined) {
      this.database = args.database;
    }
    if (args.table !== undefined) {
      this.table = args.table;
    }
  }
};
kibitz.RecommenderService_createNewRecommender_args.prototype = {};
kibitz.RecommenderService_createNewRecommender_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.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.password = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.database = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.table = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_createNewRecommender_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_createNewRecommender_args');
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 1);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.password !== null && this.password !== undefined) {
    output.writeFieldBegin('password', Thrift.Type.STRING, 2);
    output.writeString(this.password);
    output.writeFieldEnd();
  }
  if (this.database !== null && this.database !== undefined) {
    output.writeFieldBegin('database', Thrift.Type.STRING, 3);
    output.writeString(this.database);
    output.writeFieldEnd();
  }
  if (this.table !== null && this.table !== undefined) {
    output.writeFieldBegin('table', Thrift.Type.STRING, 4);
    output.writeString(this.table);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_createNewRecommender_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_createNewRecommender_result.prototype = {};
kibitz.RecommenderService_createNewRecommender_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().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_getUserRatedItems_args = function(args) {
  this.key = null;
  this.userId = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.userId !== undefined) {
      this.userId = args.userId;
    }
  }
};
kibitz.RecommenderService_getUserRatedItems_args.prototype = {};
kibitz.RecommenderService_getUserRatedItems_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.I64) {
        this.userId = input.readI64().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_getUserRatedItems_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_getUserRatedItems_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.userId !== null && this.userId !== undefined) {
    output.writeFieldBegin('userId', Thrift.Type.I64, 2);
    output.writeI64(this.userId);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_getUserRatedItems_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_getUserRatedItems_result.prototype = {};
kibitz.RecommenderService_getUserRatedItems_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 _size24 = 0;
        var _rtmp328;
        this.success = [];
        var _etype27 = 0;
        _rtmp328 = input.readListBegin();
        _etype27 = _rtmp328.etype;
        _size24 = _rtmp328.size;
        for (var _i29 = 0; _i29 < _size24; ++_i29)
        {
          var elem30 = null;
          elem30 = new kibitz.Item();
          elem30.read(input);
          this.success.push(elem30);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_getUserRatedItems_result.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_getUserRatedItems_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 iter31 in this.success)
    {
      if (this.success.hasOwnProperty(iter31))
      {
        iter31 = this.success[iter31];
        iter31.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_initiateModel_args = function(args) {
  this.key = null;
  this.table = null;
  this.username = null;
  this.password = null;
  this.database = null;
  if (args) {
    if (args.key !== undefined) {
      this.key = args.key;
    }
    if (args.table !== undefined) {
      this.table = args.table;
    }
    if (args.username !== undefined) {
      this.username = args.username;
    }
    if (args.password !== undefined) {
      this.password = args.password;
    }
    if (args.database !== undefined) {
      this.database = args.database;
    }
  }
};
kibitz.RecommenderService_initiateModel_args.prototype = {};
kibitz.RecommenderService_initiateModel_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.key = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.table = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 3:
      if (ftype == Thrift.Type.STRING) {
        this.username = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 4:
      if (ftype == Thrift.Type.STRING) {
        this.password = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 5:
      if (ftype == Thrift.Type.STRING) {
        this.database = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_initiateModel_args.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_initiateModel_args');
  if (this.key !== null && this.key !== undefined) {
    output.writeFieldBegin('key', Thrift.Type.STRING, 1);
    output.writeString(this.key);
    output.writeFieldEnd();
  }
  if (this.table !== null && this.table !== undefined) {
    output.writeFieldBegin('table', Thrift.Type.STRING, 2);
    output.writeString(this.table);
    output.writeFieldEnd();
  }
  if (this.username !== null && this.username !== undefined) {
    output.writeFieldBegin('username', Thrift.Type.STRING, 3);
    output.writeString(this.username);
    output.writeFieldEnd();
  }
  if (this.password !== null && this.password !== undefined) {
    output.writeFieldBegin('password', Thrift.Type.STRING, 4);
    output.writeString(this.password);
    output.writeFieldEnd();
  }
  if (this.database !== null && this.database !== undefined) {
    output.writeFieldBegin('database', Thrift.Type.STRING, 5);
    output.writeString(this.database);
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderService_initiateModel_result = function(args) {
};
kibitz.RecommenderService_initiateModel_result.prototype = {};
kibitz.RecommenderService_initiateModel_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;
    }
    input.skip(ftype);
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_getSearchItems_args = function(args) {
  this.table = null;
  this.query = null;
  if (args) {
    if (args.table !== undefined) {
      this.table = args.table;
    }
    if (args.query !== undefined) {
      this.query = args.query;
    }
  }
};
kibitz.RecommenderService_getSearchItems_args.prototype = {};
kibitz.RecommenderService_getSearchItems_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().value;
      } else {
        input.skip(ftype);
      }
      break;
      case 2:
      if (ftype == Thrift.Type.STRING) {
        this.query = input.readString().value;
      } else {
        input.skip(ftype);
      }
      break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

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

kibitz.RecommenderService_getSearchItems_result = function(args) {
  this.success = null;
  if (args) {
    if (args.success !== undefined) {
      this.success = args.success;
    }
  }
};
kibitz.RecommenderService_getSearchItems_result.prototype = {};
kibitz.RecommenderService_getSearchItems_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 _size32 = 0;
        var _rtmp336;
        this.success = [];
        var _etype35 = 0;
        _rtmp336 = input.readListBegin();
        _etype35 = _rtmp336.etype;
        _size32 = _rtmp336.size;
        for (var _i37 = 0; _i37 < _size32; ++_i37)
        {
          var elem38 = null;
          elem38 = new kibitz.Item();
          elem38.read(input);
          this.success.push(elem38);
        }
        input.readListEnd();
      } else {
        input.skip(ftype);
      }
      break;
      case 0:
        input.skip(ftype);
        break;
      default:
        input.skip(ftype);
    }
    input.readFieldEnd();
  }
  input.readStructEnd();
  return;
};

kibitz.RecommenderService_getSearchItems_result.prototype.write = function(output) {
  output.writeStructBegin('RecommenderService_getSearchItems_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 iter39 in this.success)
    {
      if (this.success.hasOwnProperty(iter39))
      {
        iter39 = this.success[iter39];
        iter39.write(output);
      }
    }
    output.writeListEnd();
    output.writeFieldEnd();
  }
  output.writeFieldStop();
  output.writeStructEnd();
  return;
};

kibitz.RecommenderServiceClient = function(input, output) {
    this.input = input;
    this.output = (!output) ? input : output;
    this.seqid = 0;
};
kibitz.RecommenderServiceClient.prototype = {};
kibitz.RecommenderServiceClient.prototype.createNewIndividualServer = function(key) {
  this.send_createNewIndividualServer(key);
  this.recv_createNewIndividualServer();
};

kibitz.RecommenderServiceClient.prototype.send_createNewIndividualServer = function(key) {
  this.output.writeMessageBegin('createNewIndividualServer', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_createNewIndividualServer_args();
  args.key = key;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_createNewIndividualServer = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_createNewIndividualServer_result();
  result.read(this.input);
  this.input.readMessageEnd();

  return;
};
kibitz.RecommenderServiceClient.prototype.terminateSession = function(key) {
  this.send_terminateSession(key);
  this.recv_terminateSession();
};

kibitz.RecommenderServiceClient.prototype.send_terminateSession = function(key) {
  this.output.writeMessageBegin('terminateSession', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_terminateSession_args();
  args.key = key;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_terminateSession = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_terminateSession_result();
  result.read(this.input);
  this.input.readMessageEnd();

  return;
};
kibitz.RecommenderServiceClient.prototype.makeRecommendation = function(key, userId, numRecs) {
  this.send_makeRecommendation(key, userId, numRecs);
  return this.recv_makeRecommendation();
};

kibitz.RecommenderServiceClient.prototype.send_makeRecommendation = function(key, userId, numRecs) {
  this.output.writeMessageBegin('makeRecommendation', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_makeRecommendation_args();
  args.key = key;
  args.userId = userId;
  args.numRecs = numRecs;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_makeRecommendation = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_makeRecommendation_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'makeRecommendation failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.getItems = function(key) {
  this.send_getItems(key);
  return this.recv_getItems();
};

kibitz.RecommenderServiceClient.prototype.send_getItems = function(key) {
  this.output.writeMessageBegin('getItems', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_getItems_args();
  args.key = key;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_getItems = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_getItems_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'getItems failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.getPageItems = function(key, page, numPerPage) {
  this.send_getPageItems(key, page, numPerPage);
  return this.recv_getPageItems();
};

kibitz.RecommenderServiceClient.prototype.send_getPageItems = function(key, page, numPerPage) {
  this.output.writeMessageBegin('getPageItems', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_getPageItems_args();
  args.key = key;
  args.page = page;
  args.numPerPage = numPerPage;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_getPageItems = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_getPageItems_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'getPageItems failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.getItemCount = function(key) {
  this.send_getItemCount(key);
  return this.recv_getItemCount();
};

kibitz.RecommenderServiceClient.prototype.send_getItemCount = function(key) {
  this.output.writeMessageBegin('getItemCount', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_getItemCount_args();
  args.key = key;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_getItemCount = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_getItemCount_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'getItemCount failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.recordRatings = function(key, userId, itemId, rating) {
  this.send_recordRatings(key, userId, itemId, rating);
  this.recv_recordRatings();
};

kibitz.RecommenderServiceClient.prototype.send_recordRatings = function(key, userId, itemId, rating) {
  this.output.writeMessageBegin('recordRatings', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_recordRatings_args();
  args.key = key;
  args.userId = userId;
  args.itemId = itemId;
  args.rating = rating;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_recordRatings = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_recordRatings_result();
  result.read(this.input);
  this.input.readMessageEnd();

  return;
};
kibitz.RecommenderServiceClient.prototype.deleteRatings = function(key, userId, itemId) {
  this.send_deleteRatings(key, userId, itemId);
  this.recv_deleteRatings();
};

kibitz.RecommenderServiceClient.prototype.send_deleteRatings = function(key, userId, itemId) {
  this.output.writeMessageBegin('deleteRatings', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_deleteRatings_args();
  args.key = key;
  args.userId = userId;
  args.itemId = itemId;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_deleteRatings = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_deleteRatings_result();
  result.read(this.input);
  this.input.readMessageEnd();

  return;
};
kibitz.RecommenderServiceClient.prototype.createNewUser = function(key, username, email, password, iskibitzuser) {
  this.send_createNewUser(key, username, email, password, iskibitzuser);
  return this.recv_createNewUser();
};

kibitz.RecommenderServiceClient.prototype.send_createNewUser = function(key, username, email, password, iskibitzuser) {
  this.output.writeMessageBegin('createNewUser', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_createNewUser_args();
  args.key = key;
  args.username = username;
  args.email = email;
  args.password = password;
  args.iskibitzuser = iskibitzuser;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_createNewUser = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_createNewUser_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'createNewUser failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.checkUsername = function(key, username, iskibitzuser) {
  this.send_checkUsername(key, username, iskibitzuser);
  return this.recv_checkUsername();
};

kibitz.RecommenderServiceClient.prototype.send_checkUsername = function(key, username, iskibitzuser) {
  this.output.writeMessageBegin('checkUsername', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_checkUsername_args();
  args.key = key;
  args.username = username;
  args.iskibitzuser = iskibitzuser;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_checkUsername = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_checkUsername_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'checkUsername failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.checkLogin = function(key, username, password, iskibitzuser) {
  this.send_checkLogin(key, username, password, iskibitzuser);
  return this.recv_checkLogin();
};

kibitz.RecommenderServiceClient.prototype.send_checkLogin = function(key, username, password, iskibitzuser) {
  this.output.writeMessageBegin('checkLogin', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_checkLogin_args();
  args.key = key;
  args.username = username;
  args.password = password;
  args.iskibitzuser = iskibitzuser;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_checkLogin = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_checkLogin_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'checkLogin failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.retrieveUserId = function(key, username, password) {
  this.send_retrieveUserId(key, username, password);
  return this.recv_retrieveUserId();
};

kibitz.RecommenderServiceClient.prototype.send_retrieveUserId = function(key, username, password) {
  this.output.writeMessageBegin('retrieveUserId', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_retrieveUserId_args();
  args.key = key;
  args.username = username;
  args.password = password;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_retrieveUserId = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_retrieveUserId_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'retrieveUserId failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.createNewRecommender = function(username, password, database, table) {
  this.send_createNewRecommender(username, password, database, table);
  return this.recv_createNewRecommender();
};

kibitz.RecommenderServiceClient.prototype.send_createNewRecommender = function(username, password, database, table) {
  this.output.writeMessageBegin('createNewRecommender', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_createNewRecommender_args();
  args.username = username;
  args.password = password;
  args.database = database;
  args.table = table;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_createNewRecommender = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_createNewRecommender_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'createNewRecommender failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.getUserRatedItems = function(key, userId) {
  this.send_getUserRatedItems(key, userId);
  return this.recv_getUserRatedItems();
};

kibitz.RecommenderServiceClient.prototype.send_getUserRatedItems = function(key, userId) {
  this.output.writeMessageBegin('getUserRatedItems', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_getUserRatedItems_args();
  args.key = key;
  args.userId = userId;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_getUserRatedItems = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_getUserRatedItems_result();
  result.read(this.input);
  this.input.readMessageEnd();

  if (null !== result.success) {
    return result.success;
  }
  throw 'getUserRatedItems failed: unknown result';
};
kibitz.RecommenderServiceClient.prototype.initiateModel = function(key, table, username, password, database) {
  this.send_initiateModel(key, table, username, password, database);
  this.recv_initiateModel();
};

kibitz.RecommenderServiceClient.prototype.send_initiateModel = function(key, table, username, password, database) {
  this.output.writeMessageBegin('initiateModel', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_initiateModel_args();
  args.key = key;
  args.table = table;
  args.username = username;
  args.password = password;
  args.database = database;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_initiateModel = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_initiateModel_result();
  result.read(this.input);
  this.input.readMessageEnd();

  return;
};
kibitz.RecommenderServiceClient.prototype.getSearchItems = function(table, query) {
  this.send_getSearchItems(table, query);
  return this.recv_getSearchItems();
};

kibitz.RecommenderServiceClient.prototype.send_getSearchItems = function(table, query) {
  this.output.writeMessageBegin('getSearchItems', Thrift.MessageType.CALL, this.seqid);
  var args = new kibitz.RecommenderService_getSearchItems_args();
  args.table = table;
  args.query = query;
  args.write(this.output);
  this.output.writeMessageEnd();
  return this.output.getTransport().flush();
};

kibitz.RecommenderServiceClient.prototype.recv_getSearchItems = function() {
  var ret = this.input.readMessageBegin();
  var fname = ret.fname;
  var mtype = ret.mtype;
  var rseqid = ret.rseqid;
  if (mtype == Thrift.MessageType.EXCEPTION) {
    var x = new Thrift.TApplicationException();
    x.read(this.input);
    this.input.readMessageEnd();
    throw x;
  }
  var result = new kibitz.RecommenderService_getSearchItems_result();
  result.read(this.input);
  this.input.readMessageEnd();

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


text:
/**
 * CouchDB specific format
 * Overrides some methods of OpenLayers.Format.GeoJSON
 *
 * @see OpenLayers.Format.GeoJSON
 * @extends OpenLayers.Format.GeoJson
 * @class
 */
OpenLayers.Format.CouchDB = OpenLayers.Class(OpenLayers.Format.GeoJSON, {
    /**
     * Convert json received from couchDB into list of OpenLayer.Feature.Vector
     *
     * @memberof OpenLayers.Format.CouchDB
     * @instance
     * @param {JSON} json
     * @returns {OpenLayers.Feature.Vector[]}
     */
    read: function(json, type, filter) {
        var results = [];
        var obj = null;
        if (typeof json == "string") {
            obj = OpenLayers.Format.JSON.prototype.read.apply(this, [json, filter]);
        } else {
            obj = json;
        }
        if(!obj) {
            OpenLayers.Console.error(OpenLayers.i18n("Bad JSON: ") + json);
        } else if(obj.rows) {
            for(var i = 0; i < obj.rows.length; i++) {
                var geojson = obj.rows[i].doc;
                if(geojson && geojson.type && geojson.geometry) {
                    var feature = OpenLayers.Format.GeoJSON.prototype.read.apply(this, [geojson, geojson.type, filter]);
                    feature.fid = geojson._id;
                    feature._rev = geojson._rev;
                    feature._drawType = geojson.drawType;
                    if (geojson.style) {
                        feature.style = geojson.style;
                    }
                    results.push(feature)
                }
            }
        }
        return results
    },
    /**
     * Prepares a list of features for inserting into couchDB
     *
     * @memberof OpenLayers.Format.CouchDB
     * @instance
     * @param {OpenLayers.Feature.Vector[]} obj
     * @returns {JSON} Ready to submit to couchDB
     */
    writeBulk: function(obj, pretty) {
        var bulk = {
            "docs": []
        };
        if(OpenLayers.Util.isArray(obj)) {
            for(var i=0; i<obj.length; i++) {
                var geojson = this._prepareGeoJSON(obj[i]);
                bulk.docs.push(geojson)
            }
        }
        return OpenLayers.Format.JSON.prototype.write.apply(this, [bulk, pretty]);
    },
    /**
     * Prepare a features for inserting into couchDB
     *
     * @memberof OpenLayers.Format.CouchDB
     * @instance
     * @param {OpenLayers.Feature.Vector} obj
     * @returns {JSON} Ready to submit to couchDB
     */
    write: function(obj, pretty) {
        var geojson = this._prepareGeoJSON(obj);
        return OpenLayers.Format.JSON.prototype.write.apply(this, [geojson, pretty]);
    },
    /**
     * Adds couch specific parameters to GeoJSON object
     *
     * @memberof OpenLayers.Format.CouchDB
     * @instance
     * @private
     * @param {OpenLayers.Feature.Vector} element
     * @returns GeoJSON with couch specific parameters
     */
    _prepareGeoJSON: function(element) {
        if(!element instanceof OpenLayers.Feature.Vector) {
            var msg = OpenLayers.i18n("Only OpenLayers.Feature.Vector is supported.") + ' ';
            msg += OpenLayers.i18n("Feature was") + ": " + element;
            throw msg;
        }
        var geojson = OpenLayers.Format.GeoJSON.prototype.extract.feature.apply(this, [element]);
        if(element.fid) {
            geojson._id = element.fid;
        }
        if(element._rev) {
            geojson._rev = element._rev;
        }
        if(element._deleted) {
            geojson._deleted = element._deleted;
        }
        if(element._drawType) {
            geojson.drawType = element._drawType;
        }
        if(element.style) {
            geojson.style = element.style;
        }

        return geojson;
    },

    CLASS_NAME: "OpenLayers.Format.GeoCouch"
});

/**
 * CouchDB specific protocol
 * Overrides some methods of OpenLayers.Protocol.HTTP
 *
 * @see {@link http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html|OpenLayers.Protocol.HTTP}
 * @extends OpenLayers.Protocol.HTTP
 * @class
 * @param options See {@link http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html|OpenLayers.Protocol.HTTP}
 */
OpenLayers.Protocol.CouchDB = OpenLayers.Class(OpenLayers.Protocol.HTTP, {
    /**
     * Init
     *
     * @private
     * @memberof OpenLayers.Protocol.CouchDB
     */
    initialize: function(options) {
        OpenLayers.Util.extend(options, {'headers': {'Content-Type': 'application/json'}, callback: this.cb});
        OpenLayers.Protocol.HTTP.prototype.initialize.apply(this, arguments);

    },
    /**
     * Add extension to url for reading couchDB and timestamp to prevent caching
     *
     * @memberof OpenLayers.Protocol.CouchDB
     * @instance
     * @param options See {@link http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html|OpenLayers.Protocol.HTTP}
     * @returns {OpenLayers.Protocol.Response}
     */
    read: function(options) {
        options.url = this.options.url + this.options.readExt + '&' + new Date().getTime();
        return OpenLayers.Protocol.HTTP.prototype.read.apply(this, [options]);
    },
    /**
     * Sends data to couchDB
     *
     * @memberof OpenLayers.Protocol.CouchDB
     * @instance
     * @param {OpenLayers.Feature.Vector[]} features
     * @param options See {@link http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html|OpenLayers.Protocol.HTTP}
     */
    commit: function(features, options) {
        var self = this;
        var deletes = [];
        var updates = [];
        var inserts = [];
        options = OpenLayers.Util.applyDefaults(options, this.options);
        for(var i=0; i < features.length; i++) {
            if(features[i].state != null) {
                if(features[i].state == OpenLayers.State.DELETE) {
                    features[i]._deleted = true;
                    deletes.push(features[i]);
                } else if(features[i].state == OpenLayers.State.UPDATE) {
                    updates.push(features[i]);
                } else {
                    inserts.push(features[i]);
                }
            }
        }

        if(deletes.length > 0) {
            var resp = new OpenLayers.Protocol.Response({reqFeatures: deletes});
            resp.priv = OpenLayers.Request.POST({
                url: this.options.url + this.options.bulkExt,
                headers: options.headers,
                data: this.format.writeBulk(deletes),
                callback: this.createCallback(this.handleCommitResponse, resp, options)
            });
        }
        for(var i=0;i<inserts.length; i++) {
            var resp = new OpenLayers.Protocol.Response({reqFeatures: [inserts[i]]});
            resp.priv = OpenLayers.Request.POST({
                url: this.options.url,
                headers: options.headers,
                data: this.format.write(inserts[i]),
                callback: this.createCallback(this.handleCommitResponse, resp, options)
            });
        }
        for(var i=0;i<updates.length; i++) {
            var resp = new OpenLayers.Protocol.Response({reqFeatures: [updates[i]]});
            resp.priv = OpenLayers.Request.PUT({
                url: this.options.url + updates[i].fid,
                headers: options.headers,
                data: this.format.write(updates[i]),
                callback: this.createCallback(this.handleCommitResponse, resp, options)
            });
        }
    },
    /**
     * Handles responses
     *
     * @memberof OpenLayers.Protocol.CouchDB
     * @instance
     * @param {OpenLayers.Protocol.Response} response
     * @param options See {@link http://dev.openlayers.org/releases/OpenLayers-2.12/doc/apidocs/files/OpenLayers/Protocol/HTTP-js.html|OpenLayers.Protocol.HTTP}
     */
    handleCommitResponse: function(response, options) {
        this.handleResponse(response, options);
        var format = new OpenLayers.Format.JSON();
        var responseJSON = format.read(response.priv.responseText);
        //only deletes handle more than one feature at a time
        if(response.reqFeatures.length == 1) {
            var feature = response.reqFeatures[0];
            feature.fid = responseJSON.id;
            feature._rev = responseJSON.rev;
            feature.state = null;
        }
    },
    CLASS_NAME: "OpenLayers.Protocol.CouchDB"
});

/*
 * Copyright (c) 2013 Omniscale
 * Published under the MIT license.
 */
OpenLayers.CouchDBTile = OpenLayers.Class(OpenLayers.Tile.Image, {
    crossOriginKeyword: "anonymous",

    initialize: function() {
        OpenLayers.Tile.Image.prototype.initialize.apply(this, arguments);
    },

    onImageError: function() {
        var img = this.imgDiv;
        if (img.src != null) {
            if (this.imageReloadAttempts == 0 && typeof this.layer.sourceLayer != 'undefined') {
                this.imageReloadAttempts += 1;

                // if source is WMTS we must update matrix properties
                // OpenLayers.Layer.WMTS does this by itself only if
                // setMap or moveTo with zoomChanged property is called
                if(typeof this.layer.sourceLayer.updateMatrixProperties !== "undefined") {
                    this.layer.sourceLayer.updateMatrixProperties()
                }

                // try to load img from sourceLayer
                var newImgSrc = this.layer.sourceLayer.getURL(this.bounds);
                if (OpenLayers.ProxyHost) {
                    newImgSrc = OpenLayers.Request.makeSameOrigin(newImgSrc, OpenLayers.ProxyHost);
                }
                this.setImgSrc(newImgSrc);

                // ideally we want to store the tile in the onImageLoad
                // handler but we only get an empty tile from canvas
                // in Google Chrome (tested w/ 29). To work around we
                // create a new cacheImg only for storing the tile.
                // the browsers cache should prevent from loading the
                // actual image twice
                this.cacheImg = new Image();
                this.cacheImg.crossOrigin = "anonymous"
                var tile = this;
                this.cacheImg.onload = function() {
                    var canvas = document.createElement("canvas");
                    canvas.width = img.width;
                    canvas.height = img.height;
                    var ctx = canvas.getContext("2d");
                    ctx.drawImage(img, 0, 0);
                    var tileData = canvas.toDataURL("image/png");
                    tile.cacheTile(tile.url, tileData);
                }
                this.cacheImg.src = newImgSrc;
            } else {
                OpenLayers.Element.addClass(img, "olImageLoadError");
                this.events.triggerEvent("loaderror");
                this.onImageLoad();
            }
        }
    },
    cacheTile: function(tileURL, tileData) {
        var req = new XMLHttpRequest();
        req.open("PUT", tileURL, true);
        req.onload = function (evt) {
            // stored
        };

        var blob = this._dataURIToBlob(tileData);
        blob.type = 'image/png';
        req.send(blob);
    },
    /** Convert base64 encoded data to Blob.
     * @param {string} base64 - binary data as base64 encoded string
     */
    _base64ToBlob: function(base64) {
        var binary = atob(base64);
        var len = binary.length;
        var buffer = new ArrayBuffer(len);
        var view = new Uint8Array(buffer);
        for (var i = 0; i < len; i++) {
            view[i] = binary.charCodeAt(i);
        }
        return new Blob([view]);
    },

    /**
     * Convert data URI to Blob.
     * @param {string} dataURI
     */
    _dataURIToBlob: function(dataURI) {
        return this._base64ToBlob(
            dataURI.replace(/^data:image\/(png|jpg);base64,/, "")
        );
    },
    CLASS_NAME: "OpenLayers.CouchDBTile"
});

OpenLayers.Layer.CouchDBTile = OpenLayers.Class(OpenLayers.Layer.XYZ, {
    tileClass: OpenLayers.CouchDBTile,

    initialize: function(name, url, options) {
        if (options) {
            this.sourceLayer = options.sourceLayer;
        }
        OpenLayers.Layer.XYZ.prototype.initialize.apply(this, [
            name || this.name, url || this.url, options || {}
        ]);
    },
    afterAdd: function() {
        if (typeof this.sourceLayer != 'undefined' && this.sourceLayer.map == null) {
            // sourceLayer needs to be added to map to be able
            // to generate URLs
            this.sourceLayer.displayInLayerSwitcher = false;
            this.map.addLayer(this.sourceLayer);
        }
        OpenLayers.Layer.XYZ.prototype.afterAdd.apply(this);
    },
    getURL: function(bounds) {
        var url = OpenLayers.Layer.XYZ.prototype.getURL.call(this, bounds)
        if (OpenLayers.ProxyHost) {
            url = OpenLayers.Request.makeSameOrigin(url, OpenLayers.ProxyHost);
        }
        return url
    },
    CLASS_NAME: "OpenLayers.Layer.CouchDBTile"
});

redpajama_set_name: RedPajamaGithub


text:
package com.bugsnag.functions;

import android.os.Build;
import com.adobe.fre.FREContext;
import com.adobe.fre.FREFunction;
import com.adobe.fre.FREObject;
import com.adobe.fre.FREWrongThreadException;

public class GetDeviceManufacturer implements FREFunction
{
	@Override
	public FREObject call(FREContext context, FREObject[] args)
	{
		try
		{
			return FREObject.newObject(Build.MANUFACTURER);
		}
		catch (FREWrongThreadException e)
		{
			e.printStackTrace();
		}

		return null;
	}
}


text:
package net.paoding.rose.jade.statement;

import java.util.Comparator;

import org.springframework.core.annotation.Order;

/**
 *
 * @author 王志亮 [qieqie.wang@gmail.com]
 *
 */
public class InterpreterComparator implements Comparator<Interpreter> {

    @Override
    public int compare(Interpreter thees, Interpreter that) {
        Order thessOrder = thees.getClass().getAnnotation(Order.class);
        Order thatOrder = that.getClass().getAnnotation(Order.class);
        int thessValue = thessOrder == null ? 0 : thessOrder.value();
        int thatValue = thatOrder == null ? 0 : thatOrder.value();
        return thessValue - thatValue;
    }
}


text:
    #include <stdio.h>
    #include "wx/window.h"
    #include "wx/app.h"
    #include "wx/frame.h"
#endif

#include "wx/os2/private.h"

IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)

class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
{
    friend class WXDLLEXPORT wxAcceleratorTable;
public:
    wxAcceleratorRefData();
    virtual ~wxAcceleratorRefData();

    inline HACCEL GetHACCEL() const { return m_hAccel; }
protected:
    HACCEL      m_hAccel;
    bool        m_ok;
};

#define M_ACCELDATA ((wxAcceleratorRefData *)m_refData)

wxAcceleratorRefData::wxAcceleratorRefData()
{
    m_ok = false;
    m_hAccel = 0;
} // end of wxAcceleratorRefData::wxAcceleratorRefData

wxAcceleratorRefData::~wxAcceleratorRefData()
{
    if (m_hAccel)
    {
        WinDestroyAccelTable((HACCEL) m_hAccel);
    }
    m_hAccel = 0 ;
} // end of wxAcceleratorRefData::~wxAcceleratorRefData

wxAcceleratorTable::wxAcceleratorTable()
{
    m_refData = NULL;
} // end of wxAcceleratorTable::wxAcceleratorTable

wxAcceleratorTable::~wxAcceleratorTable()
{
} // end of wxAcceleratorTable::~wxAcceleratorTable

// Load from .rc resource
wxAcceleratorTable::wxAcceleratorTable(
  const wxString&                  rResource
)
{
    HACCEL                          hAccel;
    ULONG                           ulId;

    m_refData = new wxAcceleratorRefData;

    ulId = atol(rResource.c_str());
    hAccel = ::WinLoadAccelTable( vHabmain
                                 ,NULL // resources always in .exe
                                 ,(ULONG)ulId
                                );
    if (wxTheApp->GetTopWindow() != NULL)
    {
        //
        // If we have accelerators the top window is the frame
        //
        wxFrame*                    pFrame = (wxFrame*)wxTheApp->GetTopWindow();

        ::WinSetAccelTable( vHabmain
                           ,hAccel
                           ,(HWND)pFrame->GetFrame()
                          );
    }
    M_ACCELDATA->m_hAccel = hAccel;
    M_ACCELDATA->m_ok = (hAccel != 0);
}

extern int wxCharCodeWXToOS2(
  int                               nId
, bool*                             pbIsVirtual
);

// Create from an array
wxAcceleratorTable::wxAcceleratorTable(
  int                               n
, const wxAcceleratorEntry          vaEntries[]
)
{
    int                             nAccelLength = ((sizeof(ACCEL) * n) + sizeof(ACCELTABLE));
    PACCELTABLE                     pArr;
    int                             i;

    m_refData = new wxAcceleratorRefData;
    pArr = (PACCELTABLE) new BYTE[nAccelLength];

    for (i = 0; i < n; i++)
    {
        USHORT                      uVirt = AF_CHAR;

        if (vaEntries[i].GetFlags() & wxACCEL_ALT)
        {
            uVirt |= AF_ALT;
            uVirt |= AF_VIRTUALKEY;
        }
        if (vaEntries[i].GetFlags() & wxACCEL_SHIFT)
        {
            uVirt |= AF_SHIFT;
            uVirt |= AF_VIRTUALKEY;
        }
        if (vaEntries[i].GetFlags() & wxACCEL_CTRL)
        {
            uVirt |= AF_CONTROL;
            uVirt |= AF_VIRTUALKEY;
        }

        bool bIsVirtual;
        USHORT uKey = (USHORT)wxCharCodeWXToOS2( vaEntries[i].GetKeyCode(),
                                                 &bIsVirtual);
        if (bIsVirtual)
            uVirt = AF_CHAR | AF_VIRTUALKEY;

        USHORT uCmd = (USHORT)vaEntries[i].GetCommand();

        pArr->aaccel[i].fs  = uVirt;
        pArr->aaccel[i].key = uKey;
        pArr->aaccel[i].cmd = uCmd;
    }
    pArr->codepage = (USHORT)::WinQueryCp(wxTheApp->m_hMq);
    pArr->cAccel = (USHORT)n;
    M_ACCELDATA->m_hAccel = ::WinCreateAccelTable( vHabmain
                                                  ,pArr
                                                 );
    if (wxTheApp->GetTopWindow() != NULL)
    {
        //
        // If we have accelerators the top window is the frame
        //
        wxFrame* pFrame = (wxFrame*)wxTheApp->GetTopWindow();

        ::WinSetAccelTable( vHabmain
                           ,M_ACCELDATA->m_hAccel
                           ,(HWND)pFrame->GetFrame()
                          );
    }

    delete[] pArr;
    M_ACCELDATA->m_ok = (M_ACCELDATA->m_hAccel != 0);
} // end of wxAcceleratorTable::wxAcceleratorTable

bool wxAcceleratorTable::IsOk() const
{
    return(M_ACCELDATA && (M_ACCELDATA->m_ok));
} // end of wxAcceleratorTable::IsOk

void wxAcceleratorTable::SetHACCEL(WXHACCEL hAccel)
{
    if (!M_ACCELDATA)
        m_refData = new wxAcceleratorRefData;

    M_ACCELDATA->m_hAccel = (HACCEL) hAccel;
}

WXHACCEL wxAcceleratorTable::GetHACCEL() const
{
    if (!M_ACCELDATA)
        return 0;
    return (WXHACCEL) M_ACCELDATA->m_hAccel;
}

bool wxAcceleratorTable::Translate( WXHWND  hWnd,
                                    WXMSG*  pWxmsg ) const
{
    PQMSG pMsg = (PQMSG)pWxmsg;
    BOOL  rc = FALSE;

    rc = ::WinTranslateAccel( vHabmain
                             ,(HWND)hWnd
                             ,GetHaccel()
                             ,pMsg
                            );
    return (IsOk() && rc);
} // end of wxAcceleratorTable::Translate

// ---------------------------------------------------------------------------
// function for translating labels
// ---------------------------------------------------------------------------

wxString wxPMTextToLabel( const wxString& rsTitle )
{
    wxString      sTitle;
    const wxChar* zPc;

    if (rsTitle.empty())
        return(sTitle);

    for (zPc = rsTitle.c_str(); *zPc != wxT('\0'); zPc++)
    {
        if (*zPc == wxT('&'))
        {
            if (*(zPc + 1) == wxT('&'))
            {
                zPc++;
                sTitle << wxT('&');
            }
            else
                sTitle << wxT('~');
        }
        else
        {
            if ( *zPc == wxT('~'))
            {
                //
                // Tildes must be doubled to prevent them from being
                // interpreted as accelerator character prefix by PM ???
                //
                sTitle << *zPc;
            }
            sTitle << *zPc;
        }
    }
    return(sTitle);
} // end of wxPMTextToLabel


text:
<?php

namespace Tests\AppBundle\Entity;
use AppBundle\Entity\Receiver;

class ReceiverEntityTest extends \PHPUnit_Framework_TestCase
{
    public function testConstructor() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertEquals("Office", $receiver->getName());
        $this->assertEquals(111, $receiver->getDeliveryRoom());
        $this->assertTrue($receiver->getEnabled());

        $this->assertInstanceOf(Receiver::class, $receiver);
    }

    public function testGetName() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertEquals("Office", $receiver->getName());
    }

    public function testSetName() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");
        $receiver->setName("IT", "ReceiverTest");

        $this->assertEquals("IT", $receiver->getName());
    }

    public function testGetDeliveryRoom() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertEquals(111, $receiver->getDeliveryRoom());
    }

    public function testSetDeliveryRoom() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");
        $receiver->setDeliveryRoom(1212, "ReceiverTest");

        $this->assertEquals(1212, $receiver->getDeliveryRoom());
    }

    public function testGetEnabled() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertTrue($receiver->getEnabled());
    }

    public function testSetEnabled()  {
        $receiver = new Receiver("Office", 111, "ReceiverTest");
        $receiver->setEnabled(false, "ReceiverTest");

        $this->assertNotTrue($receiver->getEnabled());
    }

    public function testDateCreated() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertNotNull($receiver->getDateCreated());
    }

    public function testGetDateModified() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertNotNull($receiver->getDateModified());
    }

    public function testSetDateModified() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");
        $testDate = new \DateTime("2016-03-22");

        $receiver->setDateModified($testDate, "ReceiverTest");

        $this->assertEquals($testDate, $receiver->getDateModified());
    }

    public function testGetUserLastModified() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");

        $this->assertEquals("ReceiverTest", $receiver->getUserLastModified());
    }

    public function testSetUserLastModified() {
        $receiver = new Receiver("Office", 111, "ReceiverTest");
        $receiver->setUserLastModified("ReceiverTest2");

        $this->assertEquals("ReceiverTest2", $receiver->getUserLastModified());
    }
}


text:
<?php

namespace Solarium\Tests\QueryType\Update;
use Solarium\QueryType\Update\Result as UpdateResult;

class ResultTest extends \PHPUnit_Framework_TestCase
{

    /**
     * @var UpdateDummy
     */
    protected $result;

    public function setUp()
    {
        $this->result = new UpdateDummy();
    }

    public function testGetStatus()
    {
        $this->assertEquals(
            1,
            $this->result->getStatus()
        );
    }

    public function testGetQueryTime()
    {
        $this->assertEquals(
            12,
            $this->result->getQueryTime()
        );
    }

}

class UpdateDummy extends UpdateResult
{
    protected $parsed = true;

    public function __construct()
    {
        $this->status = 1;
        $this->queryTime = 12;
    }

}