public static final class GenerateContentResponse.PromptFeedback.Builder extends GeneratedMessageV3.Builder<GenerateContentResponse.PromptFeedback.Builder> implements GenerateContentResponse.PromptFeedbackOrBuilder
Content filter results for a prompt sent in the request.
Protobuf type google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback
Inherited Members
com.google.protobuf.GeneratedMessageV3.Builder.getUnknownFieldSetBuilder()
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownLengthDelimitedField(int,com.google.protobuf.ByteString)
com.google.protobuf.GeneratedMessageV3.Builder.mergeUnknownVarintField(int,int)
com.google.protobuf.GeneratedMessageV3.Builder.parseUnknownField(com.google.protobuf.CodedInputStream,com.google.protobuf.ExtensionRegistryLite,int)
com.google.protobuf.GeneratedMessageV3.Builder.setUnknownFieldSetBuilder(com.google.protobuf.UnknownFieldSet.Builder)
Static Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Methods
addAllSafetyRatings(Iterable<? extends SafetyRating> values)
public GenerateContentResponse.PromptFeedback.Builder addAllSafetyRatings(Iterable<? extends SafetyRating> values)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
values | Iterable<? extends com.google.cloud.aiplatform.v1.SafetyRating>
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.PromptFeedback.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
addSafetyRatings(SafetyRating value)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(SafetyRating value)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addSafetyRatings(SafetyRating.Builder builderForValue)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(SafetyRating.Builder builderForValue)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addSafetyRatings(int index, SafetyRating value)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(int index, SafetyRating value)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addSafetyRatings(int index, SafetyRating.Builder builderForValue)
public GenerateContentResponse.PromptFeedback.Builder addSafetyRatings(int index, SafetyRating.Builder builderForValue)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addSafetyRatingsBuilder()
public SafetyRating.Builder addSafetyRatingsBuilder()
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addSafetyRatingsBuilder(int index)
public SafetyRating.Builder addSafetyRatingsBuilder(int index)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
index | int
|
build()
public GenerateContentResponse.PromptFeedback build()
buildPartial()
public GenerateContentResponse.PromptFeedback buildPartial()
clear()
public GenerateContentResponse.PromptFeedback.Builder clear()
Overrides
clearBlockReason()
public GenerateContentResponse.PromptFeedback.Builder clearBlockReason()
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearBlockReasonMessage()
public GenerateContentResponse.PromptFeedback.Builder clearBlockReasonMessage()
Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearField(Descriptors.FieldDescriptor field)
public GenerateContentResponse.PromptFeedback.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerateContentResponse.PromptFeedback.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearSafetyRatings()
public GenerateContentResponse.PromptFeedback.Builder clearSafetyRatings()
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
clone()
public GenerateContentResponse.PromptFeedback.Builder clone()
Overrides
getBlockReason()
public GenerateContentResponse.PromptFeedback.BlockedReason getBlockReason()
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
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.aiplatform.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()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getSafetyRatings(int index)
public SafetyRating getSafetyRatings(int index)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
index | int
|
getSafetyRatingsBuilder(int index)
public SafetyRating.Builder getSafetyRatingsBuilder(int index)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
index | int
|
getSafetyRatingsBuilderList()
public List<SafetyRating.Builder> getSafetyRatingsBuilderList()
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsCount()
public int getSafetyRatingsCount()
Output only. Safety ratings.
repeated .google.cloud.aiplatform.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.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsOrBuilder(int index)
public SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
index | int
|
getSafetyRatingsOrBuilderList()
public List<? extends SafetyRatingOrBuilder> getSafetyRatingsOrBuilderList()
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
---|
Type | Description |
List<? extends com.google.cloud.aiplatform.v1.SafetyRatingOrBuilder> | |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(GenerateContentResponse.PromptFeedback other)
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(GenerateContentResponse.PromptFeedback other)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(Message other)
Parameter |
---|
Name | Description |
other | Message
|
Overrides
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.PromptFeedback.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
removeSafetyRatings(int index)
public GenerateContentResponse.PromptFeedback.Builder removeSafetyRatings(int index)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
index | int
|
setBlockReason(GenerateContentResponse.PromptFeedback.BlockedReason value)
public GenerateContentResponse.PromptFeedback.Builder setBlockReason(GenerateContentResponse.PromptFeedback.BlockedReason value)
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
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 | String
The blockReasonMessage to set.
|
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 | ByteString
The bytes for blockReasonMessage to set.
|
setBlockReasonValue(int value)
public GenerateContentResponse.PromptFeedback.Builder setBlockReasonValue(int value)
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
---|
Name | Description |
value | int
The enum numeric value on the wire for blockReason to set.
|
setField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.PromptFeedback.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public GenerateContentResponse.PromptFeedback.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setSafetyRatings(int index, SafetyRating value)
public GenerateContentResponse.PromptFeedback.Builder setSafetyRatings(int index, SafetyRating value)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setSafetyRatings(int index, SafetyRating.Builder builderForValue)
public GenerateContentResponse.PromptFeedback.Builder setSafetyRatings(int index, SafetyRating.Builder builderForValue)
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.PromptFeedback.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides