GetSessionResponse.fromJson constructor
GetSessionResponse.fromJson(
- Map<String, dynamic> json
)
Implementation
factory GetSessionResponse.fromJson(Map<String, dynamic> json) {
return GetSessionResponse(
activeContexts: (json['activeContexts'] as List?)
?.whereNotNull()
.map((e) => ActiveContext.fromJson(e as Map<String, dynamic>))
.toList(),
dialogAction: json['dialogAction'] != null
? DialogAction.fromJson(json['dialogAction'] as Map<String, dynamic>)
: null,
recentIntentSummaryView: (json['recentIntentSummaryView'] as List?)
?.whereNotNull()
.map((e) => IntentSummary.fromJson(e as Map<String, dynamic>))
.toList(),
sessionAttributes: (json['sessionAttributes'] as Map<String, dynamic>?)
?.map((k, e) => MapEntry(k, e as String)),
sessionId: json['sessionId'] as String?,
);
}