public static final class GenerateContentResponse.Builder extends GeneratedMessageV3.Builder<GenerateContentResponse.Builder> implements GenerateContentResponseOrBuilder
Response message for [PredictionService.GenerateContent].
Protobuf type google.cloud.vertexai.v1beta1.GenerateContentResponse
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
addAllCandidates(Iterable<? extends Candidate> values)
public GenerateContentResponse.Builder addAllCandidates(Iterable<? extends Candidate> values)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
values |
Iterable<? extends com.google.cloud.vertexai.api.Candidate>
|
addCandidates(Candidate value)
public GenerateContentResponse.Builder addCandidates(Candidate value)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidates(Candidate.Builder builderForValue)
public GenerateContentResponse.Builder addCandidates(Candidate.Builder builderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidates(int index, Candidate value)
public GenerateContentResponse.Builder addCandidates(int index, Candidate value)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidates(int index, Candidate.Builder builderForValue)
public GenerateContentResponse.Builder addCandidates(int index, Candidate.Builder builderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidatesBuilder()
public Candidate.Builder addCandidatesBuilder()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
addCandidatesBuilder(int index)
public Candidate.Builder addCandidatesBuilder(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Overrides
build()
public GenerateContentResponse build()
buildPartial()
public GenerateContentResponse buildPartial()
clear()
public GenerateContentResponse.Builder clear()
Overrides
clearCandidates()
public GenerateContentResponse.Builder clearCandidates()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearField(Descriptors.FieldDescriptor field)
public GenerateContentResponse.Builder clearField(Descriptors.FieldDescriptor field)
Overrides
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerateContentResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Overrides
clearPromptFeedback()
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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
clearUsageMetadata()
public GenerateContentResponse.Builder clearUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
clone()
public GenerateContentResponse.Builder clone()
Overrides
getCandidates(int index)
public Candidate getCandidates(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
getCandidatesBuilder(int index)
public Candidate.Builder getCandidatesBuilder(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
getCandidatesBuilderList()
public List<Candidate.Builder> getCandidatesBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesCount()
public int getCandidatesCount()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
int |
|
getCandidatesList()
public List<Candidate> getCandidatesList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
getCandidatesOrBuilder(int index)
public CandidateOrBuilder getCandidatesOrBuilder(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
getCandidatesOrBuilderList()
public List<? extends CandidateOrBuilder> getCandidatesOrBuilderList()
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
List<? extends com.google.cloud.vertexai.api.CandidateOrBuilder> |
|
getDefaultInstanceForType()
public GenerateContentResponse getDefaultInstanceForType()
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Overrides
getPromptFeedback()
public 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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedbackBuilder()
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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getPromptFeedbackOrBuilder()
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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
getUsageMetadata()
public GenerateContentResponse.UsageMetadata getUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadataBuilder()
public GenerateContentResponse.UsageMetadata.Builder getUsageMetadataBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
getUsageMetadataOrBuilder()
public GenerateContentResponse.UsageMetadataOrBuilder getUsageMetadataOrBuilder()
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
hasPromptFeedback()
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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
Returns |
Type |
Description |
boolean |
Whether the promptFeedback field is set.
|
hasUsageMetadata()
public boolean hasUsageMetadata()
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
Returns |
Type |
Description |
boolean |
Whether the usageMetadata field is set.
|
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Overrides
isInitialized()
public final boolean isInitialized()
Overrides
mergeFrom(GenerateContentResponse other)
public GenerateContentResponse.Builder mergeFrom(GenerateContentResponse other)
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerateContentResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Overrides
mergeFrom(Message other)
public GenerateContentResponse.Builder mergeFrom(Message other)
Parameter |
Name |
Description |
other |
Message
|
Overrides
mergePromptFeedback(GenerateContentResponse.PromptFeedback value)
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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Overrides
mergeUsageMetadata(GenerateContentResponse.UsageMetadata value)
public GenerateContentResponse.Builder mergeUsageMetadata(GenerateContentResponse.UsageMetadata value)
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
removeCandidates(int index)
public GenerateContentResponse.Builder removeCandidates(int index)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
Parameter |
Name |
Description |
index |
int
|
setCandidates(int index, Candidate value)
public GenerateContentResponse.Builder setCandidates(int index, Candidate value)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setCandidates(int index, Candidate.Builder builderForValue)
public GenerateContentResponse.Builder setCandidates(int index, Candidate.Builder builderForValue)
Output only. Generated candidates.
repeated .google.cloud.vertexai.v1beta1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
setField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Overrides
setPromptFeedback(GenerateContentResponse.PromptFeedback value)
public 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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
setPromptFeedback(GenerateContentResponse.PromptFeedback.Builder builderForValue)
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.v1beta1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public GenerateContentResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Overrides
setUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Overrides
setUsageMetadata(GenerateContentResponse.UsageMetadata value)
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata value)
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue)
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue)
Usage metadata about the response(s).
.google.cloud.vertexai.v1beta1.GenerateContentResponse.UsageMetadata usage_metadata = 4;