public static final class Candidate.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder> implements CandidateOrBuilder
A response candidate generated from the model.Protobuf type
google.cloud.vertexai.v1.CandidategetAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapField, internalGetMapFieldReflection, internalGetMutableMapField, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic Candidate build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic Candidate buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic Candidate.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Candidate.Builder>public Candidate.Builder mergeFrom(Candidate other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public Candidate.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<Candidate.Builder>IOExceptionpublic int getIndex()
Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];getIndex in interface CandidateOrBuilderpublic Candidate.Builder setIndex(int value)
Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The index to set.public Candidate.Builder clearIndex()
Output only. Index of the candidate.
int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];public boolean hasContent()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasContent in interface CandidateOrBuilderpublic Content getContent()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContent in interface CandidateOrBuilderpublic Candidate.Builder setContent(Content value)
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder setContent(Content.Builder builderForValue)
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder mergeContent(Content value)
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder clearContent()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Content.Builder getContentBuilder()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public ContentOrBuilder getContentOrBuilder()
Output only. Content parts of the candidate.
.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getContentOrBuilder in interface CandidateOrBuilderpublic double getScore()
Output only. Confidence score of the candidate.
double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];getScore in interface CandidateOrBuilderpublic Candidate.Builder setScore(double value)
Output only. Confidence score of the candidate.
double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The score to set.public Candidate.Builder clearScore()
Output only. Confidence score of the candidate.
double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];public double getAvgLogprobs()
Output only. Average log probability score of the candidate.
double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];getAvgLogprobs in interface CandidateOrBuilderpublic Candidate.Builder setAvgLogprobs(double value)
Output only. Average log probability score of the candidate.
double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The avgLogprobs to set.public Candidate.Builder clearAvgLogprobs()
Output only. Average log probability score of the candidate.
double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];public int getFinishReasonValue()
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getFinishReasonValue in interface CandidateOrBuilderpublic Candidate.Builder setFinishReasonValue(int value)
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
value - The enum numeric value on the wire for finishReason to set.public Candidate.FinishReason getFinishReason()
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getFinishReason in interface CandidateOrBuilderpublic Candidate.Builder setFinishReason(Candidate.FinishReason value)
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
value - The finishReason to set.public Candidate.Builder clearFinishReason()
Output only. The reason why the model stopped generating tokens. If empty, the model has not stopped generating the tokens.
.google.cloud.vertexai.v1.Candidate.FinishReason finish_reason = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public List<SafetyRating> getSafetyRatingsList()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsList in interface CandidateOrBuilderpublic int getSafetyRatingsCount()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsCount in interface CandidateOrBuilderpublic SafetyRating getSafetyRatings(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatings in interface CandidateOrBuilderpublic Candidate.Builder setSafetyRatings(int index, SafetyRating value)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder setSafetyRatings(int index, SafetyRating.Builder builderForValue)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder addSafetyRatings(SafetyRating value)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder addSafetyRatings(int index, SafetyRating value)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder addSafetyRatings(SafetyRating.Builder builderForValue)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder addSafetyRatings(int index, SafetyRating.Builder builderForValue)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder addAllSafetyRatings(Iterable<? extends SafetyRating> values)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder clearSafetyRatings()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder removeSafetyRatings(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public SafetyRating.Builder getSafetyRatingsBuilder(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public SafetyRatingOrBuilder getSafetyRatingsOrBuilder(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsOrBuilder in interface CandidateOrBuilderpublic List<? extends SafetyRatingOrBuilder> getSafetyRatingsOrBuilderList()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
getSafetyRatingsOrBuilderList in interface CandidateOrBuilderpublic SafetyRating.Builder addSafetyRatingsBuilder()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public SafetyRating.Builder addSafetyRatingsBuilder(int index)
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public List<SafetyRating.Builder> getSafetyRatingsBuilderList()
Output only. List of ratings for the safety of a response candidate. There is at most one rating per category.
repeated .google.cloud.vertexai.v1.SafetyRating safety_ratings = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
public boolean hasFinishMessage()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];hasFinishMessage in interface CandidateOrBuilderpublic String getFinishMessage()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];getFinishMessage in interface CandidateOrBuilderpublic com.google.protobuf.ByteString getFinishMessageBytes()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];getFinishMessageBytes in interface CandidateOrBuilderpublic Candidate.Builder setFinishMessage(String value)
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The finishMessage to set.public Candidate.Builder clearFinishMessage()
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];public Candidate.Builder setFinishMessageBytes(com.google.protobuf.ByteString value)
Output only. Describes the reason the mode stopped generating tokens in more detail. This is only filled when `finish_reason` is set.
optional string finish_message = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The bytes for finishMessage to set.public boolean hasCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCitationMetadata in interface CandidateOrBuilderpublic CitationMetadata getCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCitationMetadata in interface CandidateOrBuilderpublic Candidate.Builder setCitationMetadata(CitationMetadata value)
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder setCitationMetadata(CitationMetadata.Builder builderForValue)
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder mergeCitationMetadata(CitationMetadata value)
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder clearCitationMetadata()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public CitationMetadata.Builder getCitationMetadataBuilder()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
public CitationMetadataOrBuilder getCitationMetadataOrBuilder()
Output only. Source attribution of the generated content.
.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCitationMetadataOrBuilder in interface CandidateOrBuilderpublic boolean hasGroundingMetadata()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasGroundingMetadata in interface CandidateOrBuilderpublic GroundingMetadata getGroundingMetadata()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGroundingMetadata in interface CandidateOrBuilderpublic Candidate.Builder setGroundingMetadata(GroundingMetadata value)
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder setGroundingMetadata(GroundingMetadata.Builder builderForValue)
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder mergeGroundingMetadata(GroundingMetadata value)
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder clearGroundingMetadata()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GroundingMetadata.Builder getGroundingMetadataBuilder()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GroundingMetadataOrBuilder getGroundingMetadataOrBuilder()
Output only. Metadata specifies sources used to ground generated content.
.google.cloud.vertexai.v1.GroundingMetadata grounding_metadata = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];
getGroundingMetadataOrBuilder in interface CandidateOrBuilderpublic final Candidate.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>public final Candidate.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Candidate.Builder>Copyright © 2024 Google LLC. All rights reserved.