Class Part.Builder
-
- All Implemented Interfaces:
public abstract class Part.BuilderBuilder for Part.
-
-
Constructor Summary
Constructors Constructor Description Part.Builder()
-
Method Summary
Modifier and Type Method Description abstract Part.BuildermediaResolution(PartMediaResolution mediaResolution)Setter for mediaResolution. Part.BuildermediaResolution(PartMediaResolution.Builder mediaResolutionBuilder)Setter for mediaResolution builder. Part.BuilderclearMediaResolution()Clears the value of mediaResolution field. abstract Part.BuildercodeExecutionResult(CodeExecutionResult codeExecutionResult)Setter for codeExecutionResult. Part.BuildercodeExecutionResult(CodeExecutionResult.Builder codeExecutionResultBuilder)Setter for codeExecutionResult builder. Part.BuilderclearCodeExecutionResult()Clears the value of codeExecutionResult field. abstract Part.BuilderexecutableCode(ExecutableCode executableCode)Setter for executableCode. Part.BuilderexecutableCode(ExecutableCode.Builder executableCodeBuilder)Setter for executableCode builder. Part.BuilderclearExecutableCode()Clears the value of executableCode field. abstract Part.BuilderfileData(FileData fileData)Setter for fileData. Part.BuilderfileData(FileData.Builder fileDataBuilder)Setter for fileData builder. Part.BuilderclearFileData()Clears the value of fileData field. abstract Part.BuilderfunctionCall(FunctionCall functionCall)Setter for functionCall. Part.BuilderfunctionCall(FunctionCall.Builder functionCallBuilder)Setter for functionCall builder. Part.BuilderclearFunctionCall()Clears the value of functionCall field. abstract Part.BuilderfunctionResponse(FunctionResponse functionResponse)Setter for functionResponse. Part.BuilderfunctionResponse(FunctionResponse.Builder functionResponseBuilder)Setter for functionResponse builder. Part.BuilderclearFunctionResponse()Clears the value of functionResponse field. abstract Part.BuilderinlineData(Blob inlineData)Setter for inlineData. Part.BuilderinlineData(Blob.Builder inlineDataBuilder)Setter for inlineData builder. Part.BuilderclearInlineData()Clears the value of inlineData field. abstract Part.Buildertext(String text)Setter for text. Part.BuilderclearText()Clears the value of text field. abstract Part.Builderthought(boolean thought)Setter for thought. Part.BuilderclearThought()Clears the value of thought field. abstract Part.BuilderthoughtSignature(Array<byte> thoughtSignature)Setter for thoughtSignature. Part.BuilderclearThoughtSignature()Clears the value of thoughtSignature field. abstract Part.BuildervideoMetadata(VideoMetadata videoMetadata)Setter for videoMetadata. Part.BuildervideoMetadata(VideoMetadata.Builder videoMetadataBuilder)Setter for videoMetadata builder. Part.BuilderclearVideoMetadata()Clears the value of videoMetadata field. abstract Part.BuildertoolCall(ToolCall toolCall)Setter for toolCall. Part.BuildertoolCall(ToolCall.Builder toolCallBuilder)Setter for toolCall builder. Part.BuilderclearToolCall()Clears the value of toolCall field. abstract Part.BuildertoolResponse(ToolResponse toolResponse)Setter for toolResponse. Part.BuildertoolResponse(ToolResponse.Builder toolResponseBuilder)Setter for toolResponse builder. Part.BuilderclearToolResponse()Clears the value of toolResponse field. abstract Part.BuilderpartMetadata(Map<String, Object> partMetadata)Setter for partMetadata. Part.BuilderclearPartMetadata()Clears the value of partMetadata field. abstract Partbuild()-
-
Method Detail
-
mediaResolution
abstract Part.Builder mediaResolution(PartMediaResolution mediaResolution)
Setter for mediaResolution.
mediaResolution: Media resolution for the input media.
-
mediaResolution
@CanIgnoreReturnValue() Part.Builder mediaResolution(PartMediaResolution.Builder mediaResolutionBuilder)
Setter for mediaResolution builder.
mediaResolution: Media resolution for the input media.
-
clearMediaResolution
@CanIgnoreReturnValue() Part.Builder clearMediaResolution()
Clears the value of mediaResolution field.
-
codeExecutionResult
abstract Part.Builder codeExecutionResult(CodeExecutionResult codeExecutionResult)
Setter for codeExecutionResult.
codeExecutionResult: Optional. The result of executing the ExecutableCode.
-
codeExecutionResult
@CanIgnoreReturnValue() Part.Builder codeExecutionResult(CodeExecutionResult.Builder codeExecutionResultBuilder)
Setter for codeExecutionResult builder.
codeExecutionResult: Optional. The result of executing the ExecutableCode.
-
clearCodeExecutionResult
@CanIgnoreReturnValue() Part.Builder clearCodeExecutionResult()
Clears the value of codeExecutionResult field.
-
executableCode
abstract Part.Builder executableCode(ExecutableCode executableCode)
Setter for executableCode.
executableCode: Optional. Code generated by the model that is intended to be executed.
-
executableCode
@CanIgnoreReturnValue() Part.Builder executableCode(ExecutableCode.Builder executableCodeBuilder)
Setter for executableCode builder.
executableCode: Optional. Code generated by the model that is intended to be executed.
-
clearExecutableCode
@CanIgnoreReturnValue() Part.Builder clearExecutableCode()
Clears the value of executableCode field.
-
fileData
abstract Part.Builder fileData(FileData fileData)
Setter for fileData.
fileData: Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
-
fileData
@CanIgnoreReturnValue() Part.Builder fileData(FileData.Builder fileDataBuilder)
Setter for fileData builder.
fileData: Optional. The URI-based data of the part. This can be used to include files from Google Cloud Storage.
-
clearFileData
@CanIgnoreReturnValue() Part.Builder clearFileData()
Clears the value of fileData field.
-
functionCall
abstract Part.Builder functionCall(FunctionCall functionCall)
Setter for functionCall.
functionCall: Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
-
functionCall
@CanIgnoreReturnValue() Part.Builder functionCall(FunctionCall.Builder functionCallBuilder)
Setter for functionCall builder.
functionCall: Optional. A predicted function call returned from the model. This contains the name of the function to call and the arguments to pass to the function.
-
clearFunctionCall
@CanIgnoreReturnValue() Part.Builder clearFunctionCall()
Clears the value of functionCall field.
-
functionResponse
abstract Part.Builder functionResponse(FunctionResponse functionResponse)
Setter for functionResponse.
functionResponse: Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
-
functionResponse
@CanIgnoreReturnValue() Part.Builder functionResponse(FunctionResponse.Builder functionResponseBuilder)
Setter for functionResponse builder.
functionResponse: Optional. The result of a function call. This is used to provide the model with the result of a function call that it predicted.
-
clearFunctionResponse
@CanIgnoreReturnValue() Part.Builder clearFunctionResponse()
Clears the value of functionResponse field.
-
inlineData
abstract Part.Builder inlineData(Blob inlineData)
Setter for inlineData.
inlineData: Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
-
inlineData
@CanIgnoreReturnValue() Part.Builder inlineData(Blob.Builder inlineDataBuilder)
Setter for inlineData builder.
inlineData: Optional. The inline data content of the part. This can be used to include images, audio, or video in a request.
-
clearInlineData
@CanIgnoreReturnValue() Part.Builder clearInlineData()
Clears the value of inlineData field.
-
text
abstract Part.Builder text(String text)
Setter for text.
text: Optional. The text content of the part. When sent from the VSCode Gemini Code Assist extension, references to @mentioned items will be converted to markdown boldface text. For example `@my-repo` will be converted to and sent as `**my-repo**` by the IDE agent.
-
clearText
@CanIgnoreReturnValue() Part.Builder clearText()
Clears the value of text field.
-
thought
abstract Part.Builder thought(boolean thought)
Setter for thought.
thought: Optional. Indicates whether the `part` represents the model's thought process or reasoning.
-
clearThought
@CanIgnoreReturnValue() Part.Builder clearThought()
Clears the value of thought field.
-
thoughtSignature
abstract Part.Builder thoughtSignature(Array<byte> thoughtSignature)
Setter for thoughtSignature.
thoughtSignature: Optional. An opaque signature for the thought so it can be reused in subsequent requests.
-
clearThoughtSignature
@CanIgnoreReturnValue() Part.Builder clearThoughtSignature()
Clears the value of thoughtSignature field.
-
videoMetadata
abstract Part.Builder videoMetadata(VideoMetadata videoMetadata)
Setter for videoMetadata.
videoMetadata: Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
-
videoMetadata
@CanIgnoreReturnValue() Part.Builder videoMetadata(VideoMetadata.Builder videoMetadataBuilder)
Setter for videoMetadata builder.
videoMetadata: Optional. Video metadata. The metadata should only be specified while the video data is presented in inline_data or file_data.
-
clearVideoMetadata
@CanIgnoreReturnValue() Part.Builder clearVideoMetadata()
Clears the value of videoMetadata field.
-
toolCall
abstract Part.Builder toolCall(ToolCall toolCall)
Setter for toolCall.
toolCall: Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API.
-
toolCall
@CanIgnoreReturnValue() Part.Builder toolCall(ToolCall.Builder toolCallBuilder)
Setter for toolCall builder.
toolCall: Server-side tool call. This field is populated when the model predicts a tool invocation that should be executed on the server. The client is expected to echo this message back to the API.
-
clearToolCall
@CanIgnoreReturnValue() Part.Builder clearToolCall()
Clears the value of toolCall field.
-
toolResponse
abstract Part.Builder toolResponse(ToolResponse toolResponse)
Setter for toolResponse.
toolResponse: The output from a server-side ToolCall execution. This field is populated by the client with the results of executing the corresponding ToolCall.
-
toolResponse
@CanIgnoreReturnValue() Part.Builder toolResponse(ToolResponse.Builder toolResponseBuilder)
Setter for toolResponse builder.
toolResponse: The output from a server-side ToolCall execution. This field is populated by the client with the results of executing the corresponding ToolCall.
-
clearToolResponse
@CanIgnoreReturnValue() Part.Builder clearToolResponse()
Clears the value of toolResponse field.
-
partMetadata
abstract Part.Builder partMetadata(Map<String, Object> partMetadata)
Setter for partMetadata.
partMetadata: Custom metadata associated with the Part. Agents using genai.Part as content representation may need to keep track of the additional information. For example it can be name of a file/source from which the Part originates or a way to multiplex multiple Part streams. This field is not supported in Vertex AI.
-
clearPartMetadata
@CanIgnoreReturnValue() Part.Builder clearPartMetadata()
Clears the value of partMetadata field.
-
-
-
-