SessionResource.fromJson constructor

SessionResource.fromJson(
  1. Map<String, dynamic> json
)

Implementation

factory SessionResource.fromJson(Map<String, dynamic> json) {
  return SessionResource(
    id: json['id'] as String,
    title: json['title'] as String?,
    sessionStatus: _parseSessionStatus(json['session_status'] as String),
    environmentId: json['environment_id'] as String,
    createdAt: json['created_at'] as String,
    updatedAt: json['updated_at'] as String,
    sessionContext: SessionContext.fromJson(
      json['session_context'] as Map<String, dynamic>,
    ),
  );
}