Class ChatSession
-
- All Implemented Interfaces:
public final class ChatSession
Represents a ChatKit session and its resolved configuration.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public final class
ChatSession.Builder
A builder for ChatSession.
-
Method Summary
Modifier and Type Method Description final String
id()
Identifier for the ChatKit session. final ChatSessionChatKitConfiguration
chatkitConfiguration()
Resolved ChatKit feature configuration for the session. final String
clientSecret()
Ephemeral client secret that authenticates session requests. final Long
expiresAt()
Unix timestamp (in seconds) for when the session expires. final Long
maxRequestsPer1Minute()
Convenience copy of the per-minute request limit. final JsonValue
_object_()
Type discriminator that is always chatkit.session
.final ChatSessionRateLimits
rateLimits()
Resolved rate limit values. final ChatSessionStatus
status()
Current lifecycle state of the session. final String
user()
User identifier associated with the session. final ChatKitWorkflow
workflow()
Workflow metadata for the session. final JsonField<String>
_id()
Returns the raw JSON value of id. final JsonField<ChatSessionChatKitConfiguration>
_chatkitConfiguration()
Returns the raw JSON value of chatkitConfiguration. final JsonField<String>
_clientSecret()
Returns the raw JSON value of clientSecret. final JsonField<Long>
_expiresAt()
Returns the raw JSON value of expiresAt. final JsonField<Long>
_maxRequestsPer1Minute()
Returns the raw JSON value of maxRequestsPer1Minute. final JsonField<ChatSessionRateLimits>
_rateLimits()
Returns the raw JSON value of rateLimits. final JsonField<ChatSessionStatus>
_status()
Returns the raw JSON value of status. final JsonField<String>
_user()
Returns the raw JSON value of user. final JsonField<ChatKitWorkflow>
_workflow()
Returns the raw JSON value of workflow. final Map<String, JsonValue>
_additionalProperties()
final ChatSession.Builder
toBuilder()
final ChatSession
validate()
final Boolean
isValid()
Boolean
equals(Object other)
Integer
hashCode()
String
toString()
final static ChatSession.Builder
builder()
Returns a mutable builder for constructing an instance of ChatSession. -
-
Method Detail
-
chatkitConfiguration
final ChatSessionChatKitConfiguration chatkitConfiguration()
Resolved ChatKit feature configuration for the session.
-
clientSecret
final String clientSecret()
Ephemeral client secret that authenticates session requests.
-
maxRequestsPer1Minute
final Long maxRequestsPer1Minute()
Convenience copy of the per-minute request limit.
-
_object_
final JsonValue _object_()
Type discriminator that is always
chatkit.session
.Expected to always return the following:
JsonValue.from("chatkit.session")
However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).
-
rateLimits
final ChatSessionRateLimits rateLimits()
Resolved rate limit values.
-
status
final ChatSessionStatus status()
Current lifecycle state of the session.
-
workflow
final ChatKitWorkflow workflow()
Workflow metadata for the session.
-
_id
final JsonField<String> _id()
Returns the raw JSON value of id.
Unlike id, this method doesn't throw if the JSON field has an unexpected type.
-
_chatkitConfiguration
final JsonField<ChatSessionChatKitConfiguration> _chatkitConfiguration()
Returns the raw JSON value of chatkitConfiguration.
Unlike chatkitConfiguration, this method doesn't throw if the JSON field has an unexpected type.
-
_clientSecret
final JsonField<String> _clientSecret()
Returns the raw JSON value of clientSecret.
Unlike clientSecret, this method doesn't throw if the JSON field has an unexpected type.
-
_expiresAt
final JsonField<Long> _expiresAt()
Returns the raw JSON value of expiresAt.
Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.
-
_maxRequestsPer1Minute
final JsonField<Long> _maxRequestsPer1Minute()
Returns the raw JSON value of maxRequestsPer1Minute.
Unlike maxRequestsPer1Minute, this method doesn't throw if the JSON field has an unexpected type.
-
_rateLimits
final JsonField<ChatSessionRateLimits> _rateLimits()
Returns the raw JSON value of rateLimits.
Unlike rateLimits, this method doesn't throw if the JSON field has an unexpected type.
-
_status
final JsonField<ChatSessionStatus> _status()
Returns the raw JSON value of status.
Unlike status, this method doesn't throw if the JSON field has an unexpected type.
-
_user
final JsonField<String> _user()
Returns the raw JSON value of user.
Unlike user, this method doesn't throw if the JSON field has an unexpected type.
-
_workflow
final JsonField<ChatKitWorkflow> _workflow()
Returns the raw JSON value of workflow.
Unlike workflow, this method doesn't throw if the JSON field has an unexpected type.
-
_additionalProperties
final Map<String, JsonValue> _additionalProperties()
-
toBuilder
final ChatSession.Builder toBuilder()
-
validate
final ChatSession validate()
-
builder
final static ChatSession.Builder builder()
Returns a mutable builder for constructing an instance of ChatSession.
The following fields are required:
.id() .chatkitConfiguration() .clientSecret() .expiresAt() .maxRequestsPer1Minute() .rateLimits() .status() .user() .workflow()
-
-
-
-