Class Candidate.Builder (1.11.0)

public static final class Candidate.Builder extends GeneratedMessageV3.Builder<Candidate.Builder> implements CandidateOrBuilder

A response candidate generated from the model.

Protobuf type google.cloud.vertexai.v1.Candidate

Implements

CandidateOrBuilder

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllSafetyRatings(Iterable<? extends SafetyRating> values)

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];

Parameter
Name Description
values Iterable<? extends com.google.cloud.vertexai.api.SafetyRating>
Returns
Type Description
Candidate.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public Candidate.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Candidate.Builder
Overrides

addSafetyRatings(SafetyRating value)

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];

Parameter
Name Description
value SafetyRating
Returns
Type Description
Candidate.Builder

addSafetyRatings(SafetyRating.Builder builderForValue)

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];

Parameter
Name Description
builderForValue SafetyRating.Builder
Returns
Type Description
Candidate.Builder

addSafetyRatings(int index, SafetyRating value)

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];

Parameters
Name Description
index int
value SafetyRating
Returns
Type Description
Candidate.Builder

addSafetyRatings(int index, SafetyRating.Builder builderForValue)

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];

Parameters
Name Description
index int
builderForValue SafetyRating.Builder
Returns
Type Description
Candidate.Builder

addSafetyRatingsBuilder()

public 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];

Returns
Type Description
SafetyRating.Builder

addSafetyRatingsBuilder(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
SafetyRating.Builder

build()

public Candidate build()
Returns
Type Description
Candidate

buildPartial()

public Candidate buildPartial()
Returns
Type Description
Candidate

clear()

public Candidate.Builder clear()
Returns
Type Description
Candidate.Builder
Overrides

clearAvgLogprobs()

public Candidate.Builder clearAvgLogprobs()

Output only. Average log probability score of the candidate.

double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Candidate.Builder

This builder for chaining.

clearCitationMetadata()

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];

Returns
Type Description
Candidate.Builder

clearContent()

public Candidate.Builder clearContent()

Output only. Content parts of the candidate.

.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Candidate.Builder

clearField(Descriptors.FieldDescriptor field)

public Candidate.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
Candidate.Builder
Overrides

clearFinishMessage()

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];

Returns
Type Description
Candidate.Builder

This builder for chaining.

clearFinishReason()

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];

Returns
Type Description
Candidate.Builder

This builder for chaining.

clearGroundingMetadata()

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];

Returns
Type Description
Candidate.Builder

clearIndex()

public Candidate.Builder clearIndex()

Output only. Index of the candidate.

int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Candidate.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public Candidate.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
Candidate.Builder
Overrides

clearSafetyRatings()

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];

Returns
Type Description
Candidate.Builder

clearScore()

public Candidate.Builder clearScore()

Output only. Confidence score of the candidate.

double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Candidate.Builder

This builder for chaining.

clone()

public Candidate.Builder clone()
Returns
Type Description
Candidate.Builder
Overrides

getAvgLogprobs()

public double getAvgLogprobs()

Output only. Average log probability score of the candidate.

double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
double

The avgLogprobs.

getCitationMetadata()

public CitationMetadata getCitationMetadata()

Output only. Source attribution of the generated content.

.google.cloud.vertexai.v1.CitationMetadata citation_metadata = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
CitationMetadata

The citationMetadata.

getCitationMetadataBuilder()

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];

Returns
Type Description
CitationMetadata.Builder

getCitationMetadataOrBuilder()

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];

Returns
Type Description
CitationMetadataOrBuilder

getContent()

public Content getContent()

Output only. Content parts of the candidate.

.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Content

The content.

getContentBuilder()

public Content.Builder getContentBuilder()

Output only. Content parts of the candidate.

.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
Content.Builder

getContentOrBuilder()

public ContentOrBuilder getContentOrBuilder()

Output only. Content parts of the candidate.

.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
ContentOrBuilder

getDefaultInstanceForType()

public Candidate getDefaultInstanceForType()
Returns
Type Description
Candidate

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFinishMessage()

public 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];

Returns
Type Description
String

The finishMessage.

getFinishMessageBytes()

public 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];

Returns
Type Description
ByteString

The bytes for finishMessage.

getFinishReason()

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];

Returns
Type Description
Candidate.FinishReason

The finishReason.

getFinishReasonValue()

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];

Returns
Type Description
int

The enum numeric value on the wire for finishReason.

getGroundingMetadata()

public 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];

Returns
Type Description
GroundingMetadata

The groundingMetadata.

getGroundingMetadataBuilder()

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];

Returns
Type Description
GroundingMetadata.Builder

getGroundingMetadataOrBuilder()

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];

Returns
Type Description
GroundingMetadataOrBuilder

getIndex()

public int getIndex()

Output only. Index of the candidate.

int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
int

The index.

getSafetyRatings(int index)

public 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];

Parameter
Name Description
index int
Returns
Type Description
SafetyRating

getSafetyRatingsBuilder(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
SafetyRating.Builder

getSafetyRatingsBuilderList()

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];

Returns
Type Description
List<Builder>

getSafetyRatingsCount()

public 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];

Returns
Type Description
int

getSafetyRatingsList()

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];

Returns
Type Description
List<SafetyRating>

getSafetyRatingsOrBuilder(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
SafetyRatingOrBuilder

getSafetyRatingsOrBuilderList()

public 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];

Returns
Type Description
List<? extends com.google.cloud.vertexai.api.SafetyRatingOrBuilder>

getScore()

public double getScore()

Output only. Confidence score of the candidate.

double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
double

The score.

hasCitationMetadata()

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];

Returns
Type Description
boolean

Whether the citationMetadata field is set.

hasContent()

public boolean hasContent()

Output only. Content parts of the candidate.

.google.cloud.vertexai.v1.Content content = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];

Returns
Type Description
boolean

Whether the content field is set.

hasFinishMessage()

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];

Returns
Type Description
boolean

Whether the finishMessage field is set.

hasGroundingMetadata()

public 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];

Returns
Type Description
boolean

Whether the groundingMetadata field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeCitationMetadata(CitationMetadata value)

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];

Parameter
Name Description
value CitationMetadata
Returns
Type Description
Candidate.Builder

mergeContent(Content value)

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];

Parameter
Name Description
value Content
Returns
Type Description
Candidate.Builder

mergeFrom(Candidate other)

public Candidate.Builder mergeFrom(Candidate other)
Parameter
Name Description
other Candidate
Returns
Type Description
Candidate.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public Candidate.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
Candidate.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public Candidate.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
Candidate.Builder
Overrides

mergeGroundingMetadata(GroundingMetadata value)

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];

Parameter
Name Description
value GroundingMetadata
Returns
Type Description
Candidate.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final Candidate.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Candidate.Builder
Overrides

removeSafetyRatings(int index)

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];

Parameter
Name Description
index int
Returns
Type Description
Candidate.Builder

setAvgLogprobs(double value)

public Candidate.Builder setAvgLogprobs(double value)

Output only. Average log probability score of the candidate.

double avg_logprobs = 9 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value double

The avgLogprobs to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setCitationMetadata(CitationMetadata value)

public 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];

Parameter
Name Description
value CitationMetadata
Returns
Type Description
Candidate.Builder

setCitationMetadata(CitationMetadata.Builder builderForValue)

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];

Parameter
Name Description
builderForValue CitationMetadata.Builder
Returns
Type Description
Candidate.Builder

setContent(Content value)

public 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];

Parameter
Name Description
value Content
Returns
Type Description
Candidate.Builder

setContent(Content.Builder builderForValue)

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];

Parameter
Name Description
builderForValue Content.Builder
Returns
Type Description
Candidate.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public Candidate.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
Candidate.Builder
Overrides

setFinishMessage(String value)

public 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];

Parameter
Name Description
value String

The finishMessage to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setFinishMessageBytes(ByteString value)

public Candidate.Builder setFinishMessageBytes(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];

Parameter
Name Description
value ByteString

The bytes for finishMessage to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setFinishReason(Candidate.FinishReason value)

public 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];

Parameter
Name Description
value Candidate.FinishReason

The finishReason to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setFinishReasonValue(int value)

public 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];

Parameter
Name Description
value int

The enum numeric value on the wire for finishReason to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setGroundingMetadata(GroundingMetadata value)

public 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];

Parameter
Name Description
value GroundingMetadata
Returns
Type Description
Candidate.Builder

setGroundingMetadata(GroundingMetadata.Builder builderForValue)

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];

Parameter
Name Description
builderForValue GroundingMetadata.Builder
Returns
Type Description
Candidate.Builder

setIndex(int value)

public Candidate.Builder setIndex(int value)

Output only. Index of the candidate.

int32 index = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value int

The index to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public Candidate.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
Candidate.Builder
Overrides

setSafetyRatings(int index, SafetyRating value)

public 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];

Parameters
Name Description
index int
value SafetyRating
Returns
Type Description
Candidate.Builder

setSafetyRatings(int index, SafetyRating.Builder builderForValue)

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];

Parameters
Name Description
index int
builderForValue SafetyRating.Builder
Returns
Type Description
Candidate.Builder

setScore(double value)

public Candidate.Builder setScore(double value)

Output only. Confidence score of the candidate.

double score = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];

Parameter
Name Description
value double

The score to set.

Returns
Type Description
Candidate.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final Candidate.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
Candidate.Builder
Overrides