Package com.google.genai.types
Class Segment
-
- All Implemented Interfaces:
public abstract class Segment extends JsonSerializable
Segment of the content this support belongs to.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public abstract classSegment.BuilderBuilder for Segment.
-
Field Summary
Fields Modifier and Type Field Description public final static StringMAX_READ_LENGTH_PROPERTY
-
Constructor Summary
Constructors Constructor Description Segment()
-
Method Summary
Modifier and Type Method Description abstract Optional<Integer>startIndex()Output only. abstract Optional<Integer>endIndex()Output only. abstract Optional<Integer>partIndex()Output only. abstract Optional<String>text()Output only. static Segment.Builderbuilder()Instantiates a builder for Segment. abstract Segment.BuildertoBuilder()Creates a builder with the same values as this instance. static SegmentfromJson(String jsonString)Deserializes a JSON string to a Segment object. -
Methods inherited from class com.google.genai.JsonSerializable
fromJsonNode, fromJsonString, objectMapper, setMaxReadLength, stringToJsonNode, toJson, toJsonNode, toJsonString -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
startIndex
abstract Optional<Integer> startIndex()
Output only. Start index in the given Part, measured in bytes.
Offset from the start of the Part, inclusive, starting at zero.
-
endIndex
abstract Optional<Integer> endIndex()
Output only. End index in the given Part, measured in bytes.
Offset from the start of the Part, exclusive, starting at zero.
-
partIndex
abstract Optional<Integer> partIndex()
Output only. The index of a Part object within its parent Content object.
-
text
abstract Optional<String> text()
Output only. The text corresponding to the segment from the response.
-
builder
static Segment.Builder builder()
Instantiates a builder for Segment.
-
toBuilder
abstract Segment.Builder toBuilder()
Creates a builder with the same values as this instance.
-
-
-
-