Class Segment.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • endIndex

      public abstract Segment.Builder endIndex(Integer endIndex)
      Setter for endIndex.

      endIndex: Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero.

    • partIndex

      public abstract Segment.Builder partIndex(Integer partIndex)
      Setter for partIndex.

      partIndex: Output only. The index of a Part object within its parent Content object.

    • startIndex

      public abstract Segment.Builder startIndex(Integer startIndex)
      Setter for startIndex.

      startIndex: Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero.

    • text

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

      text: Output only. The text corresponding to the segment from the response.

    • build

      public abstract Segment build()