public static final class GenerateContentResponse.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder> implements GenerateContentResponseOrBuilder
Response message for [PredictionService.GenerateContent].Protobuf type
google.cloud.vertexai.v1.GenerateContentResponsegetAllFields, 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<GenerateContentResponse.Builder>public GenerateContentResponse.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.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<GenerateContentResponse.Builder>public GenerateContentResponse getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic GenerateContentResponse build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic GenerateContentResponse buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic GenerateContentResponse.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder>public GenerateContentResponse.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<GenerateContentResponse.Builder>public GenerateContentResponse.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder>public GenerateContentResponse.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder>public GenerateContentResponse.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<GenerateContentResponse.Builder>public GenerateContentResponse.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<GenerateContentResponse.Builder>public GenerateContentResponse.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<GenerateContentResponse.Builder>public GenerateContentResponse.Builder mergeFrom(GenerateContentResponse other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder>public GenerateContentResponse.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<GenerateContentResponse.Builder>IOExceptionpublic List<Candidate> getCandidatesList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesList in interface GenerateContentResponseOrBuilderpublic int getCandidatesCount()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesCount in interface GenerateContentResponseOrBuilderpublic Candidate getCandidates(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidates in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.Builder setCandidates(int index, Candidate value)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder setCandidates(int index, Candidate.Builder builderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder addCandidates(Candidate value)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder addCandidates(int index, Candidate value)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder addCandidates(Candidate.Builder builderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder addCandidates(int index, Candidate.Builder builderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder addAllCandidates(Iterable<? extends Candidate> values)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder clearCandidates()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder removeCandidates(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder getCandidatesBuilder(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public CandidateOrBuilder getCandidatesOrBuilder(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesOrBuilder in interface GenerateContentResponseOrBuilderpublic List<? extends CandidateOrBuilder> getCandidatesOrBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesOrBuilderList in interface GenerateContentResponseOrBuilderpublic Candidate.Builder addCandidatesBuilder()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public Candidate.Builder addCandidatesBuilder(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public List<Candidate.Builder> getCandidatesBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
public String getModelVersion()
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];getModelVersion in interface GenerateContentResponseOrBuilderpublic com.google.protobuf.ByteString getModelVersionBytes()
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];getModelVersionBytes in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.Builder setModelVersion(String value)
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The modelVersion to set.public GenerateContentResponse.Builder clearModelVersion()
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];public GenerateContentResponse.Builder setModelVersionBytes(com.google.protobuf.ByteString value)
Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The bytes for modelVersion to set.public boolean hasCreateTime()
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasCreateTime in interface GenerateContentResponseOrBuilderpublic com.google.protobuf.Timestamp getCreateTime()
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTime in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.Builder setCreateTime(com.google.protobuf.Timestamp value)
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue)
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder mergeCreateTime(com.google.protobuf.Timestamp value)
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder clearCreateTime()
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder()
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder()
Output only. Timestamp when the request is made to the server.
.google.protobuf.Timestamp create_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCreateTimeOrBuilder in interface GenerateContentResponseOrBuilderpublic String getResponseId()
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];getResponseId in interface GenerateContentResponseOrBuilderpublic com.google.protobuf.ByteString getResponseIdBytes()
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];getResponseIdBytes in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.Builder setResponseId(String value)
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The responseId to set.public GenerateContentResponse.Builder clearResponseId()
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];public GenerateContentResponse.Builder setResponseIdBytes(com.google.protobuf.ByteString value)
Output only. response_id is used to identify each response. It is the encoding of the event_id.
string response_id = 13 [(.google.api.field_behavior) = OUTPUT_ONLY];value - The bytes for responseId to set.public boolean hasPromptFeedback()
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
hasPromptFeedback in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.PromptFeedback getPromptFeedback()
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedback in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.Builder setPromptFeedback(GenerateContentResponse.PromptFeedback value)
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder setPromptFeedback(GenerateContentResponse.PromptFeedback.Builder builderForValue)
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder mergePromptFeedback(GenerateContentResponse.PromptFeedback value)
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.Builder clearPromptFeedback()
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.PromptFeedback.Builder getPromptFeedbackBuilder()
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
public GenerateContentResponse.PromptFeedbackOrBuilder getPromptFeedbackOrBuilder()
Output only. Content filter results for a prompt sent in the request. Note: Sent only in the first stream chunk. Only happens when no candidates were generated due to content violations.
.google.cloud.vertexai.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedbackOrBuilder in interface GenerateContentResponseOrBuilderpublic boolean hasUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
hasUsageMetadata in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.UsageMetadata getUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadata in interface GenerateContentResponseOrBuilderpublic GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata value)
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue)
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
public GenerateContentResponse.Builder mergeUsageMetadata(GenerateContentResponse.UsageMetadata value)
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
public GenerateContentResponse.Builder clearUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
public GenerateContentResponse.UsageMetadata.Builder getUsageMetadataBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
public GenerateContentResponse.UsageMetadataOrBuilder getUsageMetadataOrBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadataOrBuilder in interface GenerateContentResponseOrBuilderpublic final GenerateContentResponse.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder>public final GenerateContentResponse.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<GenerateContentResponse.Builder>Copyright © 2025 Google LLC. All rights reserved.