validate method

dynamic validate()

Implementation

validate() {
  // check for required fields
  // alas, we cannot check 'part_id' because it's a primitive and you chose the non-beans generator.
  if (peers == null) {
    throw new TProtocolError(TProtocolErrorType.UNKNOWN,
        "Required field 'peers' was not present! Struct: " + toString());
  }
  if (losts == null) {
    throw new TProtocolError(TProtocolErrorType.UNKNOWN,
        "Required field 'losts' was not present! Struct: " + toString());
  }
  // check that fields of type enum have valid values
}