HarmCategory

public enum HarmCategory extends Enum


Category for a given harm rating.

Summary

Enum Values

DANGEROUS_CONTENT

Dangerous content.

HARASSMENT

Harassment content.

HATE_SPEECH

Hate speech and content.

SEXUALLY_EXPLICIT

Sexually explicit content.

UNKNOWN

A new and not yet supported value.

Public methods

final @NonNull HarmCategory

Returns the enum constant of this type with the specified name.

final @NonNull HarmCategory[]

Returns an array containing the constants of this enum type, in the order they're declared.

Enum Values

DANGEROUS_CONTENT

HarmCategory HarmCategory.DANGEROUS_CONTENT

Dangerous content.

HARASSMENT

HarmCategory HarmCategory.HARASSMENT

Harassment content.

HATE_SPEECH

HarmCategory HarmCategory.HATE_SPEECH

Hate speech and content.

SEXUALLY_EXPLICIT

HarmCategory HarmCategory.SEXUALLY_EXPLICIT

Sexually explicit content.

UNKNOWN

HarmCategory HarmCategory.UNKNOWN

A new and not yet supported value.

Public methods

valueOf

public final @NonNull HarmCategory valueOf(@NonNull String value)

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Throws
kotlin.IllegalArgumentException kotlin.IllegalArgumentException

if this enum type has no constant with the specified name

values

public final @NonNull HarmCategory[] values()

Returns an array containing the constants of this enum type, in the order they're declared.

This method may be used to iterate over the constants.