Class Part.Builder

java.lang.Object
com.google.genai.types.Part.Builder
Enclosing class:
Part

public abstract static class Part.Builder extends Object
Builder for Part.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • videoMetadata

      public abstract Part.Builder videoMetadata(VideoMetadata videoMetadata)
      Setter for videoMetadata.

      videoMetadata: Metadata for a given video.

    • videoMetadata

      public Part.Builder videoMetadata(VideoMetadata.Builder videoMetadataBuilder)
      Setter for videoMetadata builder.

      videoMetadata: Metadata for a given video.

    • thought

      public abstract Part.Builder thought(boolean thought)
      Setter for thought.

      thought: Indicates if the part is thought from the model.

    • inlineData

      public abstract Part.Builder inlineData(Blob inlineData)
      Setter for inlineData.

      inlineData: Optional. Inlined bytes data.

    • inlineData

      public Part.Builder inlineData(Blob.Builder inlineDataBuilder)
      Setter for inlineData builder.

      inlineData: Optional. Inlined bytes data.

    • fileData

      public abstract Part.Builder fileData(FileData fileData)
      Setter for fileData.

      fileData: Optional. URI based data.

    • fileData

      public Part.Builder fileData(FileData.Builder fileDataBuilder)
      Setter for fileData builder.

      fileData: Optional. URI based data.

    • thoughtSignature

      public abstract Part.Builder thoughtSignature(byte[] thoughtSignature)
      Setter for thoughtSignature.

      thoughtSignature: An opaque signature for the thought so it can be reused in subsequent requests.

    • functionCall

      public abstract Part.Builder functionCall(FunctionCall functionCall)
      Setter for functionCall.

      functionCall: A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.

    • functionCall

      public Part.Builder functionCall(FunctionCall.Builder functionCallBuilder)
      Setter for functionCall builder.

      functionCall: A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing the parameters and their values.

    • codeExecutionResult

      public abstract Part.Builder codeExecutionResult(CodeExecutionResult codeExecutionResult)
      Setter for codeExecutionResult.

      codeExecutionResult: Optional. Result of executing the [ExecutableCode].

    • codeExecutionResult

      public Part.Builder codeExecutionResult(CodeExecutionResult.Builder codeExecutionResultBuilder)
      Setter for codeExecutionResult builder.

      codeExecutionResult: Optional. Result of executing the [ExecutableCode].

    • executableCode

      public abstract Part.Builder executableCode(ExecutableCode executableCode)
      Setter for executableCode.

      executableCode: Optional. Code generated by the model that is meant to be executed.

    • executableCode

      public Part.Builder executableCode(ExecutableCode.Builder executableCodeBuilder)
      Setter for executableCode builder.

      executableCode: Optional. Code generated by the model that is meant to be executed.

    • functionResponse

      public abstract Part.Builder functionResponse(FunctionResponse functionResponse)
      Setter for functionResponse.

      functionResponse: Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

    • functionResponse

      public Part.Builder functionResponse(FunctionResponse.Builder functionResponseBuilder)
      Setter for functionResponse builder.

      functionResponse: Optional. The result output of a [FunctionCall] that contains a string representing the [FunctionDeclaration.name] and a structured JSON object containing any output from the function call. It is used as context to the model.

    • text

      public abstract Part.Builder text(String text)
      Setter for text.

      text: Optional. Text part (can be code).

    • build

      public abstract Part build()