toInternal method
Maps the external HarmCategory enum to the internal HarmCategory enum.
Implementation
InternalHarmCategory toInternal() {
switch (this) {
case public_types.HarmCategory.HARASSMENT:
return InternalHarmCategory.HARASSMENT;
case public_types.HarmCategory.HATE_SPEECH:
return InternalHarmCategory.HATE_SPEECH;
case public_types.HarmCategory.SEXUALLY_EXPLICIT:
return InternalHarmCategory.SEXUALLY_EXPLICIT;
case public_types.HarmCategory.DANGEROUS_CONTENT:
return InternalHarmCategory.DANGEROUS_CONTENT;
case public_types.HarmCategory.UNKNOWN:
return InternalHarmCategory.UNKNOWN;
}
}