SessionConfiguration Class

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

Implements

public final class SessionConfiguration
implements JsonSerializable<SessionConfiguration>

Session defaults applied to sessions created for a hosted agent version.

Constructor Summary

Constructor Description
SessionConfiguration()

Creates an instance of SessionConfiguration class.

Method Summary

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

Reads an instance of SessionConfiguration from the JsonReader.

Duration getIdleTimeoutSeconds()

Get the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended.

SessionConfiguration setIdleTimeoutSeconds(Duration idleTimeoutSeconds)

Set the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended.

JsonWriter toJson(JsonWriter jsonWriter)

Methods inherited from java.lang.Object

Constructor Details

SessionConfiguration

public SessionConfiguration()

Creates an instance of SessionConfiguration class.

Method Details

fromJson

public static SessionConfiguration fromJson(JsonReader jsonReader)

Reads an instance of SessionConfiguration from the JsonReader.

Parameters:

jsonReader - The JsonReader being read.

Returns:

An instance of SessionConfiguration 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 SessionConfiguration.

getIdleTimeoutSeconds

public Duration getIdleTimeoutSeconds()

Get the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended. When omitted, the server defaults to 900 seconds. Must be between 120 and 14400 seconds (4 hours).

Returns:

the idleTimeoutSeconds value.

setIdleTimeoutSeconds

public SessionConfiguration setIdleTimeoutSeconds(Duration idleTimeoutSeconds)

Set the idleTimeoutSeconds property: The idle duration, in seconds, before a session's sandbox is suspended. When omitted, the server defaults to 900 seconds. Must be between 120 and 14400 seconds (4 hours).

Parameters:

idleTimeoutSeconds - the idleTimeoutSeconds value to set.

Returns:

the SessionConfiguration object itself.

toJson

public JsonWriter toJson(JsonWriter jsonWriter)

Parameters:

jsonWriter

Throws:

Applies to