public static final class GenerateContentResponse.PromptFeedback.Builder extends GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder> implements GenerateContentResponse.PromptFeedbackOrBuilderContent filter results for a prompt sent in the request.
Protobuf type google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > GenerateContentResponse.PromptFeedback.BuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllSafetyRatings(Iterable<? extends SafetyRating> values)
public GenerateContentResponse.PromptFeedback.Builder addAllSafetyRatings(Iterable<? extends SafetyRating> values)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.vertexai.api.SafetyRating> |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
addSafetyRatings(SafetyRating value)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(SafetyRating value)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
SafetyRating |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
addSafetyRatings(SafetyRating.Builder builderForValue)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(SafetyRating.Builder builderForValue)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
SafetyRating.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
addSafetyRatings(int index, SafetyRating value)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(int index, SafetyRating value)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
SafetyRating |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
addSafetyRatings(int index, SafetyRating.Builder builderForValue)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(int index, SafetyRating.Builder builderForValue)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
SafetyRating.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
addSafetyRatingsBuilder()
public SafetyRating.Builder addSafetyRatingsBuilder()Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SafetyRating.Builder |
|
addSafetyRatingsBuilder(int index)
public SafetyRating.Builder addSafetyRatingsBuilder(int index)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
SafetyRating.Builder |
|
build()
public GenerateContentResponse.PromptFeedback build()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback |
|
buildPartial()
public GenerateContentResponse.PromptFeedback buildPartial()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback |
|
clear()
public GenerateContentResponse.PromptFeedback.Builder clear()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
clearBlockReason()
public GenerateContentResponse.PromptFeedback.Builder clearBlockReason()Output only. Blocked reason.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
This builder for chaining. |
clearBlockReasonMessage()
public GenerateContentResponse.PromptFeedback.Builder clearBlockReasonMessage()Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
This builder for chaining. |
clearSafetyRatings()
public GenerateContentResponse.PromptFeedback.Builder clearSafetyRatings()Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
getBlockReason()
public GenerateContentResponse.PromptFeedback.BlockedReason getBlockReason()Output only. Blocked reason.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.BlockedReason |
The blockReason. |
getBlockReasonMessage()
public String getBlockReasonMessage()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()
public ByteString getBlockReasonMessageBytes()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()
public int getBlockReasonValue()Output only. Blocked reason.
.google.cloud.vertexai.v1.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()
public GenerateContentResponse.PromptFeedback getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getSafetyRatings(int index)
public SafetyRating getSafetyRatings(int index)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
SafetyRating |
|
getSafetyRatingsBuilder(int index)
public SafetyRating.Builder getSafetyRatingsBuilder(int index)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
SafetyRating.Builder |
|
getSafetyRatingsBuilderList()
public List<SafetyRating.Builder> getSafetyRatingsBuilderList()Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getSafetyRatingsCount()
public int getSafetyRatingsCount()Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
int |
|
getSafetyRatingsList()
public List<SafetyRating> getSafetyRatingsList()Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
List<SafetyRating> |
|
getSafetyRatingsOrBuilder(int index)
public SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
SafetyRatingOrBuilder |
|
getSafetyRatingsOrBuilderList()
public List<? extends SafetyRatingOrBuilder> getSafetyRatingsOrBuilderList()Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.vertexai.api.SafetyRatingOrBuilder> |
|
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(GenerateContentResponse.PromptFeedback other)
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(GenerateContentResponse.PromptFeedback other)| Parameter | |
|---|---|
| Name | Description |
other |
GenerateContentResponse.PromptFeedback |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
removeSafetyRatings(int index)
public GenerateContentResponse.PromptFeedback.Builder removeSafetyRatings(int index)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
setBlockReason(GenerateContentResponse.PromptFeedback.BlockedReason value)
public GenerateContentResponse.PromptFeedback.Builder setBlockReason(GenerateContentResponse.PromptFeedback.BlockedReason value)Output only. Blocked reason.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
GenerateContentResponse.PromptFeedback.BlockedReasonThe blockReason to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
This builder for chaining. |
setBlockReasonMessage(String value)
public GenerateContentResponse.PromptFeedback.Builder setBlockReasonMessage(String value)Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe blockReasonMessage to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
This builder for chaining. |
setBlockReasonMessageBytes(ByteString value)
public GenerateContentResponse.PromptFeedback.Builder setBlockReasonMessageBytes(ByteString value)Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for blockReasonMessage to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
This builder for chaining. |
setBlockReasonValue(int value)
public GenerateContentResponse.PromptFeedback.Builder setBlockReasonValue(int value)Output only. Blocked reason.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
intThe enum numeric value on the wire for blockReason to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
This builder for chaining. |
setSafetyRatings(int index, SafetyRating value)
public GenerateContentResponse.PromptFeedback.Builder setSafetyRatings(int index, SafetyRating value)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
SafetyRating |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
setSafetyRatings(int index, SafetyRating.Builder builderForValue)
public GenerateContentResponse.PromptFeedback.Builder setSafetyRatings(int index, SafetyRating.Builder builderForValue)Output only. Safety ratings.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
SafetyRating.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|