SessionAffinityConfiguration Class

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

Implements

public final class SessionAffinityConfiguration
implements JsonSerializable<SessionAffinityConfiguration>

Request settings that control Model Router session affinity.

Constructor Summary

Constructor Description
SessionAffinityConfiguration()

Creates an instance of SessionAffinityConfiguration class.

Method Summary

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

Reads an instance of SessionAffinityConfiguration from the JsonReader.

SessionAffinityRequestMode getMode()

Get the mode property: Controls whether Model Router applies session affinity to this request.

String getSessionId()

Get the sessionId property: An opaque, application-owned conversation identifier.

SessionAffinityConfiguration setMode(SessionAffinityRequestMode mode)

Set the mode property: Controls whether Model Router applies session affinity to this request.

SessionAffinityConfiguration setSessionId(String sessionId)

Set the sessionId property: An opaque, application-owned conversation identifier.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SessionAffinityConfiguration

public SessionAffinityConfiguration()

Creates an instance of SessionAffinityConfiguration class.

Method Details

fromJson

public static SessionAffinityConfiguration fromJson(JsonReader jsonReader)

Reads an instance of SessionAffinityConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

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

Throws:

IOException

- If an error occurs while reading the SessionAffinityConfiguration.

getMode

public SessionAffinityRequestMode getMode()

Get the mode property: Controls whether Model Router applies session affinity to this request.

Returns:

the mode value.

getSessionId

public String getSessionId()

Get the sessionId property: An opaque, application-owned conversation identifier. Use the same value for related requests. The value is not returned in the response and must not contain secrets or personally identifiable information.

Returns:

the sessionId value.

setMode

public SessionAffinityConfiguration setMode(SessionAffinityRequestMode mode)

Set the mode property: Controls whether Model Router applies session affinity to this request.

Parameters:

mode - the mode value to set.

Returns:

the SessionAffinityConfiguration object itself.

setSessionId

public SessionAffinityConfiguration setSessionId(String sessionId)

Set the sessionId property: An opaque, application-owned conversation identifier. Use the same value for related requests. The value is not returned in the response and must not contain secrets or personally identifiable information.

Parameters:

sessionId - the sessionId value to set.

Returns:

the SessionAffinityConfiguration object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to