PutBotResponse.fromJson constructor

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

Implementation

factory PutBotResponse.fromJson(Map<String, dynamic> json) {
  return PutBotResponse(
    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,
    createVersion: json['createVersion'] as bool?,
    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?,
    nluIntentConfidenceThreshold:
        json['nluIntentConfidenceThreshold'] as double?,
    status: (json['status'] as String?)?.toStatus(),
    tags: (json['tags'] as List?)
        ?.whereNotNull()
        .map((e) => Tag.fromJson(e as Map<String, dynamic>))
        .toList(),
    version: json['version'] as String?,
    voiceId: json['voiceId'] as String?,
  );
}