Class Part


public abstract class Part extends JsonSerializable
A datatype containing media content.

Exactly one field within a Part should be set, representing the specific type of content being conveyed. Using multiple fields within the same `Part` instance is considered invalid.

  • Constructor Details

    • Part

      public Part()
  • Method Details

    • videoMetadata

      public abstract Optional<VideoMetadata> videoMetadata()
      Metadata for a given video.
    • thought

      public abstract Optional<Boolean> thought()
      Indicates if the part is thought from the model.
    • codeExecutionResult

      public abstract Optional<CodeExecutionResult> codeExecutionResult()
      Optional. Result of executing the [ExecutableCode].
    • executableCode

      public abstract Optional<ExecutableCode> executableCode()
      Optional. Code generated by the model that is meant to be executed.
    • fileData

      public abstract Optional<FileData> fileData()
      Optional. URI based data.
    • functionCall

      public abstract Optional<FunctionCall> functionCall()
      Optional. A predicted [FunctionCall] returned from the model that contains a string representing the [FunctionDeclaration.name] with the parameters and their values.
    • functionResponse

      public abstract Optional<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.
    • inlineData

      public abstract Optional<Blob> inlineData()
      Optional. Inlined bytes data.
    • text

      public abstract Optional<String> text()
      Optional. Text part (can be code).
    • builder

      public static Part.Builder builder()
      Instantiates a builder for Part.
    • toBuilder

      public abstract Part.Builder toBuilder()
      Creates a builder with the same values as this instance.
    • fromJson

      public static Part fromJson(String jsonString)
      Deserializes a JSON string to a Part object.