Package com.azure.ai.openai.models
Class AzureGroundingEnhancementLineSpan
java.lang.Object
com.azure.ai.openai.models.AzureGroundingEnhancementLineSpan
- All Implemented Interfaces:
com.azure.json.JsonSerializable<AzureGroundingEnhancementLineSpan>
public final class AzureGroundingEnhancementLineSpan
extends Object
implements com.azure.json.JsonSerializable<AzureGroundingEnhancementLineSpan>
A span object that represents a detected object and its bounding box information.
-
Method Summary
Modifier and TypeMethodDescriptionfromJson(com.azure.json.JsonReader jsonReader) Reads an instance of AzureGroundingEnhancementLineSpan from the JsonReader.intGet the length property: The length of the span in characters, measured in Unicode codepoints.intGet the offset property: The character offset within the text where the span begins.Get the polygon property: An array of objects representing points in the polygon that encloses the detected object.getText()Get the text property: The text content of the span that represents the detected object.com.azure.json.JsonWritertoJson(com.azure.json.JsonWriter jsonWriter)
-
Method Details
-
getText
Get the text property: The text content of the span that represents the detected object.- Returns:
- the text value.
-
getOffset
public int getOffset()Get the offset property: The character offset within the text where the span begins. This offset is defined as the position of the first character of the span, counting from the start of the text as Unicode codepoints.- Returns:
- the offset value.
-
getLength
public int getLength()Get the length property: The length of the span in characters, measured in Unicode codepoints.- Returns:
- the length value.
-
getPolygon
Get the polygon property: An array of objects representing points in the polygon that encloses the detected object.- Returns:
- the polygon value.
-
toJson
- Specified by:
toJsonin interfacecom.azure.json.JsonSerializable<AzureGroundingEnhancementLineSpan>- Throws:
IOException
-
fromJson
public static AzureGroundingEnhancementLineSpan fromJson(com.azure.json.JsonReader jsonReader) throws IOException Reads an instance of AzureGroundingEnhancementLineSpan from the JsonReader.- Parameters:
jsonReader- The JsonReader being read.- Returns:
- An instance of AzureGroundingEnhancementLineSpan if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.
- Throws:
IllegalStateException- If the deserialized JSON object was missing any required properties.IOException- If an error occurs while reading the AzureGroundingEnhancementLineSpan.
-