BlockThreshold

public enum BlockThreshold extends 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 methods

final @NonNull BlockThreshold

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

final @NonNull BlockThreshold[]

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

Enum Values

LOW_AND_ABOVE

BlockThreshold BlockThreshold.LOW_AND_ABOVE

Content with negligible harm is allowed.

MEDIUM_AND_ABOVE

BlockThreshold BlockThreshold.MEDIUM_AND_ABOVE

Content with negligible to low harm is allowed.

NONE

BlockThreshold BlockThreshold.NONE

All content is allowed regardless of harm.

ONLY_HIGH

BlockThreshold BlockThreshold.ONLY_HIGH

Content with negligible to medium harm is allowed.

UNSPECIFIED

BlockThreshold BlockThreshold.UNSPECIFIED

The threshold was not specified.

Public methods

valueOf

public final @NonNull BlockThreshold 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 BlockThreshold[] 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.