Class SpreadsheetMetadata

java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.SpreadsheetMetadata

public abstract class SpreadsheetMetadata extends JsonSerializable
Metadata describes the input spreadsheet content.

Set this in `Part.spreadsheet_metadata` or `FunctionResponsePart.spreadsheet_metadata` when `inline_data` or `file_data` contains a spreadsheet to configure static spreadsheet preprocessing.

  • Constructor Details

    • SpreadsheetMetadata

      public SpreadsheetMetadata()
  • Method Details

    • visibleCells

      public abstract Optional<String> visibleCells()
      Optional. The range of cells to extract, in A1 notation (e.g. "A1:D10"). If not set, the full occupied area of the sheet is used.
    • sheetIndex

      public abstract Optional<Integer> sheetIndex()
      Optional. The 1-indexed index of the sheet to extract, in workbook order. If not set, all sheets are extracted.
    • contentLayers

      public abstract Optional<List<SpreadsheetMetadataContentLayer>> contentLayers()
      Content layers to return. If empty, defaults to [DATA, FORMULAS] when SpreadsheetMetadata is set.
    • builder

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

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

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