Interface GenerateContentResponse.PromptFeedbackOrBuilder (0.1.0)

publicstaticinterface GenerateContentResponse.PromptFeedbackOrBuilderextendsMessageOrBuilder

Implements

MessageOrBuilder

Methods

getBlockReason()

publicabstractGenerateContentResponse.PromptFeedback.BlockedReasongetBlockReason()

Output only. Blocked reason.

.google.cloud.vertexai.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
GenerateContentResponse.PromptFeedback.BlockedReason

The blockReason.

getBlockReasonMessage()

publicabstractStringgetBlockReasonMessage()

Output only. A readable block reason message.

string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
String

The blockReasonMessage.

getBlockReasonMessageBytes()

publicabstractByteStringgetBlockReasonMessageBytes()

Output only. A readable block reason message.

string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ByteString

The bytes for blockReasonMessage.

getBlockReasonValue()

publicabstractintgetBlockReasonValue()

Output only. Blocked reason.

.google.cloud.vertexai.v1beta1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The enum numeric value on the wire for blockReason.

getSafetyRatings(int index)

publicabstractSafetyRatinggetSafetyRatings(intindex)

Output only. Safety ratings.

repeated .google.cloud.vertexai.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SafetyRating

getSafetyRatingsCount()

publicabstractintgetSafetyRatingsCount()

Output only. Safety ratings.

repeated .google.cloud.vertexai.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

getSafetyRatingsList()

publicabstractList<SafetyRating>getSafetyRatingsList()

Output only. Safety ratings.

repeated .google.cloud.vertexai.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<SafetyRating>

getSafetyRatingsOrBuilder(int index)

publicabstractSafetyRatingOrBuildergetSafetyRatingsOrBuilder(intindex)

Output only. Safety ratings.

repeated .google.cloud.vertexai.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
index int
Returns
Type Description
SafetyRatingOrBuilder

getSafetyRatingsOrBuilderList()

publicabstractList<?extendsSafetyRatingOrBuilder>getSafetyRatingsOrBuilderList()

Output only. Safety ratings.

repeated .google.cloud.vertexai.v1beta1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.SafetyRatingOrBuilder>

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

Last updated 2025年11月19日 UTC.