validate method

dynamic validate()

Implementation

validate() {
  // check for required fields
  // alas, we cannot check 'code' because it's a primitive and you chose the non-beans generator.
  // alas, we cannot check 'part_id' because it's a primitive and you chose the non-beans generator.
  // check that fields of type enum have valid values
  if (isSetCode() && !t_nebula.ErrorCode.VALID_VALUES.contains(code)) {
    throw new TProtocolError(TProtocolErrorType.UNKNOWN,
        "The field 'code' has been assigned the invalid value $code");
  }
}