CreateBotVersionResponse.fromJson constructor

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

Implementation

factory CreateBotVersionResponse.fromJson(Map<String, dynamic> json) {
  return CreateBotVersionResponse(
    abortStatement: json['abortStatement'] != null
        ? Statement.fromJson(json['abortStatement'] as Map<String, dynamic>)
        : null,
    checksum: json['checksum'] as String?,
    childDirected: json['childDirected'] as bool?,
    clarificationPrompt: json['clarificationPrompt'] != null
        ? Prompt.fromJson(json['clarificationPrompt'] as Map<String, dynamic>)
        : null,
    createdDate: timeStampFromJson(json['createdDate']),
    description: json['description'] as String?,
    detectSentiment: json['detectSentiment'] as bool?,
    enableModelImprovements: json['enableModelImprovements'] as bool?,
    failureReason: json['failureReason'] as String?,
    idleSessionTTLInSeconds: json['idleSessionTTLInSeconds'] as int?,
    intents: (json['intents'] as List?)
        ?.whereNotNull()
        .map((e) => Intent.fromJson(e as Map<String, dynamic>))
        .toList(),
    lastUpdatedDate: timeStampFromJson(json['lastUpdatedDate']),
    locale: (json['locale'] as String?)?.toLocale(),
    name: json['name'] as String?,
    status: (json['status'] as String?)?.toStatus(),
    version: json['version'] as String?,
    voiceId: json['voiceId'] as String?,
  );
}