GoogleCloudDialogflowV2QueryResult.fromJson constructor

GoogleCloudDialogflowV2QueryResult.fromJson(
  1. Map json_
)

Implementation

GoogleCloudDialogflowV2QueryResult.fromJson(core.Map json_)
    : this(
        action: json_.containsKey('action')
            ? json_['action'] as core.String
            : null,
        allRequiredParamsPresent:
            json_.containsKey('allRequiredParamsPresent')
                ? json_['allRequiredParamsPresent'] as core.bool
                : null,
        cancelsSlotFilling: json_.containsKey('cancelsSlotFilling')
            ? json_['cancelsSlotFilling'] as core.bool
            : null,
        diagnosticInfo: json_.containsKey('diagnosticInfo')
            ? json_['diagnosticInfo'] as core.Map<core.String, core.dynamic>
            : null,
        fulfillmentMessages: json_.containsKey('fulfillmentMessages')
            ? (json_['fulfillmentMessages'] as core.List)
                .map((value) => GoogleCloudDialogflowV2IntentMessage.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        fulfillmentText: json_.containsKey('fulfillmentText')
            ? json_['fulfillmentText'] as core.String
            : null,
        intent: json_.containsKey('intent')
            ? GoogleCloudDialogflowV2Intent.fromJson(
                json_['intent'] as core.Map<core.String, core.dynamic>)
            : null,
        intentDetectionConfidence:
            json_.containsKey('intentDetectionConfidence')
                ? (json_['intentDetectionConfidence'] as core.num).toDouble()
                : null,
        languageCode: json_.containsKey('languageCode')
            ? json_['languageCode'] as core.String
            : null,
        outputContexts: json_.containsKey('outputContexts')
            ? (json_['outputContexts'] as core.List)
                .map((value) => GoogleCloudDialogflowV2Context.fromJson(
                    value as core.Map<core.String, core.dynamic>))
                .toList()
            : null,
        parameters: json_.containsKey('parameters')
            ? json_['parameters'] as core.Map<core.String, core.dynamic>
            : null,
        queryText: json_.containsKey('queryText')
            ? json_['queryText'] as core.String
            : null,
        sentimentAnalysisResult: json_.containsKey('sentimentAnalysisResult')
            ? GoogleCloudDialogflowV2SentimentAnalysisResult.fromJson(
                json_['sentimentAnalysisResult']
                    as core.Map<core.String, core.dynamic>)
            : null,
        speechRecognitionConfidence: json_
                .containsKey('speechRecognitionConfidence')
            ? (json_['speechRecognitionConfidence'] as core.num).toDouble()
            : null,
        webhookPayload: json_.containsKey('webhookPayload')
            ? json_['webhookPayload'] as core.Map<core.String, core.dynamic>
            : null,
        webhookSource: json_.containsKey('webhookSource')
            ? json_['webhookSource'] as core.String
            : null,
      );