Class GenerateContentResponse.Builder
-
- All Implemented Interfaces:
public abstract class GenerateContentResponse.BuilderBuilder for GenerateContentResponse.
-
-
Constructor Summary
Constructors Constructor Description GenerateContentResponse.Builder()
-
Method Summary
-
-
Method Detail
-
sdkHttpResponse
abstract GenerateContentResponse.Builder sdkHttpResponse(HttpResponse sdkHttpResponse)
Setter for sdkHttpResponse.
sdkHttpResponse: Used to retain the full HTTP response.
-
sdkHttpResponse
@CanIgnoreReturnValue() GenerateContentResponse.Builder sdkHttpResponse(HttpResponse.Builder sdkHttpResponseBuilder)
Setter for sdkHttpResponse builder.
sdkHttpResponse: Used to retain the full HTTP response.
-
clearSdkHttpResponse
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearSdkHttpResponse()
Clears the value of sdkHttpResponse field.
-
candidates
abstract GenerateContentResponse.Builder candidates(List<Candidate> candidates)
Setter for candidates.
candidates: Response variations returned by the model.
-
candidates
@CanIgnoreReturnValue() GenerateContentResponse.Builder candidates(Array<Candidate> candidates)
Setter for candidates.
candidates: Response variations returned by the model.
-
candidates
@CanIgnoreReturnValue() GenerateContentResponse.Builder candidates(Array<Candidate.Builder> candidatesBuilders)
Setter for candidates builder.
candidates: Response variations returned by the model.
-
clearCandidates
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearCandidates()
Clears the value of candidates field.
-
createTime
abstract GenerateContentResponse.Builder createTime(Instant createTime)
Setter for createTime.
createTime: Timestamp when the request is made to the server.
-
clearCreateTime
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearCreateTime()
Clears the value of createTime field.
-
automaticFunctionCallingHistory
abstract GenerateContentResponse.Builder automaticFunctionCallingHistory(List<Content> automaticFunctionCallingHistory)
Setter for automaticFunctionCallingHistory.
automaticFunctionCallingHistory: The history of automatic function calling.
-
automaticFunctionCallingHistory
@CanIgnoreReturnValue() GenerateContentResponse.Builder automaticFunctionCallingHistory(Array<Content> automaticFunctionCallingHistory)
Setter for automaticFunctionCallingHistory.
automaticFunctionCallingHistory: The history of automatic function calling.
-
automaticFunctionCallingHistory
@CanIgnoreReturnValue() GenerateContentResponse.Builder automaticFunctionCallingHistory(Array<Content.Builder> automaticFunctionCallingHistoryBuilders)
Setter for automaticFunctionCallingHistory builder.
automaticFunctionCallingHistory: The history of automatic function calling.
-
clearAutomaticFunctionCallingHistory
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearAutomaticFunctionCallingHistory()
Clears the value of automaticFunctionCallingHistory field.
-
modelVersion
abstract GenerateContentResponse.Builder modelVersion(String modelVersion)
Setter for modelVersion.
modelVersion: Output only. The model version used to generate the response.
-
clearModelVersion
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearModelVersion()
Clears the value of modelVersion field.
-
promptFeedback
abstract GenerateContentResponse.Builder promptFeedback(GenerateContentResponsePromptFeedback promptFeedback)
Setter for promptFeedback.
promptFeedback: 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.
-
promptFeedback
@CanIgnoreReturnValue() GenerateContentResponse.Builder promptFeedback(GenerateContentResponsePromptFeedback.Builder promptFeedbackBuilder)
Setter for promptFeedback builder.
promptFeedback: 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.
-
clearPromptFeedback
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearPromptFeedback()
Clears the value of promptFeedback field.
-
responseId
abstract GenerateContentResponse.Builder responseId(String responseId)
Setter for responseId.
responseId: Output only. response_id is used to identify each response. It is the encoding of the event_id.
-
clearResponseId
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearResponseId()
Clears the value of responseId field.
-
usageMetadata
abstract GenerateContentResponse.Builder usageMetadata(GenerateContentResponseUsageMetadata usageMetadata)
Setter for usageMetadata.
usageMetadata: Usage metadata about the response(s).
-
usageMetadata
@CanIgnoreReturnValue() GenerateContentResponse.Builder usageMetadata(GenerateContentResponseUsageMetadata.Builder usageMetadataBuilder)
Setter for usageMetadata builder.
usageMetadata: Usage metadata about the response(s).
-
clearUsageMetadata
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearUsageMetadata()
Clears the value of usageMetadata field.
-
modelStatus
abstract GenerateContentResponse.Builder modelStatus(ModelStatus modelStatus)
Setter for modelStatus.
modelStatus: Output only. The current model status of this model. This field is not supported in Vertex AI.
-
modelStatus
@CanIgnoreReturnValue() GenerateContentResponse.Builder modelStatus(ModelStatus.Builder modelStatusBuilder)
Setter for modelStatus builder.
modelStatus: Output only. The current model status of this model. This field is not supported in Vertex AI.
-
clearModelStatus
@CanIgnoreReturnValue() GenerateContentResponse.Builder clearModelStatus()
Clears the value of modelStatus field.
-
build
abstract GenerateContentResponse build()
-
-
-
-