BlockReason

public final classBlockReason


This class is deprecated.
The Vertex AI in Firebase SDK (firebase-vertexai) has been replaced with the FirebaseAI SDK (firebase-ai) to accommodate the evolving set of supported features and services.For migration details, see the migration guide: https://firebase.google.com/docs/vertex-ai/migrate-to-latest-sdk

Describes why content was blocked.

Summary

Nested types

public static classBlockReason.Companion

Public fields

static final @NonNullBlockReason

Content was blocked for another reason.

static final @NonNullBlockReason

Content was blocked for another reason.

static final @NonNullBlockReason

Candidates blocked due to the terms which are included from the terminology blocklist.

static final @NonNullBlockReason

Content was blocked for violating providedSafetySetting.

static final @NonNullBlockReason

A new and not yet supported value.

final @NonNullString
final int

Public fields

BLOCKLIST

public static final @NonNullBlockReason BLOCKLIST

Content was blocked for another reason.

OTHER

public static final @NonNullBlockReason OTHER

Content was blocked for another reason.

PROHIBITED_CONTENT

public static final @NonNullBlockReason PROHIBITED_CONTENT

Candidates blocked due to the terms which are included from the terminology blocklist.

SAFETY

public static final @NonNullBlockReason SAFETY

Content was blocked for violating providedSafetySetting.

UNKNOWN

public static final @NonNullBlockReason UNKNOWN

A new and not yet supported value.

name

public final @NonNullString name

ordinal

public final int ordinal

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-21 UTC.