public static final class GenerateContentResponse.Builder extends GeneratedMessageV3.Builder<GenerateContentResponse.Builder> implements GenerateContentResponseOrBuilderResponse message for [PredictionService.GenerateContent].
Protobuf type google.cloud.vertexai.v1.GenerateContentResponse
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > GenerateContentResponse.BuilderImplements
GenerateContentResponseOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllCandidates(Iterable<? extends Candidate> values)
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];
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.cloud.vertexai.api.Candidate> |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
addCandidates(Candidate value)
public GenerateContentResponse.Builder addCandidates(Candidate value)Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
Candidate |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
addCandidates(Candidate.Builder builderForValue)
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];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Candidate.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
addCandidates(int index, Candidate value)
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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Candidate |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
addCandidates(int index, Candidate.Builder builderForValue)
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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Candidate.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
addCandidatesBuilder()
public Candidate.Builder addCandidatesBuilder()Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Candidate.Builder |
|
addCandidatesBuilder(int index)
public Candidate.Builder addCandidatesBuilder(int index)Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Candidate.Builder |
|
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
build()
public GenerateContentResponse build()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse |
|
buildPartial()
public GenerateContentResponse buildPartial()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse |
|
clear()
public GenerateContentResponse.Builder clear()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
clearCandidates()
public GenerateContentResponse.Builder clearCandidates()Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
clearCreateTime()
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];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
clearField(Descriptors.FieldDescriptor field)
public GenerateContentResponse.Builder clearField(Descriptors.FieldDescriptor field)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
clearModelVersion()
public GenerateContentResponse.Builder clearModelVersion()Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
public GenerateContentResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
clearResponseId()
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];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
This builder for chaining. |
clearUsageMetadata()
public GenerateContentResponse.Builder clearUsageMetadata()Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
clone()
public GenerateContentResponse.Builder clone()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
getCandidates(int index)
public Candidate getCandidates(int index)Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Candidate |
|
getCandidatesBuilder(int index)
public Candidate.Builder getCandidatesBuilder(int index)Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
Candidate.Builder |
|
getCandidatesBuilderList()
public List<Candidate.Builder> getCandidatesBuilderList()Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getCandidatesCount()
public int getCandidatesCount()Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.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.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
List<Candidate> |
|
getCandidatesOrBuilder(int index)
public CandidateOrBuilder getCandidatesOrBuilder(int index)Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
CandidateOrBuilder |
|
getCandidatesOrBuilderList()
public List<? extends CandidateOrBuilder> getCandidatesOrBuilderList()Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.cloud.vertexai.api.CandidateOrBuilder> |
|
getCreateTime()
public 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];
| Returns | |
|---|---|
| Type | Description |
Timestamp |
The createTime. |
getCreateTimeBuilder()
public 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];
| Returns | |
|---|---|
| Type | Description |
Builder |
|
getCreateTimeOrBuilder()
public 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];
| Returns | |
|---|---|
| Type | Description |
TimestampOrBuilder |
|
getDefaultInstanceForType()
public GenerateContentResponse getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getModelVersion()
public String getModelVersion()Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
String |
The modelVersion. |
getModelVersionBytes()
public ByteString getModelVersionBytes()Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for modelVersion. |
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback |
The promptFeedback. |
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedback.Builder |
|
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.PromptFeedbackOrBuilder |
|
getResponseId()
public 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];
| Returns | |
|---|---|
| Type | Description |
String |
The responseId. |
getResponseIdBytes()
public 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];
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for responseId. |
getUsageMetadata()
public GenerateContentResponse.UsageMetadata getUsageMetadata()Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.UsageMetadata |
The usageMetadata. |
getUsageMetadataBuilder()
public GenerateContentResponse.UsageMetadata.Builder getUsageMetadataBuilder()Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.UsageMetadata.Builder |
|
getUsageMetadataOrBuilder()
public GenerateContentResponse.UsageMetadataOrBuilder getUsageMetadataOrBuilder()Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.UsageMetadataOrBuilder |
|
hasCreateTime()
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];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the createTime field is set. |
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.v1.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.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the usageMetadata field is set. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeCreateTime(Timestamp value)
public GenerateContentResponse.Builder mergeCreateTime(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];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
mergeFrom(GenerateContentResponse other)
public GenerateContentResponse.Builder mergeFrom(GenerateContentResponse other)| Parameter | |
|---|---|
| Name | Description |
other |
GenerateContentResponse |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public GenerateContentResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public GenerateContentResponse.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
GenerateContentResponse.PromptFeedback |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
mergeUsageMetadata(GenerateContentResponse.UsageMetadata value)
public GenerateContentResponse.Builder mergeUsageMetadata(GenerateContentResponse.UsageMetadata value)Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
GenerateContentResponse.UsageMetadata |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
removeCandidates(int index)
public GenerateContentResponse.Builder removeCandidates(int index)Output only. Generated candidates.
repeated .google.cloud.vertexai.v1.Candidate candidates = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setCandidates(int index, Candidate value)
public 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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
Candidate |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setCandidates(int index, Candidate.Builder builderForValue)
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];
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
Candidate.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setCreateTime(Timestamp value)
public GenerateContentResponse.Builder setCreateTime(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];
| Parameter | |
|---|---|
| Name | Description |
value |
Timestamp |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setCreateTime(Timestamp.Builder builderForValue)
public GenerateContentResponse.Builder setCreateTime(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];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
public GenerateContentResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setModelVersion(String value)
public 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];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe modelVersion to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
This builder for chaining. |
setModelVersionBytes(ByteString value)
public GenerateContentResponse.Builder setModelVersionBytes(ByteString value)Output only. The model version used to generate the response.
string model_version = 11 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for modelVersion to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
This builder for chaining. |
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
GenerateContentResponse.PromptFeedback |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
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.v1.GenerateContentResponse.PromptFeedback prompt_feedback = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
GenerateContentResponse.PromptFeedback.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public GenerateContentResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setResponseId(String value)
public 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];
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe responseId to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
This builder for chaining. |
setResponseIdBytes(ByteString value)
public GenerateContentResponse.Builder setResponseIdBytes(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];
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for responseId to set. |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
This builder for chaining. |
setUnknownFields(UnknownFieldSet unknownFields)
public final GenerateContentResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setUsageMetadata(GenerateContentResponse.UsageMetadata value)
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata value)Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
GenerateContentResponse.UsageMetadata |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|
setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue)
public GenerateContentResponse.Builder setUsageMetadata(GenerateContentResponse.UsageMetadata.Builder builderForValue)Usage metadata about the response(s).
.google.cloud.vertexai.v1.GenerateContentResponse.UsageMetadata usage_metadata = 4;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
GenerateContentResponse.UsageMetadata.Builder |
| Returns | |
|---|---|
| Type | Description |
GenerateContentResponse.Builder |
|