Class GenerateContentResponse.PromptFeedback (0.2.0)

publicstaticfinalclass GenerateContentResponse.PromptFeedbackextendsGeneratedMessageV3implementsGenerateContentResponse.PromptFeedbackOrBuilder

Content filter results for a prompt sent in the request.

Protobuf type google.cloud.vertexai.v1beta1.GenerateContentResponse.PromptFeedback

Inheritance

Object > AbstractMessageLite<MessageType,BuilderType> > AbstractMessage > GeneratedMessageV3 > GenerateContentResponse.PromptFeedback

Inherited Members

com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT)
com.google.protobuf.GeneratedMessageV3.<ListT>makeMutableCopy(ListT,int)
com.google.protobuf.GeneratedMessageV3.<T>emptyList(java.lang.Class<T>)
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

Static Fields

BLOCK_REASON_FIELD_NUMBER

publicstaticfinalintBLOCK_REASON_FIELD_NUMBER
Field Value
Type Description
int

BLOCK_REASON_MESSAGE_FIELD_NUMBER

publicstaticfinalintBLOCK_REASON_MESSAGE_FIELD_NUMBER
Field Value
Type Description
int

SAFETY_RATINGS_FIELD_NUMBER

publicstaticfinalintSAFETY_RATINGS_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

publicstaticGenerateContentResponse.PromptFeedbackgetDefaultInstance()
Returns
Type Description
GenerateContentResponse.PromptFeedback

getDescriptor()

publicstaticfinalDescriptors.DescriptorgetDescriptor()
Returns
Type Description
Descriptor

newBuilder()

publicstaticGenerateContentResponse.PromptFeedback.BuildernewBuilder()
Returns
Type Description
GenerateContentResponse.PromptFeedback.Builder

newBuilder(GenerateContentResponse.PromptFeedback prototype)

publicstaticGenerateContentResponse.PromptFeedback.BuildernewBuilder(GenerateContentResponse.PromptFeedbackprototype)
Parameter
Name Description
prototype GenerateContentResponse.PromptFeedback
Returns
Type Description
GenerateContentResponse.PromptFeedback.Builder

parseDelimitedFrom(InputStream input)

publicstaticGenerateContentResponse.PromptFeedbackparseDelimitedFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticGenerateContentResponse.PromptFeedbackparseDelimitedFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
IOException

parseFrom(byte[] data)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(byte[]data)
Parameter
Name Description
data byte[]
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(byte[]data,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(ByteStringdata)
Parameter
Name Description
data ByteString
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(ByteStringdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(CodedInputStreaminput)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
IOException

parseFrom(InputStream input)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(InputStreaminput)
Parameter
Name Description
input InputStream
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(InputStreaminput,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(ByteBufferdata)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

publicstaticGenerateContentResponse.PromptFeedbackparseFrom(ByteBufferdata,ExtensionRegistryLiteextensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
GenerateContentResponse.PromptFeedback
Exceptions
Type Description
InvalidProtocolBufferException

parser()

publicstaticParser<GenerateContentResponse.PromptFeedback>parser()
Returns
Type Description
Parser<PromptFeedback>

Methods

equals(Object obj)

publicbooleanequals(Objectobj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getBlockReason()

publicGenerateContentResponse.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()

publicStringgetBlockReasonMessage()

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()

publicByteStringgetBlockReasonMessageBytes()

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()

publicintgetBlockReasonValue()

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.

getDefaultInstanceForType()

publicGenerateContentResponse.PromptFeedbackgetDefaultInstanceForType()
Returns
Type Description
GenerateContentResponse.PromptFeedback

getParserForType()

publicParser<GenerateContentResponse.PromptFeedback>getParserForType()
Returns
Type Description
Parser<PromptFeedback>
Overrides

getSafetyRatings(int index)

publicSafetyRatinggetSafetyRatings(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()

publicintgetSafetyRatingsCount()

Output only. Safety ratings.

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

Returns
Type Description
int

getSafetyRatingsList()

publicList<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)

publicSafetyRatingOrBuildergetSafetyRatingsOrBuilder(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()

publicList<?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>

getSerializedSize()

publicintgetSerializedSize()
Returns
Type Description
int
Overrides

hashCode()

publicinthashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

publicfinalbooleanisInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

publicGenerateContentResponse.PromptFeedback.BuildernewBuilderForType()
Returns
Type Description
GenerateContentResponse.PromptFeedback.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protectedGenerateContentResponse.PromptFeedback.BuildernewBuilderForType(GeneratedMessageV3.BuilderParentparent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
GenerateContentResponse.PromptFeedback.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protectedObjectnewInstance(GeneratedMessageV3.UnusedPrivateParameterunused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

publicGenerateContentResponse.PromptFeedback.BuildertoBuilder()
Returns
Type Description
GenerateContentResponse.PromptFeedback.Builder

writeTo(CodedOutputStream output)

publicvoidwriteTo(CodedOutputStreamoutput)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException

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.