read method
Reads the TObject from the given input protocol.
Implementation
read(TProtocol iprot) {
TField field;
iprot.readStructBegin();
while (true) {
field = iprot.readFieldBegin();
if (field.type == TType.STOP) {
break;
}
switch (field.id) {
case ACCOUNT:
if (field.type == TType.STRING) {
this.account = iprot.readBinary();
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case IS_LOCK:
if (field.type == TType.BOOL) {
this.is_lock = iprot.readBool();
this.__isset_is_lock = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MAX_QUERIES_PER_HOUR:
if (field.type == TType.I32) {
this.max_queries_per_hour = iprot.readI32();
this.__isset_max_queries_per_hour = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MAX_UPDATES_PER_HOUR:
if (field.type == TType.I32) {
this.max_updates_per_hour = iprot.readI32();
this.__isset_max_updates_per_hour = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MAX_CONNECTIONS_PER_HOUR:
if (field.type == TType.I32) {
this.max_connections_per_hour = iprot.readI32();
this.__isset_max_connections_per_hour = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
case MAX_USER_CONNECTIONS:
if (field.type == TType.I32) {
this.max_user_connections = iprot.readI32();
this.__isset_max_user_connections = true;
} else {
TProtocolUtil.skip(iprot, field.type);
}
break;
default:
TProtocolUtil.skip(iprot, field.type);
break;
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
// check for required fields of primitive type, which can't be checked in the validate method
validate();
}