SessionAffinityDetails Class

  • java.lang.Object
    • com.azure.ai.agents.models.SessionAffinityDetails

Implements

public final class SessionAffinityDetails
implements JsonSerializable<SessionAffinityDetails>

Effective Model Router session affinity metadata for a request.

Method Summary

Modifier and Type Method and Description
static SessionAffinityDetails fromJson(JsonReader jsonReader)

Reads an instance of SessionAffinityDetails from the JsonReader.

SessionAffinityDecision getDecision()

Get the decision property: The final affinity outcome for the model that served the response.

SessionAffinityMode getMode()

Get the mode property: The effective session affinity mode.

SessionAffinitySource getSource()

Get the source property: The identity source selected after applying precedence.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Method Details

fromJson

public static SessionAffinityDetails fromJson(JsonReader jsonReader)

Reads an instance of SessionAffinityDetails from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SessionAffinityDetails if the JsonReader was pointing to an instance of it, or null if it was pointing to JSON null.

Throws:

IOException

- If the deserialized JSON object was missing any required properties.

getDecision

public SessionAffinityDecision getDecision()

Get the decision property: The final affinity outcome for the model that served the response. Omitted when affinity is disabled or no usable identity was available.

Returns:

the decision value.

getMode

public SessionAffinityMode getMode()

Get the mode property: The effective session affinity mode.

Returns:

the mode value.

getSource

public SessionAffinitySource getSource()

Get the source property: The identity source selected after applying precedence. `conversation` and `previous_response_id` apply only to the Responses API. Omitted when affinity is disabled.

Returns:

the source value.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to