BlockThreshold

enum BlockThreshold : Enum


Represents the threshold for some HarmCategory that is allowed and blocked by SafetySetting.

Summary

Enum Values

LOW_AND_ABOVE

Content with negligible harm is allowed.

MEDIUM_AND_ABOVE

Content with negligible to low harm is allowed.

NONE

All content is allowed regardless of harm.

ONLY_HIGH

Content with negligible to medium harm is allowed.

UNSPECIFIED

The threshold was not specified.

Public functions

BlockThreshold
valueOf(value: String)

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

Array<BlockThreshold>

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

Enum Values

LOW_AND_ABOVE

val BlockThreshold.LOW_AND_ABOVEBlockThreshold

Content with negligible harm is allowed.

MEDIUM_AND_ABOVE

val BlockThreshold.MEDIUM_AND_ABOVEBlockThreshold

Content with negligible to low harm is allowed.

NONE

val BlockThreshold.NONEBlockThreshold

All content is allowed regardless of harm.

ONLY_HIGH

val BlockThreshold.ONLY_HIGHBlockThreshold

Content with negligible to medium harm is allowed.

UNSPECIFIED

val BlockThreshold.UNSPECIFIEDBlockThreshold

The threshold was not specified.

Public functions

valueOf

fun valueOf(value: String): BlockThreshold

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

fun values(): Array<BlockThreshold>

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.