GetIntentResponse.fromJson constructor

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

Implementation

factory GetIntentResponse.fromJson(Map<String, dynamic> json) {
  return GetIntentResponse(
    checksum: json['checksum'] as String?,
    conclusionStatement: json['conclusionStatement'] != null
        ? Statement.fromJson(
            json['conclusionStatement'] as Map<String, dynamic>)
        : null,
    confirmationPrompt: json['confirmationPrompt'] != null
        ? Prompt.fromJson(json['confirmationPrompt'] as Map<String, dynamic>)
        : null,
    createdDate: timeStampFromJson(json['createdDate']),
    description: json['description'] as String?,
    dialogCodeHook: json['dialogCodeHook'] != null
        ? CodeHook.fromJson(json['dialogCodeHook'] as Map<String, dynamic>)
        : null,
    followUpPrompt: json['followUpPrompt'] != null
        ? FollowUpPrompt.fromJson(
            json['followUpPrompt'] as Map<String, dynamic>)
        : null,
    fulfillmentActivity: json['fulfillmentActivity'] != null
        ? FulfillmentActivity.fromJson(
            json['fulfillmentActivity'] as Map<String, dynamic>)
        : null,
    inputContexts: (json['inputContexts'] as List?)
        ?.whereNotNull()
        .map((e) => InputContext.fromJson(e as Map<String, dynamic>))
        .toList(),
    kendraConfiguration: json['kendraConfiguration'] != null
        ? KendraConfiguration.fromJson(
            json['kendraConfiguration'] as Map<String, dynamic>)
        : null,
    lastUpdatedDate: timeStampFromJson(json['lastUpdatedDate']),
    name: json['name'] as String?,
    outputContexts: (json['outputContexts'] as List?)
        ?.whereNotNull()
        .map((e) => OutputContext.fromJson(e as Map<String, dynamic>))
        .toList(),
    parentIntentSignature: json['parentIntentSignature'] as String?,
    rejectionStatement: json['rejectionStatement'] != null
        ? Statement.fromJson(
            json['rejectionStatement'] as Map<String, dynamic>)
        : null,
    sampleUtterances: (json['sampleUtterances'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    slots: (json['slots'] as List?)
        ?.whereNotNull()
        .map((e) => Slot.fromJson(e as Map<String, dynamic>))
        .toList(),
    version: json['version'] as String?,
  );
}