validate method
dynamic
validate()
Implementation
validate() {
// check for required fields
// check that fields of type enum have valid values
if (isSetType() && !JobType.VALID_VALUES.contains(type)) {
throw new TProtocolError(TProtocolErrorType.UNKNOWN,
"The field 'type' has been assigned the invalid value $type");
}
if (isSetStatus() && !JobStatus.VALID_VALUES.contains(status)) {
throw new TProtocolError(TProtocolErrorType.UNKNOWN,
"The field 'status' has been assigned the invalid value $status");
}
if (isSetCode() && !t_nebula.ErrorCode.VALID_VALUES.contains(code)) {
throw new TProtocolError(TProtocolErrorType.UNKNOWN,
"The field 'code' has been assigned the invalid value $code");
}
}