Package com.google.cloud.aiplatform.v1
Class GenerateContentResponse.PromptFeedback.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
com.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.Builder
- All Implemented Interfaces:
GenerateContentResponse.PromptFeedbackOrBuilder,com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,Cloneable
- Enclosing class:
- GenerateContentResponse.PromptFeedback
public static final class GenerateContentResponse.PromptFeedback.Builder
extends com.google.protobuf.GeneratedMessage.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-
Method Summary
Modifier and TypeMethodDescriptionaddAllSafetyRatings(Iterable<? extends SafetyRating> values) Output only.addSafetyRatings(int index, SafetyRating value) Output only.addSafetyRatings(int index, SafetyRating.Builder builderForValue) Output only.addSafetyRatings(SafetyRating value) Output only.addSafetyRatings(SafetyRating.Builder builderForValue) Output only.Output only.addSafetyRatingsBuilder(int index) Output only.build()clear()Output only.Output only.Output only.Output only.Output only.com.google.protobuf.ByteStringOutput only.intOutput only.static final com.google.protobuf.Descriptors.Descriptorcom.google.protobuf.Descriptors.DescriptorgetSafetyRatings(int index) Output only.getSafetyRatingsBuilder(int index) Output only.Output only.intOutput only.Output only.getSafetyRatingsOrBuilder(int index) Output only.List<? extends SafetyRatingOrBuilder>Output only.protected com.google.protobuf.GeneratedMessage.FieldAccessorTablefinal booleanmergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom(com.google.protobuf.Message other) removeSafetyRatings(int index) Output only.Output only.setBlockReasonMessage(String value) Output only.setBlockReasonMessageBytes(com.google.protobuf.ByteString value) Output only.setBlockReasonValue(int value) Output only.setSafetyRatings(int index, SafetyRating value) Output only.setSafetyRatings(int index, SafetyRating.Builder builderForValue) Output only.Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownFields, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFields, setUnknownFieldSetBuilder, setUnknownFieldsProto3Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFromMethods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFromMethods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
-
clear
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
-
mergeFrom
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(GenerateContentResponse.PromptFeedback other) -
isInitialized
public final boolean isInitialized()- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>
-
mergeFrom
public GenerateContentResponse.PromptFeedback.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.PromptFeedback.Builder>- Throws:
IOException
-
getBlockReasonValue
public int getBlockReasonValue()Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getBlockReasonValuein interfaceGenerateContentResponse.PromptFeedbackOrBuilder- Returns:
- The enum numeric value on the wire for blockReason.
-
setBlockReasonValue
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The enum numeric value on the wire for blockReason to set.- Returns:
- This builder for chaining.
-
getBlockReason
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getBlockReasonin interfaceGenerateContentResponse.PromptFeedbackOrBuilder- Returns:
- The blockReason.
-
setBlockReason
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];- Parameters:
value- The blockReason to set.- Returns:
- This builder for chaining.
-
clearBlockReason
Output only. Blocked reason.
.google.cloud.aiplatform.v1.GenerateContentResponse.PromptFeedback.BlockedReason block_reason = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
getSafetyRatingsList
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsListin interfaceGenerateContentResponse.PromptFeedbackOrBuilder
-
getSafetyRatingsCount
public int getSafetyRatingsCount()Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsCountin interfaceGenerateContentResponse.PromptFeedbackOrBuilder
-
getSafetyRatings
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsin interfaceGenerateContentResponse.PromptFeedbackOrBuilder
-
setSafetyRatings
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
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]; -
addSafetyRatings
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addSafetyRatings
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
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
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]; -
addAllSafetyRatings
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]; -
clearSafetyRatings
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
removeSafetyRatings
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getSafetyRatingsBuilder
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getSafetyRatingsOrBuilder
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsOrBuilderin interfaceGenerateContentResponse.PromptFeedbackOrBuilder
-
getSafetyRatingsOrBuilderList
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getSafetyRatingsOrBuilderListin interfaceGenerateContentResponse.PromptFeedbackOrBuilder
-
addSafetyRatingsBuilder
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
addSafetyRatingsBuilder
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getSafetyRatingsBuilderList
Output only. Safety ratings.
repeated .google.cloud.aiplatform.v1.SafetyRating safety_ratings = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; -
getBlockReasonMessage
Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getBlockReasonMessagein interfaceGenerateContentResponse.PromptFeedbackOrBuilder- Returns:
- The blockReasonMessage.
-
getBlockReasonMessageBytes
public com.google.protobuf.ByteString getBlockReasonMessageBytes()Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Specified by:
getBlockReasonMessageBytesin interfaceGenerateContentResponse.PromptFeedbackOrBuilder- Returns:
- The bytes for blockReasonMessage.
-
setBlockReasonMessage
Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The blockReasonMessage to set.- Returns:
- This builder for chaining.
-
clearBlockReasonMessage
Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Returns:
- This builder for chaining.
-
setBlockReasonMessageBytes
public GenerateContentResponse.PromptFeedback.Builder setBlockReasonMessageBytes(com.google.protobuf.ByteString value) Output only. A readable block reason message.
string block_reason_message = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];- Parameters:
value- The bytes for blockReasonMessage to set.- Returns:
- This builder for chaining.
-