Package com.google.genai.types
Class Segment
java.lang.Object
com.google.genai.JsonSerializable
com.google.genai.types.Segment
Segment of the content.
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Segment.Builder
builder()
Instantiates a builder for Segment.endIndex()
Output only.static Segment
Deserializes a JSON string to a Segment object.Output only.Output only.text()
Output only.abstract Segment.Builder
Creates a builder with the same values as this instance.Methods inherited from class com.google.genai.JsonSerializable
stringToJsonNode, toJson
-
Constructor Details
-
Segment
public Segment()
-
-
Method Details
-
endIndex
Output only. End index in the given Part, measured in bytes. Offset from the start of the Part, exclusive, starting at zero. -
partIndex
Output only. The index of a Part object within its parent Content object. -
startIndex
Output only. Start index in the given Part, measured in bytes. Offset from the start of the Part, inclusive, starting at zero. -
text
Output only. The text corresponding to the segment from the response. -
builder
Instantiates a builder for Segment. -
toBuilder
Creates a builder with the same values as this instance. -
fromJson
Deserializes a JSON string to a Segment object.
-