Class GenerateContentResponse.Builder
- Enclosing class:
- GenerateContentResponse
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionautomaticFunctionCallingHistory(Content... automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.automaticFunctionCallingHistory(Content.Builder... automaticFunctionCallingHistoryBuilders) Setter for automaticFunctionCallingHistory builder.abstract GenerateContentResponse.BuilderautomaticFunctionCallingHistory(List<Content> automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.abstract GenerateContentResponsebuild()candidates(Candidate... candidates) Setter for candidates.candidates(Candidate.Builder... candidatesBuilders) Setter for candidates builder.abstract GenerateContentResponse.Buildercandidates(List<Candidate> candidates) Setter for candidates.Clears the value of automaticFunctionCallingHistory field.Clears the value of candidates field.Clears the value of createTime field.Clears the value of modelVersion field.Clears the value of promptFeedback field.Clears the value of responseId field.Clears the value of sdkHttpResponse field.Clears the value of usageMetadata field.abstract GenerateContentResponse.BuildercreateTime(Instant createTime) Setter for createTime.abstract GenerateContentResponse.BuildermodelVersion(String modelVersion) Setter for modelVersion.abstract GenerateContentResponse.BuilderpromptFeedback(GenerateContentResponsePromptFeedback promptFeedback) Setter for promptFeedback.promptFeedback(GenerateContentResponsePromptFeedback.Builder promptFeedbackBuilder) Setter for promptFeedback builder.abstract GenerateContentResponse.BuilderresponseId(String responseId) Setter for responseId.abstract GenerateContentResponse.BuildersdkHttpResponse(HttpResponse sdkHttpResponse) Setter for sdkHttpResponse.sdkHttpResponse(HttpResponse.Builder sdkHttpResponseBuilder) Setter for sdkHttpResponse builder.abstract GenerateContentResponse.BuilderusageMetadata(GenerateContentResponseUsageMetadata usageMetadata) Setter for usageMetadata.usageMetadata(GenerateContentResponseUsageMetadata.Builder usageMetadataBuilder) Setter for usageMetadata builder.
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
sdkHttpResponse
Setter for sdkHttpResponse.sdkHttpResponse: Used to retain the full HTTP response.
-
sdkHttpResponse
@CanIgnoreReturnValue public GenerateContentResponse.Builder sdkHttpResponse(HttpResponse.Builder sdkHttpResponseBuilder) Setter for sdkHttpResponse builder.sdkHttpResponse: Used to retain the full HTTP response.
-
clearSdkHttpResponse
Clears the value of sdkHttpResponse field. -
candidates
Setter for candidates.candidates: Response variations returned by the model.
-
candidates
Setter for candidates.candidates: Response variations returned by the model.
-
candidates
@CanIgnoreReturnValue public GenerateContentResponse.Builder candidates(Candidate.Builder... candidatesBuilders) Setter for candidates builder.candidates: Response variations returned by the model.
-
clearCandidates
Clears the value of candidates field. -
createTime
Setter for createTime.createTime: Timestamp when the request is made to the server.
-
clearCreateTime
Clears the value of createTime field. -
automaticFunctionCallingHistory
public abstract GenerateContentResponse.Builder automaticFunctionCallingHistory(List<Content> automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.automaticFunctionCallingHistory: The history of automatic function calling.
-
automaticFunctionCallingHistory
@CanIgnoreReturnValue public GenerateContentResponse.Builder automaticFunctionCallingHistory(Content... automaticFunctionCallingHistory) Setter for automaticFunctionCallingHistory.automaticFunctionCallingHistory: The history of automatic function calling.
-
automaticFunctionCallingHistory
@CanIgnoreReturnValue public GenerateContentResponse.Builder automaticFunctionCallingHistory(Content.Builder... automaticFunctionCallingHistoryBuilders) Setter for automaticFunctionCallingHistory builder.automaticFunctionCallingHistory: The history of automatic function calling.
-
clearAutomaticFunctionCallingHistory
Clears the value of automaticFunctionCallingHistory field. -
modelVersion
Setter for modelVersion.modelVersion: Output only. The model version used to generate the response.
-
clearModelVersion
Clears the value of modelVersion field. -
promptFeedback
public 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 public 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
Clears the value of promptFeedback field. -
responseId
Setter for responseId.responseId: Output only. response_id is used to identify each response. It is the encoding of the event_id.
-
clearResponseId
Clears the value of responseId field. -
usageMetadata
public abstract GenerateContentResponse.Builder usageMetadata(GenerateContentResponseUsageMetadata usageMetadata) Setter for usageMetadata.usageMetadata: Usage metadata about the response(s).
-
usageMetadata
@CanIgnoreReturnValue public GenerateContentResponse.Builder usageMetadata(GenerateContentResponseUsageMetadata.Builder usageMetadataBuilder) Setter for usageMetadata builder.usageMetadata: Usage metadata about the response(s).
-
clearUsageMetadata
Clears the value of usageMetadata field. -
build
-