toPublic method

HarmProbability toPublic()

Maps the internal HarmProbability enum to the external HarmProbability enum.

Implementation

public_types.HarmProbability toPublic() {
  switch (this) {
    case InternalHarmProbability.HIGH:
      return public_types.HarmProbability.HIGH;
    case InternalHarmProbability.MEDIUM:
      return public_types.HarmProbability.MEDIUM;
    case InternalHarmProbability.LOW:
      return public_types.HarmProbability.LOW;
    case InternalHarmProbability.NEGLIGIBLE:
      return public_types.HarmProbability.NEGLIGIBLE;
    case InternalHarmProbability.UNSPECIFIED:
      return public_types.HarmProbability.UNSPECIFIED;
    case InternalHarmProbability.UNKNOWN:
      return public_types.HarmProbability.UNKNOWN;
  }
}