const HUYA = {};

HUYA.UserId = function () {
  this.lUid = 0;
  this.sGuid = "";
  this.sToken = "";
  this.sHuYaUA = "";
  this.sCookie = "";
  this.iTokenType = 0;
};
HUYA.UserId.prototype._clone = function () { return new HUYA.UserId(); }
HUYA.UserId.prototype._write = function (os, tag, value) { os.writeStruct(tag, value); }
HUYA.UserId.prototype._read = function (is, tag, def) { return is.readStruct(tag, true, def); }

HUYA.UserId.prototype.writeTo = function (os) {
  os.writeInt64(0, this.lUid);
  os.writeString(1, this.sGuid);
  os.writeString(2, this.sToken);
  os.writeString(3, this.sHuYaUA);
  os.writeString(4, this.sCookie);
  os.writeInt32(5, this.iTokenType);
};

HUYA.UserId.prototype.readFrom = function (is) {
  this.lUid = is.readInt64(0, false, this.lUid);
  this.sGuid = is.readString(1, false, this.sGuid);
  this.sToken = is.readString(2, false, this.sToken);
  this.sHuYaUA = is.readString(3, false, this.sHuYaUA);
  this.sCookie = is.readString(4, false, this.sCookie);
  this.iTokenType = is.readInt32(5, false, this.iTokenType);
};

export default HUYA