packages feed

gogol-dialogflow-1.0.0: gen/Gogol/DialogFlow/Internal/Product.hs

{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DerivingStrategies #-}
{-# LANGUAGE DuplicateRecordFields #-}
{-# LANGUAGE ImportQualifiedPost #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE PatternSynonyms #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE StrictData #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-name-shadowing #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
{-# OPTIONS_GHC -fno-warn-unused-matches #-}

-- |
-- Module      : Gogol.DialogFlow.Internal.Product
-- Copyright   : (c) 2015-2025 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+gogol@gmail.com>
--               Toni Cebrián <toni@tonicebrian.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
module Gogol.DialogFlow.Internal.Product
  ( -- * GoogleCloudDialogflowCxV3AdvancedSettings
    GoogleCloudDialogflowCxV3AdvancedSettings (..),
    newGoogleCloudDialogflowCxV3AdvancedSettings,

    -- * GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
    GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings (..),
    newGoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings,

    -- * GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
    GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings (..),
    newGoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings,

    -- * GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings (..),
    newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings,

    -- * GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models (..),
    newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models,

    -- * GoogleCloudDialogflowCxV3Agent
    GoogleCloudDialogflowCxV3Agent (..),
    newGoogleCloudDialogflowCxV3Agent,

    -- * GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
    GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings (..),
    newGoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings,

    -- * GoogleCloudDialogflowCxV3AgentClientCertificateSettings
    GoogleCloudDialogflowCxV3AgentClientCertificateSettings (..),
    newGoogleCloudDialogflowCxV3AgentClientCertificateSettings,

    -- * GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
    GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings (..),
    newGoogleCloudDialogflowCxV3AgentGenAppBuilderSettings,

    -- * GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettings (..),
    newGoogleCloudDialogflowCxV3AgentGitIntegrationSettings,

    -- * GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings (..),
    newGoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings,

    -- * GoogleCloudDialogflowCxV3AgentPersonalizationSettings
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings (..),
    newGoogleCloudDialogflowCxV3AgentPersonalizationSettings,

    -- * GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata (..),
    newGoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata,

    -- * GoogleCloudDialogflowCxV3AgentValidationResult
    GoogleCloudDialogflowCxV3AgentValidationResult (..),
    newGoogleCloudDialogflowCxV3AgentValidationResult,

    -- * GoogleCloudDialogflowCxV3AnswerFeedback
    GoogleCloudDialogflowCxV3AnswerFeedback (..),
    newGoogleCloudDialogflowCxV3AnswerFeedback,

    -- * GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
    GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason (..),
    newGoogleCloudDialogflowCxV3AnswerFeedbackRatingReason,

    -- * GoogleCloudDialogflowCxV3AudioInput
    GoogleCloudDialogflowCxV3AudioInput (..),
    newGoogleCloudDialogflowCxV3AudioInput,

    -- * GoogleCloudDialogflowCxV3BargeInConfig
    GoogleCloudDialogflowCxV3BargeInConfig (..),
    newGoogleCloudDialogflowCxV3BargeInConfig,

    -- * GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
    GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest (..),
    newGoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest,

    -- * GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
    GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata (..),
    newGoogleCloudDialogflowCxV3BatchRunTestCasesMetadata,

    -- * GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
    GoogleCloudDialogflowCxV3BatchRunTestCasesRequest (..),
    newGoogleCloudDialogflowCxV3BatchRunTestCasesRequest,

    -- * GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
    GoogleCloudDialogflowCxV3BatchRunTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3BatchRunTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3BoostSpec
    GoogleCloudDialogflowCxV3BoostSpec (..),
    newGoogleCloudDialogflowCxV3BoostSpec,

    -- * GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec (..),
    newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec,

    -- * GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec (..),
    newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec,

    -- * GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint (..),
    newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint,

    -- * GoogleCloudDialogflowCxV3BoostSpecs
    GoogleCloudDialogflowCxV3BoostSpecs (..),
    newGoogleCloudDialogflowCxV3BoostSpecs,

    -- * GoogleCloudDialogflowCxV3CalculateCoverageResponse
    GoogleCloudDialogflowCxV3CalculateCoverageResponse (..),
    newGoogleCloudDialogflowCxV3CalculateCoverageResponse,

    -- * GoogleCloudDialogflowCxV3Changelog
    GoogleCloudDialogflowCxV3Changelog (..),
    newGoogleCloudDialogflowCxV3Changelog,

    -- * GoogleCloudDialogflowCxV3CompareVersionsRequest
    GoogleCloudDialogflowCxV3CompareVersionsRequest (..),
    newGoogleCloudDialogflowCxV3CompareVersionsRequest,

    -- * GoogleCloudDialogflowCxV3CompareVersionsResponse
    GoogleCloudDialogflowCxV3CompareVersionsResponse (..),
    newGoogleCloudDialogflowCxV3CompareVersionsResponse,

    -- * GoogleCloudDialogflowCxV3ContinuousTestResult
    GoogleCloudDialogflowCxV3ContinuousTestResult (..),
    newGoogleCloudDialogflowCxV3ContinuousTestResult,

    -- * GoogleCloudDialogflowCxV3ConversationSignals
    GoogleCloudDialogflowCxV3ConversationSignals (..),
    newGoogleCloudDialogflowCxV3ConversationSignals,

    -- * GoogleCloudDialogflowCxV3ConversationTurn
    GoogleCloudDialogflowCxV3ConversationTurn (..),
    newGoogleCloudDialogflowCxV3ConversationTurn,

    -- * GoogleCloudDialogflowCxV3ConversationTurnUserInput
    GoogleCloudDialogflowCxV3ConversationTurnUserInput (..),
    newGoogleCloudDialogflowCxV3ConversationTurnUserInput,

    -- * GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
    GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters (..),
    newGoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters,

    -- * GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput (..),
    newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput,

    -- * GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo (..),
    newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo,

    -- * GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters (..),
    newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters,

    -- * GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
    GoogleCloudDialogflowCxV3CreateVersionOperationMetadata (..),
    newGoogleCloudDialogflowCxV3CreateVersionOperationMetadata,

    -- * GoogleCloudDialogflowCxV3DataStoreConnection
    GoogleCloudDialogflowCxV3DataStoreConnection (..),
    newGoogleCloudDialogflowCxV3DataStoreConnection,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignals
    GoogleCloudDialogflowCxV3DataStoreConnectionSignals (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignals,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals,

    -- * GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet (..),
    newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet,

    -- * GoogleCloudDialogflowCxV3DeployFlowMetadata
    GoogleCloudDialogflowCxV3DeployFlowMetadata (..),
    newGoogleCloudDialogflowCxV3DeployFlowMetadata,

    -- * GoogleCloudDialogflowCxV3DeployFlowRequest
    GoogleCloudDialogflowCxV3DeployFlowRequest (..),
    newGoogleCloudDialogflowCxV3DeployFlowRequest,

    -- * GoogleCloudDialogflowCxV3DeployFlowResponse
    GoogleCloudDialogflowCxV3DeployFlowResponse (..),
    newGoogleCloudDialogflowCxV3DeployFlowResponse,

    -- * GoogleCloudDialogflowCxV3Deployment
    GoogleCloudDialogflowCxV3Deployment (..),
    newGoogleCloudDialogflowCxV3Deployment,

    -- * GoogleCloudDialogflowCxV3DeploymentResult
    GoogleCloudDialogflowCxV3DeploymentResult (..),
    newGoogleCloudDialogflowCxV3DeploymentResult,

    -- * GoogleCloudDialogflowCxV3DetectIntentRequest
    GoogleCloudDialogflowCxV3DetectIntentRequest (..),
    newGoogleCloudDialogflowCxV3DetectIntentRequest,

    -- * GoogleCloudDialogflowCxV3DetectIntentResponse
    GoogleCloudDialogflowCxV3DetectIntentResponse (..),
    newGoogleCloudDialogflowCxV3DetectIntentResponse,

    -- * GoogleCloudDialogflowCxV3DtmfInput
    GoogleCloudDialogflowCxV3DtmfInput (..),
    newGoogleCloudDialogflowCxV3DtmfInput,

    -- * GoogleCloudDialogflowCxV3EntityType
    GoogleCloudDialogflowCxV3EntityType (..),
    newGoogleCloudDialogflowCxV3EntityType,

    -- * GoogleCloudDialogflowCxV3EntityTypeEntity
    GoogleCloudDialogflowCxV3EntityTypeEntity (..),
    newGoogleCloudDialogflowCxV3EntityTypeEntity,

    -- * GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
    GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase (..),
    newGoogleCloudDialogflowCxV3EntityTypeExcludedPhrase,

    -- * GoogleCloudDialogflowCxV3Environment
    GoogleCloudDialogflowCxV3Environment (..),
    newGoogleCloudDialogflowCxV3Environment,

    -- * GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
    GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig (..),
    newGoogleCloudDialogflowCxV3EnvironmentTestCasesConfig,

    -- * GoogleCloudDialogflowCxV3EnvironmentVersionConfig
    GoogleCloudDialogflowCxV3EnvironmentVersionConfig (..),
    newGoogleCloudDialogflowCxV3EnvironmentVersionConfig,

    -- * GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
    GoogleCloudDialogflowCxV3EnvironmentWebhookConfig (..),
    newGoogleCloudDialogflowCxV3EnvironmentWebhookConfig,

    -- * GoogleCloudDialogflowCxV3EventHandler
    GoogleCloudDialogflowCxV3EventHandler (..),
    newGoogleCloudDialogflowCxV3EventHandler,

    -- * GoogleCloudDialogflowCxV3EventInput
    GoogleCloudDialogflowCxV3EventInput (..),
    newGoogleCloudDialogflowCxV3EventInput,

    -- * GoogleCloudDialogflowCxV3Experiment
    GoogleCloudDialogflowCxV3Experiment (..),
    newGoogleCloudDialogflowCxV3Experiment,

    -- * GoogleCloudDialogflowCxV3ExperimentDefinition
    GoogleCloudDialogflowCxV3ExperimentDefinition (..),
    newGoogleCloudDialogflowCxV3ExperimentDefinition,

    -- * GoogleCloudDialogflowCxV3ExperimentResult
    GoogleCloudDialogflowCxV3ExperimentResult (..),
    newGoogleCloudDialogflowCxV3ExperimentResult,

    -- * GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
    GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval (..),
    newGoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval,

    -- * GoogleCloudDialogflowCxV3ExperimentResultMetric
    GoogleCloudDialogflowCxV3ExperimentResultMetric (..),
    newGoogleCloudDialogflowCxV3ExperimentResultMetric,

    -- * GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
    GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics (..),
    newGoogleCloudDialogflowCxV3ExperimentResultVersionMetrics,

    -- * GoogleCloudDialogflowCxV3ExportAgentRequest
    GoogleCloudDialogflowCxV3ExportAgentRequest (..),
    newGoogleCloudDialogflowCxV3ExportAgentRequest,

    -- * GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
    GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination (..),
    newGoogleCloudDialogflowCxV3ExportAgentRequestGitDestination,

    -- * GoogleCloudDialogflowCxV3ExportAgentResponse
    GoogleCloudDialogflowCxV3ExportAgentResponse (..),
    newGoogleCloudDialogflowCxV3ExportAgentResponse,

    -- * GoogleCloudDialogflowCxV3ExportEntityTypesMetadata
    GoogleCloudDialogflowCxV3ExportEntityTypesMetadata (..),
    newGoogleCloudDialogflowCxV3ExportEntityTypesMetadata,

    -- * GoogleCloudDialogflowCxV3ExportEntityTypesRequest
    GoogleCloudDialogflowCxV3ExportEntityTypesRequest (..),
    newGoogleCloudDialogflowCxV3ExportEntityTypesRequest,

    -- * GoogleCloudDialogflowCxV3ExportEntityTypesResponse
    GoogleCloudDialogflowCxV3ExportEntityTypesResponse (..),
    newGoogleCloudDialogflowCxV3ExportEntityTypesResponse,

    -- * GoogleCloudDialogflowCxV3ExportFlowRequest
    GoogleCloudDialogflowCxV3ExportFlowRequest (..),
    newGoogleCloudDialogflowCxV3ExportFlowRequest,

    -- * GoogleCloudDialogflowCxV3ExportFlowResponse
    GoogleCloudDialogflowCxV3ExportFlowResponse (..),
    newGoogleCloudDialogflowCxV3ExportFlowResponse,

    -- * GoogleCloudDialogflowCxV3ExportIntentsMetadata
    GoogleCloudDialogflowCxV3ExportIntentsMetadata (..),
    newGoogleCloudDialogflowCxV3ExportIntentsMetadata,

    -- * GoogleCloudDialogflowCxV3ExportIntentsRequest
    GoogleCloudDialogflowCxV3ExportIntentsRequest (..),
    newGoogleCloudDialogflowCxV3ExportIntentsRequest,

    -- * GoogleCloudDialogflowCxV3ExportIntentsResponse
    GoogleCloudDialogflowCxV3ExportIntentsResponse (..),
    newGoogleCloudDialogflowCxV3ExportIntentsResponse,

    -- * GoogleCloudDialogflowCxV3ExportTestCasesMetadata
    GoogleCloudDialogflowCxV3ExportTestCasesMetadata (..),
    newGoogleCloudDialogflowCxV3ExportTestCasesMetadata,

    -- * GoogleCloudDialogflowCxV3ExportTestCasesRequest
    GoogleCloudDialogflowCxV3ExportTestCasesRequest (..),
    newGoogleCloudDialogflowCxV3ExportTestCasesRequest,

    -- * GoogleCloudDialogflowCxV3ExportTestCasesResponse
    GoogleCloudDialogflowCxV3ExportTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3ExportTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3FilterSpecs
    GoogleCloudDialogflowCxV3FilterSpecs (..),
    newGoogleCloudDialogflowCxV3FilterSpecs,

    -- * GoogleCloudDialogflowCxV3Flow
    GoogleCloudDialogflowCxV3Flow (..),
    newGoogleCloudDialogflowCxV3Flow,

    -- * GoogleCloudDialogflowCxV3FlowImportStrategy
    GoogleCloudDialogflowCxV3FlowImportStrategy (..),
    newGoogleCloudDialogflowCxV3FlowImportStrategy,

    -- * GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
    GoogleCloudDialogflowCxV3FlowMultiLanguageSettings (..),
    newGoogleCloudDialogflowCxV3FlowMultiLanguageSettings,

    -- * GoogleCloudDialogflowCxV3FlowValidationResult
    GoogleCloudDialogflowCxV3FlowValidationResult (..),
    newGoogleCloudDialogflowCxV3FlowValidationResult,

    -- * GoogleCloudDialogflowCxV3Form
    GoogleCloudDialogflowCxV3Form (..),
    newGoogleCloudDialogflowCxV3Form,

    -- * GoogleCloudDialogflowCxV3FormParameter
    GoogleCloudDialogflowCxV3FormParameter (..),
    newGoogleCloudDialogflowCxV3FormParameter,

    -- * GoogleCloudDialogflowCxV3FormParameterFillBehavior
    GoogleCloudDialogflowCxV3FormParameterFillBehavior (..),
    newGoogleCloudDialogflowCxV3FormParameterFillBehavior,

    -- * GoogleCloudDialogflowCxV3FulfillIntentRequest
    GoogleCloudDialogflowCxV3FulfillIntentRequest (..),
    newGoogleCloudDialogflowCxV3FulfillIntentRequest,

    -- * GoogleCloudDialogflowCxV3FulfillIntentResponse
    GoogleCloudDialogflowCxV3FulfillIntentResponse (..),
    newGoogleCloudDialogflowCxV3FulfillIntentResponse,

    -- * GoogleCloudDialogflowCxV3Fulfillment
    GoogleCloudDialogflowCxV3Fulfillment (..),
    newGoogleCloudDialogflowCxV3Fulfillment,

    -- * GoogleCloudDialogflowCxV3FulfillmentConditionalCases
    GoogleCloudDialogflowCxV3FulfillmentConditionalCases (..),
    newGoogleCloudDialogflowCxV3FulfillmentConditionalCases,

    -- * GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase (..),
    newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase,

    -- * GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent (..),
    newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent,

    -- * GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
    GoogleCloudDialogflowCxV3FulfillmentSetParameterAction (..),
    newGoogleCloudDialogflowCxV3FulfillmentSetParameterAction,

    -- * GoogleCloudDialogflowCxV3GcsDestination
    GoogleCloudDialogflowCxV3GcsDestination (..),
    newGoogleCloudDialogflowCxV3GcsDestination,

    -- * GoogleCloudDialogflowCxV3GenerativeSettings
    GoogleCloudDialogflowCxV3GenerativeSettings (..),
    newGoogleCloudDialogflowCxV3GenerativeSettings,

    -- * GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings (..),
    newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings,

    -- * GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate (..),
    newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate,

    -- * GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
    GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings (..),
    newGoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings,

    -- * GoogleCloudDialogflowCxV3Generator
    GoogleCloudDialogflowCxV3Generator (..),
    newGoogleCloudDialogflowCxV3Generator,

    -- * GoogleCloudDialogflowCxV3GeneratorModelParameter
    GoogleCloudDialogflowCxV3GeneratorModelParameter (..),
    newGoogleCloudDialogflowCxV3GeneratorModelParameter,

    -- * GoogleCloudDialogflowCxV3GeneratorPlaceholder
    GoogleCloudDialogflowCxV3GeneratorPlaceholder (..),
    newGoogleCloudDialogflowCxV3GeneratorPlaceholder,

    -- * GoogleCloudDialogflowCxV3ImportEntityTypesMetadata
    GoogleCloudDialogflowCxV3ImportEntityTypesMetadata (..),
    newGoogleCloudDialogflowCxV3ImportEntityTypesMetadata,

    -- * GoogleCloudDialogflowCxV3ImportEntityTypesRequest
    GoogleCloudDialogflowCxV3ImportEntityTypesRequest (..),
    newGoogleCloudDialogflowCxV3ImportEntityTypesRequest,

    -- * GoogleCloudDialogflowCxV3ImportEntityTypesResponse
    GoogleCloudDialogflowCxV3ImportEntityTypesResponse (..),
    newGoogleCloudDialogflowCxV3ImportEntityTypesResponse,

    -- * GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
    GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources (..),
    newGoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources,

    -- * GoogleCloudDialogflowCxV3ImportFlowRequest
    GoogleCloudDialogflowCxV3ImportFlowRequest (..),
    newGoogleCloudDialogflowCxV3ImportFlowRequest,

    -- * GoogleCloudDialogflowCxV3ImportFlowResponse
    GoogleCloudDialogflowCxV3ImportFlowResponse (..),
    newGoogleCloudDialogflowCxV3ImportFlowResponse,

    -- * GoogleCloudDialogflowCxV3ImportIntentsMetadata
    GoogleCloudDialogflowCxV3ImportIntentsMetadata (..),
    newGoogleCloudDialogflowCxV3ImportIntentsMetadata,

    -- * GoogleCloudDialogflowCxV3ImportIntentsRequest
    GoogleCloudDialogflowCxV3ImportIntentsRequest (..),
    newGoogleCloudDialogflowCxV3ImportIntentsRequest,

    -- * GoogleCloudDialogflowCxV3ImportIntentsResponse
    GoogleCloudDialogflowCxV3ImportIntentsResponse (..),
    newGoogleCloudDialogflowCxV3ImportIntentsResponse,

    -- * GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
    GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources (..),
    newGoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources,

    -- * GoogleCloudDialogflowCxV3ImportTestCasesMetadata
    GoogleCloudDialogflowCxV3ImportTestCasesMetadata (..),
    newGoogleCloudDialogflowCxV3ImportTestCasesMetadata,

    -- * GoogleCloudDialogflowCxV3ImportTestCasesRequest
    GoogleCloudDialogflowCxV3ImportTestCasesRequest (..),
    newGoogleCloudDialogflowCxV3ImportTestCasesRequest,

    -- * GoogleCloudDialogflowCxV3ImportTestCasesResponse
    GoogleCloudDialogflowCxV3ImportTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3ImportTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3InlineDestination
    GoogleCloudDialogflowCxV3InlineDestination (..),
    newGoogleCloudDialogflowCxV3InlineDestination,

    -- * GoogleCloudDialogflowCxV3InlineSource
    GoogleCloudDialogflowCxV3InlineSource (..),
    newGoogleCloudDialogflowCxV3InlineSource,

    -- * GoogleCloudDialogflowCxV3InputAudioConfig
    GoogleCloudDialogflowCxV3InputAudioConfig (..),
    newGoogleCloudDialogflowCxV3InputAudioConfig,

    -- * GoogleCloudDialogflowCxV3Intent
    GoogleCloudDialogflowCxV3Intent (..),
    newGoogleCloudDialogflowCxV3Intent,

    -- * GoogleCloudDialogflowCxV3Intent_Labels
    GoogleCloudDialogflowCxV3Intent_Labels (..),
    newGoogleCloudDialogflowCxV3Intent_Labels,

    -- * GoogleCloudDialogflowCxV3IntentCoverage
    GoogleCloudDialogflowCxV3IntentCoverage (..),
    newGoogleCloudDialogflowCxV3IntentCoverage,

    -- * GoogleCloudDialogflowCxV3IntentCoverageIntent
    GoogleCloudDialogflowCxV3IntentCoverageIntent (..),
    newGoogleCloudDialogflowCxV3IntentCoverageIntent,

    -- * GoogleCloudDialogflowCxV3IntentInput
    GoogleCloudDialogflowCxV3IntentInput (..),
    newGoogleCloudDialogflowCxV3IntentInput,

    -- * GoogleCloudDialogflowCxV3IntentParameter
    GoogleCloudDialogflowCxV3IntentParameter (..),
    newGoogleCloudDialogflowCxV3IntentParameter,

    -- * GoogleCloudDialogflowCxV3IntentTrainingPhrase
    GoogleCloudDialogflowCxV3IntentTrainingPhrase (..),
    newGoogleCloudDialogflowCxV3IntentTrainingPhrase,

    -- * GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
    GoogleCloudDialogflowCxV3IntentTrainingPhrasePart (..),
    newGoogleCloudDialogflowCxV3IntentTrainingPhrasePart,

    -- * GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
    GoogleCloudDialogflowCxV3KnowledgeConnectorSettings (..),
    newGoogleCloudDialogflowCxV3KnowledgeConnectorSettings,

    -- * GoogleCloudDialogflowCxV3LanguageInfo
    GoogleCloudDialogflowCxV3LanguageInfo (..),
    newGoogleCloudDialogflowCxV3LanguageInfo,

    -- * GoogleCloudDialogflowCxV3ListAgentsResponse
    GoogleCloudDialogflowCxV3ListAgentsResponse (..),
    newGoogleCloudDialogflowCxV3ListAgentsResponse,

    -- * GoogleCloudDialogflowCxV3ListChangelogsResponse
    GoogleCloudDialogflowCxV3ListChangelogsResponse (..),
    newGoogleCloudDialogflowCxV3ListChangelogsResponse,

    -- * GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
    GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse (..),
    newGoogleCloudDialogflowCxV3ListContinuousTestResultsResponse,

    -- * GoogleCloudDialogflowCxV3ListDeploymentsResponse
    GoogleCloudDialogflowCxV3ListDeploymentsResponse (..),
    newGoogleCloudDialogflowCxV3ListDeploymentsResponse,

    -- * GoogleCloudDialogflowCxV3ListEntityTypesResponse
    GoogleCloudDialogflowCxV3ListEntityTypesResponse (..),
    newGoogleCloudDialogflowCxV3ListEntityTypesResponse,

    -- * GoogleCloudDialogflowCxV3ListEnvironmentsResponse
    GoogleCloudDialogflowCxV3ListEnvironmentsResponse (..),
    newGoogleCloudDialogflowCxV3ListEnvironmentsResponse,

    -- * GoogleCloudDialogflowCxV3ListExperimentsResponse
    GoogleCloudDialogflowCxV3ListExperimentsResponse (..),
    newGoogleCloudDialogflowCxV3ListExperimentsResponse,

    -- * GoogleCloudDialogflowCxV3ListFlowsResponse
    GoogleCloudDialogflowCxV3ListFlowsResponse (..),
    newGoogleCloudDialogflowCxV3ListFlowsResponse,

    -- * GoogleCloudDialogflowCxV3ListGeneratorsResponse
    GoogleCloudDialogflowCxV3ListGeneratorsResponse (..),
    newGoogleCloudDialogflowCxV3ListGeneratorsResponse,

    -- * GoogleCloudDialogflowCxV3ListIntentsResponse
    GoogleCloudDialogflowCxV3ListIntentsResponse (..),
    newGoogleCloudDialogflowCxV3ListIntentsResponse,

    -- * GoogleCloudDialogflowCxV3ListPagesResponse
    GoogleCloudDialogflowCxV3ListPagesResponse (..),
    newGoogleCloudDialogflowCxV3ListPagesResponse,

    -- * GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
    GoogleCloudDialogflowCxV3ListSecuritySettingsResponse (..),
    newGoogleCloudDialogflowCxV3ListSecuritySettingsResponse,

    -- * GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
    GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse (..),
    newGoogleCloudDialogflowCxV3ListSessionEntityTypesResponse,

    -- * GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
    GoogleCloudDialogflowCxV3ListTestCaseResultsResponse (..),
    newGoogleCloudDialogflowCxV3ListTestCaseResultsResponse,

    -- * GoogleCloudDialogflowCxV3ListTestCasesResponse
    GoogleCloudDialogflowCxV3ListTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3ListTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
    GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse (..),
    newGoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse,

    -- * GoogleCloudDialogflowCxV3ListVersionsResponse
    GoogleCloudDialogflowCxV3ListVersionsResponse (..),
    newGoogleCloudDialogflowCxV3ListVersionsResponse,

    -- * GoogleCloudDialogflowCxV3ListWebhooksResponse
    GoogleCloudDialogflowCxV3ListWebhooksResponse (..),
    newGoogleCloudDialogflowCxV3ListWebhooksResponse,

    -- * GoogleCloudDialogflowCxV3LoadVersionRequest
    GoogleCloudDialogflowCxV3LoadVersionRequest (..),
    newGoogleCloudDialogflowCxV3LoadVersionRequest,

    -- * GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
    GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse (..),
    newGoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse,

    -- * GoogleCloudDialogflowCxV3Match
    GoogleCloudDialogflowCxV3Match (..),
    newGoogleCloudDialogflowCxV3Match,

    -- * GoogleCloudDialogflowCxV3Match_Parameters
    GoogleCloudDialogflowCxV3Match_Parameters (..),
    newGoogleCloudDialogflowCxV3Match_Parameters,

    -- * GoogleCloudDialogflowCxV3MatchIntentRequest
    GoogleCloudDialogflowCxV3MatchIntentRequest (..),
    newGoogleCloudDialogflowCxV3MatchIntentRequest,

    -- * GoogleCloudDialogflowCxV3MatchIntentResponse
    GoogleCloudDialogflowCxV3MatchIntentResponse (..),
    newGoogleCloudDialogflowCxV3MatchIntentResponse,

    -- * GoogleCloudDialogflowCxV3NluSettings
    GoogleCloudDialogflowCxV3NluSettings (..),
    newGoogleCloudDialogflowCxV3NluSettings,

    -- * GoogleCloudDialogflowCxV3OutputAudioConfig
    GoogleCloudDialogflowCxV3OutputAudioConfig (..),
    newGoogleCloudDialogflowCxV3OutputAudioConfig,

    -- * GoogleCloudDialogflowCxV3Page
    GoogleCloudDialogflowCxV3Page (..),
    newGoogleCloudDialogflowCxV3Page,

    -- * GoogleCloudDialogflowCxV3PageInfo
    GoogleCloudDialogflowCxV3PageInfo (..),
    newGoogleCloudDialogflowCxV3PageInfo,

    -- * GoogleCloudDialogflowCxV3PageInfoFormInfo
    GoogleCloudDialogflowCxV3PageInfoFormInfo (..),
    newGoogleCloudDialogflowCxV3PageInfoFormInfo,

    -- * GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
    GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo (..),
    newGoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo,

    -- * GoogleCloudDialogflowCxV3Phrase
    GoogleCloudDialogflowCxV3Phrase (..),
    newGoogleCloudDialogflowCxV3Phrase,

    -- * GoogleCloudDialogflowCxV3QueryInput
    GoogleCloudDialogflowCxV3QueryInput (..),
    newGoogleCloudDialogflowCxV3QueryInput,

    -- * GoogleCloudDialogflowCxV3QueryParameters
    GoogleCloudDialogflowCxV3QueryParameters (..),
    newGoogleCloudDialogflowCxV3QueryParameters,

    -- * GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
    GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata (..),
    newGoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata,

    -- * GoogleCloudDialogflowCxV3QueryParameters_Parameters
    GoogleCloudDialogflowCxV3QueryParameters_Parameters (..),
    newGoogleCloudDialogflowCxV3QueryParameters_Parameters,

    -- * GoogleCloudDialogflowCxV3QueryParameters_Payload
    GoogleCloudDialogflowCxV3QueryParameters_Payload (..),
    newGoogleCloudDialogflowCxV3QueryParameters_Payload,

    -- * GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
    GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders (..),
    newGoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders,

    -- * GoogleCloudDialogflowCxV3QueryResult
    GoogleCloudDialogflowCxV3QueryResult (..),
    newGoogleCloudDialogflowCxV3QueryResult,

    -- * GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
    GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo (..),
    newGoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo,

    -- * GoogleCloudDialogflowCxV3QueryResult_Parameters
    GoogleCloudDialogflowCxV3QueryResult_Parameters (..),
    newGoogleCloudDialogflowCxV3QueryResult_Parameters,

    -- * GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
    GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem (..),
    newGoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem,

    -- * GoogleCloudDialogflowCxV3ResourceName
    GoogleCloudDialogflowCxV3ResourceName (..),
    newGoogleCloudDialogflowCxV3ResourceName,

    -- * GoogleCloudDialogflowCxV3ResponseMessage
    GoogleCloudDialogflowCxV3ResponseMessage (..),
    newGoogleCloudDialogflowCxV3ResponseMessage,

    -- * GoogleCloudDialogflowCxV3ResponseMessage_Payload
    GoogleCloudDialogflowCxV3ResponseMessage_Payload (..),
    newGoogleCloudDialogflowCxV3ResponseMessage_Payload,

    -- * GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess (..),
    newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess,

    -- * GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata (..),
    newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata,

    -- * GoogleCloudDialogflowCxV3ResponseMessageEndInteraction
    GoogleCloudDialogflowCxV3ResponseMessageEndInteraction (..),
    newGoogleCloudDialogflowCxV3ResponseMessageEndInteraction,

    -- * GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
    GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard (..),
    newGoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard,

    -- * GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff (..),
    newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff,

    -- * GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata (..),
    newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata,

    -- * GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudio (..),
    newGoogleCloudDialogflowCxV3ResponseMessageMixedAudio,

    -- * GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment (..),
    newGoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment,

    -- * GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
    GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText (..),
    newGoogleCloudDialogflowCxV3ResponseMessageOutputAudioText,

    -- * GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
    GoogleCloudDialogflowCxV3ResponseMessagePlayAudio (..),
    newGoogleCloudDialogflowCxV3ResponseMessagePlayAudio,

    -- * GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
    GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall (..),
    newGoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall,

    -- * GoogleCloudDialogflowCxV3ResponseMessageText
    GoogleCloudDialogflowCxV3ResponseMessageText (..),
    newGoogleCloudDialogflowCxV3ResponseMessageText,

    -- * GoogleCloudDialogflowCxV3RestoreAgentRequest
    GoogleCloudDialogflowCxV3RestoreAgentRequest (..),
    newGoogleCloudDialogflowCxV3RestoreAgentRequest,

    -- * GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
    GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource (..),
    newGoogleCloudDialogflowCxV3RestoreAgentRequestGitSource,

    -- * GoogleCloudDialogflowCxV3RolloutConfig
    GoogleCloudDialogflowCxV3RolloutConfig (..),
    newGoogleCloudDialogflowCxV3RolloutConfig,

    -- * GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
    GoogleCloudDialogflowCxV3RolloutConfigRolloutStep (..),
    newGoogleCloudDialogflowCxV3RolloutConfigRolloutStep,

    -- * GoogleCloudDialogflowCxV3RolloutState
    GoogleCloudDialogflowCxV3RolloutState (..),
    newGoogleCloudDialogflowCxV3RolloutState,

    -- * GoogleCloudDialogflowCxV3RunContinuousTestMetadata
    GoogleCloudDialogflowCxV3RunContinuousTestMetadata (..),
    newGoogleCloudDialogflowCxV3RunContinuousTestMetadata,

    -- * GoogleCloudDialogflowCxV3RunContinuousTestRequest
    GoogleCloudDialogflowCxV3RunContinuousTestRequest (..),
    newGoogleCloudDialogflowCxV3RunContinuousTestRequest,

    -- * GoogleCloudDialogflowCxV3RunContinuousTestResponse
    GoogleCloudDialogflowCxV3RunContinuousTestResponse (..),
    newGoogleCloudDialogflowCxV3RunContinuousTestResponse,

    -- * GoogleCloudDialogflowCxV3RunTestCaseMetadata
    GoogleCloudDialogflowCxV3RunTestCaseMetadata (..),
    newGoogleCloudDialogflowCxV3RunTestCaseMetadata,

    -- * GoogleCloudDialogflowCxV3RunTestCaseRequest
    GoogleCloudDialogflowCxV3RunTestCaseRequest (..),
    newGoogleCloudDialogflowCxV3RunTestCaseRequest,

    -- * GoogleCloudDialogflowCxV3RunTestCaseResponse
    GoogleCloudDialogflowCxV3RunTestCaseResponse (..),
    newGoogleCloudDialogflowCxV3RunTestCaseResponse,

    -- * GoogleCloudDialogflowCxV3SafetySettings
    GoogleCloudDialogflowCxV3SafetySettings (..),
    newGoogleCloudDialogflowCxV3SafetySettings,

    -- * GoogleCloudDialogflowCxV3SafetySettingsPhrase
    GoogleCloudDialogflowCxV3SafetySettingsPhrase (..),
    newGoogleCloudDialogflowCxV3SafetySettingsPhrase,

    -- * GoogleCloudDialogflowCxV3SearchConfig
    GoogleCloudDialogflowCxV3SearchConfig (..),
    newGoogleCloudDialogflowCxV3SearchConfig,

    -- * GoogleCloudDialogflowCxV3SecuritySettings
    GoogleCloudDialogflowCxV3SecuritySettings (..),
    newGoogleCloudDialogflowCxV3SecuritySettings,

    -- * GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
    GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings (..),
    newGoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings,

    -- * GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
    GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings (..),
    newGoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings,

    -- * GoogleCloudDialogflowCxV3SentimentAnalysisResult
    GoogleCloudDialogflowCxV3SentimentAnalysisResult (..),
    newGoogleCloudDialogflowCxV3SentimentAnalysisResult,

    -- * GoogleCloudDialogflowCxV3SessionEntityType
    GoogleCloudDialogflowCxV3SessionEntityType (..),
    newGoogleCloudDialogflowCxV3SessionEntityType,

    -- * GoogleCloudDialogflowCxV3SessionInfo
    GoogleCloudDialogflowCxV3SessionInfo (..),
    newGoogleCloudDialogflowCxV3SessionInfo,

    -- * GoogleCloudDialogflowCxV3SessionInfo_Parameters
    GoogleCloudDialogflowCxV3SessionInfo_Parameters (..),
    newGoogleCloudDialogflowCxV3SessionInfo_Parameters,

    -- * GoogleCloudDialogflowCxV3SpeechToTextSettings
    GoogleCloudDialogflowCxV3SpeechToTextSettings (..),
    newGoogleCloudDialogflowCxV3SpeechToTextSettings,

    -- * GoogleCloudDialogflowCxV3StartExperimentRequest
    GoogleCloudDialogflowCxV3StartExperimentRequest (..),
    newGoogleCloudDialogflowCxV3StartExperimentRequest,

    -- * GoogleCloudDialogflowCxV3StopExperimentRequest
    GoogleCloudDialogflowCxV3StopExperimentRequest (..),
    newGoogleCloudDialogflowCxV3StopExperimentRequest,

    -- * GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
    GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest (..),
    newGoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest,

    -- * GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
    GoogleCloudDialogflowCxV3SynthesizeSpeechConfig (..),
    newGoogleCloudDialogflowCxV3SynthesizeSpeechConfig,

    -- * GoogleCloudDialogflowCxV3TestCase
    GoogleCloudDialogflowCxV3TestCase (..),
    newGoogleCloudDialogflowCxV3TestCase,

    -- * GoogleCloudDialogflowCxV3TestCaseError
    GoogleCloudDialogflowCxV3TestCaseError (..),
    newGoogleCloudDialogflowCxV3TestCaseError,

    -- * GoogleCloudDialogflowCxV3TestCaseResult
    GoogleCloudDialogflowCxV3TestCaseResult (..),
    newGoogleCloudDialogflowCxV3TestCaseResult,

    -- * GoogleCloudDialogflowCxV3TestConfig
    GoogleCloudDialogflowCxV3TestConfig (..),
    newGoogleCloudDialogflowCxV3TestConfig,

    -- * GoogleCloudDialogflowCxV3TestError
    GoogleCloudDialogflowCxV3TestError (..),
    newGoogleCloudDialogflowCxV3TestError,

    -- * GoogleCloudDialogflowCxV3TestRunDifference
    GoogleCloudDialogflowCxV3TestRunDifference (..),
    newGoogleCloudDialogflowCxV3TestRunDifference,

    -- * GoogleCloudDialogflowCxV3TextInput
    GoogleCloudDialogflowCxV3TextInput (..),
    newGoogleCloudDialogflowCxV3TextInput,

    -- * GoogleCloudDialogflowCxV3TextToSpeechSettings
    GoogleCloudDialogflowCxV3TextToSpeechSettings (..),
    newGoogleCloudDialogflowCxV3TextToSpeechSettings,

    -- * GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
    GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs (..),
    newGoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs,

    -- * GoogleCloudDialogflowCxV3TrainFlowRequest
    GoogleCloudDialogflowCxV3TrainFlowRequest (..),
    newGoogleCloudDialogflowCxV3TrainFlowRequest,

    -- * GoogleCloudDialogflowCxV3TransitionCoverage
    GoogleCloudDialogflowCxV3TransitionCoverage (..),
    newGoogleCloudDialogflowCxV3TransitionCoverage,

    -- * GoogleCloudDialogflowCxV3TransitionCoverageTransition
    GoogleCloudDialogflowCxV3TransitionCoverageTransition (..),
    newGoogleCloudDialogflowCxV3TransitionCoverageTransition,

    -- * GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
    GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode (..),
    newGoogleCloudDialogflowCxV3TransitionCoverageTransitionNode,

    -- * GoogleCloudDialogflowCxV3TransitionRoute
    GoogleCloudDialogflowCxV3TransitionRoute (..),
    newGoogleCloudDialogflowCxV3TransitionRoute,

    -- * GoogleCloudDialogflowCxV3TransitionRouteGroup
    GoogleCloudDialogflowCxV3TransitionRouteGroup (..),
    newGoogleCloudDialogflowCxV3TransitionRouteGroup,

    -- * GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage (..),
    newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverage,

    -- * GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage (..),
    newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage,

    -- * GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition (..),
    newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition,

    -- * GoogleCloudDialogflowCxV3TurnSignals
    GoogleCloudDialogflowCxV3TurnSignals (..),
    newGoogleCloudDialogflowCxV3TurnSignals,

    -- * GoogleCloudDialogflowCxV3ValidateAgentRequest
    GoogleCloudDialogflowCxV3ValidateAgentRequest (..),
    newGoogleCloudDialogflowCxV3ValidateAgentRequest,

    -- * GoogleCloudDialogflowCxV3ValidateFlowRequest
    GoogleCloudDialogflowCxV3ValidateFlowRequest (..),
    newGoogleCloudDialogflowCxV3ValidateFlowRequest,

    -- * GoogleCloudDialogflowCxV3ValidationMessage
    GoogleCloudDialogflowCxV3ValidationMessage (..),
    newGoogleCloudDialogflowCxV3ValidationMessage,

    -- * GoogleCloudDialogflowCxV3VariantsHistory
    GoogleCloudDialogflowCxV3VariantsHistory (..),
    newGoogleCloudDialogflowCxV3VariantsHistory,

    -- * GoogleCloudDialogflowCxV3Version
    GoogleCloudDialogflowCxV3Version (..),
    newGoogleCloudDialogflowCxV3Version,

    -- * GoogleCloudDialogflowCxV3VersionVariants
    GoogleCloudDialogflowCxV3VersionVariants (..),
    newGoogleCloudDialogflowCxV3VersionVariants,

    -- * GoogleCloudDialogflowCxV3VersionVariantsVariant
    GoogleCloudDialogflowCxV3VersionVariantsVariant (..),
    newGoogleCloudDialogflowCxV3VersionVariantsVariant,

    -- * GoogleCloudDialogflowCxV3VoiceSelectionParams
    GoogleCloudDialogflowCxV3VoiceSelectionParams (..),
    newGoogleCloudDialogflowCxV3VoiceSelectionParams,

    -- * GoogleCloudDialogflowCxV3Webhook
    GoogleCloudDialogflowCxV3Webhook (..),
    newGoogleCloudDialogflowCxV3Webhook,

    -- * GoogleCloudDialogflowCxV3WebhookGenericWebService
    GoogleCloudDialogflowCxV3WebhookGenericWebService (..),
    newGoogleCloudDialogflowCxV3WebhookGenericWebService,

    -- * GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
    GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping (..),
    newGoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping,

    -- * GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
    GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders (..),
    newGoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders,

    -- * GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
    GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig (..),
    newGoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig,

    -- * GoogleCloudDialogflowCxV3WebhookRequest
    GoogleCloudDialogflowCxV3WebhookRequest (..),
    newGoogleCloudDialogflowCxV3WebhookRequest,

    -- * GoogleCloudDialogflowCxV3WebhookRequest_Payload
    GoogleCloudDialogflowCxV3WebhookRequest_Payload (..),
    newGoogleCloudDialogflowCxV3WebhookRequest_Payload,

    -- * GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
    GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo (..),
    newGoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo,

    -- * GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo (..),
    newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo,

    -- * GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters (..),
    newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters,

    -- * GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue (..),
    newGoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue,

    -- * GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
    GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult (..),
    newGoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult,

    -- * GoogleCloudDialogflowCxV3WebhookResponse
    GoogleCloudDialogflowCxV3WebhookResponse (..),
    newGoogleCloudDialogflowCxV3WebhookResponse,

    -- * GoogleCloudDialogflowCxV3WebhookResponse_Payload
    GoogleCloudDialogflowCxV3WebhookResponse_Payload (..),
    newGoogleCloudDialogflowCxV3WebhookResponse_Payload,

    -- * GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
    GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse (..),
    newGoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse,

    -- * GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
    GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig (..),
    newGoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig,

    -- * GoogleCloudDialogflowCxV3beta1AdvancedSettings
    GoogleCloudDialogflowCxV3beta1AdvancedSettings (..),
    newGoogleCloudDialogflowCxV3beta1AdvancedSettings,

    -- * GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings (..),
    newGoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings,

    -- * GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings (..),
    newGoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings,

    -- * GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings (..),
    newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings,

    -- * GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models (..),
    newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models,

    -- * GoogleCloudDialogflowCxV3beta1AudioInput
    GoogleCloudDialogflowCxV3beta1AudioInput (..),
    newGoogleCloudDialogflowCxV3beta1AudioInput,

    -- * GoogleCloudDialogflowCxV3beta1BargeInConfig
    GoogleCloudDialogflowCxV3beta1BargeInConfig (..),
    newGoogleCloudDialogflowCxV3beta1BargeInConfig,

    -- * GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
    GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata (..),
    newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata,

    -- * GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
    GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3beta1ContinuousTestResult
    GoogleCloudDialogflowCxV3beta1ContinuousTestResult (..),
    newGoogleCloudDialogflowCxV3beta1ContinuousTestResult,

    -- * GoogleCloudDialogflowCxV3beta1ConversationSignals
    GoogleCloudDialogflowCxV3beta1ConversationSignals (..),
    newGoogleCloudDialogflowCxV3beta1ConversationSignals,

    -- * GoogleCloudDialogflowCxV3beta1ConversationTurn
    GoogleCloudDialogflowCxV3beta1ConversationTurn (..),
    newGoogleCloudDialogflowCxV3beta1ConversationTurn,

    -- * GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput (..),
    newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput,

    -- * GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters (..),
    newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters,

    -- * GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput (..),
    newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput,

    -- * GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo (..),
    newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo,

    -- * GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters (..),
    newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters,

    -- * GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
    GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata (..),
    newGoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata,

    -- * GoogleCloudDialogflowCxV3beta1DataStoreConnection
    GoogleCloudDialogflowCxV3beta1DataStoreConnection (..),
    newGoogleCloudDialogflowCxV3beta1DataStoreConnection,

    -- * GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
    GoogleCloudDialogflowCxV3beta1DeployFlowMetadata (..),
    newGoogleCloudDialogflowCxV3beta1DeployFlowMetadata,

    -- * GoogleCloudDialogflowCxV3beta1DeployFlowResponse
    GoogleCloudDialogflowCxV3beta1DeployFlowResponse (..),
    newGoogleCloudDialogflowCxV3beta1DeployFlowResponse,

    -- * GoogleCloudDialogflowCxV3beta1DtmfInput
    GoogleCloudDialogflowCxV3beta1DtmfInput (..),
    newGoogleCloudDialogflowCxV3beta1DtmfInput,

    -- * GoogleCloudDialogflowCxV3beta1Environment
    GoogleCloudDialogflowCxV3beta1Environment (..),
    newGoogleCloudDialogflowCxV3beta1Environment,

    -- * GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
    GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig (..),
    newGoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig,

    -- * GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
    GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig (..),
    newGoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig,

    -- * GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
    GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig (..),
    newGoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig,

    -- * GoogleCloudDialogflowCxV3beta1EventHandler
    GoogleCloudDialogflowCxV3beta1EventHandler (..),
    newGoogleCloudDialogflowCxV3beta1EventHandler,

    -- * GoogleCloudDialogflowCxV3beta1EventInput
    GoogleCloudDialogflowCxV3beta1EventInput (..),
    newGoogleCloudDialogflowCxV3beta1EventInput,

    -- * GoogleCloudDialogflowCxV3beta1ExportAgentResponse
    GoogleCloudDialogflowCxV3beta1ExportAgentResponse (..),
    newGoogleCloudDialogflowCxV3beta1ExportAgentResponse,

    -- * GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata
    GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata (..),
    newGoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata,

    -- * GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
    GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse (..),
    newGoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse,

    -- * GoogleCloudDialogflowCxV3beta1ExportFlowResponse
    GoogleCloudDialogflowCxV3beta1ExportFlowResponse (..),
    newGoogleCloudDialogflowCxV3beta1ExportFlowResponse,

    -- * GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata
    GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata (..),
    newGoogleCloudDialogflowCxV3beta1ExportIntentsMetadata,

    -- * GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
    GoogleCloudDialogflowCxV3beta1ExportIntentsResponse (..),
    newGoogleCloudDialogflowCxV3beta1ExportIntentsResponse,

    -- * GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
    GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata (..),
    newGoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata,

    -- * GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
    GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3beta1ExportTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3beta1Form
    GoogleCloudDialogflowCxV3beta1Form (..),
    newGoogleCloudDialogflowCxV3beta1Form,

    -- * GoogleCloudDialogflowCxV3beta1FormParameter
    GoogleCloudDialogflowCxV3beta1FormParameter (..),
    newGoogleCloudDialogflowCxV3beta1FormParameter,

    -- * GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
    GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior (..),
    newGoogleCloudDialogflowCxV3beta1FormParameterFillBehavior,

    -- * GoogleCloudDialogflowCxV3beta1Fulfillment
    GoogleCloudDialogflowCxV3beta1Fulfillment (..),
    newGoogleCloudDialogflowCxV3beta1Fulfillment,

    -- * GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases (..),
    newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases,

    -- * GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase (..),
    newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase,

    -- * GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent (..),
    newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent,

    -- * GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
    GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction (..),
    newGoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction,

    -- * GoogleCloudDialogflowCxV3beta1GcsDestination
    GoogleCloudDialogflowCxV3beta1GcsDestination (..),
    newGoogleCloudDialogflowCxV3beta1GcsDestination,

    -- * GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata (..),
    newGoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata,

    -- * GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse (..),
    newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse,

    -- * GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources (..),
    newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources,

    -- * GoogleCloudDialogflowCxV3beta1ImportFlowResponse
    GoogleCloudDialogflowCxV3beta1ImportFlowResponse (..),
    newGoogleCloudDialogflowCxV3beta1ImportFlowResponse,

    -- * GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata
    GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata (..),
    newGoogleCloudDialogflowCxV3beta1ImportIntentsMetadata,

    -- * GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponse (..),
    newGoogleCloudDialogflowCxV3beta1ImportIntentsResponse,

    -- * GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources (..),
    newGoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources,

    -- * GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
    GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata (..),
    newGoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata,

    -- * GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
    GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse (..),
    newGoogleCloudDialogflowCxV3beta1ImportTestCasesResponse,

    -- * GoogleCloudDialogflowCxV3beta1InlineDestination
    GoogleCloudDialogflowCxV3beta1InlineDestination (..),
    newGoogleCloudDialogflowCxV3beta1InlineDestination,

    -- * GoogleCloudDialogflowCxV3beta1InputAudioConfig
    GoogleCloudDialogflowCxV3beta1InputAudioConfig (..),
    newGoogleCloudDialogflowCxV3beta1InputAudioConfig,

    -- * GoogleCloudDialogflowCxV3beta1Intent
    GoogleCloudDialogflowCxV3beta1Intent (..),
    newGoogleCloudDialogflowCxV3beta1Intent,

    -- * GoogleCloudDialogflowCxV3beta1Intent_Labels
    GoogleCloudDialogflowCxV3beta1Intent_Labels (..),
    newGoogleCloudDialogflowCxV3beta1Intent_Labels,

    -- * GoogleCloudDialogflowCxV3beta1IntentInput
    GoogleCloudDialogflowCxV3beta1IntentInput (..),
    newGoogleCloudDialogflowCxV3beta1IntentInput,

    -- * GoogleCloudDialogflowCxV3beta1IntentParameter
    GoogleCloudDialogflowCxV3beta1IntentParameter (..),
    newGoogleCloudDialogflowCxV3beta1IntentParameter,

    -- * GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
    GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase (..),
    newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrase,

    -- * GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
    GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart (..),
    newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart,

    -- * GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
    GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings (..),
    newGoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings,

    -- * GoogleCloudDialogflowCxV3beta1LanguageInfo
    GoogleCloudDialogflowCxV3beta1LanguageInfo (..),
    newGoogleCloudDialogflowCxV3beta1LanguageInfo,

    -- * GoogleCloudDialogflowCxV3beta1Page
    GoogleCloudDialogflowCxV3beta1Page (..),
    newGoogleCloudDialogflowCxV3beta1Page,

    -- * GoogleCloudDialogflowCxV3beta1PageInfo
    GoogleCloudDialogflowCxV3beta1PageInfo (..),
    newGoogleCloudDialogflowCxV3beta1PageInfo,

    -- * GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
    GoogleCloudDialogflowCxV3beta1PageInfoFormInfo (..),
    newGoogleCloudDialogflowCxV3beta1PageInfoFormInfo,

    -- * GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
    GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo (..),
    newGoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo,

    -- * GoogleCloudDialogflowCxV3beta1QueryInput
    GoogleCloudDialogflowCxV3beta1QueryInput (..),
    newGoogleCloudDialogflowCxV3beta1QueryInput,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessage
    GoogleCloudDialogflowCxV3beta1ResponseMessage (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessage,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
    GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessage_Payload,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
    GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
    GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
    GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
    GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
    GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall,

    -- * GoogleCloudDialogflowCxV3beta1ResponseMessageText
    GoogleCloudDialogflowCxV3beta1ResponseMessageText (..),
    newGoogleCloudDialogflowCxV3beta1ResponseMessageText,

    -- * GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
    GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata (..),
    newGoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata,

    -- * GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
    GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse (..),
    newGoogleCloudDialogflowCxV3beta1RunContinuousTestResponse,

    -- * GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata
    GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata (..),
    newGoogleCloudDialogflowCxV3beta1RunTestCaseMetadata,

    -- * GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
    GoogleCloudDialogflowCxV3beta1RunTestCaseResponse (..),
    newGoogleCloudDialogflowCxV3beta1RunTestCaseResponse,

    -- * GoogleCloudDialogflowCxV3beta1SessionInfo
    GoogleCloudDialogflowCxV3beta1SessionInfo (..),
    newGoogleCloudDialogflowCxV3beta1SessionInfo,

    -- * GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
    GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters (..),
    newGoogleCloudDialogflowCxV3beta1SessionInfo_Parameters,

    -- * GoogleCloudDialogflowCxV3beta1TestCase
    GoogleCloudDialogflowCxV3beta1TestCase (..),
    newGoogleCloudDialogflowCxV3beta1TestCase,

    -- * GoogleCloudDialogflowCxV3beta1TestCaseError
    GoogleCloudDialogflowCxV3beta1TestCaseError (..),
    newGoogleCloudDialogflowCxV3beta1TestCaseError,

    -- * GoogleCloudDialogflowCxV3beta1TestCaseResult
    GoogleCloudDialogflowCxV3beta1TestCaseResult (..),
    newGoogleCloudDialogflowCxV3beta1TestCaseResult,

    -- * GoogleCloudDialogflowCxV3beta1TestConfig
    GoogleCloudDialogflowCxV3beta1TestConfig (..),
    newGoogleCloudDialogflowCxV3beta1TestConfig,

    -- * GoogleCloudDialogflowCxV3beta1TestError
    GoogleCloudDialogflowCxV3beta1TestError (..),
    newGoogleCloudDialogflowCxV3beta1TestError,

    -- * GoogleCloudDialogflowCxV3beta1TestRunDifference
    GoogleCloudDialogflowCxV3beta1TestRunDifference (..),
    newGoogleCloudDialogflowCxV3beta1TestRunDifference,

    -- * GoogleCloudDialogflowCxV3beta1TextInput
    GoogleCloudDialogflowCxV3beta1TextInput (..),
    newGoogleCloudDialogflowCxV3beta1TextInput,

    -- * GoogleCloudDialogflowCxV3beta1ToolCall
    GoogleCloudDialogflowCxV3beta1ToolCall (..),
    newGoogleCloudDialogflowCxV3beta1ToolCall,

    -- * GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
    GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters (..),
    newGoogleCloudDialogflowCxV3beta1ToolCall_InputParameters,

    -- * GoogleCloudDialogflowCxV3beta1ToolCallResult
    GoogleCloudDialogflowCxV3beta1ToolCallResult (..),
    newGoogleCloudDialogflowCxV3beta1ToolCallResult,

    -- * GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
    GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters (..),
    newGoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters,

    -- * GoogleCloudDialogflowCxV3beta1ToolCallResultError
    GoogleCloudDialogflowCxV3beta1ToolCallResultError (..),
    newGoogleCloudDialogflowCxV3beta1ToolCallResultError,

    -- * GoogleCloudDialogflowCxV3beta1TransitionRoute
    GoogleCloudDialogflowCxV3beta1TransitionRoute (..),
    newGoogleCloudDialogflowCxV3beta1TransitionRoute,

    -- * GoogleCloudDialogflowCxV3beta1TurnSignals
    GoogleCloudDialogflowCxV3beta1TurnSignals (..),
    newGoogleCloudDialogflowCxV3beta1TurnSignals,

    -- * GoogleCloudDialogflowCxV3beta1Webhook
    GoogleCloudDialogflowCxV3beta1Webhook (..),
    newGoogleCloudDialogflowCxV3beta1Webhook,

    -- * GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService (..),
    newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService,

    -- * GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping (..),
    newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping,

    -- * GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders (..),
    newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders,

    -- * GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig (..),
    newGoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequest
    GoogleCloudDialogflowCxV3beta1WebhookRequest (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequest,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
    GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequest_Payload,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
    GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue,

    -- * GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
    GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult (..),
    newGoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult,

    -- * GoogleCloudDialogflowCxV3beta1WebhookResponse
    GoogleCloudDialogflowCxV3beta1WebhookResponse (..),
    newGoogleCloudDialogflowCxV3beta1WebhookResponse,

    -- * GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
    GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload (..),
    newGoogleCloudDialogflowCxV3beta1WebhookResponse_Payload,

    -- * GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
    GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse (..),
    newGoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse,

    -- * GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
    GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig (..),
    newGoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig,

    -- * GoogleCloudDialogflowV2AnnotatedMessagePart
    GoogleCloudDialogflowV2AnnotatedMessagePart (..),
    newGoogleCloudDialogflowV2AnnotatedMessagePart,

    -- * GoogleCloudDialogflowV2ArticleAnswer
    GoogleCloudDialogflowV2ArticleAnswer (..),
    newGoogleCloudDialogflowV2ArticleAnswer,

    -- * GoogleCloudDialogflowV2ArticleAnswer_Metadata
    GoogleCloudDialogflowV2ArticleAnswer_Metadata (..),
    newGoogleCloudDialogflowV2ArticleAnswer_Metadata,

    -- * GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
    GoogleCloudDialogflowV2ArticleSuggestionModelMetadata (..),
    newGoogleCloudDialogflowV2ArticleSuggestionModelMetadata,

    -- * GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
    GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse (..),
    newGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse,

    -- * GoogleCloudDialogflowV2BatchUpdateIntentsResponse
    GoogleCloudDialogflowV2BatchUpdateIntentsResponse (..),
    newGoogleCloudDialogflowV2BatchUpdateIntentsResponse,

    -- * GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
    GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata (..),
    newGoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata,

    -- * GoogleCloudDialogflowV2Context
    GoogleCloudDialogflowV2Context (..),
    newGoogleCloudDialogflowV2Context,

    -- * GoogleCloudDialogflowV2Context_Parameters
    GoogleCloudDialogflowV2Context_Parameters (..),
    newGoogleCloudDialogflowV2Context_Parameters,

    -- * GoogleCloudDialogflowV2ConversationEvent
    GoogleCloudDialogflowV2ConversationEvent (..),
    newGoogleCloudDialogflowV2ConversationEvent,

    -- * GoogleCloudDialogflowV2ConversationModel
    GoogleCloudDialogflowV2ConversationModel (..),
    newGoogleCloudDialogflowV2ConversationModel,

    -- * GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
    GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata (..),
    newGoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata,

    -- * GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
    GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata (..),
    newGoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata,

    -- * GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
    GoogleCloudDialogflowV2CreateConversationModelOperationMetadata (..),
    newGoogleCloudDialogflowV2CreateConversationModelOperationMetadata,

    -- * GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata
    GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata (..),
    newGoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata,

    -- * GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
    GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata (..),
    newGoogleCloudDialogflowV2DeleteConversationModelOperationMetadata,

    -- * GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
    GoogleCloudDialogflowV2DeployConversationModelOperationMetadata (..),
    newGoogleCloudDialogflowV2DeployConversationModelOperationMetadata,

    -- * GoogleCloudDialogflowV2EncryptionSpec
    GoogleCloudDialogflowV2EncryptionSpec (..),
    newGoogleCloudDialogflowV2EncryptionSpec,

    -- * GoogleCloudDialogflowV2EntityType
    GoogleCloudDialogflowV2EntityType (..),
    newGoogleCloudDialogflowV2EntityType,

    -- * GoogleCloudDialogflowV2EntityTypeEntity
    GoogleCloudDialogflowV2EntityTypeEntity (..),
    newGoogleCloudDialogflowV2EntityTypeEntity,

    -- * GoogleCloudDialogflowV2EventInput
    GoogleCloudDialogflowV2EventInput (..),
    newGoogleCloudDialogflowV2EventInput,

    -- * GoogleCloudDialogflowV2EventInput_Parameters
    GoogleCloudDialogflowV2EventInput_Parameters (..),
    newGoogleCloudDialogflowV2EventInput_Parameters,

    -- * GoogleCloudDialogflowV2ExportAgentResponse
    GoogleCloudDialogflowV2ExportAgentResponse (..),
    newGoogleCloudDialogflowV2ExportAgentResponse,

    -- * GoogleCloudDialogflowV2ExportOperationMetadata
    GoogleCloudDialogflowV2ExportOperationMetadata (..),
    newGoogleCloudDialogflowV2ExportOperationMetadata,

    -- * GoogleCloudDialogflowV2FaqAnswer
    GoogleCloudDialogflowV2FaqAnswer (..),
    newGoogleCloudDialogflowV2FaqAnswer,

    -- * GoogleCloudDialogflowV2FaqAnswer_Metadata
    GoogleCloudDialogflowV2FaqAnswer_Metadata (..),
    newGoogleCloudDialogflowV2FaqAnswer_Metadata,

    -- * GoogleCloudDialogflowV2GcsDestination
    GoogleCloudDialogflowV2GcsDestination (..),
    newGoogleCloudDialogflowV2GcsDestination,

    -- * GoogleCloudDialogflowV2HumanAgentAssistantEvent
    GoogleCloudDialogflowV2HumanAgentAssistantEvent (..),
    newGoogleCloudDialogflowV2HumanAgentAssistantEvent,

    -- * GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
    GoogleCloudDialogflowV2ImportConversationDataOperationMetadata (..),
    newGoogleCloudDialogflowV2ImportConversationDataOperationMetadata,

    -- * GoogleCloudDialogflowV2ImportConversationDataOperationResponse
    GoogleCloudDialogflowV2ImportConversationDataOperationResponse (..),
    newGoogleCloudDialogflowV2ImportConversationDataOperationResponse,

    -- * GoogleCloudDialogflowV2ImportDocumentsResponse
    GoogleCloudDialogflowV2ImportDocumentsResponse (..),
    newGoogleCloudDialogflowV2ImportDocumentsResponse,

    -- * GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
    GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata (..),
    newGoogleCloudDialogflowV2InitializeEncryptionSpecMetadata,

    -- * GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
    GoogleCloudDialogflowV2InitializeEncryptionSpecRequest (..),
    newGoogleCloudDialogflowV2InitializeEncryptionSpecRequest,

    -- * GoogleCloudDialogflowV2InputDataset
    GoogleCloudDialogflowV2InputDataset (..),
    newGoogleCloudDialogflowV2InputDataset,

    -- * GoogleCloudDialogflowV2Intent
    GoogleCloudDialogflowV2Intent (..),
    newGoogleCloudDialogflowV2Intent,

    -- * GoogleCloudDialogflowV2IntentFollowupIntentInfo
    GoogleCloudDialogflowV2IntentFollowupIntentInfo (..),
    newGoogleCloudDialogflowV2IntentFollowupIntentInfo,

    -- * GoogleCloudDialogflowV2IntentMessage
    GoogleCloudDialogflowV2IntentMessage (..),
    newGoogleCloudDialogflowV2IntentMessage,

    -- * GoogleCloudDialogflowV2IntentMessage_Payload
    GoogleCloudDialogflowV2IntentMessage_Payload (..),
    newGoogleCloudDialogflowV2IntentMessage_Payload,

    -- * GoogleCloudDialogflowV2IntentMessageBasicCard
    GoogleCloudDialogflowV2IntentMessageBasicCard (..),
    newGoogleCloudDialogflowV2IntentMessageBasicCard,

    -- * GoogleCloudDialogflowV2IntentMessageBasicCardButton
    GoogleCloudDialogflowV2IntentMessageBasicCardButton (..),
    newGoogleCloudDialogflowV2IntentMessageBasicCardButton,

    -- * GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
    GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction (..),
    newGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction,

    -- * GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard (..),
    newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard,

    -- * GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem (..),
    newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem,

    -- * GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction (..),
    newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction,

    -- * GoogleCloudDialogflowV2IntentMessageCard
    GoogleCloudDialogflowV2IntentMessageCard (..),
    newGoogleCloudDialogflowV2IntentMessageCard,

    -- * GoogleCloudDialogflowV2IntentMessageCardButton
    GoogleCloudDialogflowV2IntentMessageCardButton (..),
    newGoogleCloudDialogflowV2IntentMessageCardButton,

    -- * GoogleCloudDialogflowV2IntentMessageCarouselSelect
    GoogleCloudDialogflowV2IntentMessageCarouselSelect (..),
    newGoogleCloudDialogflowV2IntentMessageCarouselSelect,

    -- * GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
    GoogleCloudDialogflowV2IntentMessageCarouselSelectItem (..),
    newGoogleCloudDialogflowV2IntentMessageCarouselSelectItem,

    -- * GoogleCloudDialogflowV2IntentMessageColumnProperties
    GoogleCloudDialogflowV2IntentMessageColumnProperties (..),
    newGoogleCloudDialogflowV2IntentMessageColumnProperties,

    -- * GoogleCloudDialogflowV2IntentMessageImage
    GoogleCloudDialogflowV2IntentMessageImage (..),
    newGoogleCloudDialogflowV2IntentMessageImage,

    -- * GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
    GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion (..),
    newGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion,

    -- * GoogleCloudDialogflowV2IntentMessageListSelect
    GoogleCloudDialogflowV2IntentMessageListSelect (..),
    newGoogleCloudDialogflowV2IntentMessageListSelect,

    -- * GoogleCloudDialogflowV2IntentMessageListSelectItem
    GoogleCloudDialogflowV2IntentMessageListSelectItem (..),
    newGoogleCloudDialogflowV2IntentMessageListSelectItem,

    -- * GoogleCloudDialogflowV2IntentMessageMediaContent
    GoogleCloudDialogflowV2IntentMessageMediaContent (..),
    newGoogleCloudDialogflowV2IntentMessageMediaContent,

    -- * GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
    GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject (..),
    newGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject,

    -- * GoogleCloudDialogflowV2IntentMessageQuickReplies
    GoogleCloudDialogflowV2IntentMessageQuickReplies (..),
    newGoogleCloudDialogflowV2IntentMessageQuickReplies,

    -- * GoogleCloudDialogflowV2IntentMessageSelectItemInfo
    GoogleCloudDialogflowV2IntentMessageSelectItemInfo (..),
    newGoogleCloudDialogflowV2IntentMessageSelectItemInfo,

    -- * GoogleCloudDialogflowV2IntentMessageSimpleResponse
    GoogleCloudDialogflowV2IntentMessageSimpleResponse (..),
    newGoogleCloudDialogflowV2IntentMessageSimpleResponse,

    -- * GoogleCloudDialogflowV2IntentMessageSimpleResponses
    GoogleCloudDialogflowV2IntentMessageSimpleResponses (..),
    newGoogleCloudDialogflowV2IntentMessageSimpleResponses,

    -- * GoogleCloudDialogflowV2IntentMessageSuggestion
    GoogleCloudDialogflowV2IntentMessageSuggestion (..),
    newGoogleCloudDialogflowV2IntentMessageSuggestion,

    -- * GoogleCloudDialogflowV2IntentMessageSuggestions
    GoogleCloudDialogflowV2IntentMessageSuggestions (..),
    newGoogleCloudDialogflowV2IntentMessageSuggestions,

    -- * GoogleCloudDialogflowV2IntentMessageTableCard
    GoogleCloudDialogflowV2IntentMessageTableCard (..),
    newGoogleCloudDialogflowV2IntentMessageTableCard,

    -- * GoogleCloudDialogflowV2IntentMessageTableCardCell
    GoogleCloudDialogflowV2IntentMessageTableCardCell (..),
    newGoogleCloudDialogflowV2IntentMessageTableCardCell,

    -- * GoogleCloudDialogflowV2IntentMessageTableCardRow
    GoogleCloudDialogflowV2IntentMessageTableCardRow (..),
    newGoogleCloudDialogflowV2IntentMessageTableCardRow,

    -- * GoogleCloudDialogflowV2IntentMessageText
    GoogleCloudDialogflowV2IntentMessageText (..),
    newGoogleCloudDialogflowV2IntentMessageText,

    -- * GoogleCloudDialogflowV2IntentParameter
    GoogleCloudDialogflowV2IntentParameter (..),
    newGoogleCloudDialogflowV2IntentParameter,

    -- * GoogleCloudDialogflowV2IntentTrainingPhrase
    GoogleCloudDialogflowV2IntentTrainingPhrase (..),
    newGoogleCloudDialogflowV2IntentTrainingPhrase,

    -- * GoogleCloudDialogflowV2IntentTrainingPhrasePart
    GoogleCloudDialogflowV2IntentTrainingPhrasePart (..),
    newGoogleCloudDialogflowV2IntentTrainingPhrasePart,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswer
    GoogleCloudDialogflowV2KnowledgeAssistAnswer (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswer,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata,

    -- * GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
    GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery (..),
    newGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery,

    -- * GoogleCloudDialogflowV2KnowledgeOperationMetadata
    GoogleCloudDialogflowV2KnowledgeOperationMetadata (..),
    newGoogleCloudDialogflowV2KnowledgeOperationMetadata,

    -- * GoogleCloudDialogflowV2Message
    GoogleCloudDialogflowV2Message (..),
    newGoogleCloudDialogflowV2Message,

    -- * GoogleCloudDialogflowV2MessageAnnotation
    GoogleCloudDialogflowV2MessageAnnotation (..),
    newGoogleCloudDialogflowV2MessageAnnotation,

    -- * GoogleCloudDialogflowV2OriginalDetectIntentRequest
    GoogleCloudDialogflowV2OriginalDetectIntentRequest (..),
    newGoogleCloudDialogflowV2OriginalDetectIntentRequest,

    -- * GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
    GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload (..),
    newGoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload,

    -- * GoogleCloudDialogflowV2QueryResult
    GoogleCloudDialogflowV2QueryResult (..),
    newGoogleCloudDialogflowV2QueryResult,

    -- * GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
    GoogleCloudDialogflowV2QueryResult_DiagnosticInfo (..),
    newGoogleCloudDialogflowV2QueryResult_DiagnosticInfo,

    -- * GoogleCloudDialogflowV2QueryResult_Parameters
    GoogleCloudDialogflowV2QueryResult_Parameters (..),
    newGoogleCloudDialogflowV2QueryResult_Parameters,

    -- * GoogleCloudDialogflowV2QueryResult_WebhookPayload
    GoogleCloudDialogflowV2QueryResult_WebhookPayload (..),
    newGoogleCloudDialogflowV2QueryResult_WebhookPayload,

    -- * GoogleCloudDialogflowV2Sentiment
    GoogleCloudDialogflowV2Sentiment (..),
    newGoogleCloudDialogflowV2Sentiment,

    -- * GoogleCloudDialogflowV2SentimentAnalysisResult
    GoogleCloudDialogflowV2SentimentAnalysisResult (..),
    newGoogleCloudDialogflowV2SentimentAnalysisResult,

    -- * GoogleCloudDialogflowV2SessionEntityType
    GoogleCloudDialogflowV2SessionEntityType (..),
    newGoogleCloudDialogflowV2SessionEntityType,

    -- * GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
    GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata (..),
    newGoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata,

    -- * GoogleCloudDialogflowV2SmartReplyAnswer
    GoogleCloudDialogflowV2SmartReplyAnswer (..),
    newGoogleCloudDialogflowV2SmartReplyAnswer,

    -- * GoogleCloudDialogflowV2SmartReplyModelMetadata
    GoogleCloudDialogflowV2SmartReplyModelMetadata (..),
    newGoogleCloudDialogflowV2SmartReplyModelMetadata,

    -- * GoogleCloudDialogflowV2SpeechWordInfo
    GoogleCloudDialogflowV2SpeechWordInfo (..),
    newGoogleCloudDialogflowV2SpeechWordInfo,

    -- * GoogleCloudDialogflowV2StreamingRecognitionResult
    GoogleCloudDialogflowV2StreamingRecognitionResult (..),
    newGoogleCloudDialogflowV2StreamingRecognitionResult,

    -- * GoogleCloudDialogflowV2SuggestArticlesResponse
    GoogleCloudDialogflowV2SuggestArticlesResponse (..),
    newGoogleCloudDialogflowV2SuggestArticlesResponse,

    -- * GoogleCloudDialogflowV2SuggestFaqAnswersResponse
    GoogleCloudDialogflowV2SuggestFaqAnswersResponse (..),
    newGoogleCloudDialogflowV2SuggestFaqAnswersResponse,

    -- * GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
    GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse (..),
    newGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse,

    -- * GoogleCloudDialogflowV2SuggestSmartRepliesResponse
    GoogleCloudDialogflowV2SuggestSmartRepliesResponse (..),
    newGoogleCloudDialogflowV2SuggestSmartRepliesResponse,

    -- * GoogleCloudDialogflowV2SuggestionResult
    GoogleCloudDialogflowV2SuggestionResult (..),
    newGoogleCloudDialogflowV2SuggestionResult,

    -- * GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
    GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata (..),
    newGoogleCloudDialogflowV2UndeployConversationModelOperationMetadata,

    -- * GoogleCloudDialogflowV2WebhookRequest
    GoogleCloudDialogflowV2WebhookRequest (..),
    newGoogleCloudDialogflowV2WebhookRequest,

    -- * GoogleCloudDialogflowV2WebhookResponse
    GoogleCloudDialogflowV2WebhookResponse (..),
    newGoogleCloudDialogflowV2WebhookResponse,

    -- * GoogleCloudDialogflowV2WebhookResponse_Payload
    GoogleCloudDialogflowV2WebhookResponse_Payload (..),
    newGoogleCloudDialogflowV2WebhookResponse_Payload,

    -- * GoogleCloudDialogflowV2beta1AnnotatedMessagePart
    GoogleCloudDialogflowV2beta1AnnotatedMessagePart (..),
    newGoogleCloudDialogflowV2beta1AnnotatedMessagePart,

    -- * GoogleCloudDialogflowV2beta1ArticleAnswer
    GoogleCloudDialogflowV2beta1ArticleAnswer (..),
    newGoogleCloudDialogflowV2beta1ArticleAnswer,

    -- * GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
    GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata (..),
    newGoogleCloudDialogflowV2beta1ArticleAnswer_Metadata,

    -- * GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
    GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse (..),
    newGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse,

    -- * GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
    GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse (..),
    newGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse,

    -- * GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
    GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata (..),
    newGoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata,

    -- * GoogleCloudDialogflowV2beta1Context
    GoogleCloudDialogflowV2beta1Context (..),
    newGoogleCloudDialogflowV2beta1Context,

    -- * GoogleCloudDialogflowV2beta1Context_Parameters
    GoogleCloudDialogflowV2beta1Context_Parameters (..),
    newGoogleCloudDialogflowV2beta1Context_Parameters,

    -- * GoogleCloudDialogflowV2beta1ConversationEvent
    GoogleCloudDialogflowV2beta1ConversationEvent (..),
    newGoogleCloudDialogflowV2beta1ConversationEvent,

    -- * GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
    GoogleCloudDialogflowV2beta1DialogflowAssistAnswer (..),
    newGoogleCloudDialogflowV2beta1DialogflowAssistAnswer,

    -- * GoogleCloudDialogflowV2beta1EncryptionSpec
    GoogleCloudDialogflowV2beta1EncryptionSpec (..),
    newGoogleCloudDialogflowV2beta1EncryptionSpec,

    -- * GoogleCloudDialogflowV2beta1EntityType
    GoogleCloudDialogflowV2beta1EntityType (..),
    newGoogleCloudDialogflowV2beta1EntityType,

    -- * GoogleCloudDialogflowV2beta1EntityTypeEntity
    GoogleCloudDialogflowV2beta1EntityTypeEntity (..),
    newGoogleCloudDialogflowV2beta1EntityTypeEntity,

    -- * GoogleCloudDialogflowV2beta1EventInput
    GoogleCloudDialogflowV2beta1EventInput (..),
    newGoogleCloudDialogflowV2beta1EventInput,

    -- * GoogleCloudDialogflowV2beta1EventInput_Parameters
    GoogleCloudDialogflowV2beta1EventInput_Parameters (..),
    newGoogleCloudDialogflowV2beta1EventInput_Parameters,

    -- * GoogleCloudDialogflowV2beta1ExportAgentResponse
    GoogleCloudDialogflowV2beta1ExportAgentResponse (..),
    newGoogleCloudDialogflowV2beta1ExportAgentResponse,

    -- * GoogleCloudDialogflowV2beta1ExportOperationMetadata
    GoogleCloudDialogflowV2beta1ExportOperationMetadata (..),
    newGoogleCloudDialogflowV2beta1ExportOperationMetadata,

    -- * GoogleCloudDialogflowV2beta1FaqAnswer
    GoogleCloudDialogflowV2beta1FaqAnswer (..),
    newGoogleCloudDialogflowV2beta1FaqAnswer,

    -- * GoogleCloudDialogflowV2beta1FaqAnswer_Metadata
    GoogleCloudDialogflowV2beta1FaqAnswer_Metadata (..),
    newGoogleCloudDialogflowV2beta1FaqAnswer_Metadata,

    -- * GoogleCloudDialogflowV2beta1GcsDestination
    GoogleCloudDialogflowV2beta1GcsDestination (..),
    newGoogleCloudDialogflowV2beta1GcsDestination,

    -- * GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
    GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent (..),
    newGoogleCloudDialogflowV2beta1HumanAgentAssistantEvent,

    -- * GoogleCloudDialogflowV2beta1ImportDocumentsResponse
    GoogleCloudDialogflowV2beta1ImportDocumentsResponse (..),
    newGoogleCloudDialogflowV2beta1ImportDocumentsResponse,

    -- * GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata (..),
    newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata,

    -- * GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest (..),
    newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest,

    -- * GoogleCloudDialogflowV2beta1Intent
    GoogleCloudDialogflowV2beta1Intent (..),
    newGoogleCloudDialogflowV2beta1Intent,

    -- * GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
    GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo (..),
    newGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo,

    -- * GoogleCloudDialogflowV2beta1IntentMessage
    GoogleCloudDialogflowV2beta1IntentMessage (..),
    newGoogleCloudDialogflowV2beta1IntentMessage,

    -- * GoogleCloudDialogflowV2beta1IntentMessage_Payload
    GoogleCloudDialogflowV2beta1IntentMessage_Payload (..),
    newGoogleCloudDialogflowV2beta1IntentMessage_Payload,

    -- * GoogleCloudDialogflowV2beta1IntentMessageBasicCard
    GoogleCloudDialogflowV2beta1IntentMessageBasicCard (..),
    newGoogleCloudDialogflowV2beta1IntentMessageBasicCard,

    -- * GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton (..),
    newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton,

    -- * GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction (..),
    newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction,

    -- * GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard (..),
    newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard,

    -- * GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem (..),
    newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem,

    -- * GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction (..),
    newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction,

    -- * GoogleCloudDialogflowV2beta1IntentMessageCard
    GoogleCloudDialogflowV2beta1IntentMessageCard (..),
    newGoogleCloudDialogflowV2beta1IntentMessageCard,

    -- * GoogleCloudDialogflowV2beta1IntentMessageCardButton
    GoogleCloudDialogflowV2beta1IntentMessageCardButton (..),
    newGoogleCloudDialogflowV2beta1IntentMessageCardButton,

    -- * GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect (..),
    newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect,

    -- * GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem (..),
    newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem,

    -- * GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
    GoogleCloudDialogflowV2beta1IntentMessageColumnProperties (..),
    newGoogleCloudDialogflowV2beta1IntentMessageColumnProperties,

    -- * GoogleCloudDialogflowV2beta1IntentMessageImage
    GoogleCloudDialogflowV2beta1IntentMessageImage (..),
    newGoogleCloudDialogflowV2beta1IntentMessageImage,

    -- * GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
    GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion (..),
    newGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion,

    -- * GoogleCloudDialogflowV2beta1IntentMessageListSelect
    GoogleCloudDialogflowV2beta1IntentMessageListSelect (..),
    newGoogleCloudDialogflowV2beta1IntentMessageListSelect,

    -- * GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
    GoogleCloudDialogflowV2beta1IntentMessageListSelectItem (..),
    newGoogleCloudDialogflowV2beta1IntentMessageListSelectItem,

    -- * GoogleCloudDialogflowV2beta1IntentMessageMediaContent
    GoogleCloudDialogflowV2beta1IntentMessageMediaContent (..),
    newGoogleCloudDialogflowV2beta1IntentMessageMediaContent,

    -- * GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
    GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject (..),
    newGoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject,

    -- * GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
    GoogleCloudDialogflowV2beta1IntentMessageQuickReplies (..),
    newGoogleCloudDialogflowV2beta1IntentMessageQuickReplies,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContent,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
    GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
    GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion,

    -- * GoogleCloudDialogflowV2beta1IntentMessageRbmText
    GoogleCloudDialogflowV2beta1IntentMessageRbmText (..),
    newGoogleCloudDialogflowV2beta1IntentMessageRbmText,

    -- * GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
    GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo (..),
    newGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo,

    -- * GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
    GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse (..),
    newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse,

    -- * GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
    GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses (..),
    newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses,

    -- * GoogleCloudDialogflowV2beta1IntentMessageSuggestion
    GoogleCloudDialogflowV2beta1IntentMessageSuggestion (..),
    newGoogleCloudDialogflowV2beta1IntentMessageSuggestion,

    -- * GoogleCloudDialogflowV2beta1IntentMessageSuggestions
    GoogleCloudDialogflowV2beta1IntentMessageSuggestions (..),
    newGoogleCloudDialogflowV2beta1IntentMessageSuggestions,

    -- * GoogleCloudDialogflowV2beta1IntentMessageTableCard
    GoogleCloudDialogflowV2beta1IntentMessageTableCard (..),
    newGoogleCloudDialogflowV2beta1IntentMessageTableCard,

    -- * GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
    GoogleCloudDialogflowV2beta1IntentMessageTableCardCell (..),
    newGoogleCloudDialogflowV2beta1IntentMessageTableCardCell,

    -- * GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
    GoogleCloudDialogflowV2beta1IntentMessageTableCardRow (..),
    newGoogleCloudDialogflowV2beta1IntentMessageTableCardRow,

    -- * GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio (..),
    newGoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio,

    -- * GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
    GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech (..),
    newGoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech,

    -- * GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall (..),
    newGoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall,

    -- * GoogleCloudDialogflowV2beta1IntentMessageText
    GoogleCloudDialogflowV2beta1IntentMessageText (..),
    newGoogleCloudDialogflowV2beta1IntentMessageText,

    -- * GoogleCloudDialogflowV2beta1IntentParameter
    GoogleCloudDialogflowV2beta1IntentParameter (..),
    newGoogleCloudDialogflowV2beta1IntentParameter,

    -- * GoogleCloudDialogflowV2beta1IntentSuggestion
    GoogleCloudDialogflowV2beta1IntentSuggestion (..),
    newGoogleCloudDialogflowV2beta1IntentSuggestion,

    -- * GoogleCloudDialogflowV2beta1IntentTrainingPhrase
    GoogleCloudDialogflowV2beta1IntentTrainingPhrase (..),
    newGoogleCloudDialogflowV2beta1IntentTrainingPhrase,

    -- * GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
    GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart (..),
    newGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAnswers
    GoogleCloudDialogflowV2beta1KnowledgeAnswers (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAnswers,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
    GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswer,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata,

    -- * GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery (..),
    newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery,

    -- * GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
    GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata (..),
    newGoogleCloudDialogflowV2beta1KnowledgeOperationMetadata,

    -- * GoogleCloudDialogflowV2beta1Message
    GoogleCloudDialogflowV2beta1Message (..),
    newGoogleCloudDialogflowV2beta1Message,

    -- * GoogleCloudDialogflowV2beta1MessageAnnotation
    GoogleCloudDialogflowV2beta1MessageAnnotation (..),
    newGoogleCloudDialogflowV2beta1MessageAnnotation,

    -- * GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest (..),
    newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest,

    -- * GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload (..),
    newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload,

    -- * GoogleCloudDialogflowV2beta1QueryResult
    GoogleCloudDialogflowV2beta1QueryResult (..),
    newGoogleCloudDialogflowV2beta1QueryResult,

    -- * GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
    GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo (..),
    newGoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo,

    -- * GoogleCloudDialogflowV2beta1QueryResult_Parameters
    GoogleCloudDialogflowV2beta1QueryResult_Parameters (..),
    newGoogleCloudDialogflowV2beta1QueryResult_Parameters,

    -- * GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
    GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload (..),
    newGoogleCloudDialogflowV2beta1QueryResult_WebhookPayload,

    -- * GoogleCloudDialogflowV2beta1ResponseMessage
    GoogleCloudDialogflowV2beta1ResponseMessage (..),
    newGoogleCloudDialogflowV2beta1ResponseMessage,

    -- * GoogleCloudDialogflowV2beta1ResponseMessage_Payload
    GoogleCloudDialogflowV2beta1ResponseMessage_Payload (..),
    newGoogleCloudDialogflowV2beta1ResponseMessage_Payload,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
    GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageEndInteraction,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudio,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
    GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall,

    -- * GoogleCloudDialogflowV2beta1ResponseMessageText
    GoogleCloudDialogflowV2beta1ResponseMessageText (..),
    newGoogleCloudDialogflowV2beta1ResponseMessageText,

    -- * GoogleCloudDialogflowV2beta1Sentiment
    GoogleCloudDialogflowV2beta1Sentiment (..),
    newGoogleCloudDialogflowV2beta1Sentiment,

    -- * GoogleCloudDialogflowV2beta1SentimentAnalysisResult
    GoogleCloudDialogflowV2beta1SentimentAnalysisResult (..),
    newGoogleCloudDialogflowV2beta1SentimentAnalysisResult,

    -- * GoogleCloudDialogflowV2beta1SessionEntityType
    GoogleCloudDialogflowV2beta1SessionEntityType (..),
    newGoogleCloudDialogflowV2beta1SessionEntityType,

    -- * GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
    GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata (..),
    newGoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata,

    -- * GoogleCloudDialogflowV2beta1SmartReplyAnswer
    GoogleCloudDialogflowV2beta1SmartReplyAnswer (..),
    newGoogleCloudDialogflowV2beta1SmartReplyAnswer,

    -- * GoogleCloudDialogflowV2beta1SpeechWordInfo
    GoogleCloudDialogflowV2beta1SpeechWordInfo (..),
    newGoogleCloudDialogflowV2beta1SpeechWordInfo,

    -- * GoogleCloudDialogflowV2beta1StreamingRecognitionResult
    GoogleCloudDialogflowV2beta1StreamingRecognitionResult (..),
    newGoogleCloudDialogflowV2beta1StreamingRecognitionResult,

    -- * GoogleCloudDialogflowV2beta1SuggestArticlesResponse
    GoogleCloudDialogflowV2beta1SuggestArticlesResponse (..),
    newGoogleCloudDialogflowV2beta1SuggestArticlesResponse,

    -- * GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
    GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse (..),
    newGoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse,

    -- * GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
    GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse (..),
    newGoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse,

    -- * GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
    GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse (..),
    newGoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse,

    -- * GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
    GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse (..),
    newGoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse,

    -- * GoogleCloudDialogflowV2beta1SuggestionResult
    GoogleCloudDialogflowV2beta1SuggestionResult (..),
    newGoogleCloudDialogflowV2beta1SuggestionResult,

    -- * GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
    GoogleCloudDialogflowV2beta1TelephonyDtmfEvents (..),
    newGoogleCloudDialogflowV2beta1TelephonyDtmfEvents,

    -- * GoogleCloudDialogflowV2beta1WebhookRequest
    GoogleCloudDialogflowV2beta1WebhookRequest (..),
    newGoogleCloudDialogflowV2beta1WebhookRequest,

    -- * GoogleCloudDialogflowV2beta1WebhookResponse
    GoogleCloudDialogflowV2beta1WebhookResponse (..),
    newGoogleCloudDialogflowV2beta1WebhookResponse,

    -- * GoogleCloudDialogflowV2beta1WebhookResponse_Payload
    GoogleCloudDialogflowV2beta1WebhookResponse_Payload (..),
    newGoogleCloudDialogflowV2beta1WebhookResponse_Payload,

    -- * GoogleCloudDialogflowV3alpha1ConversationSignals
    GoogleCloudDialogflowV3alpha1ConversationSignals (..),
    newGoogleCloudDialogflowV3alpha1ConversationSignals,

    -- * GoogleCloudDialogflowV3alpha1TurnSignals
    GoogleCloudDialogflowV3alpha1TurnSignals (..),
    newGoogleCloudDialogflowV3alpha1TurnSignals,

    -- * GoogleCloudLocationListLocationsResponse
    GoogleCloudLocationListLocationsResponse (..),
    newGoogleCloudLocationListLocationsResponse,

    -- * GoogleCloudLocationLocation
    GoogleCloudLocationLocation (..),
    newGoogleCloudLocationLocation,

    -- * GoogleCloudLocationLocation_Labels
    GoogleCloudLocationLocation_Labels (..),
    newGoogleCloudLocationLocation_Labels,

    -- * GoogleCloudLocationLocation_Metadata
    GoogleCloudLocationLocation_Metadata (..),
    newGoogleCloudLocationLocation_Metadata,

    -- * GoogleLongrunningListOperationsResponse
    GoogleLongrunningListOperationsResponse (..),
    newGoogleLongrunningListOperationsResponse,

    -- * GoogleLongrunningOperation
    GoogleLongrunningOperation (..),
    newGoogleLongrunningOperation,

    -- * GoogleLongrunningOperation_Metadata
    GoogleLongrunningOperation_Metadata (..),
    newGoogleLongrunningOperation_Metadata,

    -- * GoogleLongrunningOperation_Response
    GoogleLongrunningOperation_Response (..),
    newGoogleLongrunningOperation_Response,

    -- * GoogleProtobufEmpty
    GoogleProtobufEmpty (..),
    newGoogleProtobufEmpty,

    -- * GoogleRpcStatus
    GoogleRpcStatus (..),
    newGoogleRpcStatus,

    -- * GoogleRpcStatus_DetailsItem
    GoogleRpcStatus_DetailsItem (..),
    newGoogleRpcStatus_DetailsItem,

    -- * GoogleTypeLatLng
    GoogleTypeLatLng (..),
    newGoogleTypeLatLng,
  )
where

import Gogol.DialogFlow.Internal.Sum
import Gogol.Prelude qualified as Core

-- | Hierarchical advanced settings for agent\/flow\/page\/fulfillment\/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback/interruption/settings at fulfillment level only overrides the playback/interruption/settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent->Flow->Page->Fulfillment\/Parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AdvancedSettings' smart constructor.
data GoogleCloudDialogflowCxV3AdvancedSettings = GoogleCloudDialogflowCxV3AdvancedSettings
  { -- | If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level
    audioExportGcsDestination :: (Core.Maybe GoogleCloudDialogflowCxV3GcsDestination),
    -- | Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level.
    dtmfSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings),
    -- | Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level.
    loggingSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
      ),
    -- | Settings for speech to text detection. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level
    speechSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AdvancedSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AdvancedSettings ::
  GoogleCloudDialogflowCxV3AdvancedSettings
newGoogleCloudDialogflowCxV3AdvancedSettings =
  GoogleCloudDialogflowCxV3AdvancedSettings
    { audioExportGcsDestination =
        Core.Nothing,
      dtmfSettings = Core.Nothing,
      loggingSettings = Core.Nothing,
      speechSettings = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3AdvancedSettings where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AdvancedSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AdvancedSettings
            Core.<$> (o Core..:? "audioExportGcsDestination")
            Core.<*> (o Core..:? "dtmfSettings")
            Core.<*> (o Core..:? "loggingSettings")
            Core.<*> (o Core..:? "speechSettings")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3AdvancedSettings where
  toJSON GoogleCloudDialogflowCxV3AdvancedSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("audioExportGcsDestination" Core..=)
              Core.<$> audioExportGcsDestination,
            ("dtmfSettings" Core..=) Core.<$> dtmfSettings,
            ("loggingSettings" Core..=) Core.<$> loggingSettings,
            ("speechSettings" Core..=) Core.<$> speechSettings
          ]
      )

-- | Define behaviors for DTMF (dual tone multi frequency).
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings' smart constructor.
data GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings = GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
  { -- | If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).
    enabled :: (Core.Maybe Core.Bool),
    -- | Endpoint timeout setting for matching dtmf input to regex.
    endpointingTimeoutDuration :: (Core.Maybe Core.Duration),
    -- | The digit that terminates a DTMF digit sequence.
    finishDigit :: (Core.Maybe Core.Text),
    -- | Interdigit timeout setting for matching dtmf input to regex.
    interdigitTimeoutDuration :: (Core.Maybe Core.Duration),
    -- | Max length of DTMF digits.
    maxDigits :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings ::
  GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
newGoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings =
  GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
    { enabled =
        Core.Nothing,
      endpointingTimeoutDuration = Core.Nothing,
      finishDigit = Core.Nothing,
      interdigitTimeoutDuration = Core.Nothing,
      maxDigits = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
            Core.<$> (o Core..:? "enabled")
            Core.<*> (o Core..:? "endpointingTimeoutDuration")
            Core.<*> (o Core..:? "finishDigit")
            Core.<*> (o Core..:? "interdigitTimeoutDuration")
            Core.<*> (o Core..:? "maxDigits")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings
  where
  toJSON GoogleCloudDialogflowCxV3AdvancedSettingsDtmfSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("enabled" Core..=) Core.<$> enabled,
            ("endpointingTimeoutDuration" Core..=)
              Core.<$> endpointingTimeoutDuration,
            ("finishDigit" Core..=) Core.<$> finishDigit,
            ("interdigitTimeoutDuration" Core..=)
              Core.<$> interdigitTimeoutDuration,
            ("maxDigits" Core..=) Core.<$> maxDigits
          ]
      )

-- | Define behaviors on logging.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings' smart constructor.
data GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings = GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
  { -- | Enables consent-based end-user input redaction, if true, a pre-defined session parameter @$session.params.conversation-redaction@ will be used to determine if the utterance should be redacted.
    enableConsentBasedRedaction :: (Core.Maybe Core.Bool),
    -- | Enables DF Interaction logging.
    enableInteractionLogging :: (Core.Maybe Core.Bool),
    -- | Enables Google Cloud Logging.
    enableStackdriverLogging :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings ::
  GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
newGoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings =
  GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
    { enableConsentBasedRedaction =
        Core.Nothing,
      enableInteractionLogging =
        Core.Nothing,
      enableStackdriverLogging =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
            Core.<$> (o Core..:? "enableConsentBasedRedaction")
            Core.<*> (o Core..:? "enableInteractionLogging")
            Core.<*> (o Core..:? "enableStackdriverLogging")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings
  where
  toJSON GoogleCloudDialogflowCxV3AdvancedSettingsLoggingSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableConsentBasedRedaction" Core..=)
              Core.<$> enableConsentBasedRedaction,
            ("enableInteractionLogging" Core..=)
              Core.<$> enableInteractionLogging,
            ("enableStackdriverLogging" Core..=)
              Core.<$> enableStackdriverLogging
          ]
      )

-- | Define behaviors of speech to text detection.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings' smart constructor.
data GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings = GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
  { -- | Sensitivity of the speech model that detects the end of speech. Scale from 0 to 100.
    endpointerSensitivity :: (Core.Maybe Core.Int32),
    -- | Mapping from language to Speech-to-Text model. The mapped Speech-to-Text model will be selected for requests from its corresponding language. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models Speech models>.
    models ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
      ),
    -- | Timeout before detecting no speech.
    noSpeechTimeout :: (Core.Maybe Core.Duration),
    -- | Use timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value.
    useTimeoutBasedEndpointing :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings ::
  GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings =
  GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
    { endpointerSensitivity =
        Core.Nothing,
      models = Core.Nothing,
      noSpeechTimeout = Core.Nothing,
      useTimeoutBasedEndpointing =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
            Core.<$> (o Core..:? "endpointerSensitivity")
            Core.<*> (o Core..:? "models")
            Core.<*> (o Core..:? "noSpeechTimeout")
            Core.<*> (o Core..:? "useTimeoutBasedEndpointing")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings
  where
  toJSON GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("endpointerSensitivity" Core..=) Core.<$> endpointerSensitivity,
            ("models" Core..=) Core.<$> models,
            ("noSpeechTimeout" Core..=) Core.<$> noSpeechTimeout,
            ("useTimeoutBasedEndpointing" Core..=)
              Core.<$> useTimeoutBasedEndpointing
          ]
      )

-- | Mapping from language to Speech-to-Text model. The mapped Speech-to-Text model will be selected for requests from its corresponding language. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models Speech models>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models' smart constructor.
newtype GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models = GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
newGoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
  additional =
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models"
      ( \o ->
          GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models
  where
  toJSON
    GoogleCloudDialogflowCxV3AdvancedSettingsSpeechSettings_Models {..} =
      Core.toJSON additional

-- | Agents are best described as Natural Language Understanding (NLU) modules that transform user requests into actionable data. You can include agents in your app, product, or service to determine user intent and respond to the user in a natural way. After you create an agent, you can add Intents, Entity Types, Flows, Fulfillments, Webhooks, TransitionRouteGroups and so on to manage the conversation flows.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Agent' smart constructor.
data GoogleCloudDialogflowCxV3Agent = GoogleCloudDialogflowCxV3Agent
  { -- | Hierarchical advanced settings for this agent. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettings),
    -- | Optional. Answer feedback collection settings.
    answerFeedbackSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings),
    -- | The URI of the agent\'s avatar. Avatars are used throughout the Dialogflow console and in the self-hosted <https://cloud.google.com/dialogflow/docs/integrations/web-demo Web Demo> integration.
    avatarUri :: (Core.Maybe Core.Text),
    -- | Optional. Settings for custom client certificates.
    clientCertificateSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3AgentClientCertificateSettings
      ),
    -- | Required. Immutable. The default language of the agent as a language tag. See <https://cloud.google.com/dialogflow/cx/docs/reference/language Language Support> for a list of the currently supported language codes. This field cannot be set by the Agents.UpdateAgent method.
    defaultLanguageCode :: (Core.Maybe Core.Text),
    -- | The description of the agent. The maximum length is 500 characters. If exceeded, the request is rejected.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the agent, unique within the location.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. Enable training multi-lingual models for this agent. These models will be trained on all the languages supported by the agent.
    enableMultiLanguageTraining :: (Core.Maybe Core.Bool),
    -- | Indicates if automatic spell correction is enabled in detect intent requests.
    enableSpellCorrection :: (Core.Maybe Core.Bool),
    -- | Indicates if stackdriver logging is enabled for the agent. Please use agent.advanced_settings instead.
    enableStackdriverLogging :: (Core.Maybe Core.Bool),
    -- | Gen App Builder-related agent-level settings.
    genAppBuilderSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings),
    -- | Git integration settings for this agent.
    gitIntegrationSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AgentGitIntegrationSettings),
    -- | Indicates whether the agent is locked for changes. If the agent is locked, modifications to the agent will be rejected except for RestoreAgent.
    locked :: (Core.Maybe Core.Bool),
    -- | The unique identifier of the agent. Required for the Agents.UpdateAgent method. Agents.CreateAgent populates the name automatically. Format: @projects\/\/locations\/\/agents\/@.
    name :: (Core.Maybe Core.Text),
    -- | Optional. Settings for end user personalization.
    personalizationSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AgentPersonalizationSettings),
    -- | Optional. Output only. A read only boolean field reflecting Zone Isolation status of the agent.
    satisfiesPzi :: (Core.Maybe Core.Bool),
    -- | Optional. Output only. A read only boolean field reflecting Zone Separation status of the agent.
    satisfiesPzs :: (Core.Maybe Core.Bool),
    -- | Name of the SecuritySettings reference for the agent. Format: @projects\/\/locations\/\/securitySettings\/@.
    securitySettings :: (Core.Maybe Core.Text),
    -- | Speech recognition related settings.
    speechToTextSettings :: (Core.Maybe GoogleCloudDialogflowCxV3SpeechToTextSettings),
    -- | Immutable. Name of the start flow in this agent. A start flow will be automatically created when the agent is created, and can only be deleted by deleting the agent. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    startFlow :: (Core.Maybe Core.Text),
    -- | The list of all languages supported by the agent (except for the @default_language_code@).
    supportedLanguageCodes :: (Core.Maybe [Core.Text]),
    -- | Settings on instructing the speech synthesizer on how to generate the output audio content.
    textToSpeechSettings :: (Core.Maybe GoogleCloudDialogflowCxV3TextToSpeechSettings),
    -- | Required. The time zone of the agent from the <https://www.iana.org/time-zones time zone database>, e.g., America\/New_York, Europe\/Paris.
    timeZone :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Agent' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Agent ::
  GoogleCloudDialogflowCxV3Agent
newGoogleCloudDialogflowCxV3Agent =
  GoogleCloudDialogflowCxV3Agent
    { advancedSettings = Core.Nothing,
      answerFeedbackSettings = Core.Nothing,
      avatarUri = Core.Nothing,
      clientCertificateSettings = Core.Nothing,
      defaultLanguageCode = Core.Nothing,
      description = Core.Nothing,
      displayName = Core.Nothing,
      enableMultiLanguageTraining = Core.Nothing,
      enableSpellCorrection = Core.Nothing,
      enableStackdriverLogging = Core.Nothing,
      genAppBuilderSettings = Core.Nothing,
      gitIntegrationSettings = Core.Nothing,
      locked = Core.Nothing,
      name = Core.Nothing,
      personalizationSettings = Core.Nothing,
      satisfiesPzi = Core.Nothing,
      satisfiesPzs = Core.Nothing,
      securitySettings = Core.Nothing,
      speechToTextSettings = Core.Nothing,
      startFlow = Core.Nothing,
      supportedLanguageCodes = Core.Nothing,
      textToSpeechSettings = Core.Nothing,
      timeZone = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Agent where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Agent"
      ( \o ->
          GoogleCloudDialogflowCxV3Agent
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "answerFeedbackSettings")
            Core.<*> (o Core..:? "avatarUri")
            Core.<*> (o Core..:? "clientCertificateSettings")
            Core.<*> (o Core..:? "defaultLanguageCode")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "enableMultiLanguageTraining")
            Core.<*> (o Core..:? "enableSpellCorrection")
            Core.<*> (o Core..:? "enableStackdriverLogging")
            Core.<*> (o Core..:? "genAppBuilderSettings")
            Core.<*> (o Core..:? "gitIntegrationSettings")
            Core.<*> (o Core..:? "locked")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "personalizationSettings")
            Core.<*> (o Core..:? "satisfiesPzi")
            Core.<*> (o Core..:? "satisfiesPzs")
            Core.<*> (o Core..:? "securitySettings")
            Core.<*> (o Core..:? "speechToTextSettings")
            Core.<*> (o Core..:? "startFlow")
            Core.<*> (o Core..:? "supportedLanguageCodes")
            Core.<*> (o Core..:? "textToSpeechSettings")
            Core.<*> (o Core..:? "timeZone")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Agent where
  toJSON GoogleCloudDialogflowCxV3Agent {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("answerFeedbackSettings" Core..=) Core.<$> answerFeedbackSettings,
            ("avatarUri" Core..=) Core.<$> avatarUri,
            ("clientCertificateSettings" Core..=)
              Core.<$> clientCertificateSettings,
            ("defaultLanguageCode" Core..=) Core.<$> defaultLanguageCode,
            ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("enableMultiLanguageTraining" Core..=)
              Core.<$> enableMultiLanguageTraining,
            ("enableSpellCorrection" Core..=) Core.<$> enableSpellCorrection,
            ("enableStackdriverLogging" Core..=)
              Core.<$> enableStackdriverLogging,
            ("genAppBuilderSettings" Core..=) Core.<$> genAppBuilderSettings,
            ("gitIntegrationSettings" Core..=) Core.<$> gitIntegrationSettings,
            ("locked" Core..=) Core.<$> locked,
            ("name" Core..=) Core.<$> name,
            ("personalizationSettings" Core..=)
              Core.<$> personalizationSettings,
            ("satisfiesPzi" Core..=) Core.<$> satisfiesPzi,
            ("satisfiesPzs" Core..=) Core.<$> satisfiesPzs,
            ("securitySettings" Core..=) Core.<$> securitySettings,
            ("speechToTextSettings" Core..=) Core.<$> speechToTextSettings,
            ("startFlow" Core..=) Core.<$> startFlow,
            ("supportedLanguageCodes" Core..=) Core.<$> supportedLanguageCodes,
            ("textToSpeechSettings" Core..=) Core.<$> textToSpeechSettings,
            ("timeZone" Core..=) Core.<$> timeZone
          ]
      )

-- | Settings for answer feedback collection.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings = GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
  { -- | Optional. If enabled, end users will be able to provide answer feedback to Dialogflow responses. Feature works only if interaction logging is enabled in the Dialogflow agent.
    enableAnswerFeedback :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings ::
  GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
newGoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings =
  GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
    { enableAnswerFeedback =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
            Core.<$> (o Core..:? "enableAnswerFeedback")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings
  where
  toJSON GoogleCloudDialogflowCxV3AgentAnswerFeedbackSettings {..} =
    Core.object
      ( Core.catMaybes
          [("enableAnswerFeedback" Core..=) Core.<$> enableAnswerFeedback]
      )

-- | Settings for custom client certificates.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentClientCertificateSettings' smart constructor.
data GoogleCloudDialogflowCxV3AgentClientCertificateSettings = GoogleCloudDialogflowCxV3AgentClientCertificateSettings
  { -- | Optional. The name of the SecretManager secret version resource storing the passphrase. \'passphrase\' should be left unset if the private key is not encrypted. Format: @projects\/{project}\/secrets\/{secret}\/versions\/{version}@
    passphrase :: (Core.Maybe Core.Text),
    -- | Required. The name of the SecretManager secret version resource storing the private key encoded in PEM format. Format: @projects\/{project}\/secrets\/{secret}\/versions\/{version}@
    privateKey :: (Core.Maybe Core.Text),
    -- | Required. The ssl certificate encoded in PEM format. This string must include the begin header and end footer lines.
    sslCertificate :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentClientCertificateSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentClientCertificateSettings ::
  GoogleCloudDialogflowCxV3AgentClientCertificateSettings
newGoogleCloudDialogflowCxV3AgentClientCertificateSettings =
  GoogleCloudDialogflowCxV3AgentClientCertificateSettings
    { passphrase =
        Core.Nothing,
      privateKey = Core.Nothing,
      sslCertificate = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentClientCertificateSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentClientCertificateSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentClientCertificateSettings
            Core.<$> (o Core..:? "passphrase")
            Core.<*> (o Core..:? "privateKey")
            Core.<*> (o Core..:? "sslCertificate")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentClientCertificateSettings
  where
  toJSON GoogleCloudDialogflowCxV3AgentClientCertificateSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("passphrase" Core..=) Core.<$> passphrase,
            ("privateKey" Core..=) Core.<$> privateKey,
            ("sslCertificate" Core..=) Core.<$> sslCertificate
          ]
      )

-- | Settings for Gen App Builder.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentGenAppBuilderSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings = GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
  { -- | Required. The full name of the Gen App Builder engine related to this agent if there is one. Format: @projects\/{Project ID}\/locations\/{Location ID}\/collections\/{Collection ID}\/engines\/{Engine ID}@
    engine :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentGenAppBuilderSettings ::
  GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
newGoogleCloudDialogflowCxV3AgentGenAppBuilderSettings =
  GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
    { engine =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
            Core.<$> (o Core..:? "engine")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings
  where
  toJSON GoogleCloudDialogflowCxV3AgentGenAppBuilderSettings {..} =
    Core.object (Core.catMaybes [("engine" Core..=) Core.<$> engine])

-- | Settings for connecting to Git repository for an agent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentGitIntegrationSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3AgentGitIntegrationSettings = GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
  { -- | GitHub settings.
    githubSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentGitIntegrationSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentGitIntegrationSettings ::
  GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
newGoogleCloudDialogflowCxV3AgentGitIntegrationSettings =
  GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
    { githubSettings =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentGitIntegrationSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
            Core.<$> (o Core..:? "githubSettings")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettings
  where
  toJSON GoogleCloudDialogflowCxV3AgentGitIntegrationSettings {..} =
    Core.object
      ( Core.catMaybes
          [("githubSettings" Core..=) Core.<$> githubSettings]
      )

-- | Settings of integration with GitHub.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings' smart constructor.
data GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings = GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
  { -- | The access token used to authenticate the access to the GitHub repository.
    accessToken :: (Core.Maybe Core.Text),
    -- | A list of branches configured to be used from Dialogflow.
    branches :: (Core.Maybe [Core.Text]),
    -- | The unique repository display name for the GitHub repository.
    displayName :: (Core.Maybe Core.Text),
    -- | The GitHub repository URI related to the agent.
    repositoryUri :: (Core.Maybe Core.Text),
    -- | The branch of the GitHub repository tracked for this agent.
    trackingBranch :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings ::
  GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
newGoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings =
  GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
    { accessToken =
        Core.Nothing,
      branches = Core.Nothing,
      displayName = Core.Nothing,
      repositoryUri = Core.Nothing,
      trackingBranch =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
            Core.<$> (o Core..:? "accessToken")
            Core.<*> (o Core..:? "branches")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "repositoryUri")
            Core.<*> (o Core..:? "trackingBranch")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3AgentGitIntegrationSettingsGithubSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("accessToken" Core..=) Core.<$> accessToken,
              ("branches" Core..=) Core.<$> branches,
              ("displayName" Core..=) Core.<$> displayName,
              ("repositoryUri" Core..=) Core.<$> repositoryUri,
              ("trackingBranch" Core..=) Core.<$> trackingBranch
            ]
        )

-- | Settings for end user personalization.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentPersonalizationSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3AgentPersonalizationSettings = GoogleCloudDialogflowCxV3AgentPersonalizationSettings
  { -- | Optional. Default end user metadata, used when processing DetectIntent requests. Recommended to be filled as a template instead of hard-coded value, for example { \"age\": \"$session.params.age\" }. The data will be merged with the QueryParameters.end/user/metadata in DetectIntentRequest.query_params during query processing.
    defaultEndUserMetadata ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentPersonalizationSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentPersonalizationSettings ::
  GoogleCloudDialogflowCxV3AgentPersonalizationSettings
newGoogleCloudDialogflowCxV3AgentPersonalizationSettings =
  GoogleCloudDialogflowCxV3AgentPersonalizationSettings
    { defaultEndUserMetadata =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentPersonalizationSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentPersonalizationSettings
            Core.<$> (o Core..:? "defaultEndUserMetadata")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings
  where
  toJSON GoogleCloudDialogflowCxV3AgentPersonalizationSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("defaultEndUserMetadata" Core..=)
              Core.<$> defaultEndUserMetadata
          ]
      )

-- | Optional. Default end user metadata, used when processing DetectIntent requests. Recommended to be filled as a template instead of hard-coded value, for example { \"age\": \"$session.params.age\" }. The data will be merged with the QueryParameters.end/user/metadata in DetectIntentRequest.query_params during query processing.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata = GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
newGoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
  additional =
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata
  where
  toJSON
    GoogleCloudDialogflowCxV3AgentPersonalizationSettings_DefaultEndUserMetadata {..} =
      Core.toJSON additional

-- | The response message for Agents.GetAgentValidationResult.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AgentValidationResult' smart constructor.
data GoogleCloudDialogflowCxV3AgentValidationResult = GoogleCloudDialogflowCxV3AgentValidationResult
  { -- | Contains all flow validation results.
    flowValidationResults :: (Core.Maybe [GoogleCloudDialogflowCxV3FlowValidationResult]),
    -- | The unique identifier of the agent validation result. Format: @projects\/\/locations\/\/agents\/\/validationResult@.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AgentValidationResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AgentValidationResult ::
  GoogleCloudDialogflowCxV3AgentValidationResult
newGoogleCloudDialogflowCxV3AgentValidationResult =
  GoogleCloudDialogflowCxV3AgentValidationResult
    { flowValidationResults =
        Core.Nothing,
      name = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AgentValidationResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AgentValidationResult"
      ( \o ->
          GoogleCloudDialogflowCxV3AgentValidationResult
            Core.<$> (o Core..:? "flowValidationResults")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3AgentValidationResult where
  toJSON GoogleCloudDialogflowCxV3AgentValidationResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("flowValidationResults" Core..=) Core.<$> flowValidationResults,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Stores information about feedback provided by users about a response.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AnswerFeedback' smart constructor.
data GoogleCloudDialogflowCxV3AnswerFeedback = GoogleCloudDialogflowCxV3AnswerFeedback
  { -- | Optional. Custom rating from the user about the provided answer, with maximum length of 1024 characters. For example, client could use a customized JSON object to indicate the rating.
    customRating :: (Core.Maybe Core.Text),
    -- | Optional. Rating from user for the specific Dialogflow response.
    rating :: (Core.Maybe GoogleCloudDialogflowCxV3AnswerFeedback_Rating),
    -- | Optional. In case of thumbs down rating provided, users can optionally provide context about the rating.
    ratingReason :: (Core.Maybe GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AnswerFeedback' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AnswerFeedback ::
  GoogleCloudDialogflowCxV3AnswerFeedback
newGoogleCloudDialogflowCxV3AnswerFeedback =
  GoogleCloudDialogflowCxV3AnswerFeedback
    { customRating =
        Core.Nothing,
      rating = Core.Nothing,
      ratingReason = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3AnswerFeedback where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AnswerFeedback"
      ( \o ->
          GoogleCloudDialogflowCxV3AnswerFeedback
            Core.<$> (o Core..:? "customRating")
            Core.<*> (o Core..:? "rating")
            Core.<*> (o Core..:? "ratingReason")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3AnswerFeedback where
  toJSON GoogleCloudDialogflowCxV3AnswerFeedback {..} =
    Core.object
      ( Core.catMaybes
          [ ("customRating" Core..=) Core.<$> customRating,
            ("rating" Core..=) Core.<$> rating,
            ("ratingReason" Core..=) Core.<$> ratingReason
          ]
      )

-- | Stores extra information about why users provided thumbs down rating.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AnswerFeedbackRatingReason' smart constructor.
data GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason = GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
  { -- | Optional. Additional feedback about the rating. This field can be populated without choosing a predefined @reason@.
    feedback :: (Core.Maybe Core.Text),
    -- | Optional. Custom reason labels for thumbs down rating provided by the user. The maximum number of labels allowed is 10 and the maximum length of a single label is 128 characters.
    reasonLabels :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AnswerFeedbackRatingReason ::
  GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
newGoogleCloudDialogflowCxV3AnswerFeedbackRatingReason =
  GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
    { feedback =
        Core.Nothing,
      reasonLabels = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason"
      ( \o ->
          GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
            Core.<$> (o Core..:? "feedback")
            Core.<*> (o Core..:? "reasonLabels")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason
  where
  toJSON GoogleCloudDialogflowCxV3AnswerFeedbackRatingReason {..} =
    Core.object
      ( Core.catMaybes
          [ ("feedback" Core..=) Core.<$> feedback,
            ("reasonLabels" Core..=) Core.<$> reasonLabels
          ]
      )

-- | Represents the natural speech audio to be processed.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3AudioInput' smart constructor.
data GoogleCloudDialogflowCxV3AudioInput = GoogleCloudDialogflowCxV3AudioInput
  { -- | The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both @config@ and @audio@ must be provided. For streaming audio detect intent, @config@ must be provided in the first request and @audio@ must be provided in all following requests.
    audio :: (Core.Maybe Core.Base64),
    -- | Required. Instructs the speech recognizer how to process the speech audio.
    config :: (Core.Maybe GoogleCloudDialogflowCxV3InputAudioConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3AudioInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3AudioInput ::
  GoogleCloudDialogflowCxV3AudioInput
newGoogleCloudDialogflowCxV3AudioInput =
  GoogleCloudDialogflowCxV3AudioInput
    { audio = Core.Nothing,
      config = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3AudioInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3AudioInput"
      ( \o ->
          GoogleCloudDialogflowCxV3AudioInput
            Core.<$> (o Core..:? "audio")
            Core.<*> (o Core..:? "config")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3AudioInput where
  toJSON GoogleCloudDialogflowCxV3AudioInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("audio" Core..=) Core.<$> audio,
            ("config" Core..=) Core.<$> config
          ]
      )

-- | Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request. The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases: * No barge-in phase: which goes first and during which speech detection should not be carried out. * Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase. The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length from the start of the input audio.
-- No-speech event is a response with END/OF/UTTERANCE without any transcript following up.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BargeInConfig' smart constructor.
data GoogleCloudDialogflowCxV3BargeInConfig = GoogleCloudDialogflowCxV3BargeInConfig
  { -- | Duration that is not eligible for barge-in at the beginning of the input audio.
    noBargeInDuration :: (Core.Maybe Core.Duration),
    -- | Total duration for the playback at the beginning of the input audio.
    totalDuration :: (Core.Maybe Core.Duration)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BargeInConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BargeInConfig ::
  GoogleCloudDialogflowCxV3BargeInConfig
newGoogleCloudDialogflowCxV3BargeInConfig =
  GoogleCloudDialogflowCxV3BargeInConfig
    { noBargeInDuration =
        Core.Nothing,
      totalDuration = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3BargeInConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BargeInConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3BargeInConfig
            Core.<$> (o Core..:? "noBargeInDuration")
            Core.<*> (o Core..:? "totalDuration")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3BargeInConfig where
  toJSON GoogleCloudDialogflowCxV3BargeInConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("noBargeInDuration" Core..=) Core.<$> noBargeInDuration,
            ("totalDuration" Core..=) Core.<$> totalDuration
          ]
      )

-- | The request message for TestCases.BatchDeleteTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest' smart constructor.
newtype GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest = GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
  { -- | Required. Format of test case names: @projects\/\/locations\/\/agents\/\/testCases\/@.
    names :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest ::
  GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
newGoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest =
  GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
    { names =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
            Core.<$> (o Core..:? "names")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest
  where
  toJSON GoogleCloudDialogflowCxV3BatchDeleteTestCasesRequest {..} =
    Core.object (Core.catMaybes [("names" Core..=) Core.<$> names])

-- | Metadata returned for the TestCases.BatchRunTestCases long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BatchRunTestCasesMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata = GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
  { -- | The test errors.
    errors :: (Core.Maybe [GoogleCloudDialogflowCxV3TestError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BatchRunTestCasesMetadata ::
  GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
newGoogleCloudDialogflowCxV3BatchRunTestCasesMetadata =
  GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
    { errors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
            Core.<$> (o Core..:? "errors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata
  where
  toJSON GoogleCloudDialogflowCxV3BatchRunTestCasesMetadata {..} =
    Core.object (Core.catMaybes [("errors" Core..=) Core.<$> errors])

-- | The request message for TestCases.BatchRunTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BatchRunTestCasesRequest' smart constructor.
data GoogleCloudDialogflowCxV3BatchRunTestCasesRequest = GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
  { -- | Optional. If not set, draft environment is assumed. Format: @projects\/\/locations\/\/agents\/\/environments\/@.
    environment :: (Core.Maybe Core.Text),
    -- | Required. Format: @projects\/\/locations\/\/agents\/\/testCases\/@.
    testCases :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BatchRunTestCasesRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BatchRunTestCasesRequest ::
  GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
newGoogleCloudDialogflowCxV3BatchRunTestCasesRequest =
  GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
    { environment =
        Core.Nothing,
      testCases = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BatchRunTestCasesRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
            Core.<$> (o Core..:? "environment")
            Core.<*> (o Core..:? "testCases")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BatchRunTestCasesRequest
  where
  toJSON GoogleCloudDialogflowCxV3BatchRunTestCasesRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("environment" Core..=) Core.<$> environment,
            ("testCases" Core..=) Core.<$> testCases
          ]
      )

-- | The response message for TestCases.BatchRunTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BatchRunTestCasesResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3BatchRunTestCasesResponse = GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
  { -- | The test case results. The detailed conversation turns are empty in this response.
    results :: (Core.Maybe [GoogleCloudDialogflowCxV3TestCaseResult])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BatchRunTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BatchRunTestCasesResponse ::
  GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
newGoogleCloudDialogflowCxV3BatchRunTestCasesResponse =
  GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
    { results =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BatchRunTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
            Core.<$> (o Core..:? "results")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BatchRunTestCasesResponse
  where
  toJSON GoogleCloudDialogflowCxV3BatchRunTestCasesResponse {..} =
    Core.object
      (Core.catMaybes [("results" Core..=) Core.<$> results])

-- | Boost specification to boost certain documents. A copy of google.cloud.discoveryengine.v1main.BoostSpec, field documentation is available at https:\/\/cloud.google.com\/generative-ai-app-builder\/docs\/reference\/rest\/v1alpha\/BoostSpec
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BoostSpec' smart constructor.
newtype GoogleCloudDialogflowCxV3BoostSpec = GoogleCloudDialogflowCxV3BoostSpec
  { -- | Optional. Condition boost specifications. If a document matches multiple conditions in the specifications, boost scores from these specifications are all applied and combined in a non-linear way. Maximum number of specifications is 20.
    conditionBoostSpecs :: (Core.Maybe [GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BoostSpec' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BoostSpec ::
  GoogleCloudDialogflowCxV3BoostSpec
newGoogleCloudDialogflowCxV3BoostSpec =
  GoogleCloudDialogflowCxV3BoostSpec
    { conditionBoostSpecs =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3BoostSpec where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BoostSpec"
      ( \o ->
          GoogleCloudDialogflowCxV3BoostSpec
            Core.<$> (o Core..:? "conditionBoostSpecs")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3BoostSpec where
  toJSON GoogleCloudDialogflowCxV3BoostSpec {..} =
    Core.object
      ( Core.catMaybes
          [("conditionBoostSpecs" Core..=) Core.<$> conditionBoostSpecs]
      )

-- | Boost applies to documents which match a condition.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec' smart constructor.
data GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec = GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
  { -- | Optional. Strength of the condition boost, which should be in [-1, 1]. Negative boost means demotion. Default is 0.0. Setting to 1.0 gives the document a big promotion. However, it does not necessarily mean that the boosted document will be the top result at all times, nor that other documents will be excluded. Results could still be shown even when none of them matches the condition. And results that are significantly more relevant to the search query can still trump your heavily favored but irrelevant documents. Setting to -1.0 gives the document a big demotion. However, results that are deeply relevant might still be shown. The document will have an upstream battle to get a fairly high ranking, but it is not blocked out completely. Setting to 0.0 means no boost applied. The boosting condition is ignored.
    boost :: (Core.Maybe Core.Double),
    -- | Optional. Complex specification for custom ranking based on customer defined attribute value.
    boostControlSpec ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
      ),
    -- | Optional. An expression which specifies a boost condition. The syntax and supported fields are the same as a filter expression. Examples: * To boost documents with document ID \"doc/1\" or \"doc/2\", and color \"Red\" or \"Blue\": * (id: ANY(\"doc/1\", \"doc/2\")) AND (color: ANY(\"Red\",\"Blue\"))
    condition :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec ::
  GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec =
  GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
    { boost =
        Core.Nothing,
      boostControlSpec = Core.Nothing,
      condition = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec"
      ( \o ->
          GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
            Core.<$> (o Core..:? "boost")
            Core.<*> (o Core..:? "boostControlSpec")
            Core.<*> (o Core..:? "condition")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec
  where
  toJSON GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpec {..} =
    Core.object
      ( Core.catMaybes
          [ ("boost" Core..=) Core.<$> boost,
            ("boostControlSpec" Core..=) Core.<$> boostControlSpec,
            ("condition" Core..=) Core.<$> condition
          ]
      )

-- | Specification for custom ranking based on customer specified attribute value. It provides more controls for customized ranking than the simple (condition, boost) combination above.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec' smart constructor.
data GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec = GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
  { -- | Optional. The attribute type to be used to determine the boost amount. The attribute value can be derived from the field value of the specified field/name. In the case of numerical it is straightforward i.e. attribute/value = numerical/field/value. In the case of freshness however, attribute/value = (time.now() - datetime/field_value).
    attributeType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec_AttributeType
      ),
    -- | Optional. The control points used to define the curve. The monotonic function (defined through the interpolation_type above) passes through the control points listed here.
    controlPoints ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint]
      ),
    -- | Optional. The name of the field whose value will be used to determine the boost amount.
    fieldName :: (Core.Maybe Core.Text),
    -- | Optional. The interpolation type to be applied to connect the control points listed below.
    interpolationType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec_InterpolationType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec ::
  GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec =
  GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
    { attributeType =
        Core.Nothing,
      controlPoints =
        Core.Nothing,
      fieldName = Core.Nothing,
      interpolationType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec"
      ( \o ->
          GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
            Core.<$> (o Core..:? "attributeType")
            Core.<*> (o Core..:? "controlPoints")
            Core.<*> (o Core..:? "fieldName")
            Core.<*> (o Core..:? "interpolationType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec
  where
  toJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpec {..} =
      Core.object
        ( Core.catMaybes
            [ ("attributeType" Core..=) Core.<$> attributeType,
              ("controlPoints" Core..=) Core.<$> controlPoints,
              ("fieldName" Core..=) Core.<$> fieldName,
              ("interpolationType" Core..=) Core.<$> interpolationType
            ]
        )

-- | The control points used to define the curve. The curve defined through these control points can only be monotonically increasing or decreasing(constant values are acceptable).
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint' smart constructor.
data GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint = GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
  { -- | Optional. Can be one of: 1. The numerical field value. 2. The duration spec for freshness: The value must be formatted as an XSD @dayTimeDuration@ value (a restricted subset of an ISO 8601 duration value). The pattern for this is: @nDnM]@.
    attributeValue :: (Core.Maybe Core.Text),
    -- | Optional. The value between -1 to 1 by which to boost the score if the attribute_value evaluates to the value specified above.
    boostAmount :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint ::
  GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
newGoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint =
  GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
    { attributeValue =
        Core.Nothing,
      boostAmount =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint"
      ( \o ->
          GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
            Core.<$> (o Core..:? "attributeValue")
            Core.<*> (o Core..:? "boostAmount")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint
  where
  toJSON
    GoogleCloudDialogflowCxV3BoostSpecConditionBoostSpecBoostControlSpecControlPoint {..} =
      Core.object
        ( Core.catMaybes
            [ ("attributeValue" Core..=) Core.<$> attributeValue,
              ("boostAmount" Core..=) Core.<$> boostAmount
            ]
        )

-- | Boost specifications for data stores.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3BoostSpecs' smart constructor.
data GoogleCloudDialogflowCxV3BoostSpecs = GoogleCloudDialogflowCxV3BoostSpecs
  { -- | Optional. Data Stores where the boosting configuration is applied. The full names of the referenced data stores. Formats: @projects\/{project}\/locations\/{location}\/collections\/{collection}\/dataStores\/{data_store}@ @projects\/{project}\/locations\/{location}\/dataStores\/{data_store}@
    dataStores :: (Core.Maybe [Core.Text]),
    -- | Optional. A list of boosting specifications.
    spec :: (Core.Maybe [GoogleCloudDialogflowCxV3BoostSpec])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3BoostSpecs' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3BoostSpecs ::
  GoogleCloudDialogflowCxV3BoostSpecs
newGoogleCloudDialogflowCxV3BoostSpecs =
  GoogleCloudDialogflowCxV3BoostSpecs
    { dataStores = Core.Nothing,
      spec = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3BoostSpecs where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3BoostSpecs"
      ( \o ->
          GoogleCloudDialogflowCxV3BoostSpecs
            Core.<$> (o Core..:? "dataStores")
            Core.<*> (o Core..:? "spec")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3BoostSpecs where
  toJSON GoogleCloudDialogflowCxV3BoostSpecs {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataStores" Core..=) Core.<$> dataStores,
            ("spec" Core..=) Core.<$> spec
          ]
      )

-- | The response message for TestCases.CalculateCoverage.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3CalculateCoverageResponse' smart constructor.
data GoogleCloudDialogflowCxV3CalculateCoverageResponse = GoogleCloudDialogflowCxV3CalculateCoverageResponse
  { -- | The agent to calculate coverage for. Format: @projects\/\/locations\/\/agents\/@.
    agent :: (Core.Maybe Core.Text),
    -- | Intent coverage.
    intentCoverage :: (Core.Maybe GoogleCloudDialogflowCxV3IntentCoverage),
    -- | Transition route group coverage.
    routeGroupCoverage :: (Core.Maybe GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage),
    -- | Transition (excluding transition route groups) coverage.
    transitionCoverage :: (Core.Maybe GoogleCloudDialogflowCxV3TransitionCoverage)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3CalculateCoverageResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3CalculateCoverageResponse ::
  GoogleCloudDialogflowCxV3CalculateCoverageResponse
newGoogleCloudDialogflowCxV3CalculateCoverageResponse =
  GoogleCloudDialogflowCxV3CalculateCoverageResponse
    { agent =
        Core.Nothing,
      intentCoverage = Core.Nothing,
      routeGroupCoverage = Core.Nothing,
      transitionCoverage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3CalculateCoverageResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3CalculateCoverageResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3CalculateCoverageResponse
            Core.<$> (o Core..:? "agent")
            Core.<*> (o Core..:? "intentCoverage")
            Core.<*> (o Core..:? "routeGroupCoverage")
            Core.<*> (o Core..:? "transitionCoverage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3CalculateCoverageResponse
  where
  toJSON GoogleCloudDialogflowCxV3CalculateCoverageResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("agent" Core..=) Core.<$> agent,
            ("intentCoverage" Core..=) Core.<$> intentCoverage,
            ("routeGroupCoverage" Core..=) Core.<$> routeGroupCoverage,
            ("transitionCoverage" Core..=) Core.<$> transitionCoverage
          ]
      )

-- | Changelogs represents a change made to a given agent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Changelog' smart constructor.
data GoogleCloudDialogflowCxV3Changelog = GoogleCloudDialogflowCxV3Changelog
  { -- | The action of the change.
    action :: (Core.Maybe Core.Text),
    -- | The timestamp of the change.
    createTime :: (Core.Maybe Core.DateTime),
    -- | The affected resource display name of the change.
    displayName :: (Core.Maybe Core.Text),
    -- | The affected language code of the change.
    languageCode :: (Core.Maybe Core.Text),
    -- | The unique identifier of the changelog. Format: @projects\/\/locations\/\/agents\/\/changelogs\/@.
    name :: (Core.Maybe Core.Text),
    -- | The affected resource name of the change.
    resource :: (Core.Maybe Core.Text),
    -- | The affected resource type.
    type' :: (Core.Maybe Core.Text),
    -- | Email address of the authenticated user.
    userEmail :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Changelog' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Changelog ::
  GoogleCloudDialogflowCxV3Changelog
newGoogleCloudDialogflowCxV3Changelog =
  GoogleCloudDialogflowCxV3Changelog
    { action = Core.Nothing,
      createTime = Core.Nothing,
      displayName = Core.Nothing,
      languageCode = Core.Nothing,
      name = Core.Nothing,
      resource = Core.Nothing,
      type' = Core.Nothing,
      userEmail = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Changelog where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Changelog"
      ( \o ->
          GoogleCloudDialogflowCxV3Changelog
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "resource")
            Core.<*> (o Core..:? "type")
            Core.<*> (o Core..:? "userEmail")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Changelog where
  toJSON GoogleCloudDialogflowCxV3Changelog {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("createTime" Core..=) Core.<$> createTime,
            ("displayName" Core..=) Core.<$> displayName,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("name" Core..=) Core.<$> name,
            ("resource" Core..=) Core.<$> resource,
            ("type" Core..=) Core.<$> type',
            ("userEmail" Core..=) Core.<$> userEmail
          ]
      )

-- | The request message for Versions.CompareVersions.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3CompareVersionsRequest' smart constructor.
data GoogleCloudDialogflowCxV3CompareVersionsRequest = GoogleCloudDialogflowCxV3CompareVersionsRequest
  { -- | The language to compare the flow versions for. If not specified, the agent\'s default language is used. <https://cloud.google.com/dialogflow/docs/reference/language Many languages> are supported. Note: languages must be enabled in the agent before they can be used.
    languageCode :: (Core.Maybe Core.Text),
    -- | Required. Name of the target flow version to compare with the base version. Use version ID @0@ to indicate the draft version of the specified flow. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@.
    targetVersion :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3CompareVersionsRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3CompareVersionsRequest ::
  GoogleCloudDialogflowCxV3CompareVersionsRequest
newGoogleCloudDialogflowCxV3CompareVersionsRequest =
  GoogleCloudDialogflowCxV3CompareVersionsRequest
    { languageCode =
        Core.Nothing,
      targetVersion = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3CompareVersionsRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3CompareVersionsRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3CompareVersionsRequest
            Core.<$> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "targetVersion")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3CompareVersionsRequest
  where
  toJSON GoogleCloudDialogflowCxV3CompareVersionsRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("languageCode" Core..=) Core.<$> languageCode,
            ("targetVersion" Core..=) Core.<$> targetVersion
          ]
      )

-- | The response message for Versions.CompareVersions.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3CompareVersionsResponse' smart constructor.
data GoogleCloudDialogflowCxV3CompareVersionsResponse = GoogleCloudDialogflowCxV3CompareVersionsResponse
  { -- | JSON representation of the base version content.
    baseVersionContentJson :: (Core.Maybe Core.Text),
    -- | The timestamp when the two version compares.
    compareTime :: (Core.Maybe Core.DateTime),
    -- | JSON representation of the target version content.
    targetVersionContentJson :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3CompareVersionsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3CompareVersionsResponse ::
  GoogleCloudDialogflowCxV3CompareVersionsResponse
newGoogleCloudDialogflowCxV3CompareVersionsResponse =
  GoogleCloudDialogflowCxV3CompareVersionsResponse
    { baseVersionContentJson =
        Core.Nothing,
      compareTime = Core.Nothing,
      targetVersionContentJson = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3CompareVersionsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3CompareVersionsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3CompareVersionsResponse
            Core.<$> (o Core..:? "baseVersionContentJson")
            Core.<*> (o Core..:? "compareTime")
            Core.<*> (o Core..:? "targetVersionContentJson")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3CompareVersionsResponse
  where
  toJSON GoogleCloudDialogflowCxV3CompareVersionsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("baseVersionContentJson" Core..=)
              Core.<$> baseVersionContentJson,
            ("compareTime" Core..=) Core.<$> compareTime,
            ("targetVersionContentJson" Core..=)
              Core.<$> targetVersionContentJson
          ]
      )

-- | Represents a result from running a test case in an agent environment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ContinuousTestResult' smart constructor.
data GoogleCloudDialogflowCxV3ContinuousTestResult = GoogleCloudDialogflowCxV3ContinuousTestResult
  { -- | The resource name for the continuous test result. Format: @projects\/\/locations\/\/agents\/\/environments\/\/continuousTestResults\/@.
    name :: (Core.Maybe Core.Text),
    -- | The result of this continuous test run, i.e. whether all the tests in this continuous test run pass or not.
    result :: (Core.Maybe GoogleCloudDialogflowCxV3ContinuousTestResult_Result),
    -- | Time when the continuous testing run starts.
    runTime :: (Core.Maybe Core.DateTime),
    -- | A list of individual test case results names in this continuous test run.
    testCaseResults :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ContinuousTestResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ContinuousTestResult ::
  GoogleCloudDialogflowCxV3ContinuousTestResult
newGoogleCloudDialogflowCxV3ContinuousTestResult =
  GoogleCloudDialogflowCxV3ContinuousTestResult
    { name =
        Core.Nothing,
      result = Core.Nothing,
      runTime = Core.Nothing,
      testCaseResults = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ContinuousTestResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ContinuousTestResult"
      ( \o ->
          GoogleCloudDialogflowCxV3ContinuousTestResult
            Core.<$> (o Core..:? "name")
            Core.<*> (o Core..:? "result")
            Core.<*> (o Core..:? "runTime")
            Core.<*> (o Core..:? "testCaseResults")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ContinuousTestResult where
  toJSON GoogleCloudDialogflowCxV3ContinuousTestResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("name" Core..=) Core.<$> name,
            ("result" Core..=) Core.<$> result,
            ("runTime" Core..=) Core.<$> runTime,
            ("testCaseResults" Core..=) Core.<$> testCaseResults
          ]
      )

-- | This message is used to hold all the Conversation Signals data, which will be converted to JSON and exported to BigQuery.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationSignals' smart constructor.
newtype GoogleCloudDialogflowCxV3ConversationSignals = GoogleCloudDialogflowCxV3ConversationSignals
  { -- | Required. Turn signals for the current turn.
    turnSignals :: (Core.Maybe GoogleCloudDialogflowCxV3TurnSignals)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationSignals ::
  GoogleCloudDialogflowCxV3ConversationSignals
newGoogleCloudDialogflowCxV3ConversationSignals =
  GoogleCloudDialogflowCxV3ConversationSignals
    { turnSignals =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ConversationSignals where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationSignals
            Core.<$> (o Core..:? "turnSignals")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ConversationSignals where
  toJSON GoogleCloudDialogflowCxV3ConversationSignals {..} =
    Core.object
      (Core.catMaybes [("turnSignals" Core..=) Core.<$> turnSignals])

-- | One interaction between a human and virtual agent. The human provides some input and the virtual agent provides a response.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationTurn' smart constructor.
data GoogleCloudDialogflowCxV3ConversationTurn = GoogleCloudDialogflowCxV3ConversationTurn
  { -- | The user input.
    userInput :: (Core.Maybe GoogleCloudDialogflowCxV3ConversationTurnUserInput),
    -- | The virtual agent output.
    virtualAgentOutput ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationTurn' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationTurn ::
  GoogleCloudDialogflowCxV3ConversationTurn
newGoogleCloudDialogflowCxV3ConversationTurn =
  GoogleCloudDialogflowCxV3ConversationTurn
    { userInput =
        Core.Nothing,
      virtualAgentOutput = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ConversationTurn where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationTurn"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationTurn
            Core.<$> (o Core..:? "userInput")
            Core.<*> (o Core..:? "virtualAgentOutput")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ConversationTurn where
  toJSON GoogleCloudDialogflowCxV3ConversationTurn {..} =
    Core.object
      ( Core.catMaybes
          [ ("userInput" Core..=) Core.<$> userInput,
            ("virtualAgentOutput" Core..=) Core.<$> virtualAgentOutput
          ]
      )

-- | The input from the human user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationTurnUserInput' smart constructor.
data GoogleCloudDialogflowCxV3ConversationTurnUserInput = GoogleCloudDialogflowCxV3ConversationTurnUserInput
  { -- | Whether sentiment analysis is enabled.
    enableSentimentAnalysis :: (Core.Maybe Core.Bool),
    -- | Parameters that need to be injected into the conversation during intent detection.
    injectedParameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
      ),
    -- | Supports text input, event input, dtmf input in the test case.
    input :: (Core.Maybe GoogleCloudDialogflowCxV3QueryInput),
    -- | If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
    isWebhookEnabled :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationTurnUserInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationTurnUserInput ::
  GoogleCloudDialogflowCxV3ConversationTurnUserInput
newGoogleCloudDialogflowCxV3ConversationTurnUserInput =
  GoogleCloudDialogflowCxV3ConversationTurnUserInput
    { enableSentimentAnalysis =
        Core.Nothing,
      injectedParameters = Core.Nothing,
      input = Core.Nothing,
      isWebhookEnabled = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ConversationTurnUserInput
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationTurnUserInput"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationTurnUserInput
            Core.<$> (o Core..:? "enableSentimentAnalysis")
            Core.<*> (o Core..:? "injectedParameters")
            Core.<*> (o Core..:? "input")
            Core.<*> (o Core..:? "isWebhookEnabled")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ConversationTurnUserInput
  where
  toJSON GoogleCloudDialogflowCxV3ConversationTurnUserInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableSentimentAnalysis" Core..=)
              Core.<$> enableSentimentAnalysis,
            ("injectedParameters" Core..=) Core.<$> injectedParameters,
            ("input" Core..=) Core.<$> input,
            ("isWebhookEnabled" Core..=) Core.<$> isWebhookEnabled
          ]
      )

-- | Parameters that need to be injected into the conversation during intent detection.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters' smart constructor.
newtype GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters = GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
newGoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
  additional =
    GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters
  where
  toJSON
    GoogleCloudDialogflowCxV3ConversationTurnUserInput_InjectedParameters {..} =
      Core.toJSON additional

-- | The output from the virtual agent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput' smart constructor.
data GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput = GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
  { -- | The Page on which the utterance was spoken. Only name and displayName will be set.
    currentPage :: (Core.Maybe GoogleCloudDialogflowCxV3Page),
    -- | Required. Input only. The diagnostic info output for the turn. Required to calculate the testing coverage.
    diagnosticInfo ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
      ),
    -- | Output only. If this is part of a result conversation turn, the list of differences between the original run and the replay for this output, if any.
    differences :: (Core.Maybe [GoogleCloudDialogflowCxV3TestRunDifference]),
    -- | The session parameters available to the bot at this point.
    sessionParameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
      ),
    -- | Response error from the agent in the test result. If set, other output is empty.
    status :: (Core.Maybe GoogleRpcStatus),
    -- | The text responses from the agent for the turn.
    textResponses :: (Core.Maybe [GoogleCloudDialogflowCxV3ResponseMessageText]),
    -- | The Intent that triggered the response. Only name and displayName will be set.
    triggeredIntent :: (Core.Maybe GoogleCloudDialogflowCxV3Intent)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput ::
  GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput =
  GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
    { currentPage =
        Core.Nothing,
      diagnosticInfo = Core.Nothing,
      differences = Core.Nothing,
      sessionParameters = Core.Nothing,
      status = Core.Nothing,
      textResponses = Core.Nothing,
      triggeredIntent = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
            Core.<$> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "diagnosticInfo")
            Core.<*> (o Core..:? "differences")
            Core.<*> (o Core..:? "sessionParameters")
            Core.<*> (o Core..:? "status")
            Core.<*> (o Core..:? "textResponses")
            Core.<*> (o Core..:? "triggeredIntent")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput
  where
  toJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput {..} =
      Core.object
        ( Core.catMaybes
            [ ("currentPage" Core..=) Core.<$> currentPage,
              ("diagnosticInfo" Core..=) Core.<$> diagnosticInfo,
              ("differences" Core..=) Core.<$> differences,
              ("sessionParameters" Core..=) Core.<$> sessionParameters,
              ("status" Core..=) Core.<$> status,
              ("textResponses" Core..=) Core.<$> textResponses,
              ("triggeredIntent" Core..=) Core.<$> triggeredIntent
            ]
        )

-- | Required. Input only. The diagnostic info output for the turn. Required to calculate the testing coverage.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo = GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
  additional =
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo
  where
  toJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_DiagnosticInfo {..} =
      Core.toJSON additional

-- | The session parameters available to the bot at this point.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters' smart constructor.
newtype GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters = GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
newGoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
  additional =
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters
  where
  toJSON
    GoogleCloudDialogflowCxV3ConversationTurnVirtualAgentOutput_SessionParameters {..} =
      Core.toJSON additional

-- | Metadata associated with the long running operation for Versions.CreateVersion.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3CreateVersionOperationMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3CreateVersionOperationMetadata = GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
  { -- | Name of the created version. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3CreateVersionOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3CreateVersionOperationMetadata ::
  GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
newGoogleCloudDialogflowCxV3CreateVersionOperationMetadata =
  GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
    { version =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3CreateVersionOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
            Core.<$> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3CreateVersionOperationMetadata
  where
  toJSON GoogleCloudDialogflowCxV3CreateVersionOperationMetadata {..} =
    Core.object
      (Core.catMaybes [("version" Core..=) Core.<$> version])

-- | A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnection' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnection = GoogleCloudDialogflowCxV3DataStoreConnection
  { -- | The full name of the referenced data store. Formats: @projects\/{project}\/locations\/{location}\/collections\/{collection}\/dataStores\/{data_store}@ @projects\/{project}\/locations\/{location}\/dataStores\/{data_store}@
    dataStore :: (Core.Maybe Core.Text),
    -- | The type of the connected data store.
    dataStoreType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnection_DataStoreType
      ),
    -- | The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode.
    documentProcessingMode ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnection_DocumentProcessingMode
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnection' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnection ::
  GoogleCloudDialogflowCxV3DataStoreConnection
newGoogleCloudDialogflowCxV3DataStoreConnection =
  GoogleCloudDialogflowCxV3DataStoreConnection
    { dataStore =
        Core.Nothing,
      dataStoreType = Core.Nothing,
      documentProcessingMode = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DataStoreConnection where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnection"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnection
            Core.<$> (o Core..:? "dataStore")
            Core.<*> (o Core..:? "dataStoreType")
            Core.<*> (o Core..:? "documentProcessingMode")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DataStoreConnection where
  toJSON GoogleCloudDialogflowCxV3DataStoreConnection {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataStore" Core..=) Core.<$> dataStore,
            ("dataStoreType" Core..=) Core.<$> dataStoreType,
            ("documentProcessingMode" Core..=)
              Core.<$> documentProcessingMode
          ]
      )

-- | Data store connection feature output signals. Might be only partially field if processing stop before the final answer. Reasons for this can be, but are not limited to: empty UCS search results, positive RAI check outcome, grounding failure, ...
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignals' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignals = GoogleCloudDialogflowCxV3DataStoreConnectionSignals
  { -- | Optional. The final compiled answer.
    answer :: (Core.Maybe Core.Text),
    -- | Optional. Diagnostic info related to the answer generation model call.
    answerGenerationModelCallSignals ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
      ),
    -- | Optional. Answer parts with relevant citations. Concatenation of texts should add up the @answer@ (not counting whitespaces).
    answerParts ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart]
      ),
    -- | Optional. Snippets cited by the answer generation model from the most to least relevant.
    citedSnippets ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet]
      ),
    -- | Optional. Grounding signals.
    groundingSignals ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
      ),
    -- | Optional. Diagnostic info related to the rewriter model call.
    rewriterModelCallSignals ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
      ),
    -- | Optional. Rewritten string query used for search.
    rewrittenQuery :: (Core.Maybe Core.Text),
    -- | Optional. Safety check result.
    safetySignals ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
      ),
    -- | Optional. Search snippets included in the answer generation prompt.
    searchSnippets ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignals ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignals
newGoogleCloudDialogflowCxV3DataStoreConnectionSignals =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignals
    { answer =
        Core.Nothing,
      answerGenerationModelCallSignals =
        Core.Nothing,
      answerParts = Core.Nothing,
      citedSnippets = Core.Nothing,
      groundingSignals = Core.Nothing,
      rewriterModelCallSignals = Core.Nothing,
      rewrittenQuery = Core.Nothing,
      safetySignals = Core.Nothing,
      searchSnippets = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignals
            Core.<$> (o Core..:? "answer")
            Core.<*> (o Core..:? "answerGenerationModelCallSignals")
            Core.<*> (o Core..:? "answerParts")
            Core.<*> (o Core..:? "citedSnippets")
            Core.<*> (o Core..:? "groundingSignals")
            Core.<*> (o Core..:? "rewriterModelCallSignals")
            Core.<*> (o Core..:? "rewrittenQuery")
            Core.<*> (o Core..:? "safetySignals")
            Core.<*> (o Core..:? "searchSnippets")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignals
  where
  toJSON GoogleCloudDialogflowCxV3DataStoreConnectionSignals {..} =
    Core.object
      ( Core.catMaybes
          [ ("answer" Core..=) Core.<$> answer,
            ("answerGenerationModelCallSignals" Core..=)
              Core.<$> answerGenerationModelCallSignals,
            ("answerParts" Core..=) Core.<$> answerParts,
            ("citedSnippets" Core..=) Core.<$> citedSnippets,
            ("groundingSignals" Core..=) Core.<$> groundingSignals,
            ("rewriterModelCallSignals" Core..=)
              Core.<$> rewriterModelCallSignals,
            ("rewrittenQuery" Core..=) Core.<$> rewrittenQuery,
            ("safetySignals" Core..=) Core.<$> safetySignals,
            ("searchSnippets" Core..=) Core.<$> searchSnippets
          ]
      )

-- | Diagnostic info related to the answer generation model call.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
  { -- | Name of the generative model. For example, \"gemini-ultra\", \"gemini-pro\", \"gemini-1.5-flash\" etc. Defaults to \"Other\" if the model is unknown.
    model :: (Core.Maybe Core.Text),
    -- | Output of the generative model.
    modelOutput :: (Core.Maybe Core.Text),
    -- | Prompt as sent to the model.
    renderedPrompt :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
    { model =
        Core.Nothing,
      modelOutput =
        Core.Nothing,
      renderedPrompt =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
            Core.<$> (o Core..:? "model")
            Core.<*> (o Core..:? "modelOutput")
            Core.<*> (o Core..:? "renderedPrompt")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerGenerationModelCallSignals {..} =
      Core.object
        ( Core.catMaybes
            [ ("model" Core..=) Core.<$> model,
              ("modelOutput" Core..=) Core.<$> modelOutput,
              ("renderedPrompt" Core..=) Core.<$> renderedPrompt
            ]
        )

-- | Answer part with citation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
  { -- | Citations for this answer part. Indices of @search_snippets@.
    supportingIndices :: (Core.Maybe [Core.Int32]),
    -- | Substring of the answer.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
    { supportingIndices =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
            Core.<$> (o Core..:? "supportingIndices")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsAnswerPart {..} =
      Core.object
        ( Core.catMaybes
            [ ("supportingIndices" Core..=) Core.<$> supportingIndices,
              ("text" Core..=) Core.<$> text
            ]
        )

-- | Snippet cited by the answer generation model.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
  { -- | Details of the snippet.
    searchSnippet ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
      ),
    -- | Index of the snippet in @search_snippets@ field.
    snippetIndex :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
    { searchSnippet =
        Core.Nothing,
      snippetIndex = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
            Core.<$> (o Core..:? "searchSnippet")
            Core.<*> (o Core..:? "snippetIndex")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsCitedSnippet {..} =
      Core.object
        ( Core.catMaybes
            [ ("searchSnippet" Core..=) Core.<$> searchSnippet,
              ("snippetIndex" Core..=) Core.<$> snippetIndex
            ]
        )

-- | Grounding signals.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
  { -- | Represents the decision of the grounding check.
    decision ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals_Decision
      ),
    -- | Grounding score bucket setting.
    score ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals_Score
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
    { decision =
        Core.Nothing,
      score = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
            Core.<$> (o Core..:? "decision")
            Core.<*> (o Core..:? "score")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsGroundingSignals {..} =
      Core.object
        ( Core.catMaybes
            [ ("decision" Core..=) Core.<$> decision,
              ("score" Core..=) Core.<$> score
            ]
        )

-- | Diagnostic info related to the rewriter model call.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
  { -- | Name of the generative model. For example, \"gemini-ultra\", \"gemini-pro\", \"gemini-1.5-flash\" etc. Defaults to \"Other\" if the model is unknown.
    model :: (Core.Maybe Core.Text),
    -- | Output of the generative model.
    modelOutput :: (Core.Maybe Core.Text),
    -- | Prompt as sent to the model.
    renderedPrompt :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
    { model =
        Core.Nothing,
      modelOutput =
        Core.Nothing,
      renderedPrompt =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
            Core.<$> (o Core..:? "model")
            Core.<*> (o Core..:? "modelOutput")
            Core.<*> (o Core..:? "renderedPrompt")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsRewriterModelCallSignals {..} =
      Core.object
        ( Core.catMaybes
            [ ("model" Core..=) Core.<$> model,
              ("modelOutput" Core..=) Core.<$> modelOutput,
              ("renderedPrompt" Core..=) Core.<$> renderedPrompt
            ]
        )

-- | Safety check results.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
  { -- | Specifies banned phrase match subject.
    bannedPhraseMatch ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals_BannedPhraseMatch
      ),
    -- | Safety decision.
    decision ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals_Decision
      ),
    -- | The matched banned phrase if there was a match.
    matchedBannedPhrase :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
    { bannedPhraseMatch =
        Core.Nothing,
      decision = Core.Nothing,
      matchedBannedPhrase =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
            Core.<$> (o Core..:? "bannedPhraseMatch")
            Core.<*> (o Core..:? "decision")
            Core.<*> (o Core..:? "matchedBannedPhrase")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSafetySignals {..} =
      Core.object
        ( Core.catMaybes
            [ ("bannedPhraseMatch" Core..=) Core.<$> bannedPhraseMatch,
              ("decision" Core..=) Core.<$> decision,
              ("matchedBannedPhrase" Core..=) Core.<$> matchedBannedPhrase
            ]
        )

-- | Search snippet details.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet' smart constructor.
data GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet = GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
  { -- | Title of the enclosing document.
    documentTitle :: (Core.Maybe Core.Text),
    -- | Uri for the document. Present if specified for the document.
    documentUri :: (Core.Maybe Core.Text),
    -- | Text included in the prompt.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet ::
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
newGoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet =
  GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
    { documentTitle =
        Core.Nothing,
      documentUri = Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet"
      ( \o ->
          GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
            Core.<$> (o Core..:? "documentTitle")
            Core.<*> (o Core..:? "documentUri")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet
  where
  toJSON
    GoogleCloudDialogflowCxV3DataStoreConnectionSignalsSearchSnippet {..} =
      Core.object
        ( Core.catMaybes
            [ ("documentTitle" Core..=) Core.<$> documentTitle,
              ("documentUri" Core..=) Core.<$> documentUri,
              ("text" Core..=) Core.<$> text
            ]
        )

-- | Metadata returned for the Environments.DeployFlow long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DeployFlowMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3DeployFlowMetadata = GoogleCloudDialogflowCxV3DeployFlowMetadata
  { -- | Errors of running deployment tests.
    testErrors :: (Core.Maybe [GoogleCloudDialogflowCxV3TestError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DeployFlowMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DeployFlowMetadata ::
  GoogleCloudDialogflowCxV3DeployFlowMetadata
newGoogleCloudDialogflowCxV3DeployFlowMetadata =
  GoogleCloudDialogflowCxV3DeployFlowMetadata
    { testErrors =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DeployFlowMetadata where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DeployFlowMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3DeployFlowMetadata
            Core.<$> (o Core..:? "testErrors")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DeployFlowMetadata where
  toJSON GoogleCloudDialogflowCxV3DeployFlowMetadata {..} =
    Core.object
      (Core.catMaybes [("testErrors" Core..=) Core.<$> testErrors])

-- | The request message for Environments.DeployFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DeployFlowRequest' smart constructor.
newtype GoogleCloudDialogflowCxV3DeployFlowRequest = GoogleCloudDialogflowCxV3DeployFlowRequest
  { -- | Required. The flow version to deploy. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@.
    flowVersion :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DeployFlowRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DeployFlowRequest ::
  GoogleCloudDialogflowCxV3DeployFlowRequest
newGoogleCloudDialogflowCxV3DeployFlowRequest =
  GoogleCloudDialogflowCxV3DeployFlowRequest
    { flowVersion =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DeployFlowRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DeployFlowRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3DeployFlowRequest
            Core.<$> (o Core..:? "flowVersion")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DeployFlowRequest where
  toJSON GoogleCloudDialogflowCxV3DeployFlowRequest {..} =
    Core.object
      (Core.catMaybes [("flowVersion" Core..=) Core.<$> flowVersion])

-- | The response message for Environments.DeployFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DeployFlowResponse' smart constructor.
data GoogleCloudDialogflowCxV3DeployFlowResponse = GoogleCloudDialogflowCxV3DeployFlowResponse
  { -- | The name of the flow version Deployment. Format: @projects\/\/locations\/\/agents\/\/environments\/\/deployments\/@.
    deployment :: (Core.Maybe Core.Text),
    -- | The updated environment where the flow is deployed.
    environment :: (Core.Maybe GoogleCloudDialogflowCxV3Environment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DeployFlowResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DeployFlowResponse ::
  GoogleCloudDialogflowCxV3DeployFlowResponse
newGoogleCloudDialogflowCxV3DeployFlowResponse =
  GoogleCloudDialogflowCxV3DeployFlowResponse
    { deployment =
        Core.Nothing,
      environment = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DeployFlowResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DeployFlowResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3DeployFlowResponse
            Core.<$> (o Core..:? "deployment")
            Core.<*> (o Core..:? "environment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DeployFlowResponse where
  toJSON GoogleCloudDialogflowCxV3DeployFlowResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("deployment" Core..=) Core.<$> deployment,
            ("environment" Core..=) Core.<$> environment
          ]
      )

-- | Represents a deployment in an environment. A deployment happens when a flow version configured to be active in the environment. You can configure running pre-deployment steps, e.g. running validation test cases, experiment auto-rollout, etc.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Deployment' smart constructor.
data GoogleCloudDialogflowCxV3Deployment = GoogleCloudDialogflowCxV3Deployment
  { -- | End time of this deployment.
    endTime :: (Core.Maybe Core.DateTime),
    -- | The name of the flow version for this deployment. Format: projects\/\/locations\/\/agents\/\/flows\/\/versions\/.
    flowVersion :: (Core.Maybe Core.Text),
    -- | The name of the deployment. Format: projects\/\/locations\/\/agents\/\/environments\/\/deployments\/.
    name :: (Core.Maybe Core.Text),
    -- | Result of the deployment.
    result :: (Core.Maybe GoogleCloudDialogflowCxV3DeploymentResult),
    -- | Start time of this deployment.
    startTime :: (Core.Maybe Core.DateTime),
    -- | The current state of the deployment.
    state :: (Core.Maybe GoogleCloudDialogflowCxV3Deployment_State)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Deployment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Deployment ::
  GoogleCloudDialogflowCxV3Deployment
newGoogleCloudDialogflowCxV3Deployment =
  GoogleCloudDialogflowCxV3Deployment
    { endTime = Core.Nothing,
      flowVersion = Core.Nothing,
      name = Core.Nothing,
      result = Core.Nothing,
      startTime = Core.Nothing,
      state = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Deployment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Deployment"
      ( \o ->
          GoogleCloudDialogflowCxV3Deployment
            Core.<$> (o Core..:? "endTime")
            Core.<*> (o Core..:? "flowVersion")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "result")
            Core.<*> (o Core..:? "startTime")
            Core.<*> (o Core..:? "state")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Deployment where
  toJSON GoogleCloudDialogflowCxV3Deployment {..} =
    Core.object
      ( Core.catMaybes
          [ ("endTime" Core..=) Core.<$> endTime,
            ("flowVersion" Core..=) Core.<$> flowVersion,
            ("name" Core..=) Core.<$> name,
            ("result" Core..=) Core.<$> result,
            ("startTime" Core..=) Core.<$> startTime,
            ("state" Core..=) Core.<$> state
          ]
      )

-- | Result of the deployment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DeploymentResult' smart constructor.
data GoogleCloudDialogflowCxV3DeploymentResult = GoogleCloudDialogflowCxV3DeploymentResult
  { -- | Results of test cases running before the deployment. Format: @projects\/\/locations\/\/agents\/\/testCases\/\/results\/@.
    deploymentTestResults :: (Core.Maybe [Core.Text]),
    -- | The name of the experiment triggered by this deployment. Format: projects\/\/locations\/\/agents\/\/environments\/\/experiments\/.
    experiment :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DeploymentResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DeploymentResult ::
  GoogleCloudDialogflowCxV3DeploymentResult
newGoogleCloudDialogflowCxV3DeploymentResult =
  GoogleCloudDialogflowCxV3DeploymentResult
    { deploymentTestResults =
        Core.Nothing,
      experiment = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DeploymentResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DeploymentResult"
      ( \o ->
          GoogleCloudDialogflowCxV3DeploymentResult
            Core.<$> (o Core..:? "deploymentTestResults")
            Core.<*> (o Core..:? "experiment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DeploymentResult where
  toJSON GoogleCloudDialogflowCxV3DeploymentResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("deploymentTestResults" Core..=) Core.<$> deploymentTestResults,
            ("experiment" Core..=) Core.<$> experiment
          ]
      )

-- | The request to detect user\'s intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DetectIntentRequest' smart constructor.
data GoogleCloudDialogflowCxV3DetectIntentRequest = GoogleCloudDialogflowCxV3DetectIntentRequest
  { -- | Instructs the speech synthesizer how to generate the output audio.
    outputAudioConfig :: (Core.Maybe GoogleCloudDialogflowCxV3OutputAudioConfig),
    -- | Required. The input specification.
    queryInput :: (Core.Maybe GoogleCloudDialogflowCxV3QueryInput),
    -- | The parameters of this query.
    queryParams :: (Core.Maybe GoogleCloudDialogflowCxV3QueryParameters)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DetectIntentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DetectIntentRequest ::
  GoogleCloudDialogflowCxV3DetectIntentRequest
newGoogleCloudDialogflowCxV3DetectIntentRequest =
  GoogleCloudDialogflowCxV3DetectIntentRequest
    { outputAudioConfig =
        Core.Nothing,
      queryInput = Core.Nothing,
      queryParams = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DetectIntentRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DetectIntentRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3DetectIntentRequest
            Core.<$> (o Core..:? "outputAudioConfig")
            Core.<*> (o Core..:? "queryInput")
            Core.<*> (o Core..:? "queryParams")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DetectIntentRequest where
  toJSON GoogleCloudDialogflowCxV3DetectIntentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("outputAudioConfig" Core..=) Core.<$> outputAudioConfig,
            ("queryInput" Core..=) Core.<$> queryInput,
            ("queryParams" Core..=) Core.<$> queryParams
          ]
      )

-- | The message returned from the DetectIntent method.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DetectIntentResponse' smart constructor.
data GoogleCloudDialogflowCxV3DetectIntentResponse = GoogleCloudDialogflowCxV3DetectIntentResponse
  { -- | Indicates whether the partial response can be cancelled when a later response arrives. e.g. if the agent specified some music as partial response, it can be cancelled.
    allowCancellation :: (Core.Maybe Core.Bool),
    -- | The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the @query_result.response_messages@ field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
    outputAudio :: (Core.Maybe Core.Base64),
    -- | The config used by the speech synthesizer to generate the output audio.
    outputAudioConfig :: (Core.Maybe GoogleCloudDialogflowCxV3OutputAudioConfig),
    -- | The result of the conversational query.
    queryResult :: (Core.Maybe GoogleCloudDialogflowCxV3QueryResult),
    -- | Output only. The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
    responseId :: (Core.Maybe Core.Text),
    -- | Response type.
    responseType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3DetectIntentResponse_ResponseType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DetectIntentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DetectIntentResponse ::
  GoogleCloudDialogflowCxV3DetectIntentResponse
newGoogleCloudDialogflowCxV3DetectIntentResponse =
  GoogleCloudDialogflowCxV3DetectIntentResponse
    { allowCancellation =
        Core.Nothing,
      outputAudio = Core.Nothing,
      outputAudioConfig = Core.Nothing,
      queryResult = Core.Nothing,
      responseId = Core.Nothing,
      responseType = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3DetectIntentResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DetectIntentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3DetectIntentResponse
            Core.<$> (o Core..:? "allowCancellation")
            Core.<*> (o Core..:? "outputAudio")
            Core.<*> (o Core..:? "outputAudioConfig")
            Core.<*> (o Core..:? "queryResult")
            Core.<*> (o Core..:? "responseId")
            Core.<*> (o Core..:? "responseType")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DetectIntentResponse where
  toJSON GoogleCloudDialogflowCxV3DetectIntentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowCancellation" Core..=) Core.<$> allowCancellation,
            ("outputAudio" Core..=) Core.<$> outputAudio,
            ("outputAudioConfig" Core..=) Core.<$> outputAudioConfig,
            ("queryResult" Core..=) Core.<$> queryResult,
            ("responseId" Core..=) Core.<$> responseId,
            ("responseType" Core..=) Core.<$> responseType
          ]
      )

-- | Represents the input for dtmf event.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3DtmfInput' smart constructor.
data GoogleCloudDialogflowCxV3DtmfInput = GoogleCloudDialogflowCxV3DtmfInput
  { -- | The dtmf digits.
    digits :: (Core.Maybe Core.Text),
    -- | The finish digit (if any).
    finishDigit :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3DtmfInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3DtmfInput ::
  GoogleCloudDialogflowCxV3DtmfInput
newGoogleCloudDialogflowCxV3DtmfInput =
  GoogleCloudDialogflowCxV3DtmfInput
    { digits = Core.Nothing,
      finishDigit = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3DtmfInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3DtmfInput"
      ( \o ->
          GoogleCloudDialogflowCxV3DtmfInput
            Core.<$> (o Core..:? "digits")
            Core.<*> (o Core..:? "finishDigit")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3DtmfInput where
  toJSON GoogleCloudDialogflowCxV3DtmfInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("digits" Core..=) Core.<$> digits,
            ("finishDigit" Core..=) Core.<$> finishDigit
          ]
      )

-- | Entities are extracted from user input and represent parameters that are meaningful to your application. For example, a date range, a proper name such as a geographic location or landmark, and so on. Entities represent actionable data for your application. When you define an entity, you can also include synonyms that all map to that entity. For example, \"soft drink\", \"soda\", \"pop\", and so on. There are three types of entities: * __System__ - entities that are defined by the Dialogflow API for common data types such as date, time, currency, and so on. A system entity is represented by the @EntityType@ type. * __Custom__ - entities that are defined by you that represent actionable data that is meaningful to your application. For example, you could define a @pizza.sauce@ entity for red or white pizza sauce, a @pizza.cheese@ entity for the different types of cheese on a pizza, a @pizza.topping@ entity for different toppings, and so on. A custom entity is represented by the @EntityType@ type. * __User__ -
-- entities that are built for an individual user such as favorites, preferences, playlists, and so on. A user entity is represented by the SessionEntityType type. For more information about entity types, see the <https://cloud.google.com/dialogflow/docs/entities-overview Dialogflow documentation>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EntityType' smart constructor.
data GoogleCloudDialogflowCxV3EntityType = GoogleCloudDialogflowCxV3EntityType
  { -- | Indicates whether the entity type can be automatically expanded.
    autoExpansionMode :: (Core.Maybe GoogleCloudDialogflowCxV3EntityType_AutoExpansionMode),
    -- | Required. The human-readable name of the entity type, unique within the agent.
    displayName :: (Core.Maybe Core.Text),
    -- | Enables fuzzy entity extraction during classification.
    enableFuzzyExtraction :: (Core.Maybe Core.Bool),
    -- | The collection of entity entries associated with the entity type.
    entities :: (Core.Maybe [GoogleCloudDialogflowCxV3EntityTypeEntity]),
    -- | Collection of exceptional words and phrases that shouldn\'t be matched. For example, if you have a size entity type with entry @giant@(an adjective), you might consider adding @giants@(a noun) as an exclusion. If the kind of entity type is @KIND_MAP@, then the phrases specified by entities and excluded phrases should be mutually exclusive.
    excludedPhrases :: (Core.Maybe [GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase]),
    -- | Required. Indicates the kind of entity type.
    kind :: (Core.Maybe GoogleCloudDialogflowCxV3EntityType_Kind),
    -- | The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType. Format: @projects\/\/locations\/\/agents\/\/entityTypes\/@.
    name :: (Core.Maybe Core.Text),
    -- | Indicates whether parameters of the entity type should be redacted in log. If redaction is enabled, page parameters and intent parameters referring to the entity type will be replaced by parameter name when logging.
    redact :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EntityType' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EntityType ::
  GoogleCloudDialogflowCxV3EntityType
newGoogleCloudDialogflowCxV3EntityType =
  GoogleCloudDialogflowCxV3EntityType
    { autoExpansionMode =
        Core.Nothing,
      displayName = Core.Nothing,
      enableFuzzyExtraction = Core.Nothing,
      entities = Core.Nothing,
      excludedPhrases = Core.Nothing,
      kind = Core.Nothing,
      name = Core.Nothing,
      redact = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3EntityType where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EntityType"
      ( \o ->
          GoogleCloudDialogflowCxV3EntityType
            Core.<$> (o Core..:? "autoExpansionMode")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "enableFuzzyExtraction")
            Core.<*> (o Core..:? "entities")
            Core.<*> (o Core..:? "excludedPhrases")
            Core.<*> (o Core..:? "kind")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "redact")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3EntityType where
  toJSON GoogleCloudDialogflowCxV3EntityType {..} =
    Core.object
      ( Core.catMaybes
          [ ("autoExpansionMode" Core..=) Core.<$> autoExpansionMode,
            ("displayName" Core..=) Core.<$> displayName,
            ("enableFuzzyExtraction" Core..=) Core.<$> enableFuzzyExtraction,
            ("entities" Core..=) Core.<$> entities,
            ("excludedPhrases" Core..=) Core.<$> excludedPhrases,
            ("kind" Core..=) Core.<$> kind,
            ("name" Core..=) Core.<$> name,
            ("redact" Core..=) Core.<$> redact
          ]
      )

-- | An __entity entry__ for an associated entity type.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EntityTypeEntity' smart constructor.
data GoogleCloudDialogflowCxV3EntityTypeEntity = GoogleCloudDialogflowCxV3EntityTypeEntity
  { -- | Required. A collection of value synonyms. For example, if the entity type is /vegetable/, and @value@ is /scallions/, a synonym could be /green onions/. For @KIND_LIST@ entity types: * This collection must contain exactly one synonym equal to @value@.
    synonyms :: (Core.Maybe [Core.Text]),
    -- | Required. The primary value associated with this entity entry. For example, if the entity type is /vegetable/, the value could be /scallions/. For @KIND_MAP@ entity types: * A canonical value to be used in place of synonyms. For @KIND_LIST@ entity types: * A string that can contain references to other entity types (with or without aliases).
    value :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EntityTypeEntity' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EntityTypeEntity ::
  GoogleCloudDialogflowCxV3EntityTypeEntity
newGoogleCloudDialogflowCxV3EntityTypeEntity =
  GoogleCloudDialogflowCxV3EntityTypeEntity
    { synonyms =
        Core.Nothing,
      value = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3EntityTypeEntity where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EntityTypeEntity"
      ( \o ->
          GoogleCloudDialogflowCxV3EntityTypeEntity
            Core.<$> (o Core..:? "synonyms")
            Core.<*> (o Core..:? "value")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3EntityTypeEntity where
  toJSON GoogleCloudDialogflowCxV3EntityTypeEntity {..} =
    Core.object
      ( Core.catMaybes
          [ ("synonyms" Core..=) Core.<$> synonyms,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | An excluded entity phrase that should not be matched.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EntityTypeExcludedPhrase' smart constructor.
newtype GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase = GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
  { -- | Required. The word or phrase to be excluded.
    value :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EntityTypeExcludedPhrase ::
  GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
newGoogleCloudDialogflowCxV3EntityTypeExcludedPhrase =
  GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
    { value =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase"
      ( \o ->
          GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
            Core.<$> (o Core..:? "value")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase
  where
  toJSON GoogleCloudDialogflowCxV3EntityTypeExcludedPhrase {..} =
    Core.object (Core.catMaybes [("value" Core..=) Core.<$> value])

-- | Represents an environment for an agent. You can create multiple versions of your agent and publish them to separate environments. When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for testing, development, production, etc.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Environment' smart constructor.
data GoogleCloudDialogflowCxV3Environment = GoogleCloudDialogflowCxV3Environment
  { -- | The human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | The name of the environment. Format: @projects\/\/locations\/\/agents\/\/environments\/@.
    name :: (Core.Maybe Core.Text),
    -- | The test cases config for continuous tests of this environment.
    testCasesConfig :: (Core.Maybe GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig),
    -- | Output only. Update time of this environment.
    updateTime :: (Core.Maybe Core.DateTime),
    -- | A list of configurations for flow versions. You should include version configs for all flows that are reachable from @Start Flow@ in the agent. Otherwise, an error will be returned.
    versionConfigs :: (Core.Maybe [GoogleCloudDialogflowCxV3EnvironmentVersionConfig]),
    -- | The webhook configuration for this environment.
    webhookConfig :: (Core.Maybe GoogleCloudDialogflowCxV3EnvironmentWebhookConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Environment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Environment ::
  GoogleCloudDialogflowCxV3Environment
newGoogleCloudDialogflowCxV3Environment =
  GoogleCloudDialogflowCxV3Environment
    { description = Core.Nothing,
      displayName = Core.Nothing,
      name = Core.Nothing,
      testCasesConfig = Core.Nothing,
      updateTime = Core.Nothing,
      versionConfigs = Core.Nothing,
      webhookConfig = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Environment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Environment"
      ( \o ->
          GoogleCloudDialogflowCxV3Environment
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "testCasesConfig")
            Core.<*> (o Core..:? "updateTime")
            Core.<*> (o Core..:? "versionConfigs")
            Core.<*> (o Core..:? "webhookConfig")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Environment where
  toJSON GoogleCloudDialogflowCxV3Environment {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("name" Core..=) Core.<$> name,
            ("testCasesConfig" Core..=) Core.<$> testCasesConfig,
            ("updateTime" Core..=) Core.<$> updateTime,
            ("versionConfigs" Core..=) Core.<$> versionConfigs,
            ("webhookConfig" Core..=) Core.<$> webhookConfig
          ]
      )

-- | The configuration for continuous tests.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EnvironmentTestCasesConfig' smart constructor.
data GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig = GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
  { -- | Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
    enableContinuousRun :: (Core.Maybe Core.Bool),
    -- | Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
    enablePredeploymentRun :: (Core.Maybe Core.Bool),
    -- | A list of test case names to run. They should be under the same agent. Format of each test case name: @projects\/\/locations\/\/agents\/\/testCases\/@
    testCases :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EnvironmentTestCasesConfig ::
  GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
newGoogleCloudDialogflowCxV3EnvironmentTestCasesConfig =
  GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
    { enableContinuousRun =
        Core.Nothing,
      enablePredeploymentRun = Core.Nothing,
      testCases = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
            Core.<$> (o Core..:? "enableContinuousRun")
            Core.<*> (o Core..:? "enablePredeploymentRun")
            Core.<*> (o Core..:? "testCases")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig
  where
  toJSON GoogleCloudDialogflowCxV3EnvironmentTestCasesConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableContinuousRun" Core..=) Core.<$> enableContinuousRun,
            ("enablePredeploymentRun" Core..=) Core.<$> enablePredeploymentRun,
            ("testCases" Core..=) Core.<$> testCases
          ]
      )

-- | Configuration for the version.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EnvironmentVersionConfig' smart constructor.
newtype GoogleCloudDialogflowCxV3EnvironmentVersionConfig = GoogleCloudDialogflowCxV3EnvironmentVersionConfig
  { -- | Required. Both flow and playbook versions are supported. Format for flow version: projects\/\/locations\/\/agents\/\/flows\/\/versions\/. Format for playbook version: projects\/\/locations\/\/agents\/\/playbooks\/\/versions\/.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EnvironmentVersionConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EnvironmentVersionConfig ::
  GoogleCloudDialogflowCxV3EnvironmentVersionConfig
newGoogleCloudDialogflowCxV3EnvironmentVersionConfig =
  GoogleCloudDialogflowCxV3EnvironmentVersionConfig
    { version =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3EnvironmentVersionConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EnvironmentVersionConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3EnvironmentVersionConfig
            Core.<$> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3EnvironmentVersionConfig
  where
  toJSON GoogleCloudDialogflowCxV3EnvironmentVersionConfig {..} =
    Core.object
      (Core.catMaybes [("version" Core..=) Core.<$> version])

-- | Configuration for webhooks.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EnvironmentWebhookConfig' smart constructor.
newtype GoogleCloudDialogflowCxV3EnvironmentWebhookConfig = GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
  { -- | The list of webhooks to override for the agent environment. The webhook must exist in the agent. You can override fields in @generic_web_service@ and @service_directory@.
    webhookOverrides :: (Core.Maybe [GoogleCloudDialogflowCxV3Webhook])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EnvironmentWebhookConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EnvironmentWebhookConfig ::
  GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
newGoogleCloudDialogflowCxV3EnvironmentWebhookConfig =
  GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
    { webhookOverrides =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EnvironmentWebhookConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
            Core.<$> (o Core..:? "webhookOverrides")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3EnvironmentWebhookConfig
  where
  toJSON GoogleCloudDialogflowCxV3EnvironmentWebhookConfig {..} =
    Core.object
      ( Core.catMaybes
          [("webhookOverrides" Core..=) Core.<$> webhookOverrides]
      )

-- | An event handler specifies an event that can be handled during a session. When the specified event happens, the following actions are taken in order: * If there is a @trigger_fulfillment@ associated with the event, it will be called. * If there is a @target_page@ associated with the event, the session will transition into the specified page. * If there is a @target_flow@ associated with the event, the session will transition into the specified flow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EventHandler' smart constructor.
data GoogleCloudDialogflowCxV3EventHandler = GoogleCloudDialogflowCxV3EventHandler
  { -- | Required. The name of the event to handle.
    event :: (Core.Maybe Core.Text),
    -- | Output only. The unique identifier of this event handler.
    name :: (Core.Maybe Core.Text),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text),
    -- | The target playbook to transition to. Format: @projects\/\/locations\/\/agents\/\/playbooks\/@.
    targetPlaybook :: (Core.Maybe Core.Text),
    -- | The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
    triggerFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3Fulfillment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EventHandler' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EventHandler ::
  GoogleCloudDialogflowCxV3EventHandler
newGoogleCloudDialogflowCxV3EventHandler =
  GoogleCloudDialogflowCxV3EventHandler
    { event = Core.Nothing,
      name = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing,
      targetPlaybook = Core.Nothing,
      triggerFulfillment = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3EventHandler where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EventHandler"
      ( \o ->
          GoogleCloudDialogflowCxV3EventHandler
            Core.<$> (o Core..:? "event")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
            Core.<*> (o Core..:? "targetPlaybook")
            Core.<*> (o Core..:? "triggerFulfillment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3EventHandler where
  toJSON GoogleCloudDialogflowCxV3EventHandler {..} =
    Core.object
      ( Core.catMaybes
          [ ("event" Core..=) Core.<$> event,
            ("name" Core..=) Core.<$> name,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage,
            ("targetPlaybook" Core..=) Core.<$> targetPlaybook,
            ("triggerFulfillment" Core..=) Core.<$> triggerFulfillment
          ]
      )

-- | Represents the event to trigger.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3EventInput' smart constructor.
newtype GoogleCloudDialogflowCxV3EventInput = GoogleCloudDialogflowCxV3EventInput
  { -- | Name of the event.
    event :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3EventInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3EventInput ::
  GoogleCloudDialogflowCxV3EventInput
newGoogleCloudDialogflowCxV3EventInput =
  GoogleCloudDialogflowCxV3EventInput {event = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3EventInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3EventInput"
      ( \o ->
          GoogleCloudDialogflowCxV3EventInput Core.<$> (o Core..:? "event")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3EventInput where
  toJSON GoogleCloudDialogflowCxV3EventInput {..} =
    Core.object (Core.catMaybes [("event" Core..=) Core.<$> event])

-- | Represents an experiment in an environment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Experiment' smart constructor.
data GoogleCloudDialogflowCxV3Experiment = GoogleCloudDialogflowCxV3Experiment
  { -- | Creation time of this experiment.
    createTime :: (Core.Maybe Core.DateTime),
    -- | The definition of the experiment.
    definition :: (Core.Maybe GoogleCloudDialogflowCxV3ExperimentDefinition),
    -- | The human-readable description of the experiment.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the experiment (unique in an environment). Limit of 64 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | End time of this experiment.
    endTime :: (Core.Maybe Core.DateTime),
    -- | Maximum number of days to run the experiment\/rollout. If auto-rollout is not enabled, default value and maximum will be 30 days. If auto-rollout is enabled, default value and maximum will be 6 days.
    experimentLength :: (Core.Maybe Core.Duration),
    -- | Last update time of this experiment.
    lastUpdateTime :: (Core.Maybe Core.DateTime),
    -- | The name of the experiment. Format: projects\/\/locations\/\/agents\/\/environments\/\/experiments\/.
    name :: (Core.Maybe Core.Text),
    -- | Inference result of the experiment.
    result :: (Core.Maybe GoogleCloudDialogflowCxV3ExperimentResult),
    -- | The configuration for auto rollout. If set, there should be exactly two variants in the experiment (control variant being the default version of the flow), the traffic allocation for the non-control variant will gradually increase to 100% when conditions are met, and eventually replace the control variant to become the default version of the flow.
    rolloutConfig :: (Core.Maybe GoogleCloudDialogflowCxV3RolloutConfig),
    -- | The reason why rollout has failed. Should only be set when state is ROLLOUT_FAILED.
    rolloutFailureReason :: (Core.Maybe Core.Text),
    -- | State of the auto rollout process.
    rolloutState :: (Core.Maybe GoogleCloudDialogflowCxV3RolloutState),
    -- | Start time of this experiment.
    startTime :: (Core.Maybe Core.DateTime),
    -- | The current state of the experiment. Transition triggered by Experiments.StartExperiment: DRAFT->RUNNING. Transition triggered by Experiments.CancelExperiment: DRAFT->DONE or RUNNING->DONE.
    state :: (Core.Maybe GoogleCloudDialogflowCxV3Experiment_State),
    -- | The history of updates to the experiment variants.
    variantsHistory :: (Core.Maybe [GoogleCloudDialogflowCxV3VariantsHistory])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Experiment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Experiment ::
  GoogleCloudDialogflowCxV3Experiment
newGoogleCloudDialogflowCxV3Experiment =
  GoogleCloudDialogflowCxV3Experiment
    { createTime = Core.Nothing,
      definition = Core.Nothing,
      description = Core.Nothing,
      displayName = Core.Nothing,
      endTime = Core.Nothing,
      experimentLength = Core.Nothing,
      lastUpdateTime = Core.Nothing,
      name = Core.Nothing,
      result = Core.Nothing,
      rolloutConfig = Core.Nothing,
      rolloutFailureReason = Core.Nothing,
      rolloutState = Core.Nothing,
      startTime = Core.Nothing,
      state = Core.Nothing,
      variantsHistory = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Experiment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Experiment"
      ( \o ->
          GoogleCloudDialogflowCxV3Experiment
            Core.<$> (o Core..:? "createTime")
            Core.<*> (o Core..:? "definition")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "endTime")
            Core.<*> (o Core..:? "experimentLength")
            Core.<*> (o Core..:? "lastUpdateTime")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "result")
            Core.<*> (o Core..:? "rolloutConfig")
            Core.<*> (o Core..:? "rolloutFailureReason")
            Core.<*> (o Core..:? "rolloutState")
            Core.<*> (o Core..:? "startTime")
            Core.<*> (o Core..:? "state")
            Core.<*> (o Core..:? "variantsHistory")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Experiment where
  toJSON GoogleCloudDialogflowCxV3Experiment {..} =
    Core.object
      ( Core.catMaybes
          [ ("createTime" Core..=) Core.<$> createTime,
            ("definition" Core..=) Core.<$> definition,
            ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("endTime" Core..=) Core.<$> endTime,
            ("experimentLength" Core..=) Core.<$> experimentLength,
            ("lastUpdateTime" Core..=) Core.<$> lastUpdateTime,
            ("name" Core..=) Core.<$> name,
            ("result" Core..=) Core.<$> result,
            ("rolloutConfig" Core..=) Core.<$> rolloutConfig,
            ("rolloutFailureReason" Core..=) Core.<$> rolloutFailureReason,
            ("rolloutState" Core..=) Core.<$> rolloutState,
            ("startTime" Core..=) Core.<$> startTime,
            ("state" Core..=) Core.<$> state,
            ("variantsHistory" Core..=) Core.<$> variantsHistory
          ]
      )

-- | Definition of the experiment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExperimentDefinition' smart constructor.
data GoogleCloudDialogflowCxV3ExperimentDefinition = GoogleCloudDialogflowCxV3ExperimentDefinition
  { -- | The condition defines which subset of sessions are selected for this experiment. If not specified, all sessions are eligible. E.g. \"query/input.language/code=en\" See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>.
    condition :: (Core.Maybe Core.Text),
    -- | The flow versions as the variants of this experiment.
    versionVariants :: (Core.Maybe GoogleCloudDialogflowCxV3VersionVariants)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExperimentDefinition' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExperimentDefinition ::
  GoogleCloudDialogflowCxV3ExperimentDefinition
newGoogleCloudDialogflowCxV3ExperimentDefinition =
  GoogleCloudDialogflowCxV3ExperimentDefinition
    { condition =
        Core.Nothing,
      versionVariants = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExperimentDefinition
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExperimentDefinition"
      ( \o ->
          GoogleCloudDialogflowCxV3ExperimentDefinition
            Core.<$> (o Core..:? "condition")
            Core.<*> (o Core..:? "versionVariants")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExperimentDefinition where
  toJSON GoogleCloudDialogflowCxV3ExperimentDefinition {..} =
    Core.object
      ( Core.catMaybes
          [ ("condition" Core..=) Core.<$> condition,
            ("versionVariants" Core..=) Core.<$> versionVariants
          ]
      )

-- | The inference result which includes an objective metric to optimize and the confidence interval.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExperimentResult' smart constructor.
data GoogleCloudDialogflowCxV3ExperimentResult = GoogleCloudDialogflowCxV3ExperimentResult
  { -- | The last time the experiment\'s stats data was updated. Will have default value if stats have never been computed for this experiment.
    lastUpdateTime :: (Core.Maybe Core.DateTime),
    -- | Version variants and metrics.
    versionMetrics ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExperimentResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExperimentResult ::
  GoogleCloudDialogflowCxV3ExperimentResult
newGoogleCloudDialogflowCxV3ExperimentResult =
  GoogleCloudDialogflowCxV3ExperimentResult
    { lastUpdateTime =
        Core.Nothing,
      versionMetrics = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ExperimentResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExperimentResult"
      ( \o ->
          GoogleCloudDialogflowCxV3ExperimentResult
            Core.<$> (o Core..:? "lastUpdateTime")
            Core.<*> (o Core..:? "versionMetrics")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExperimentResult where
  toJSON GoogleCloudDialogflowCxV3ExperimentResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("lastUpdateTime" Core..=) Core.<$> lastUpdateTime,
            ("versionMetrics" Core..=) Core.<$> versionMetrics
          ]
      )

-- | A confidence interval is a range of possible values for the experiment objective you are trying to measure.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval' smart constructor.
data GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval = GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
  { -- | The confidence level used to construct the interval, i.e. there is X% chance that the true value is within this interval.
    confidenceLevel :: (Core.Maybe Core.Double),
    -- | Lower bound of the interval.
    lowerBound :: (Core.Maybe Core.Double),
    -- | The percent change between an experiment metric\'s value and the value for its control.
    ratio :: (Core.Maybe Core.Double),
    -- | Upper bound of the interval.
    upperBound :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval ::
  GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
newGoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval =
  GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
    { confidenceLevel =
        Core.Nothing,
      lowerBound = Core.Nothing,
      ratio = Core.Nothing,
      upperBound = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval"
      ( \o ->
          GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
            Core.<$> (o Core..:? "confidenceLevel")
            Core.<*> (o Core..:? "lowerBound")
            Core.<*> (o Core..:? "ratio")
            Core.<*> (o Core..:? "upperBound")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
  where
  toJSON
    GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval {..} =
      Core.object
        ( Core.catMaybes
            [ ("confidenceLevel" Core..=) Core.<$> confidenceLevel,
              ("lowerBound" Core..=) Core.<$> lowerBound,
              ("ratio" Core..=) Core.<$> ratio,
              ("upperBound" Core..=) Core.<$> upperBound
            ]
        )

-- | Metric and corresponding confidence intervals.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExperimentResultMetric' smart constructor.
data GoogleCloudDialogflowCxV3ExperimentResultMetric = GoogleCloudDialogflowCxV3ExperimentResultMetric
  { -- | The probability that the treatment is better than all other treatments in the experiment
    confidenceInterval ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ExperimentResultConfidenceInterval
      ),
    -- | Count value of a metric.
    count :: (Core.Maybe Core.Double),
    -- | Count-based metric type. Only one of type or count_type is specified in each Metric.
    countType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ExperimentResultMetric_CountType
      ),
    -- | Ratio value of a metric.
    ratio :: (Core.Maybe Core.Double),
    -- | Ratio-based metric type. Only one of type or count_type is specified in each Metric.
    type' :: (Core.Maybe GoogleCloudDialogflowCxV3ExperimentResultMetric_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExperimentResultMetric' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExperimentResultMetric ::
  GoogleCloudDialogflowCxV3ExperimentResultMetric
newGoogleCloudDialogflowCxV3ExperimentResultMetric =
  GoogleCloudDialogflowCxV3ExperimentResultMetric
    { confidenceInterval =
        Core.Nothing,
      count = Core.Nothing,
      countType = Core.Nothing,
      ratio = Core.Nothing,
      type' = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExperimentResultMetric
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExperimentResultMetric"
      ( \o ->
          GoogleCloudDialogflowCxV3ExperimentResultMetric
            Core.<$> (o Core..:? "confidenceInterval")
            Core.<*> (o Core..:? "count")
            Core.<*> (o Core..:? "countType")
            Core.<*> (o Core..:? "ratio")
            Core.<*> (o Core..:? "type")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExperimentResultMetric
  where
  toJSON GoogleCloudDialogflowCxV3ExperimentResultMetric {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidenceInterval" Core..=) Core.<$> confidenceInterval,
            ("count" Core..=) Core.<$> count,
            ("countType" Core..=) Core.<$> countType,
            ("ratio" Core..=) Core.<$> ratio,
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Version variant and associated metrics.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExperimentResultVersionMetrics' smart constructor.
data GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics = GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
  { -- | The metrics and corresponding confidence intervals in the inference result.
    metrics :: (Core.Maybe [GoogleCloudDialogflowCxV3ExperimentResultMetric]),
    -- | Number of sessions that were allocated to this version.
    sessionCount :: (Core.Maybe Core.Int32),
    -- | The name of the flow Version. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExperimentResultVersionMetrics ::
  GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
newGoogleCloudDialogflowCxV3ExperimentResultVersionMetrics =
  GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
    { metrics =
        Core.Nothing,
      sessionCount = Core.Nothing,
      version = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics"
      ( \o ->
          GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
            Core.<$> (o Core..:? "metrics")
            Core.<*> (o Core..:? "sessionCount")
            Core.<*> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics
  where
  toJSON GoogleCloudDialogflowCxV3ExperimentResultVersionMetrics {..} =
    Core.object
      ( Core.catMaybes
          [ ("metrics" Core..=) Core.<$> metrics,
            ("sessionCount" Core..=) Core.<$> sessionCount,
            ("version" Core..=) Core.<$> version
          ]
      )

-- | The request message for Agents.ExportAgent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportAgentRequest' smart constructor.
data GoogleCloudDialogflowCxV3ExportAgentRequest = GoogleCloudDialogflowCxV3ExportAgentRequest
  { -- | Optional. The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to export the agent to. The format of this URI must be @gs:\/\/\/@. If left unspecified, the serialized agent is returned inline. Dialogflow performs a write operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have write permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    agentUri :: (Core.Maybe Core.Text),
    -- | Optional. The data format of the exported agent. If not specified, @BLOB@ is assumed.
    dataFormat :: (Core.Maybe GoogleCloudDialogflowCxV3ExportAgentRequest_DataFormat),
    -- | Optional. Environment name. If not set, draft environment is assumed. Format: @projects\/\/locations\/\/agents\/\/environments\/@.
    environment :: (Core.Maybe Core.Text),
    -- | Optional. The Git branch to export the agent to.
    gitDestination ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
      ),
    -- | Optional. Whether to include BigQuery Export setting.
    includeBigqueryExportSettings :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportAgentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportAgentRequest ::
  GoogleCloudDialogflowCxV3ExportAgentRequest
newGoogleCloudDialogflowCxV3ExportAgentRequest =
  GoogleCloudDialogflowCxV3ExportAgentRequest
    { agentUri =
        Core.Nothing,
      dataFormat = Core.Nothing,
      environment = Core.Nothing,
      gitDestination = Core.Nothing,
      includeBigqueryExportSettings = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ExportAgentRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportAgentRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportAgentRequest
            Core.<$> (o Core..:? "agentUri")
            Core.<*> (o Core..:? "dataFormat")
            Core.<*> (o Core..:? "environment")
            Core.<*> (o Core..:? "gitDestination")
            Core.<*> (o Core..:? "includeBigqueryExportSettings")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportAgentRequest where
  toJSON GoogleCloudDialogflowCxV3ExportAgentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentUri" Core..=) Core.<$> agentUri,
            ("dataFormat" Core..=) Core.<$> dataFormat,
            ("environment" Core..=) Core.<$> environment,
            ("gitDestination" Core..=) Core.<$> gitDestination,
            ("includeBigqueryExportSettings" Core..=)
              Core.<$> includeBigqueryExportSettings
          ]
      )

-- | Settings for exporting to a git branch.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportAgentRequestGitDestination' smart constructor.
data GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination = GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
  { -- | Commit message for the git push.
    commitMessage :: (Core.Maybe Core.Text),
    -- | Tracking branch for the git push.
    trackingBranch :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportAgentRequestGitDestination ::
  GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
newGoogleCloudDialogflowCxV3ExportAgentRequestGitDestination =
  GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
    { commitMessage =
        Core.Nothing,
      trackingBranch = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
            Core.<$> (o Core..:? "commitMessage")
            Core.<*> (o Core..:? "trackingBranch")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination
  where
  toJSON
    GoogleCloudDialogflowCxV3ExportAgentRequestGitDestination {..} =
      Core.object
        ( Core.catMaybes
            [ ("commitMessage" Core..=) Core.<$> commitMessage,
              ("trackingBranch" Core..=) Core.<$> trackingBranch
            ]
        )

-- | The response message for Agents.ExportAgent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportAgentResponse' smart constructor.
data GoogleCloudDialogflowCxV3ExportAgentResponse = GoogleCloudDialogflowCxV3ExportAgentResponse
  { -- | Uncompressed raw byte content for agent. This field is populated if none of @agent_uri@ and @git_destination@ are specified in ExportAgentRequest.
    agentContent :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported agent. This field is populated if @agent_uri@ is specified in ExportAgentRequest.
    agentUri :: (Core.Maybe Core.Text),
    -- | Commit SHA of the git push. This field is populated if @git_destination@ is specified in ExportAgentRequest.
    commitSha :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportAgentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportAgentResponse ::
  GoogleCloudDialogflowCxV3ExportAgentResponse
newGoogleCloudDialogflowCxV3ExportAgentResponse =
  GoogleCloudDialogflowCxV3ExportAgentResponse
    { agentContent =
        Core.Nothing,
      agentUri = Core.Nothing,
      commitSha = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ExportAgentResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportAgentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportAgentResponse
            Core.<$> (o Core..:? "agentContent")
            Core.<*> (o Core..:? "agentUri")
            Core.<*> (o Core..:? "commitSha")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportAgentResponse where
  toJSON GoogleCloudDialogflowCxV3ExportAgentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentContent" Core..=) Core.<$> agentContent,
            ("agentUri" Core..=) Core.<$> agentUri,
            ("commitSha" Core..=) Core.<$> commitSha
          ]
      )

-- | Metadata returned for the EntityTypes.ExportEntityTypes long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportEntityTypesMetadata' smart constructor.
data GoogleCloudDialogflowCxV3ExportEntityTypesMetadata = GoogleCloudDialogflowCxV3ExportEntityTypesMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportEntityTypesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportEntityTypesMetadata ::
  GoogleCloudDialogflowCxV3ExportEntityTypesMetadata
newGoogleCloudDialogflowCxV3ExportEntityTypesMetadata =
  GoogleCloudDialogflowCxV3ExportEntityTypesMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportEntityTypesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportEntityTypesMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3ExportEntityTypesMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportEntityTypesMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The request message for EntityTypes.ExportEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportEntityTypesRequest' smart constructor.
data GoogleCloudDialogflowCxV3ExportEntityTypesRequest = GoogleCloudDialogflowCxV3ExportEntityTypesRequest
  { -- | Optional. The data format of the exported entity types. If not specified, @BLOB@ is assumed.
    dataFormat ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ExportEntityTypesRequest_DataFormat
      ),
    -- | Required. The name of the entity types to export. Format: @projects\/\/locations\/\/agents\/\/entityTypes\/@.
    entityTypes :: (Core.Maybe [Core.Text]),
    -- | Optional. The option to return the serialized entity types inline.
    entityTypesContentInline :: (Core.Maybe Core.Bool),
    -- | Optional. The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to export the entity types to. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a write operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have write permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    entityTypesUri :: (Core.Maybe Core.Text),
    -- | Optional. The language to retrieve the entity type for. The following fields are language dependent: * @EntityType.entities.value@ * @EntityType.entities.synonyms@ * @EntityType.excluded_phrases.value@ If not specified, all language dependent fields will be retrieved. <https://cloud.google.com/dialogflow/docs/reference/language Many languages> are supported. Note: languages must be enabled in the agent before they can be used.
    languageCode :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportEntityTypesRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportEntityTypesRequest ::
  GoogleCloudDialogflowCxV3ExportEntityTypesRequest
newGoogleCloudDialogflowCxV3ExportEntityTypesRequest =
  GoogleCloudDialogflowCxV3ExportEntityTypesRequest
    { dataFormat =
        Core.Nothing,
      entityTypes = Core.Nothing,
      entityTypesContentInline = Core.Nothing,
      entityTypesUri = Core.Nothing,
      languageCode = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportEntityTypesRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportEntityTypesRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportEntityTypesRequest
            Core.<$> (o Core..:? "dataFormat")
            Core.<*> (o Core..:? "entityTypes")
            Core.<*> (o Core..:? "entityTypesContentInline")
            Core.<*> (o Core..:? "entityTypesUri")
            Core.<*> (o Core..:? "languageCode")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportEntityTypesRequest
  where
  toJSON GoogleCloudDialogflowCxV3ExportEntityTypesRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataFormat" Core..=) Core.<$> dataFormat,
            ("entityTypes" Core..=) Core.<$> entityTypes,
            ("entityTypesContentInline" Core..=)
              Core.<$> entityTypesContentInline,
            ("entityTypesUri" Core..=) Core.<$> entityTypesUri,
            ("languageCode" Core..=) Core.<$> languageCode
          ]
      )

-- | The response message for EntityTypes.ExportEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportEntityTypesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ExportEntityTypesResponse = GoogleCloudDialogflowCxV3ExportEntityTypesResponse
  { -- | Uncompressed byte content for entity types. This field is populated only if @entity_types_content_inline@ is set to true in ExportEntityTypesRequest.
    entityTypesContent :: (Core.Maybe GoogleCloudDialogflowCxV3InlineDestination),
    -- | The URI to a file containing the exported entity types. This field is populated only if @entity_types_uri@ is specified in ExportEntityTypesRequest.
    entityTypesUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportEntityTypesResponse ::
  GoogleCloudDialogflowCxV3ExportEntityTypesResponse
newGoogleCloudDialogflowCxV3ExportEntityTypesResponse =
  GoogleCloudDialogflowCxV3ExportEntityTypesResponse
    { entityTypesContent =
        Core.Nothing,
      entityTypesUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportEntityTypesResponse
            Core.<$> (o Core..:? "entityTypesContent")
            Core.<*> (o Core..:? "entityTypesUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowCxV3ExportEntityTypesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityTypesContent" Core..=) Core.<$> entityTypesContent,
            ("entityTypesUri" Core..=) Core.<$> entityTypesUri
          ]
      )

-- | The request message for Flows.ExportFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportFlowRequest' smart constructor.
data GoogleCloudDialogflowCxV3ExportFlowRequest = GoogleCloudDialogflowCxV3ExportFlowRequest
  { -- | Optional. The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to export the flow to. The format of this URI must be @gs:\/\/\/@. If left unspecified, the serialized flow is returned inline. Dialogflow performs a write operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have write permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    flowUri :: (Core.Maybe Core.Text),
    -- | Optional. Whether to export flows referenced by the specified flow.
    includeReferencedFlows :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportFlowRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportFlowRequest ::
  GoogleCloudDialogflowCxV3ExportFlowRequest
newGoogleCloudDialogflowCxV3ExportFlowRequest =
  GoogleCloudDialogflowCxV3ExportFlowRequest
    { flowUri =
        Core.Nothing,
      includeReferencedFlows = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ExportFlowRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportFlowRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportFlowRequest
            Core.<$> (o Core..:? "flowUri")
            Core.<*> (o Core..:? "includeReferencedFlows")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportFlowRequest where
  toJSON GoogleCloudDialogflowCxV3ExportFlowRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("flowUri" Core..=) Core.<$> flowUri,
            ("includeReferencedFlows" Core..=)
              Core.<$> includeReferencedFlows
          ]
      )

-- | The response message for Flows.ExportFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportFlowResponse' smart constructor.
data GoogleCloudDialogflowCxV3ExportFlowResponse = GoogleCloudDialogflowCxV3ExportFlowResponse
  { -- | Uncompressed raw byte content for flow.
    flowContent :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported flow. This field is populated only if @flow_uri@ is specified in ExportFlowRequest.
    flowUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportFlowResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportFlowResponse ::
  GoogleCloudDialogflowCxV3ExportFlowResponse
newGoogleCloudDialogflowCxV3ExportFlowResponse =
  GoogleCloudDialogflowCxV3ExportFlowResponse
    { flowContent =
        Core.Nothing,
      flowUri = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ExportFlowResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportFlowResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportFlowResponse
            Core.<$> (o Core..:? "flowContent")
            Core.<*> (o Core..:? "flowUri")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportFlowResponse where
  toJSON GoogleCloudDialogflowCxV3ExportFlowResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("flowContent" Core..=) Core.<$> flowContent,
            ("flowUri" Core..=) Core.<$> flowUri
          ]
      )

-- | Metadata returned for the Intents.ExportIntents long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportIntentsMetadata' smart constructor.
data GoogleCloudDialogflowCxV3ExportIntentsMetadata = GoogleCloudDialogflowCxV3ExportIntentsMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportIntentsMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportIntentsMetadata ::
  GoogleCloudDialogflowCxV3ExportIntentsMetadata
newGoogleCloudDialogflowCxV3ExportIntentsMetadata =
  GoogleCloudDialogflowCxV3ExportIntentsMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportIntentsMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportIntentsMetadata"
      (\o -> Core.pure GoogleCloudDialogflowCxV3ExportIntentsMetadata)

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportIntentsMetadata where
  toJSON = Core.const Core.emptyObject

-- | The request message for Intents.ExportIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportIntentsRequest' smart constructor.
data GoogleCloudDialogflowCxV3ExportIntentsRequest = GoogleCloudDialogflowCxV3ExportIntentsRequest
  { -- | Optional. The data format of the exported intents. If not specified, @BLOB@ is assumed.
    dataFormat ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ExportIntentsRequest_DataFormat
      ),
    -- | Required. The name of the intents to export. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    intents :: (Core.Maybe [Core.Text]),
    -- | Optional. The option to return the serialized intents inline.
    intentsContentInline :: (Core.Maybe Core.Bool),
    -- | Optional. The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to export the intents to. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a write operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have write permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    intentsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportIntentsRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportIntentsRequest ::
  GoogleCloudDialogflowCxV3ExportIntentsRequest
newGoogleCloudDialogflowCxV3ExportIntentsRequest =
  GoogleCloudDialogflowCxV3ExportIntentsRequest
    { dataFormat =
        Core.Nothing,
      intents = Core.Nothing,
      intentsContentInline = Core.Nothing,
      intentsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportIntentsRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportIntentsRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportIntentsRequest
            Core.<$> (o Core..:? "dataFormat")
            Core.<*> (o Core..:? "intents")
            Core.<*> (o Core..:? "intentsContentInline")
            Core.<*> (o Core..:? "intentsUri")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportIntentsRequest where
  toJSON GoogleCloudDialogflowCxV3ExportIntentsRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataFormat" Core..=) Core.<$> dataFormat,
            ("intents" Core..=) Core.<$> intents,
            ("intentsContentInline" Core..=) Core.<$> intentsContentInline,
            ("intentsUri" Core..=) Core.<$> intentsUri
          ]
      )

-- | The response message for Intents.ExportIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportIntentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ExportIntentsResponse = GoogleCloudDialogflowCxV3ExportIntentsResponse
  { -- | Uncompressed byte content for intents. This field is populated only if @intents_content_inline@ is set to true in ExportIntentsRequest.
    intentsContent :: (Core.Maybe GoogleCloudDialogflowCxV3InlineDestination),
    -- | The URI to a file containing the exported intents. This field is populated only if @intents_uri@ is specified in ExportIntentsRequest.
    intentsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportIntentsResponse ::
  GoogleCloudDialogflowCxV3ExportIntentsResponse
newGoogleCloudDialogflowCxV3ExportIntentsResponse =
  GoogleCloudDialogflowCxV3ExportIntentsResponse
    { intentsContent =
        Core.Nothing,
      intentsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportIntentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportIntentsResponse
            Core.<$> (o Core..:? "intentsContent")
            Core.<*> (o Core..:? "intentsUri")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ExportIntentsResponse where
  toJSON GoogleCloudDialogflowCxV3ExportIntentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("intentsContent" Core..=) Core.<$> intentsContent,
            ("intentsUri" Core..=) Core.<$> intentsUri
          ]
      )

-- | Metadata returned for the TestCases.ExportTestCases long running operation. This message currently has no fields.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportTestCasesMetadata' smart constructor.
data GoogleCloudDialogflowCxV3ExportTestCasesMetadata = GoogleCloudDialogflowCxV3ExportTestCasesMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportTestCasesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportTestCasesMetadata ::
  GoogleCloudDialogflowCxV3ExportTestCasesMetadata
newGoogleCloudDialogflowCxV3ExportTestCasesMetadata =
  GoogleCloudDialogflowCxV3ExportTestCasesMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportTestCasesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportTestCasesMetadata"
      (\o -> Core.pure GoogleCloudDialogflowCxV3ExportTestCasesMetadata)

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportTestCasesMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The request message for TestCases.ExportTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportTestCasesRequest' smart constructor.
data GoogleCloudDialogflowCxV3ExportTestCasesRequest = GoogleCloudDialogflowCxV3ExportTestCasesRequest
  { -- | The data format of the exported test cases. If not specified, @BLOB@ is assumed.
    dataFormat ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ExportTestCasesRequest_DataFormat
      ),
    -- | The filter expression used to filter exported test cases, see <https://aip.dev/160 API Filtering>. The expression is case insensitive and supports the following syntax: name = [OR name = ] ... For example: * \"name = t1 OR name = t2\" matches the test case with the exact resource name \"t1\" or \"t2\".
    filter :: (Core.Maybe Core.Text),
    -- | The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to export the test cases to. The format of this URI must be @gs:\/\/\/@. If unspecified, the serialized test cases is returned inline. Dialogflow performs a write operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have write permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    gcsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportTestCasesRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportTestCasesRequest ::
  GoogleCloudDialogflowCxV3ExportTestCasesRequest
newGoogleCloudDialogflowCxV3ExportTestCasesRequest =
  GoogleCloudDialogflowCxV3ExportTestCasesRequest
    { dataFormat =
        Core.Nothing,
      filter = Core.Nothing,
      gcsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportTestCasesRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportTestCasesRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportTestCasesRequest
            Core.<$> (o Core..:? "dataFormat")
            Core.<*> (o Core..:? "filter")
            Core.<*> (o Core..:? "gcsUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportTestCasesRequest
  where
  toJSON GoogleCloudDialogflowCxV3ExportTestCasesRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataFormat" Core..=) Core.<$> dataFormat,
            ("filter" Core..=) Core.<$> filter,
            ("gcsUri" Core..=) Core.<$> gcsUri
          ]
      )

-- | The response message for TestCases.ExportTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ExportTestCasesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ExportTestCasesResponse = GoogleCloudDialogflowCxV3ExportTestCasesResponse
  { -- | Uncompressed raw byte content for test cases.
    content :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported test cases. This field is populated only if @gcs_uri@ is specified in ExportTestCasesRequest.
    gcsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ExportTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ExportTestCasesResponse ::
  GoogleCloudDialogflowCxV3ExportTestCasesResponse
newGoogleCloudDialogflowCxV3ExportTestCasesResponse =
  GoogleCloudDialogflowCxV3ExportTestCasesResponse
    { content =
        Core.Nothing,
      gcsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ExportTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ExportTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ExportTestCasesResponse
            Core.<$> (o Core..:? "content")
            Core.<*> (o Core..:? "gcsUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ExportTestCasesResponse
  where
  toJSON GoogleCloudDialogflowCxV3ExportTestCasesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("content" Core..=) Core.<$> content,
            ("gcsUri" Core..=) Core.<$> gcsUri
          ]
      )

-- | Filter specifications for data stores.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FilterSpecs' smart constructor.
data GoogleCloudDialogflowCxV3FilterSpecs = GoogleCloudDialogflowCxV3FilterSpecs
  { -- | Optional. Data Stores where the boosting configuration is applied. The full names of the referenced data stores. Formats: @projects\/{project}\/locations\/{location}\/collections\/{collection}\/dataStores\/{data_store}@ @projects\/{project}\/locations\/{location}\/dataStores\/{data_store}@
    dataStores :: (Core.Maybe [Core.Text]),
    -- | Optional. The filter expression to be applied. Expression syntax is documented at https:\/\/cloud.google.com\/generative-ai-app-builder\/docs\/filter-search-metadata#filter-expression-syntax
    filter :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FilterSpecs' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FilterSpecs ::
  GoogleCloudDialogflowCxV3FilterSpecs
newGoogleCloudDialogflowCxV3FilterSpecs =
  GoogleCloudDialogflowCxV3FilterSpecs
    { dataStores = Core.Nothing,
      filter = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3FilterSpecs where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FilterSpecs"
      ( \o ->
          GoogleCloudDialogflowCxV3FilterSpecs
            Core.<$> (o Core..:? "dataStores")
            Core.<*> (o Core..:? "filter")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3FilterSpecs where
  toJSON GoogleCloudDialogflowCxV3FilterSpecs {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataStores" Core..=) Core.<$> dataStores,
            ("filter" Core..=) Core.<$> filter
          ]
      )

-- | Flows represents the conversation flows when you build your chatbot agent. A flow consists of many pages connected by the transition routes. Conversations always start with the built-in Start Flow (with an all-0 ID). Transition routes can direct the conversation session from the current flow (parent flow) to another flow (sub flow). When the sub flow is finished, Dialogflow will bring the session back to the parent flow, where the sub flow is started. Usually, when a transition route is followed by a matched intent, the intent will be \"consumed\". This means the intent won\'t activate more transition routes. However, when the followed transition route moves the conversation session into a different flow, the matched intent can be carried over and to be consumed in the target flow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Flow' smart constructor.
data GoogleCloudDialogflowCxV3Flow = GoogleCloudDialogflowCxV3Flow
  { -- | Hierarchical advanced settings for this flow. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettings),
    -- | The description of the flow. The maximum length is 500 characters. If exceeded, the request is rejected.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the flow.
    displayName :: (Core.Maybe Core.Text),
    -- | A flow\'s event handlers serve two purposes: * They are responsible for handling events (e.g. no match, webhook errors) in the flow. * They are inherited by every page\'s event handlers, which can be used to handle common events regardless of the current page. Event handlers defined in the page have higher priority than those defined in the flow. Unlike transition_routes, these handlers are evaluated on a first-match basis. The first one that matches the event get executed, with the rest being ignored.
    eventHandlers :: (Core.Maybe [GoogleCloudDialogflowCxV3EventHandler]),
    -- | Optional. Knowledge connector configuration.
    knowledgeConnectorSettings :: (Core.Maybe GoogleCloudDialogflowCxV3KnowledgeConnectorSettings),
    -- | Indicates whether the flow is locked for changes. If the flow is locked, modifications to the flow will be rejected.
    locked :: (Core.Maybe Core.Bool),
    -- | Optional. Multi-lingual agent settings for this flow.
    multiLanguageSettings :: (Core.Maybe GoogleCloudDialogflowCxV3FlowMultiLanguageSettings),
    -- | The unique identifier of the flow. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    name :: (Core.Maybe Core.Text),
    -- | NLU related settings of the flow.
    nluSettings :: (Core.Maybe GoogleCloudDialogflowCxV3NluSettings),
    -- | A flow\'s transition route group serve two purposes: * They are responsible for matching the user\'s first utterances in the flow. * They are inherited by every page\'s transition route groups. Transition route groups defined in the page have higher priority than those defined in the flow. Format: @projects\/\/locations\/\/agents\/\/flows\/\/transitionRouteGroups\/@ or @projects\/\/locations\/\/agents\/\/transitionRouteGroups\/@ for agent-level groups.
    transitionRouteGroups :: (Core.Maybe [Core.Text]),
    -- | A flow\'s transition routes serve two purposes: * They are responsible for matching the user\'s first utterances in the flow. * They are inherited by every page\'s transition routes and can support use cases such as the user saying \"help\" or \"can I talk to a human?\", which can be handled in a common way regardless of the current page. Transition routes defined in the page have higher priority than those defined in the flow. TransitionRoutes are evaluated in the following order: * TransitionRoutes with intent specified. * TransitionRoutes with only condition specified. TransitionRoutes with intent specified are inherited by pages in the flow.
    transitionRoutes :: (Core.Maybe [GoogleCloudDialogflowCxV3TransitionRoute])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Flow' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Flow ::
  GoogleCloudDialogflowCxV3Flow
newGoogleCloudDialogflowCxV3Flow =
  GoogleCloudDialogflowCxV3Flow
    { advancedSettings = Core.Nothing,
      description = Core.Nothing,
      displayName = Core.Nothing,
      eventHandlers = Core.Nothing,
      knowledgeConnectorSettings = Core.Nothing,
      locked = Core.Nothing,
      multiLanguageSettings = Core.Nothing,
      name = Core.Nothing,
      nluSettings = Core.Nothing,
      transitionRouteGroups = Core.Nothing,
      transitionRoutes = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Flow where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Flow"
      ( \o ->
          GoogleCloudDialogflowCxV3Flow
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "eventHandlers")
            Core.<*> (o Core..:? "knowledgeConnectorSettings")
            Core.<*> (o Core..:? "locked")
            Core.<*> (o Core..:? "multiLanguageSettings")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "nluSettings")
            Core.<*> (o Core..:? "transitionRouteGroups")
            Core.<*> (o Core..:? "transitionRoutes")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Flow where
  toJSON GoogleCloudDialogflowCxV3Flow {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("eventHandlers" Core..=) Core.<$> eventHandlers,
            ("knowledgeConnectorSettings" Core..=)
              Core.<$> knowledgeConnectorSettings,
            ("locked" Core..=) Core.<$> locked,
            ("multiLanguageSettings" Core..=) Core.<$> multiLanguageSettings,
            ("name" Core..=) Core.<$> name,
            ("nluSettings" Core..=) Core.<$> nluSettings,
            ("transitionRouteGroups" Core..=) Core.<$> transitionRouteGroups,
            ("transitionRoutes" Core..=) Core.<$> transitionRoutes
          ]
      )

-- | The flow import strategy used for resource conflict resolution associated with an ImportFlowRequest.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FlowImportStrategy' smart constructor.
newtype GoogleCloudDialogflowCxV3FlowImportStrategy = GoogleCloudDialogflowCxV3FlowImportStrategy
  { -- | Optional. Import strategy for resource conflict resolution, applied globally throughout the flow. It will be applied for all display name conflicts in the imported content. If not specified, \'CREATE_NEW\' is assumed.
    globalImportStrategy ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3FlowImportStrategy_GlobalImportStrategy
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FlowImportStrategy' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FlowImportStrategy ::
  GoogleCloudDialogflowCxV3FlowImportStrategy
newGoogleCloudDialogflowCxV3FlowImportStrategy =
  GoogleCloudDialogflowCxV3FlowImportStrategy
    { globalImportStrategy =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3FlowImportStrategy where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FlowImportStrategy"
      ( \o ->
          GoogleCloudDialogflowCxV3FlowImportStrategy
            Core.<$> (o Core..:? "globalImportStrategy")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3FlowImportStrategy where
  toJSON GoogleCloudDialogflowCxV3FlowImportStrategy {..} =
    Core.object
      ( Core.catMaybes
          [("globalImportStrategy" Core..=) Core.<$> globalImportStrategy]
      )

-- | Settings for multi-lingual agents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FlowMultiLanguageSettings' smart constructor.
data GoogleCloudDialogflowCxV3FlowMultiLanguageSettings = GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
  { -- | Optional. Enable multi-language detection for this flow. This can be set only if agent level multi language setting is enabled.
    enableMultiLanguageDetection :: (Core.Maybe Core.Bool),
    -- | Optional. Agent will respond in the detected language if the detected language code is in the supported resolved languages for this flow. This will be used only if multi-language training is enabled in the agent and multi-language detection is enabled in the flow. The supported languages must be a subset of the languages supported by the agent.
    supportedResponseLanguageCodes :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FlowMultiLanguageSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FlowMultiLanguageSettings ::
  GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
newGoogleCloudDialogflowCxV3FlowMultiLanguageSettings =
  GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
    { enableMultiLanguageDetection =
        Core.Nothing,
      supportedResponseLanguageCodes =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FlowMultiLanguageSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
            Core.<$> (o Core..:? "enableMultiLanguageDetection")
            Core.<*> (o Core..:? "supportedResponseLanguageCodes")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3FlowMultiLanguageSettings
  where
  toJSON GoogleCloudDialogflowCxV3FlowMultiLanguageSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableMultiLanguageDetection" Core..=)
              Core.<$> enableMultiLanguageDetection,
            ("supportedResponseLanguageCodes" Core..=)
              Core.<$> supportedResponseLanguageCodes
          ]
      )

-- | The response message for Flows.GetFlowValidationResult.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FlowValidationResult' smart constructor.
data GoogleCloudDialogflowCxV3FlowValidationResult = GoogleCloudDialogflowCxV3FlowValidationResult
  { -- | The unique identifier of the flow validation result. Format: @projects\/\/locations\/\/agents\/\/flows\/\/validationResult@.
    name :: (Core.Maybe Core.Text),
    -- | Last time the flow was validated.
    updateTime :: (Core.Maybe Core.DateTime),
    -- | Contains all validation messages.
    validationMessages :: (Core.Maybe [GoogleCloudDialogflowCxV3ValidationMessage])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FlowValidationResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FlowValidationResult ::
  GoogleCloudDialogflowCxV3FlowValidationResult
newGoogleCloudDialogflowCxV3FlowValidationResult =
  GoogleCloudDialogflowCxV3FlowValidationResult
    { name =
        Core.Nothing,
      updateTime = Core.Nothing,
      validationMessages = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FlowValidationResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FlowValidationResult"
      ( \o ->
          GoogleCloudDialogflowCxV3FlowValidationResult
            Core.<$> (o Core..:? "name")
            Core.<*> (o Core..:? "updateTime")
            Core.<*> (o Core..:? "validationMessages")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3FlowValidationResult where
  toJSON GoogleCloudDialogflowCxV3FlowValidationResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("name" Core..=) Core.<$> name,
            ("updateTime" Core..=) Core.<$> updateTime,
            ("validationMessages" Core..=) Core.<$> validationMessages
          ]
      )

-- | A form is a data model that groups related parameters that can be collected from the user. The process in which the agent prompts the user and collects parameter values from the user is called form filling. A form can be added to a page. When form filling is done, the filled parameters will be written to the session.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Form' smart constructor.
newtype GoogleCloudDialogflowCxV3Form = GoogleCloudDialogflowCxV3Form
  { -- | Parameters to collect from the user.
    parameters :: (Core.Maybe [GoogleCloudDialogflowCxV3FormParameter])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Form' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Form ::
  GoogleCloudDialogflowCxV3Form
newGoogleCloudDialogflowCxV3Form =
  GoogleCloudDialogflowCxV3Form {parameters = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3Form where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Form"
      ( \o ->
          GoogleCloudDialogflowCxV3Form Core.<$> (o Core..:? "parameters")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Form where
  toJSON GoogleCloudDialogflowCxV3Form {..} =
    Core.object
      (Core.catMaybes [("parameters" Core..=) Core.<$> parameters])

-- | Represents a form parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FormParameter' smart constructor.
data GoogleCloudDialogflowCxV3FormParameter = GoogleCloudDialogflowCxV3FormParameter
  { -- | Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettings),
    -- | The default value of an optional parameter. If the parameter is required, the default value will be ignored.
    defaultValue :: (Core.Maybe Core.Value),
    -- | Required. The human-readable name of the parameter, unique within the form.
    displayName :: (Core.Maybe Core.Text),
    -- | Required. The entity type of the parameter. Format: @projects\/-\/locations\/-\/agents\/-\/entityTypes\/@ for system entity types (for example, @projects\/-\/locations\/-\/agents\/-\/entityTypes\/sys.date@), or @projects\/\/locations\/\/agents\/\/entityTypes\/@ for developer entity types.
    entityType :: (Core.Maybe Core.Text),
    -- | Required. Defines fill behavior for the parameter.
    fillBehavior :: (Core.Maybe GoogleCloudDialogflowCxV3FormParameterFillBehavior),
    -- | Indicates whether the parameter represents a list of values.
    isList :: (Core.Maybe Core.Bool),
    -- | Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
    redact :: (Core.Maybe Core.Bool),
    -- | Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.
    required :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FormParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FormParameter ::
  GoogleCloudDialogflowCxV3FormParameter
newGoogleCloudDialogflowCxV3FormParameter =
  GoogleCloudDialogflowCxV3FormParameter
    { advancedSettings =
        Core.Nothing,
      defaultValue = Core.Nothing,
      displayName = Core.Nothing,
      entityType = Core.Nothing,
      fillBehavior = Core.Nothing,
      isList = Core.Nothing,
      redact = Core.Nothing,
      required = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3FormParameter where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FormParameter"
      ( \o ->
          GoogleCloudDialogflowCxV3FormParameter
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "defaultValue")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "entityType")
            Core.<*> (o Core..:? "fillBehavior")
            Core.<*> (o Core..:? "isList")
            Core.<*> (o Core..:? "redact")
            Core.<*> (o Core..:? "required")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3FormParameter where
  toJSON GoogleCloudDialogflowCxV3FormParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("defaultValue" Core..=) Core.<$> defaultValue,
            ("displayName" Core..=) Core.<$> displayName,
            ("entityType" Core..=) Core.<$> entityType,
            ("fillBehavior" Core..=) Core.<$> fillBehavior,
            ("isList" Core..=) Core.<$> isList,
            ("redact" Core..=) Core.<$> redact,
            ("required" Core..=) Core.<$> required
          ]
      )

-- | Configuration for how the filling of a parameter should be handled.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FormParameterFillBehavior' smart constructor.
data GoogleCloudDialogflowCxV3FormParameterFillBehavior = GoogleCloudDialogflowCxV3FormParameterFillBehavior
  { -- | Required. The fulfillment to provide the initial prompt that the agent can present to the user in order to fill the parameter.
    initialPromptFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3Fulfillment),
    -- | The handlers for parameter-level events, used to provide reprompt for the parameter or transition to a different page\/flow. The supported events are: * @sys.no-match-@, where N can be from 1 to 6 * @sys.no-match-default@ * @sys.no-input-@, where N can be from 1 to 6 * @sys.no-input-default@ * @sys.invalid-parameter@ @initial_prompt_fulfillment@ provides the first prompt for the parameter. If the user\'s response does not fill the parameter, a no-match\/no-input event will be triggered, and the fulfillment associated with the @sys.no-match-1@\/@sys.no-input-1@ handler (if defined) will be called to provide a prompt. The @sys.no-match-2@\/@sys.no-input-2@ handler (if defined) will respond to the next no-match\/no-input event, and so on. A @sys.no-match-default@ or @sys.no-input-default@ handler will be used to handle all following no-match\/no-input events after all numbered no-match\/no-input handlers for the parameter are consumed. A @sys.invalid-parameter@ handler can be defined to handle the case where the
    -- parameter values have been @invalidated@ by webhook. For example, if the user\'s response fill the parameter, however the parameter was invalidated by webhook, the fulfillment associated with the @sys.invalid-parameter@ handler (if defined) will be called to provide a prompt. If the event handler for the corresponding event can\'t be found on the parameter, @initial_prompt_fulfillment@ will be re-prompted.
    repromptEventHandlers :: (Core.Maybe [GoogleCloudDialogflowCxV3EventHandler])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FormParameterFillBehavior' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FormParameterFillBehavior ::
  GoogleCloudDialogflowCxV3FormParameterFillBehavior
newGoogleCloudDialogflowCxV3FormParameterFillBehavior =
  GoogleCloudDialogflowCxV3FormParameterFillBehavior
    { initialPromptFulfillment =
        Core.Nothing,
      repromptEventHandlers = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FormParameterFillBehavior
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FormParameterFillBehavior"
      ( \o ->
          GoogleCloudDialogflowCxV3FormParameterFillBehavior
            Core.<$> (o Core..:? "initialPromptFulfillment")
            Core.<*> (o Core..:? "repromptEventHandlers")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3FormParameterFillBehavior
  where
  toJSON GoogleCloudDialogflowCxV3FormParameterFillBehavior {..} =
    Core.object
      ( Core.catMaybes
          [ ("initialPromptFulfillment" Core..=)
              Core.<$> initialPromptFulfillment,
            ("repromptEventHandlers" Core..=) Core.<$> repromptEventHandlers
          ]
      )

-- | Request of FulfillIntent
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FulfillIntentRequest' smart constructor.
data GoogleCloudDialogflowCxV3FulfillIntentRequest = GoogleCloudDialogflowCxV3FulfillIntentRequest
  { -- | The matched intent\/event to fulfill.
    match :: (Core.Maybe GoogleCloudDialogflowCxV3Match),
    -- | Must be same as the corresponding MatchIntent request, otherwise the behavior is undefined.
    matchIntentRequest :: (Core.Maybe GoogleCloudDialogflowCxV3MatchIntentRequest),
    -- | Instructs the speech synthesizer how to generate output audio.
    outputAudioConfig :: (Core.Maybe GoogleCloudDialogflowCxV3OutputAudioConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FulfillIntentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FulfillIntentRequest ::
  GoogleCloudDialogflowCxV3FulfillIntentRequest
newGoogleCloudDialogflowCxV3FulfillIntentRequest =
  GoogleCloudDialogflowCxV3FulfillIntentRequest
    { match =
        Core.Nothing,
      matchIntentRequest = Core.Nothing,
      outputAudioConfig = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FulfillIntentRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FulfillIntentRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3FulfillIntentRequest
            Core.<$> (o Core..:? "match")
            Core.<*> (o Core..:? "matchIntentRequest")
            Core.<*> (o Core..:? "outputAudioConfig")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3FulfillIntentRequest where
  toJSON GoogleCloudDialogflowCxV3FulfillIntentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("match" Core..=) Core.<$> match,
            ("matchIntentRequest" Core..=) Core.<$> matchIntentRequest,
            ("outputAudioConfig" Core..=) Core.<$> outputAudioConfig
          ]
      )

-- | Response of FulfillIntent
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FulfillIntentResponse' smart constructor.
data GoogleCloudDialogflowCxV3FulfillIntentResponse = GoogleCloudDialogflowCxV3FulfillIntentResponse
  { -- | The audio data bytes encoded as specified in the request. Note: The output audio is generated based on the values of default platform text responses found in the @query_result.response_messages@ field. If multiple default text responses exist, they will be concatenated when generating audio. If no default platform text responses exist, the generated audio content will be empty. In some scenarios, multiple output audio fields may be present in the response structure. In these cases, only the top-most-level audio output has content.
    outputAudio :: (Core.Maybe Core.Base64),
    -- | The config used by the speech synthesizer to generate the output audio.
    outputAudioConfig :: (Core.Maybe GoogleCloudDialogflowCxV3OutputAudioConfig),
    -- | The result of the conversational query.
    queryResult :: (Core.Maybe GoogleCloudDialogflowCxV3QueryResult),
    -- | Output only. The unique identifier of the response. It can be used to locate a response in the training example set or for reporting issues.
    responseId :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FulfillIntentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FulfillIntentResponse ::
  GoogleCloudDialogflowCxV3FulfillIntentResponse
newGoogleCloudDialogflowCxV3FulfillIntentResponse =
  GoogleCloudDialogflowCxV3FulfillIntentResponse
    { outputAudio =
        Core.Nothing,
      outputAudioConfig = Core.Nothing,
      queryResult = Core.Nothing,
      responseId = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FulfillIntentResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FulfillIntentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3FulfillIntentResponse
            Core.<$> (o Core..:? "outputAudio")
            Core.<*> (o Core..:? "outputAudioConfig")
            Core.<*> (o Core..:? "queryResult")
            Core.<*> (o Core..:? "responseId")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3FulfillIntentResponse where
  toJSON GoogleCloudDialogflowCxV3FulfillIntentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("outputAudio" Core..=) Core.<$> outputAudio,
            ("outputAudioConfig" Core..=) Core.<$> outputAudioConfig,
            ("queryResult" Core..=) Core.<$> queryResult,
            ("responseId" Core..=) Core.<$> responseId
          ]
      )

-- | A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page\'s entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Fulfillment' smart constructor.
data GoogleCloudDialogflowCxV3Fulfillment = GoogleCloudDialogflowCxV3Fulfillment
  { -- | Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettings),
    -- | Conditional cases for this fulfillment.
    conditionalCases :: (Core.Maybe [GoogleCloudDialogflowCxV3FulfillmentConditionalCases]),
    -- | If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.
    enableGenerativeFallback :: (Core.Maybe Core.Bool),
    -- | The list of rich message responses to present to the user.
    messages :: (Core.Maybe [GoogleCloudDialogflowCxV3ResponseMessage]),
    -- | Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
    returnPartialResponses :: (Core.Maybe Core.Bool),
    -- | Set parameter values before executing the webhook.
    setParameterActions ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3FulfillmentSetParameterAction]
      ),
    -- | The value of this field will be populated in the WebhookRequest @fulfillmentInfo.tag@ field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if @webhook@ is specified.
    tag :: (Core.Maybe Core.Text),
    -- | The webhook to call. Format: @projects\/\/locations\/\/agents\/\/webhooks\/@.
    webhook :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Fulfillment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Fulfillment ::
  GoogleCloudDialogflowCxV3Fulfillment
newGoogleCloudDialogflowCxV3Fulfillment =
  GoogleCloudDialogflowCxV3Fulfillment
    { advancedSettings =
        Core.Nothing,
      conditionalCases = Core.Nothing,
      enableGenerativeFallback = Core.Nothing,
      messages = Core.Nothing,
      returnPartialResponses = Core.Nothing,
      setParameterActions = Core.Nothing,
      tag = Core.Nothing,
      webhook = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Fulfillment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Fulfillment"
      ( \o ->
          GoogleCloudDialogflowCxV3Fulfillment
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "conditionalCases")
            Core.<*> (o Core..:? "enableGenerativeFallback")
            Core.<*> (o Core..:? "messages")
            Core.<*> (o Core..:? "returnPartialResponses")
            Core.<*> (o Core..:? "setParameterActions")
            Core.<*> (o Core..:? "tag")
            Core.<*> (o Core..:? "webhook")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Fulfillment where
  toJSON GoogleCloudDialogflowCxV3Fulfillment {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("conditionalCases" Core..=) Core.<$> conditionalCases,
            ("enableGenerativeFallback" Core..=)
              Core.<$> enableGenerativeFallback,
            ("messages" Core..=) Core.<$> messages,
            ("returnPartialResponses" Core..=) Core.<$> returnPartialResponses,
            ("setParameterActions" Core..=) Core.<$> setParameterActions,
            ("tag" Core..=) Core.<$> tag,
            ("webhook" Core..=) Core.<$> webhook
          ]
      )

-- | A list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FulfillmentConditionalCases' smart constructor.
newtype GoogleCloudDialogflowCxV3FulfillmentConditionalCases = GoogleCloudDialogflowCxV3FulfillmentConditionalCases
  { -- | A list of cascading if-else conditions.
    cases ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FulfillmentConditionalCases' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FulfillmentConditionalCases ::
  GoogleCloudDialogflowCxV3FulfillmentConditionalCases
newGoogleCloudDialogflowCxV3FulfillmentConditionalCases =
  GoogleCloudDialogflowCxV3FulfillmentConditionalCases
    { cases =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCases
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FulfillmentConditionalCases"
      ( \o ->
          GoogleCloudDialogflowCxV3FulfillmentConditionalCases
            Core.<$> (o Core..:? "cases")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCases
  where
  toJSON GoogleCloudDialogflowCxV3FulfillmentConditionalCases {..} =
    Core.object (Core.catMaybes [("cases" Core..=) Core.<$> cases])

-- | Each case has a Boolean condition. When it is evaluated to be True, the corresponding messages will be selected and evaluated recursively.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase' smart constructor.
data GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase = GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
  { -- | A list of case content.
    caseContent ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent]
      ),
    -- | The condition to activate and select this case. Empty means the condition is always true. The condition is evaluated against form parameters or session parameters. See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>.
    condition :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase ::
  GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase =
  GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
    { caseContent =
        Core.Nothing,
      condition = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase"
      ( \o ->
          GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
            Core.<$> (o Core..:? "caseContent")
            Core.<*> (o Core..:? "condition")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase
  where
  toJSON GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCase {..} =
    Core.object
      ( Core.catMaybes
          [ ("caseContent" Core..=) Core.<$> caseContent,
            ("condition" Core..=) Core.<$> condition
          ]
      )

-- | The list of messages or conditional cases to activate for this case.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent' smart constructor.
data GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent = GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
  { -- | Additional cases to be evaluated.
    additionalCases :: (Core.Maybe GoogleCloudDialogflowCxV3FulfillmentConditionalCases),
    -- | Returned message.
    message :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessage)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent ::
  GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
newGoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent =
  GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
    { additionalCases =
        Core.Nothing,
      message = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent"
      ( \o ->
          GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
            Core.<$> (o Core..:? "additionalCases")
            Core.<*> (o Core..:? "message")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent
  where
  toJSON
    GoogleCloudDialogflowCxV3FulfillmentConditionalCasesCaseCaseContent {..} =
      Core.object
        ( Core.catMaybes
            [ ("additionalCases" Core..=) Core.<$> additionalCases,
              ("message" Core..=) Core.<$> message
            ]
        )

-- | Setting a parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3FulfillmentSetParameterAction' smart constructor.
data GoogleCloudDialogflowCxV3FulfillmentSetParameterAction = GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
  { -- | Display name of the parameter.
    parameter :: (Core.Maybe Core.Text),
    -- | The new value of the parameter. A null value clears the parameter.
    value :: (Core.Maybe Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3FulfillmentSetParameterAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3FulfillmentSetParameterAction ::
  GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
newGoogleCloudDialogflowCxV3FulfillmentSetParameterAction =
  GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
    { parameter =
        Core.Nothing,
      value = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3FulfillmentSetParameterAction"
      ( \o ->
          GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
            Core.<$> (o Core..:? "parameter")
            Core.<*> (o Core..:? "value")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3FulfillmentSetParameterAction
  where
  toJSON GoogleCloudDialogflowCxV3FulfillmentSetParameterAction {..} =
    Core.object
      ( Core.catMaybes
          [ ("parameter" Core..=) Core.<$> parameter,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GcsDestination' smart constructor.
newtype GoogleCloudDialogflowCxV3GcsDestination = GoogleCloudDialogflowCxV3GcsDestination
  { -- | Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: @gs:\/\/bucket\/object-name-or-prefix@ Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GcsDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GcsDestination ::
  GoogleCloudDialogflowCxV3GcsDestination
newGoogleCloudDialogflowCxV3GcsDestination =
  GoogleCloudDialogflowCxV3GcsDestination {uri = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3GcsDestination where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GcsDestination"
      ( \o ->
          GoogleCloudDialogflowCxV3GcsDestination
            Core.<$> (o Core..:? "uri")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3GcsDestination where
  toJSON GoogleCloudDialogflowCxV3GcsDestination {..} =
    Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Settings for Generative AI.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GenerativeSettings' smart constructor.
data GoogleCloudDialogflowCxV3GenerativeSettings = GoogleCloudDialogflowCxV3GenerativeSettings
  { -- | Settings for Generative Fallback.
    fallbackSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
      ),
    -- | Settings for Generative Safety.
    generativeSafetySettings :: (Core.Maybe GoogleCloudDialogflowCxV3SafetySettings),
    -- | Settings for knowledge connector.
    knowledgeConnectorSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
      ),
    -- | Language for this settings.
    languageCode :: (Core.Maybe Core.Text),
    -- | Format: @projects\/\/locations\/\/agents\/\/generativeSettings@.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GenerativeSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GenerativeSettings ::
  GoogleCloudDialogflowCxV3GenerativeSettings
newGoogleCloudDialogflowCxV3GenerativeSettings =
  GoogleCloudDialogflowCxV3GenerativeSettings
    { fallbackSettings =
        Core.Nothing,
      generativeSafetySettings = Core.Nothing,
      knowledgeConnectorSettings = Core.Nothing,
      languageCode = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3GenerativeSettings where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GenerativeSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3GenerativeSettings
            Core.<$> (o Core..:? "fallbackSettings")
            Core.<*> (o Core..:? "generativeSafetySettings")
            Core.<*> (o Core..:? "knowledgeConnectorSettings")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3GenerativeSettings where
  toJSON GoogleCloudDialogflowCxV3GenerativeSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("fallbackSettings" Core..=) Core.<$> fallbackSettings,
            ("generativeSafetySettings" Core..=)
              Core.<$> generativeSafetySettings,
            ("knowledgeConnectorSettings" Core..=)
              Core.<$> knowledgeConnectorSettings,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Settings for Generative Fallback.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings' smart constructor.
data GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings = GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
  { -- | Stored prompts that can be selected, for example default templates like \"conservative\" or \"chatty\", or user defined ones.
    promptTemplates ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate]
      ),
    -- | Display name of the selected prompt.
    selectedPrompt :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings ::
  GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings =
  GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
    { promptTemplates =
        Core.Nothing,
      selectedPrompt = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
            Core.<$> (o Core..:? "promptTemplates")
            Core.<*> (o Core..:? "selectedPrompt")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("promptTemplates" Core..=) Core.<$> promptTemplates,
              ("selectedPrompt" Core..=) Core.<$> selectedPrompt
            ]
        )

-- | Prompt template.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate' smart constructor.
data GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate = GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
  { -- | Prompt name.
    displayName :: (Core.Maybe Core.Text),
    -- | If the flag is true, the prompt is frozen and cannot be modified by users.
    frozen :: (Core.Maybe Core.Bool),
    -- | Prompt text that is sent to a LLM on no-match default, placeholders are filled downstream. For example: \"Here is a conversation $conversation, a response is: \"
    promptText :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate ::
  GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
newGoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate =
  GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
    { displayName =
        Core.Nothing,
      frozen = Core.Nothing,
      promptText =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate"
      ( \o ->
          GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "frozen")
            Core.<*> (o Core..:? "promptText")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate
  where
  toJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsFallbackSettingsPromptTemplate {..} =
      Core.object
        ( Core.catMaybes
            [ ("displayName" Core..=) Core.<$> displayName,
              ("frozen" Core..=) Core.<$> frozen,
              ("promptText" Core..=) Core.<$> promptText
            ]
        )

-- | Settings for knowledge connector. These parameters are used for LLM prompt like \"You are . You are a helpful and verbose at , . Your task is to help humans on \".
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings' smart constructor.
data GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings = GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
  { -- | Name of the virtual agent. Used for LLM prompt. Can be left empty.
    agent :: (Core.Maybe Core.Text),
    -- | Identity of the agent, e.g. \"virtual agent\", \"AI assistant\".
    agentIdentity :: (Core.Maybe Core.Text),
    -- | Agent scope, e.g. \"Example company website\", \"internal Example company website for employees\", \"manual of car owner\".
    agentScope :: (Core.Maybe Core.Text),
    -- | Name of the company, organization or other entity that the agent represents. Used for knowledge connector LLM prompt and for knowledge search.
    business :: (Core.Maybe Core.Text),
    -- | Company description, used for LLM prompt, e.g. \"a family company selling freshly roasted coffee beans\".
    businessDescription :: (Core.Maybe Core.Text),
    -- | Whether to disable fallback to Data Store search results (in case the LLM couldn\'t pick a proper answer). Per default the feature is enabled.
    disableDataStoreFallback :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings ::
  GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
newGoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings =
  GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
    { agent =
        Core.Nothing,
      agentIdentity =
        Core.Nothing,
      agentScope = Core.Nothing,
      business = Core.Nothing,
      businessDescription =
        Core.Nothing,
      disableDataStoreFallback =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
            Core.<$> (o Core..:? "agent")
            Core.<*> (o Core..:? "agentIdentity")
            Core.<*> (o Core..:? "agentScope")
            Core.<*> (o Core..:? "business")
            Core.<*> (o Core..:? "businessDescription")
            Core.<*> (o Core..:? "disableDataStoreFallback")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3GenerativeSettingsKnowledgeConnectorSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("agent" Core..=) Core.<$> agent,
              ("agentIdentity" Core..=) Core.<$> agentIdentity,
              ("agentScope" Core..=) Core.<$> agentScope,
              ("business" Core..=) Core.<$> business,
              ("businessDescription" Core..=) Core.<$> businessDescription,
              ("disableDataStoreFallback" Core..=)
                Core.<$> disableDataStoreFallback
            ]
        )

-- | Generators contain prompt to be sent to the LLM model to generate text. The prompt can contain parameters which will be resolved before calling the model. It can optionally contain banned phrases to ensure the model responses are safe.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Generator' smart constructor.
data GoogleCloudDialogflowCxV3Generator = GoogleCloudDialogflowCxV3Generator
  { -- | Required. The human-readable name of the generator, unique within the agent. The prompt contains pre-defined parameters such as $conversation, $last-user-utterance, etc. populated by Dialogflow. It can also contain custom placeholders which will be resolved during fulfillment.
    displayName :: (Core.Maybe Core.Text),
    -- | Parameters passed to the LLM to configure its behavior.
    modelParameter :: (Core.Maybe GoogleCloudDialogflowCxV3GeneratorModelParameter),
    -- | The unique identifier of the generator. Must be set for the Generators.UpdateGenerator method. Generators.CreateGenerate populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/generators\/@.
    name :: (Core.Maybe Core.Text),
    -- | Optional. List of custom placeholders in the prompt text.
    placeholders :: (Core.Maybe [GoogleCloudDialogflowCxV3GeneratorPlaceholder]),
    -- | Required. Prompt for the LLM model.
    promptText :: (Core.Maybe GoogleCloudDialogflowCxV3Phrase)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Generator' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Generator ::
  GoogleCloudDialogflowCxV3Generator
newGoogleCloudDialogflowCxV3Generator =
  GoogleCloudDialogflowCxV3Generator
    { displayName = Core.Nothing,
      modelParameter = Core.Nothing,
      name = Core.Nothing,
      placeholders = Core.Nothing,
      promptText = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Generator where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Generator"
      ( \o ->
          GoogleCloudDialogflowCxV3Generator
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "modelParameter")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "placeholders")
            Core.<*> (o Core..:? "promptText")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Generator where
  toJSON GoogleCloudDialogflowCxV3Generator {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayName" Core..=) Core.<$> displayName,
            ("modelParameter" Core..=) Core.<$> modelParameter,
            ("name" Core..=) Core.<$> name,
            ("placeholders" Core..=) Core.<$> placeholders,
            ("promptText" Core..=) Core.<$> promptText
          ]
      )

-- | Parameters to be passed to the LLM. If not set, default values will be used.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GeneratorModelParameter' smart constructor.
data GoogleCloudDialogflowCxV3GeneratorModelParameter = GoogleCloudDialogflowCxV3GeneratorModelParameter
  { -- | The maximum number of tokens to generate.
    maxDecodeSteps :: (Core.Maybe Core.Int32),
    -- | The temperature used for sampling. Temperature sampling occurs after both topP and topK have been applied. Valid range: [0.0, 1.0] Low temperature = less random. High temperature = more random.
    temperature :: (Core.Maybe Core.Double),
    -- | If set, the sampling process in each step is limited to the top_k tokens with highest probabilities. Valid range: [1, 40] or 1000+. Small topK = less random. Large topK = more random.
    topK :: (Core.Maybe Core.Int32),
    -- | If set, only the tokens comprising the top top/p probability mass are considered. If both top/p and top/k are set, top/p will be used for further refining candidates selected with top_k. Valid range: (0.0, 1.0]. Small topP = less random. Large topP = more random.
    topP :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GeneratorModelParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GeneratorModelParameter ::
  GoogleCloudDialogflowCxV3GeneratorModelParameter
newGoogleCloudDialogflowCxV3GeneratorModelParameter =
  GoogleCloudDialogflowCxV3GeneratorModelParameter
    { maxDecodeSteps =
        Core.Nothing,
      temperature = Core.Nothing,
      topK = Core.Nothing,
      topP = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3GeneratorModelParameter
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GeneratorModelParameter"
      ( \o ->
          GoogleCloudDialogflowCxV3GeneratorModelParameter
            Core.<$> (o Core..:? "maxDecodeSteps")
            Core.<*> (o Core..:? "temperature")
            Core.<*> (o Core..:? "topK")
            Core.<*> (o Core..:? "topP")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3GeneratorModelParameter
  where
  toJSON GoogleCloudDialogflowCxV3GeneratorModelParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("maxDecodeSteps" Core..=) Core.<$> maxDecodeSteps,
            ("temperature" Core..=) Core.<$> temperature,
            ("topK" Core..=) Core.<$> topK,
            ("topP" Core..=) Core.<$> topP
          ]
      )

-- | Represents a custom placeholder in the prompt text.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3GeneratorPlaceholder' smart constructor.
data GoogleCloudDialogflowCxV3GeneratorPlaceholder = GoogleCloudDialogflowCxV3GeneratorPlaceholder
  { -- | Unique ID used to map custom placeholder to parameters in fulfillment.
    id :: (Core.Maybe Core.Text),
    -- | Custom placeholder value in the prompt text.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3GeneratorPlaceholder' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3GeneratorPlaceholder ::
  GoogleCloudDialogflowCxV3GeneratorPlaceholder
newGoogleCloudDialogflowCxV3GeneratorPlaceholder =
  GoogleCloudDialogflowCxV3GeneratorPlaceholder
    { id = Core.Nothing,
      name = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3GeneratorPlaceholder
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3GeneratorPlaceholder"
      ( \o ->
          GoogleCloudDialogflowCxV3GeneratorPlaceholder
            Core.<$> (o Core..:? "id")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3GeneratorPlaceholder where
  toJSON GoogleCloudDialogflowCxV3GeneratorPlaceholder {..} =
    Core.object
      ( Core.catMaybes
          [("id" Core..=) Core.<$> id, ("name" Core..=) Core.<$> name]
      )

-- | Metadata returned for the EntityTypes.ImportEntityTypes long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportEntityTypesMetadata' smart constructor.
data GoogleCloudDialogflowCxV3ImportEntityTypesMetadata = GoogleCloudDialogflowCxV3ImportEntityTypesMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportEntityTypesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportEntityTypesMetadata ::
  GoogleCloudDialogflowCxV3ImportEntityTypesMetadata
newGoogleCloudDialogflowCxV3ImportEntityTypesMetadata =
  GoogleCloudDialogflowCxV3ImportEntityTypesMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportEntityTypesMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3ImportEntityTypesMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The request message for EntityTypes.ImportEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportEntityTypesRequest' smart constructor.
data GoogleCloudDialogflowCxV3ImportEntityTypesRequest = GoogleCloudDialogflowCxV3ImportEntityTypesRequest
  { -- | Uncompressed byte content of entity types.
    entityTypesContent :: (Core.Maybe GoogleCloudDialogflowCxV3InlineSource),
    -- | The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to import entity types from. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a read operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have read permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    entityTypesUri :: (Core.Maybe Core.Text),
    -- | Required. Merge option for importing entity types.
    mergeOption ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ImportEntityTypesRequest_MergeOption
      ),
    -- | Optional. The target entity type to import into. Format: @projects\/\/locations\/\/agents\/\/entity_types\/@. If set, there should be only one entity type included in entity_types, of which the type should match the type of the target entity type. All entities in the imported entity type will be added to the target entity type.
    targetEntityType :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportEntityTypesRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportEntityTypesRequest ::
  GoogleCloudDialogflowCxV3ImportEntityTypesRequest
newGoogleCloudDialogflowCxV3ImportEntityTypesRequest =
  GoogleCloudDialogflowCxV3ImportEntityTypesRequest
    { entityTypesContent =
        Core.Nothing,
      entityTypesUri = Core.Nothing,
      mergeOption = Core.Nothing,
      targetEntityType = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportEntityTypesRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportEntityTypesRequest
            Core.<$> (o Core..:? "entityTypesContent")
            Core.<*> (o Core..:? "entityTypesUri")
            Core.<*> (o Core..:? "mergeOption")
            Core.<*> (o Core..:? "targetEntityType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesRequest
  where
  toJSON GoogleCloudDialogflowCxV3ImportEntityTypesRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityTypesContent" Core..=) Core.<$> entityTypesContent,
            ("entityTypesUri" Core..=) Core.<$> entityTypesUri,
            ("mergeOption" Core..=) Core.<$> mergeOption,
            ("targetEntityType" Core..=) Core.<$> targetEntityType
          ]
      )

-- | The response message for EntityTypes.ImportEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportEntityTypesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ImportEntityTypesResponse = GoogleCloudDialogflowCxV3ImportEntityTypesResponse
  { -- | Info which resources have conflicts when REPORT/CONFLICT merge/option is set in ImportEntityTypesRequest.
    conflictingResources ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
      ),
    -- | The unique identifier of the imported entity types. Format: @projects\/\/locations\/\/agents\/\/entity_types\/@.
    entityTypes :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportEntityTypesResponse ::
  GoogleCloudDialogflowCxV3ImportEntityTypesResponse
newGoogleCloudDialogflowCxV3ImportEntityTypesResponse =
  GoogleCloudDialogflowCxV3ImportEntityTypesResponse
    { conflictingResources =
        Core.Nothing,
      entityTypes = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportEntityTypesResponse
            Core.<$> (o Core..:? "conflictingResources")
            Core.<*> (o Core..:? "entityTypes")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowCxV3ImportEntityTypesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("conflictingResources" Core..=) Core.<$> conflictingResources,
            ("entityTypes" Core..=) Core.<$> entityTypes
          ]
      )

-- | Conflicting resources detected during the import process. Only filled when REPORT_CONFLICT is set in the request and there are conflicts in the display names.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources' smart constructor.
data GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources = GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
  { -- | Display names of conflicting entities.
    entityDisplayNames :: (Core.Maybe [Core.Text]),
    -- | Display names of conflicting entity types.
    entityTypeDisplayNames :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources ::
  GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
newGoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources =
  GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
    { entityDisplayNames =
        Core.Nothing,
      entityTypeDisplayNames =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
            Core.<$> (o Core..:? "entityDisplayNames")
            Core.<*> (o Core..:? "entityTypeDisplayNames")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources
  where
  toJSON
    GoogleCloudDialogflowCxV3ImportEntityTypesResponseConflictingResources {..} =
      Core.object
        ( Core.catMaybes
            [ ("entityDisplayNames" Core..=) Core.<$> entityDisplayNames,
              ("entityTypeDisplayNames" Core..=)
                Core.<$> entityTypeDisplayNames
            ]
        )

-- | The request message for Flows.ImportFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportFlowRequest' smart constructor.
data GoogleCloudDialogflowCxV3ImportFlowRequest = GoogleCloudDialogflowCxV3ImportFlowRequest
  { -- | Uncompressed raw byte content for flow.
    flowContent :: (Core.Maybe Core.Base64),
    -- | Optional. Specifies the import strategy used when resolving resource conflicts.
    flowImportStrategy :: (Core.Maybe GoogleCloudDialogflowCxV3FlowImportStrategy),
    -- | The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to import flow from. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a read operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have read permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    flowUri :: (Core.Maybe Core.Text),
    -- | Flow import mode. If not specified, @KEEP@ is assumed.
    importOption ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ImportFlowRequest_ImportOption
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportFlowRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportFlowRequest ::
  GoogleCloudDialogflowCxV3ImportFlowRequest
newGoogleCloudDialogflowCxV3ImportFlowRequest =
  GoogleCloudDialogflowCxV3ImportFlowRequest
    { flowContent =
        Core.Nothing,
      flowImportStrategy = Core.Nothing,
      flowUri = Core.Nothing,
      importOption = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ImportFlowRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportFlowRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportFlowRequest
            Core.<$> (o Core..:? "flowContent")
            Core.<*> (o Core..:? "flowImportStrategy")
            Core.<*> (o Core..:? "flowUri")
            Core.<*> (o Core..:? "importOption")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ImportFlowRequest where
  toJSON GoogleCloudDialogflowCxV3ImportFlowRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("flowContent" Core..=) Core.<$> flowContent,
            ("flowImportStrategy" Core..=) Core.<$> flowImportStrategy,
            ("flowUri" Core..=) Core.<$> flowUri,
            ("importOption" Core..=) Core.<$> importOption
          ]
      )

-- | The response message for Flows.ImportFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportFlowResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3ImportFlowResponse = GoogleCloudDialogflowCxV3ImportFlowResponse
  { -- | The unique identifier of the new flow. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    flow :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportFlowResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportFlowResponse ::
  GoogleCloudDialogflowCxV3ImportFlowResponse
newGoogleCloudDialogflowCxV3ImportFlowResponse =
  GoogleCloudDialogflowCxV3ImportFlowResponse {flow = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3ImportFlowResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportFlowResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportFlowResponse
            Core.<$> (o Core..:? "flow")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ImportFlowResponse where
  toJSON GoogleCloudDialogflowCxV3ImportFlowResponse {..} =
    Core.object (Core.catMaybes [("flow" Core..=) Core.<$> flow])

-- | Metadata returned for the Intents.ImportIntents long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportIntentsMetadata' smart constructor.
data GoogleCloudDialogflowCxV3ImportIntentsMetadata = GoogleCloudDialogflowCxV3ImportIntentsMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportIntentsMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportIntentsMetadata ::
  GoogleCloudDialogflowCxV3ImportIntentsMetadata
newGoogleCloudDialogflowCxV3ImportIntentsMetadata =
  GoogleCloudDialogflowCxV3ImportIntentsMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportIntentsMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportIntentsMetadata"
      (\o -> Core.pure GoogleCloudDialogflowCxV3ImportIntentsMetadata)

instance Core.ToJSON GoogleCloudDialogflowCxV3ImportIntentsMetadata where
  toJSON = Core.const Core.emptyObject

-- | The request message for Intents.ImportIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportIntentsRequest' smart constructor.
data GoogleCloudDialogflowCxV3ImportIntentsRequest = GoogleCloudDialogflowCxV3ImportIntentsRequest
  { -- | Uncompressed byte content of intents.
    intentsContent :: (Core.Maybe GoogleCloudDialogflowCxV3InlineSource),
    -- | The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to import intents from. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a read operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have read permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    intentsUri :: (Core.Maybe Core.Text),
    -- | Merge option for importing intents. If not specified, @REJECT@ is assumed.
    mergeOption ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ImportIntentsRequest_MergeOption
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportIntentsRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportIntentsRequest ::
  GoogleCloudDialogflowCxV3ImportIntentsRequest
newGoogleCloudDialogflowCxV3ImportIntentsRequest =
  GoogleCloudDialogflowCxV3ImportIntentsRequest
    { intentsContent =
        Core.Nothing,
      intentsUri = Core.Nothing,
      mergeOption = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportIntentsRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportIntentsRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportIntentsRequest
            Core.<$> (o Core..:? "intentsContent")
            Core.<*> (o Core..:? "intentsUri")
            Core.<*> (o Core..:? "mergeOption")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ImportIntentsRequest where
  toJSON GoogleCloudDialogflowCxV3ImportIntentsRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("intentsContent" Core..=) Core.<$> intentsContent,
            ("intentsUri" Core..=) Core.<$> intentsUri,
            ("mergeOption" Core..=) Core.<$> mergeOption
          ]
      )

-- | The response message for Intents.ImportIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportIntentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ImportIntentsResponse = GoogleCloudDialogflowCxV3ImportIntentsResponse
  { -- | Info which resources have conflicts when REPORT/CONFLICT merge/option is set in ImportIntentsRequest.
    conflictingResources ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
      ),
    -- | The unique identifier of the imported intents. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    intents :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportIntentsResponse ::
  GoogleCloudDialogflowCxV3ImportIntentsResponse
newGoogleCloudDialogflowCxV3ImportIntentsResponse =
  GoogleCloudDialogflowCxV3ImportIntentsResponse
    { conflictingResources =
        Core.Nothing,
      intents = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportIntentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportIntentsResponse
            Core.<$> (o Core..:? "conflictingResources")
            Core.<*> (o Core..:? "intents")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ImportIntentsResponse where
  toJSON GoogleCloudDialogflowCxV3ImportIntentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("conflictingResources" Core..=) Core.<$> conflictingResources,
            ("intents" Core..=) Core.<$> intents
          ]
      )

-- | Conflicting resources detected during the import process. Only filled when REPORT_CONFLICT is set in the request and there are conflicts in the display names.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources' smart constructor.
data GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources = GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
  { -- | Display names of conflicting entities.
    entityDisplayNames :: (Core.Maybe [Core.Text]),
    -- | Display names of conflicting intents.
    intentDisplayNames :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources ::
  GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
newGoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources =
  GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
    { entityDisplayNames =
        Core.Nothing,
      intentDisplayNames =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
            Core.<$> (o Core..:? "entityDisplayNames")
            Core.<*> (o Core..:? "intentDisplayNames")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources
  where
  toJSON
    GoogleCloudDialogflowCxV3ImportIntentsResponseConflictingResources {..} =
      Core.object
        ( Core.catMaybes
            [ ("entityDisplayNames" Core..=) Core.<$> entityDisplayNames,
              ("intentDisplayNames" Core..=) Core.<$> intentDisplayNames
            ]
        )

-- | Metadata returned for the TestCases.ImportTestCases long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportTestCasesMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3ImportTestCasesMetadata = GoogleCloudDialogflowCxV3ImportTestCasesMetadata
  { -- | Errors for failed test cases.
    errors :: (Core.Maybe [GoogleCloudDialogflowCxV3TestCaseError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportTestCasesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportTestCasesMetadata ::
  GoogleCloudDialogflowCxV3ImportTestCasesMetadata
newGoogleCloudDialogflowCxV3ImportTestCasesMetadata =
  GoogleCloudDialogflowCxV3ImportTestCasesMetadata
    { errors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportTestCasesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportTestCasesMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportTestCasesMetadata
            Core.<$> (o Core..:? "errors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportTestCasesMetadata
  where
  toJSON GoogleCloudDialogflowCxV3ImportTestCasesMetadata {..} =
    Core.object (Core.catMaybes [("errors" Core..=) Core.<$> errors])

-- | The request message for TestCases.ImportTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportTestCasesRequest' smart constructor.
data GoogleCloudDialogflowCxV3ImportTestCasesRequest = GoogleCloudDialogflowCxV3ImportTestCasesRequest
  { -- | Uncompressed raw byte content for test cases.
    content :: (Core.Maybe Core.Base64),
    -- | The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to import test cases from. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a read operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have read permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    gcsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportTestCasesRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportTestCasesRequest ::
  GoogleCloudDialogflowCxV3ImportTestCasesRequest
newGoogleCloudDialogflowCxV3ImportTestCasesRequest =
  GoogleCloudDialogflowCxV3ImportTestCasesRequest
    { content =
        Core.Nothing,
      gcsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportTestCasesRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportTestCasesRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportTestCasesRequest
            Core.<$> (o Core..:? "content")
            Core.<*> (o Core..:? "gcsUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportTestCasesRequest
  where
  toJSON GoogleCloudDialogflowCxV3ImportTestCasesRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("content" Core..=) Core.<$> content,
            ("gcsUri" Core..=) Core.<$> gcsUri
          ]
      )

-- | The response message for TestCases.ImportTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ImportTestCasesResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3ImportTestCasesResponse = GoogleCloudDialogflowCxV3ImportTestCasesResponse
  { -- | The unique identifiers of the new test cases. Format: @projects\/\/locations\/\/agents\/\/testCases\/@.
    names :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ImportTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ImportTestCasesResponse ::
  GoogleCloudDialogflowCxV3ImportTestCasesResponse
newGoogleCloudDialogflowCxV3ImportTestCasesResponse =
  GoogleCloudDialogflowCxV3ImportTestCasesResponse
    { names =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ImportTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ImportTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ImportTestCasesResponse
            Core.<$> (o Core..:? "names")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ImportTestCasesResponse
  where
  toJSON GoogleCloudDialogflowCxV3ImportTestCasesResponse {..} =
    Core.object (Core.catMaybes [("names" Core..=) Core.<$> names])

-- | Inline destination for a Dialogflow operation that writes or exports objects (e.g. intents) outside of Dialogflow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3InlineDestination' smart constructor.
newtype GoogleCloudDialogflowCxV3InlineDestination = GoogleCloudDialogflowCxV3InlineDestination
  { -- | Output only. The uncompressed byte content for the objects. Only populated in responses.
    content :: (Core.Maybe Core.Base64)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3InlineDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3InlineDestination ::
  GoogleCloudDialogflowCxV3InlineDestination
newGoogleCloudDialogflowCxV3InlineDestination =
  GoogleCloudDialogflowCxV3InlineDestination
    { content =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3InlineDestination where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3InlineDestination"
      ( \o ->
          GoogleCloudDialogflowCxV3InlineDestination
            Core.<$> (o Core..:? "content")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3InlineDestination where
  toJSON GoogleCloudDialogflowCxV3InlineDestination {..} =
    Core.object
      (Core.catMaybes [("content" Core..=) Core.<$> content])

-- | Inline source for a Dialogflow operation that reads or imports objects (e.g. intents) into Dialogflow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3InlineSource' smart constructor.
newtype GoogleCloudDialogflowCxV3InlineSource = GoogleCloudDialogflowCxV3InlineSource
  { -- | The uncompressed byte content for the objects.
    content :: (Core.Maybe Core.Base64)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3InlineSource' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3InlineSource ::
  GoogleCloudDialogflowCxV3InlineSource
newGoogleCloudDialogflowCxV3InlineSource =
  GoogleCloudDialogflowCxV3InlineSource {content = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3InlineSource where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3InlineSource"
      ( \o ->
          GoogleCloudDialogflowCxV3InlineSource
            Core.<$> (o Core..:? "content")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3InlineSource where
  toJSON GoogleCloudDialogflowCxV3InlineSource {..} =
    Core.object
      (Core.catMaybes [("content" Core..=) Core.<$> content])

-- | Instructs the speech recognizer on how to process the audio content.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3InputAudioConfig' smart constructor.
data GoogleCloudDialogflowCxV3InputAudioConfig = GoogleCloudDialogflowCxV3InputAudioConfig
  { -- | Required. Audio encoding of the audio content to process.
    audioEncoding ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3InputAudioConfig_AudioEncoding
      ),
    -- | Configuration of barge-in behavior during the streaming of input audio.
    bargeInConfig :: (Core.Maybe GoogleCloudDialogflowCxV3BargeInConfig),
    -- | Optional. If @true@, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn\'t return any word-level information.
    enableWordInfo :: (Core.Maybe Core.Bool),
    -- | Optional. Which Speech model to select for the given request. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models Speech models>.
    model :: (Core.Maybe Core.Text),
    -- | Optional. Which variant of the Speech model to use.
    modelVariant :: (Core.Maybe GoogleCloudDialogflowCxV3InputAudioConfig_ModelVariant),
    -- | If @true@, the request will opt out for STT conformer model migration. This field will be deprecated once force migration takes place in June 2024. Please refer to <https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration Dialogflow CX Speech model migration>.
    optOutConformerModelMigration :: (Core.Maybe Core.Bool),
    -- | Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See <https://cloud.google.com/speech-to-text/docs/basics#phrase-hints the Cloud Speech documentation> for more details.
    phraseHints :: (Core.Maybe [Core.Text]),
    -- | Sample rate (in Hertz) of the audio content sent in the query. Refer to <https://cloud.google.com/speech-to-text/docs/basics Cloud Speech API documentation> for more details.
    sampleRateHertz :: (Core.Maybe Core.Int32),
    -- | Optional. If @false@ (default), recognition does not cease until the client closes the stream. If @true@, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio\'s voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods.
    singleUtterance :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3InputAudioConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3InputAudioConfig ::
  GoogleCloudDialogflowCxV3InputAudioConfig
newGoogleCloudDialogflowCxV3InputAudioConfig =
  GoogleCloudDialogflowCxV3InputAudioConfig
    { audioEncoding =
        Core.Nothing,
      bargeInConfig = Core.Nothing,
      enableWordInfo = Core.Nothing,
      model = Core.Nothing,
      modelVariant = Core.Nothing,
      optOutConformerModelMigration = Core.Nothing,
      phraseHints = Core.Nothing,
      sampleRateHertz = Core.Nothing,
      singleUtterance = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3InputAudioConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3InputAudioConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3InputAudioConfig
            Core.<$> (o Core..:? "audioEncoding")
            Core.<*> (o Core..:? "bargeInConfig")
            Core.<*> (o Core..:? "enableWordInfo")
            Core.<*> (o Core..:? "model")
            Core.<*> (o Core..:? "modelVariant")
            Core.<*> (o Core..:? "optOutConformerModelMigration")
            Core.<*> (o Core..:? "phraseHints")
            Core.<*> (o Core..:? "sampleRateHertz")
            Core.<*> (o Core..:? "singleUtterance")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3InputAudioConfig where
  toJSON GoogleCloudDialogflowCxV3InputAudioConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("audioEncoding" Core..=) Core.<$> audioEncoding,
            ("bargeInConfig" Core..=) Core.<$> bargeInConfig,
            ("enableWordInfo" Core..=) Core.<$> enableWordInfo,
            ("model" Core..=) Core.<$> model,
            ("modelVariant" Core..=) Core.<$> modelVariant,
            ("optOutConformerModelMigration" Core..=)
              Core.<$> optOutConformerModelMigration,
            ("phraseHints" Core..=) Core.<$> phraseHints,
            ("sampleRateHertz" Core..=) Core.<$> sampleRateHertz,
            ("singleUtterance" Core..=) Core.<$> singleUtterance
          ]
      )

-- | An intent represents a user\'s intent to interact with a conversational agent. You can provide information for the Dialogflow API to use to match user input to an intent by adding training phrases (i.e., examples of user input) to your intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Intent' smart constructor.
data GoogleCloudDialogflowCxV3Intent = GoogleCloudDialogflowCxV3Intent
  { -- | Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the intent, unique within the agent.
    displayName :: (Core.Maybe Core.Text),
    -- | Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.
    isFallback :: (Core.Maybe Core.Bool),
    -- | The key\/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols \'-\' and \'_\'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix \"sys-\" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. \"sys-head\" means the intent is a head intent. \"sys.contextual\" means the intent is a contextual intent.
    labels :: (Core.Maybe GoogleCloudDialogflowCxV3Intent_Labels),
    -- | The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    name :: (Core.Maybe Core.Text),
    -- | The collection of parameters associated with the intent.
    parameters :: (Core.Maybe [GoogleCloudDialogflowCxV3IntentParameter]),
    -- | The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the @Normal@ priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.
    priority :: (Core.Maybe Core.Int32),
    -- | The collection of training phrases the agent is trained on to identify the intent.
    trainingPhrases :: (Core.Maybe [GoogleCloudDialogflowCxV3IntentTrainingPhrase])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Intent' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Intent ::
  GoogleCloudDialogflowCxV3Intent
newGoogleCloudDialogflowCxV3Intent =
  GoogleCloudDialogflowCxV3Intent
    { description = Core.Nothing,
      displayName = Core.Nothing,
      isFallback = Core.Nothing,
      labels = Core.Nothing,
      name = Core.Nothing,
      parameters = Core.Nothing,
      priority = Core.Nothing,
      trainingPhrases = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Intent where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Intent"
      ( \o ->
          GoogleCloudDialogflowCxV3Intent
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "isFallback")
            Core.<*> (o Core..:? "labels")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "priority")
            Core.<*> (o Core..:? "trainingPhrases")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Intent where
  toJSON GoogleCloudDialogflowCxV3Intent {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("isFallback" Core..=) Core.<$> isFallback,
            ("labels" Core..=) Core.<$> labels,
            ("name" Core..=) Core.<$> name,
            ("parameters" Core..=) Core.<$> parameters,
            ("priority" Core..=) Core.<$> priority,
            ("trainingPhrases" Core..=) Core.<$> trainingPhrases
          ]
      )

-- | The key\/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols \'-\' and \'_\'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix \"sys-\" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. \"sys-head\" means the intent is a head intent. \"sys.contextual\" means the intent is a contextual intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Intent_Labels' smart constructor.
newtype GoogleCloudDialogflowCxV3Intent_Labels = GoogleCloudDialogflowCxV3Intent_Labels
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Intent_Labels' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Intent_Labels ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowCxV3Intent_Labels
newGoogleCloudDialogflowCxV3Intent_Labels additional =
  GoogleCloudDialogflowCxV3Intent_Labels {additional = additional}

instance Core.FromJSON GoogleCloudDialogflowCxV3Intent_Labels where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Intent_Labels"
      ( \o ->
          GoogleCloudDialogflowCxV3Intent_Labels
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Intent_Labels where
  toJSON GoogleCloudDialogflowCxV3Intent_Labels {..} =
    Core.toJSON additional

-- | Intent coverage represents the percentage of all possible intents in the agent that are triggered in any of a parent\'s test cases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3IntentCoverage' smart constructor.
data GoogleCloudDialogflowCxV3IntentCoverage = GoogleCloudDialogflowCxV3IntentCoverage
  { -- | The percent of intents in the agent that are covered.
    coverageScore :: (Core.Maybe Core.Double),
    -- | The list of Intents present in the agent
    intents :: (Core.Maybe [GoogleCloudDialogflowCxV3IntentCoverageIntent])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3IntentCoverage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3IntentCoverage ::
  GoogleCloudDialogflowCxV3IntentCoverage
newGoogleCloudDialogflowCxV3IntentCoverage =
  GoogleCloudDialogflowCxV3IntentCoverage
    { coverageScore =
        Core.Nothing,
      intents = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3IntentCoverage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3IntentCoverage"
      ( \o ->
          GoogleCloudDialogflowCxV3IntentCoverage
            Core.<$> (o Core..:? "coverageScore")
            Core.<*> (o Core..:? "intents")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3IntentCoverage where
  toJSON GoogleCloudDialogflowCxV3IntentCoverage {..} =
    Core.object
      ( Core.catMaybes
          [ ("coverageScore" Core..=) Core.<$> coverageScore,
            ("intents" Core..=) Core.<$> intents
          ]
      )

-- | The agent\'s intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3IntentCoverageIntent' smart constructor.
data GoogleCloudDialogflowCxV3IntentCoverageIntent = GoogleCloudDialogflowCxV3IntentCoverageIntent
  { -- | Whether the intent is covered by at least one of the agent\'s test cases.
    covered :: (Core.Maybe Core.Bool),
    -- | The intent full resource name
    intent :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3IntentCoverageIntent' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3IntentCoverageIntent ::
  GoogleCloudDialogflowCxV3IntentCoverageIntent
newGoogleCloudDialogflowCxV3IntentCoverageIntent =
  GoogleCloudDialogflowCxV3IntentCoverageIntent
    { covered =
        Core.Nothing,
      intent = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3IntentCoverageIntent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3IntentCoverageIntent"
      ( \o ->
          GoogleCloudDialogflowCxV3IntentCoverageIntent
            Core.<$> (o Core..:? "covered")
            Core.<*> (o Core..:? "intent")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3IntentCoverageIntent where
  toJSON GoogleCloudDialogflowCxV3IntentCoverageIntent {..} =
    Core.object
      ( Core.catMaybes
          [ ("covered" Core..=) Core.<$> covered,
            ("intent" Core..=) Core.<$> intent
          ]
      )

-- | Represents the intent to trigger programmatically rather than as a result of natural language processing.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3IntentInput' smart constructor.
newtype GoogleCloudDialogflowCxV3IntentInput = GoogleCloudDialogflowCxV3IntentInput
  { -- | Required. The unique identifier of the intent. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    intent :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3IntentInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3IntentInput ::
  GoogleCloudDialogflowCxV3IntentInput
newGoogleCloudDialogflowCxV3IntentInput =
  GoogleCloudDialogflowCxV3IntentInput {intent = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3IntentInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3IntentInput"
      ( \o ->
          GoogleCloudDialogflowCxV3IntentInput
            Core.<$> (o Core..:? "intent")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3IntentInput where
  toJSON GoogleCloudDialogflowCxV3IntentInput {..} =
    Core.object (Core.catMaybes [("intent" Core..=) Core.<$> intent])

-- | Represents an intent parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3IntentParameter' smart constructor.
data GoogleCloudDialogflowCxV3IntentParameter = GoogleCloudDialogflowCxV3IntentParameter
  { -- | Required. The entity type of the parameter. Format: @projects\/-\/locations\/-\/agents\/-\/entityTypes\/@ for system entity types (for example, @projects\/-\/locations\/-\/agents\/-\/entityTypes\/sys.date@), or @projects\/\/locations\/\/agents\/\/entityTypes\/@ for developer entity types.
    entityType :: (Core.Maybe Core.Text),
    -- | Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
    id :: (Core.Maybe Core.Text),
    -- | Indicates whether the parameter represents a list of values.
    isList :: (Core.Maybe Core.Bool),
    -- | Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
    redact :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3IntentParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3IntentParameter ::
  GoogleCloudDialogflowCxV3IntentParameter
newGoogleCloudDialogflowCxV3IntentParameter =
  GoogleCloudDialogflowCxV3IntentParameter
    { entityType =
        Core.Nothing,
      id = Core.Nothing,
      isList = Core.Nothing,
      redact = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3IntentParameter where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3IntentParameter"
      ( \o ->
          GoogleCloudDialogflowCxV3IntentParameter
            Core.<$> (o Core..:? "entityType")
            Core.<*> (o Core..:? "id")
            Core.<*> (o Core..:? "isList")
            Core.<*> (o Core..:? "redact")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3IntentParameter where
  toJSON GoogleCloudDialogflowCxV3IntentParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityType" Core..=) Core.<$> entityType,
            ("id" Core..=) Core.<$> id,
            ("isList" Core..=) Core.<$> isList,
            ("redact" Core..=) Core.<$> redact
          ]
      )

-- | Represents an example that the agent is trained on to identify the intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3IntentTrainingPhrase' smart constructor.
data GoogleCloudDialogflowCxV3IntentTrainingPhrase = GoogleCloudDialogflowCxV3IntentTrainingPhrase
  { -- | Output only. The unique identifier of the training phrase.
    id :: (Core.Maybe Core.Text),
    -- | Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - @Part.text@ is set to a part of the phrase that has no parameters. - @Part.text@ is set to a part of the phrase that you want to annotate, and the @parameter_id@ field is set.
    parts :: (Core.Maybe [GoogleCloudDialogflowCxV3IntentTrainingPhrasePart]),
    -- | Indicates how many times this example was added to the intent.
    repeatCount :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3IntentTrainingPhrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3IntentTrainingPhrase ::
  GoogleCloudDialogflowCxV3IntentTrainingPhrase
newGoogleCloudDialogflowCxV3IntentTrainingPhrase =
  GoogleCloudDialogflowCxV3IntentTrainingPhrase
    { id = Core.Nothing,
      parts = Core.Nothing,
      repeatCount = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3IntentTrainingPhrase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3IntentTrainingPhrase"
      ( \o ->
          GoogleCloudDialogflowCxV3IntentTrainingPhrase
            Core.<$> (o Core..:? "id")
            Core.<*> (o Core..:? "parts")
            Core.<*> (o Core..:? "repeatCount")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3IntentTrainingPhrase where
  toJSON GoogleCloudDialogflowCxV3IntentTrainingPhrase {..} =
    Core.object
      ( Core.catMaybes
          [ ("id" Core..=) Core.<$> id,
            ("parts" Core..=) Core.<$> parts,
            ("repeatCount" Core..=) Core.<$> repeatCount
          ]
      )

-- | Represents a part of a training phrase.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3IntentTrainingPhrasePart' smart constructor.
data GoogleCloudDialogflowCxV3IntentTrainingPhrasePart = GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
  { -- | The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
    parameterId :: (Core.Maybe Core.Text),
    -- | Required. The text for this part.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3IntentTrainingPhrasePart' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3IntentTrainingPhrasePart ::
  GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
newGoogleCloudDialogflowCxV3IntentTrainingPhrasePart =
  GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
    { parameterId =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3IntentTrainingPhrasePart"
      ( \o ->
          GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
            Core.<$> (o Core..:? "parameterId")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3IntentTrainingPhrasePart
  where
  toJSON GoogleCloudDialogflowCxV3IntentTrainingPhrasePart {..} =
    Core.object
      ( Core.catMaybes
          [ ("parameterId" Core..=) Core.<$> parameterId,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3KnowledgeConnectorSettings' smart constructor.
data GoogleCloudDialogflowCxV3KnowledgeConnectorSettings = GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
  { -- | Optional. List of related data store connections.
    dataStoreConnections :: (Core.Maybe [GoogleCloudDialogflowCxV3DataStoreConnection]),
    -- | Whether Knowledge Connector is enabled or not.
    enabled :: (Core.Maybe Core.Bool),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text),
    -- | The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter @$request.knowledge.answers@ (contains up to the 5 highest confidence answers) and @$request.knowledge.questions@ (contains the corresponding questions) to construct the fulfillment.
    triggerFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3Fulfillment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3KnowledgeConnectorSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3KnowledgeConnectorSettings ::
  GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
newGoogleCloudDialogflowCxV3KnowledgeConnectorSettings =
  GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
    { dataStoreConnections =
        Core.Nothing,
      enabled = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing,
      triggerFulfillment = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3KnowledgeConnectorSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
            Core.<$> (o Core..:? "dataStoreConnections")
            Core.<*> (o Core..:? "enabled")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
            Core.<*> (o Core..:? "triggerFulfillment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3KnowledgeConnectorSettings
  where
  toJSON GoogleCloudDialogflowCxV3KnowledgeConnectorSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataStoreConnections" Core..=) Core.<$> dataStoreConnections,
            ("enabled" Core..=) Core.<$> enabled,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage,
            ("triggerFulfillment" Core..=) Core.<$> triggerFulfillment
          ]
      )

-- | Represents the language information of the request.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3LanguageInfo' smart constructor.
data GoogleCloudDialogflowCxV3LanguageInfo = GoogleCloudDialogflowCxV3LanguageInfo
  { -- | The confidence score of the detected language between 0 and 1.
    confidenceScore :: (Core.Maybe Core.Double),
    -- | The language code specified in the original request.
    inputLanguageCode :: (Core.Maybe Core.Text),
    -- | The language code detected for this request based on the user conversation.
    resolvedLanguageCode :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3LanguageInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3LanguageInfo ::
  GoogleCloudDialogflowCxV3LanguageInfo
newGoogleCloudDialogflowCxV3LanguageInfo =
  GoogleCloudDialogflowCxV3LanguageInfo
    { confidenceScore =
        Core.Nothing,
      inputLanguageCode = Core.Nothing,
      resolvedLanguageCode = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3LanguageInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3LanguageInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3LanguageInfo
            Core.<$> (o Core..:? "confidenceScore")
            Core.<*> (o Core..:? "inputLanguageCode")
            Core.<*> (o Core..:? "resolvedLanguageCode")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3LanguageInfo where
  toJSON GoogleCloudDialogflowCxV3LanguageInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidenceScore" Core..=) Core.<$> confidenceScore,
            ("inputLanguageCode" Core..=) Core.<$> inputLanguageCode,
            ("resolvedLanguageCode" Core..=) Core.<$> resolvedLanguageCode
          ]
      )

-- | The response message for Agents.ListAgents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListAgentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListAgentsResponse = GoogleCloudDialogflowCxV3ListAgentsResponse
  { -- | The list of agents. There will be a maximum number of items returned based on the page_size field in the request.
    agents :: (Core.Maybe [GoogleCloudDialogflowCxV3Agent]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListAgentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListAgentsResponse ::
  GoogleCloudDialogflowCxV3ListAgentsResponse
newGoogleCloudDialogflowCxV3ListAgentsResponse =
  GoogleCloudDialogflowCxV3ListAgentsResponse
    { agents =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ListAgentsResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListAgentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListAgentsResponse
            Core.<$> (o Core..:? "agents")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListAgentsResponse where
  toJSON GoogleCloudDialogflowCxV3ListAgentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("agents" Core..=) Core.<$> agents,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Changelogs.ListChangelogs.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListChangelogsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListChangelogsResponse = GoogleCloudDialogflowCxV3ListChangelogsResponse
  { -- | The list of changelogs. There will be a maximum number of items returned based on the page_size field in the request. The changelogs will be ordered by timestamp.
    changelogs :: (Core.Maybe [GoogleCloudDialogflowCxV3Changelog]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListChangelogsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListChangelogsResponse ::
  GoogleCloudDialogflowCxV3ListChangelogsResponse
newGoogleCloudDialogflowCxV3ListChangelogsResponse =
  GoogleCloudDialogflowCxV3ListChangelogsResponse
    { changelogs =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListChangelogsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListChangelogsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListChangelogsResponse
            Core.<$> (o Core..:? "changelogs")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListChangelogsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListChangelogsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("changelogs" Core..=) Core.<$> changelogs,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Environments.ListTestCaseResults.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListContinuousTestResultsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse = GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
  { -- | The list of continuous test results.
    continuousTestResults :: (Core.Maybe [GoogleCloudDialogflowCxV3ContinuousTestResult]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListContinuousTestResultsResponse ::
  GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
newGoogleCloudDialogflowCxV3ListContinuousTestResultsResponse =
  GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
    { continuousTestResults =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
            Core.<$> (o Core..:? "continuousTestResults")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse
  where
  toJSON
    GoogleCloudDialogflowCxV3ListContinuousTestResultsResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("continuousTestResults" Core..=) Core.<$> continuousTestResults,
              ("nextPageToken" Core..=) Core.<$> nextPageToken
            ]
        )

-- | The response message for Deployments.ListDeployments.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListDeploymentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListDeploymentsResponse = GoogleCloudDialogflowCxV3ListDeploymentsResponse
  { -- | The list of deployments. There will be a maximum number of items returned based on the page/size field in the request. The list may in some cases be empty or contain fewer entries than page/size even if this isn\'t the last page.
    deployments :: (Core.Maybe [GoogleCloudDialogflowCxV3Deployment]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListDeploymentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListDeploymentsResponse ::
  GoogleCloudDialogflowCxV3ListDeploymentsResponse
newGoogleCloudDialogflowCxV3ListDeploymentsResponse =
  GoogleCloudDialogflowCxV3ListDeploymentsResponse
    { deployments =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListDeploymentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListDeploymentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListDeploymentsResponse
            Core.<$> (o Core..:? "deployments")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListDeploymentsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListDeploymentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("deployments" Core..=) Core.<$> deployments,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for EntityTypes.ListEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListEntityTypesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListEntityTypesResponse = GoogleCloudDialogflowCxV3ListEntityTypesResponse
  { -- | The list of entity types. There will be a maximum number of items returned based on the page_size field in the request.
    entityTypes :: (Core.Maybe [GoogleCloudDialogflowCxV3EntityType]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListEntityTypesResponse ::
  GoogleCloudDialogflowCxV3ListEntityTypesResponse
newGoogleCloudDialogflowCxV3ListEntityTypesResponse =
  GoogleCloudDialogflowCxV3ListEntityTypesResponse
    { entityTypes =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListEntityTypesResponse
            Core.<$> (o Core..:? "entityTypes")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListEntityTypesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityTypes" Core..=) Core.<$> entityTypes,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Environments.ListEnvironments.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListEnvironmentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListEnvironmentsResponse = GoogleCloudDialogflowCxV3ListEnvironmentsResponse
  { -- | The list of environments. There will be a maximum number of items returned based on the page/size field in the request. The list may in some cases be empty or contain fewer entries than page/size even if this isn\'t the last page.
    environments :: (Core.Maybe [GoogleCloudDialogflowCxV3Environment]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListEnvironmentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListEnvironmentsResponse ::
  GoogleCloudDialogflowCxV3ListEnvironmentsResponse
newGoogleCloudDialogflowCxV3ListEnvironmentsResponse =
  GoogleCloudDialogflowCxV3ListEnvironmentsResponse
    { environments =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListEnvironmentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListEnvironmentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListEnvironmentsResponse
            Core.<$> (o Core..:? "environments")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListEnvironmentsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListEnvironmentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("environments" Core..=) Core.<$> environments,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Experiments.ListExperiments.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListExperimentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListExperimentsResponse = GoogleCloudDialogflowCxV3ListExperimentsResponse
  { -- | The list of experiments. There will be a maximum number of items returned based on the page/size field in the request. The list may in some cases be empty or contain fewer entries than page/size even if this isn\'t the last page.
    experiments :: (Core.Maybe [GoogleCloudDialogflowCxV3Experiment]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListExperimentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListExperimentsResponse ::
  GoogleCloudDialogflowCxV3ListExperimentsResponse
newGoogleCloudDialogflowCxV3ListExperimentsResponse =
  GoogleCloudDialogflowCxV3ListExperimentsResponse
    { experiments =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListExperimentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListExperimentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListExperimentsResponse
            Core.<$> (o Core..:? "experiments")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListExperimentsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListExperimentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("experiments" Core..=) Core.<$> experiments,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Flows.ListFlows.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListFlowsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListFlowsResponse = GoogleCloudDialogflowCxV3ListFlowsResponse
  { -- | The list of flows. There will be a maximum number of items returned based on the page_size field in the request.
    flows :: (Core.Maybe [GoogleCloudDialogflowCxV3Flow]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListFlowsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListFlowsResponse ::
  GoogleCloudDialogflowCxV3ListFlowsResponse
newGoogleCloudDialogflowCxV3ListFlowsResponse =
  GoogleCloudDialogflowCxV3ListFlowsResponse
    { flows = Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ListFlowsResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListFlowsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListFlowsResponse
            Core.<$> (o Core..:? "flows")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListFlowsResponse where
  toJSON GoogleCloudDialogflowCxV3ListFlowsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("flows" Core..=) Core.<$> flows,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Generators.ListGenerators.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListGeneratorsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListGeneratorsResponse = GoogleCloudDialogflowCxV3ListGeneratorsResponse
  { -- | The list of generators. There will be a maximum number of items returned based on the page_size field in the request.
    generators :: (Core.Maybe [GoogleCloudDialogflowCxV3Generator]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListGeneratorsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListGeneratorsResponse ::
  GoogleCloudDialogflowCxV3ListGeneratorsResponse
newGoogleCloudDialogflowCxV3ListGeneratorsResponse =
  GoogleCloudDialogflowCxV3ListGeneratorsResponse
    { generators =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListGeneratorsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListGeneratorsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListGeneratorsResponse
            Core.<$> (o Core..:? "generators")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListGeneratorsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListGeneratorsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("generators" Core..=) Core.<$> generators,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Intents.ListIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListIntentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListIntentsResponse = GoogleCloudDialogflowCxV3ListIntentsResponse
  { -- | The list of intents. There will be a maximum number of items returned based on the page_size field in the request.
    intents :: (Core.Maybe [GoogleCloudDialogflowCxV3Intent]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListIntentsResponse ::
  GoogleCloudDialogflowCxV3ListIntentsResponse
newGoogleCloudDialogflowCxV3ListIntentsResponse =
  GoogleCloudDialogflowCxV3ListIntentsResponse
    { intents =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ListIntentsResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListIntentsResponse
            Core.<$> (o Core..:? "intents")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListIntentsResponse where
  toJSON GoogleCloudDialogflowCxV3ListIntentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("intents" Core..=) Core.<$> intents,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | The response message for Pages.ListPages.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListPagesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListPagesResponse = GoogleCloudDialogflowCxV3ListPagesResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of pages. There will be a maximum number of items returned based on the page_size field in the request.
    pages :: (Core.Maybe [GoogleCloudDialogflowCxV3Page])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListPagesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListPagesResponse ::
  GoogleCloudDialogflowCxV3ListPagesResponse
newGoogleCloudDialogflowCxV3ListPagesResponse =
  GoogleCloudDialogflowCxV3ListPagesResponse
    { nextPageToken =
        Core.Nothing,
      pages = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ListPagesResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListPagesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListPagesResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "pages")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListPagesResponse where
  toJSON GoogleCloudDialogflowCxV3ListPagesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("pages" Core..=) Core.<$> pages
          ]
      )

-- | The response message for SecuritySettings.ListSecuritySettings.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListSecuritySettingsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListSecuritySettingsResponse = GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of security settings.
    securitySettings :: (Core.Maybe [GoogleCloudDialogflowCxV3SecuritySettings])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListSecuritySettingsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListSecuritySettingsResponse ::
  GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
newGoogleCloudDialogflowCxV3ListSecuritySettingsResponse =
  GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
    { nextPageToken =
        Core.Nothing,
      securitySettings = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListSecuritySettingsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "securitySettings")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListSecuritySettingsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListSecuritySettingsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("securitySettings" Core..=) Core.<$> securitySettings
          ]
      )

-- | The response message for SessionEntityTypes.ListSessionEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListSessionEntityTypesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse = GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of session entity types. There will be a maximum number of items returned based on the page_size field in the request.
    sessionEntityTypes :: (Core.Maybe [GoogleCloudDialogflowCxV3SessionEntityType])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListSessionEntityTypesResponse ::
  GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
newGoogleCloudDialogflowCxV3ListSessionEntityTypesResponse =
  GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
    { nextPageToken =
        Core.Nothing,
      sessionEntityTypes = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "sessionEntityTypes")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListSessionEntityTypesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("sessionEntityTypes" Core..=) Core.<$> sessionEntityTypes
          ]
      )

-- | The response message for TestCases.ListTestCaseResults.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListTestCaseResultsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListTestCaseResultsResponse = GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of test case results.
    testCaseResults :: (Core.Maybe [GoogleCloudDialogflowCxV3TestCaseResult])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListTestCaseResultsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListTestCaseResultsResponse ::
  GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
newGoogleCloudDialogflowCxV3ListTestCaseResultsResponse =
  GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
    { nextPageToken =
        Core.Nothing,
      testCaseResults = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListTestCaseResultsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "testCaseResults")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListTestCaseResultsResponse
  where
  toJSON GoogleCloudDialogflowCxV3ListTestCaseResultsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("testCaseResults" Core..=) Core.<$> testCaseResults
          ]
      )

-- | The response message for TestCases.ListTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListTestCasesResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListTestCasesResponse = GoogleCloudDialogflowCxV3ListTestCasesResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of test cases. There will be a maximum number of items returned based on the page_size field in the request.
    testCases :: (Core.Maybe [GoogleCloudDialogflowCxV3TestCase])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListTestCasesResponse ::
  GoogleCloudDialogflowCxV3ListTestCasesResponse
newGoogleCloudDialogflowCxV3ListTestCasesResponse =
  GoogleCloudDialogflowCxV3ListTestCasesResponse
    { nextPageToken =
        Core.Nothing,
      testCases = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListTestCasesResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "testCases")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListTestCasesResponse where
  toJSON GoogleCloudDialogflowCxV3ListTestCasesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("testCases" Core..=) Core.<$> testCases
          ]
      )

-- | The response message for TransitionRouteGroups.ListTransitionRouteGroups.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse = GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of transition route groups. There will be a maximum number of items returned based on the page/size field in the request. The list may in some cases be empty or contain fewer entries than page/size even if this isn\'t the last page.
    transitionRouteGroups :: (Core.Maybe [GoogleCloudDialogflowCxV3TransitionRouteGroup])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse ::
  GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
newGoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse =
  GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
    { nextPageToken =
        Core.Nothing,
      transitionRouteGroups = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "transitionRouteGroups")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse
  where
  toJSON
    GoogleCloudDialogflowCxV3ListTransitionRouteGroupsResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
              ("transitionRouteGroups" Core..=) Core.<$> transitionRouteGroups
            ]
        )

-- | The response message for Versions.ListVersions.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListVersionsResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListVersionsResponse = GoogleCloudDialogflowCxV3ListVersionsResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | A list of versions. There will be a maximum number of items returned based on the page/size field in the request. The list may in some cases be empty or contain fewer entries than page/size even if this isn\'t the last page.
    versions :: (Core.Maybe [GoogleCloudDialogflowCxV3Version])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListVersionsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListVersionsResponse ::
  GoogleCloudDialogflowCxV3ListVersionsResponse
newGoogleCloudDialogflowCxV3ListVersionsResponse =
  GoogleCloudDialogflowCxV3ListVersionsResponse
    { nextPageToken =
        Core.Nothing,
      versions = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListVersionsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListVersionsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListVersionsResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "versions")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListVersionsResponse where
  toJSON GoogleCloudDialogflowCxV3ListVersionsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("versions" Core..=) Core.<$> versions
          ]
      )

-- | The response message for Webhooks.ListWebhooks.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ListWebhooksResponse' smart constructor.
data GoogleCloudDialogflowCxV3ListWebhooksResponse = GoogleCloudDialogflowCxV3ListWebhooksResponse
  { -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | The list of webhooks. There will be a maximum number of items returned based on the page_size field in the request.
    webhooks :: (Core.Maybe [GoogleCloudDialogflowCxV3Webhook])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ListWebhooksResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ListWebhooksResponse ::
  GoogleCloudDialogflowCxV3ListWebhooksResponse
newGoogleCloudDialogflowCxV3ListWebhooksResponse =
  GoogleCloudDialogflowCxV3ListWebhooksResponse
    { nextPageToken =
        Core.Nothing,
      webhooks = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ListWebhooksResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ListWebhooksResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3ListWebhooksResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "webhooks")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ListWebhooksResponse where
  toJSON GoogleCloudDialogflowCxV3ListWebhooksResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("webhooks" Core..=) Core.<$> webhooks
          ]
      )

-- | The request message for Versions.LoadVersion.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3LoadVersionRequest' smart constructor.
newtype GoogleCloudDialogflowCxV3LoadVersionRequest = GoogleCloudDialogflowCxV3LoadVersionRequest
  { -- | This field is used to prevent accidental overwrite of other agent resources, which can potentially impact other flow\'s behavior. If @allow_override_agent_resources@ is false, conflicted agent-level resources will not be overridden (i.e. intents, entities, webhooks).
    allowOverrideAgentResources :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3LoadVersionRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3LoadVersionRequest ::
  GoogleCloudDialogflowCxV3LoadVersionRequest
newGoogleCloudDialogflowCxV3LoadVersionRequest =
  GoogleCloudDialogflowCxV3LoadVersionRequest
    { allowOverrideAgentResources =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3LoadVersionRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3LoadVersionRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3LoadVersionRequest
            Core.<$> (o Core..:? "allowOverrideAgentResources")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3LoadVersionRequest where
  toJSON GoogleCloudDialogflowCxV3LoadVersionRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowOverrideAgentResources" Core..=)
              Core.<$> allowOverrideAgentResources
          ]
      )

-- | The response message for Environments.LookupEnvironmentHistory.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse' smart constructor.
data GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse = GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
  { -- | Represents a list of snapshots for an environment. Time of the snapshots is stored in @update_time@.
    environments :: (Core.Maybe [GoogleCloudDialogflowCxV3Environment]),
    -- | Token to retrieve the next page of results, or empty if there are no more results in the list.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse ::
  GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
newGoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse =
  GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
    { environments =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
            Core.<$> (o Core..:? "environments")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse
  where
  toJSON
    GoogleCloudDialogflowCxV3LookupEnvironmentHistoryResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("environments" Core..=) Core.<$> environments,
              ("nextPageToken" Core..=) Core.<$> nextPageToken
            ]
        )

-- | Represents one match result of MatchIntent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Match' smart constructor.
data GoogleCloudDialogflowCxV3Match = GoogleCloudDialogflowCxV3Match
  { -- | The confidence of this match. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation.
    confidence :: (Core.Maybe Core.Double),
    -- | The event that matched the query. Filled for @EVENT@, @NO_MATCH@ and @NO_INPUT@ match types.
    event :: (Core.Maybe Core.Text),
    -- | The Intent that matched the query. Some, not all fields are filled in this message, including but not limited to: @name@ and @display_name@. Only filled for @INTENT@ match type.
    intent :: (Core.Maybe GoogleCloudDialogflowCxV3Intent),
    -- | Type of this Match.
    matchType :: (Core.Maybe GoogleCloudDialogflowCxV3Match_MatchType),
    -- | The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowCxV3Match_Parameters),
    -- | Final text input which was matched during MatchIntent. This value can be different from original input sent in request because of spelling correction or other processing.
    resolvedInput :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Match' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Match ::
  GoogleCloudDialogflowCxV3Match
newGoogleCloudDialogflowCxV3Match =
  GoogleCloudDialogflowCxV3Match
    { confidence = Core.Nothing,
      event = Core.Nothing,
      intent = Core.Nothing,
      matchType = Core.Nothing,
      parameters = Core.Nothing,
      resolvedInput = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Match where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Match"
      ( \o ->
          GoogleCloudDialogflowCxV3Match
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "event")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "matchType")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "resolvedInput")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Match where
  toJSON GoogleCloudDialogflowCxV3Match {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("event" Core..=) Core.<$> event,
            ("intent" Core..=) Core.<$> intent,
            ("matchType" Core..=) Core.<$> matchType,
            ("parameters" Core..=) Core.<$> parameters,
            ("resolvedInput" Core..=) Core.<$> resolvedInput
          ]
      )

-- | The collection of parameters extracted from the query. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Match_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3Match_Parameters = GoogleCloudDialogflowCxV3Match_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Match_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Match_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3Match_Parameters
newGoogleCloudDialogflowCxV3Match_Parameters additional =
  GoogleCloudDialogflowCxV3Match_Parameters
    { additional =
        additional
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Match_Parameters where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Match_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3Match_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Match_Parameters where
  toJSON GoogleCloudDialogflowCxV3Match_Parameters {..} =
    Core.toJSON additional

-- | Request of MatchIntent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3MatchIntentRequest' smart constructor.
data GoogleCloudDialogflowCxV3MatchIntentRequest = GoogleCloudDialogflowCxV3MatchIntentRequest
  { -- | Persist session parameter changes from @query_params@.
    persistParameterChanges :: (Core.Maybe Core.Bool),
    -- | Required. The input specification.
    queryInput :: (Core.Maybe GoogleCloudDialogflowCxV3QueryInput),
    -- | The parameters of this query.
    queryParams :: (Core.Maybe GoogleCloudDialogflowCxV3QueryParameters)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3MatchIntentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3MatchIntentRequest ::
  GoogleCloudDialogflowCxV3MatchIntentRequest
newGoogleCloudDialogflowCxV3MatchIntentRequest =
  GoogleCloudDialogflowCxV3MatchIntentRequest
    { persistParameterChanges =
        Core.Nothing,
      queryInput = Core.Nothing,
      queryParams = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3MatchIntentRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3MatchIntentRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3MatchIntentRequest
            Core.<$> (o Core..:? "persistParameterChanges")
            Core.<*> (o Core..:? "queryInput")
            Core.<*> (o Core..:? "queryParams")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3MatchIntentRequest where
  toJSON GoogleCloudDialogflowCxV3MatchIntentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("persistParameterChanges" Core..=)
              Core.<$> persistParameterChanges,
            ("queryInput" Core..=) Core.<$> queryInput,
            ("queryParams" Core..=) Core.<$> queryParams
          ]
      )

-- | Response of MatchIntent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3MatchIntentResponse' smart constructor.
data GoogleCloudDialogflowCxV3MatchIntentResponse = GoogleCloudDialogflowCxV3MatchIntentResponse
  { -- | The current Page. Some, not all fields are filled in this message, including but not limited to @name@ and @display_name@.
    currentPage :: (Core.Maybe GoogleCloudDialogflowCxV3Page),
    -- | Match results, if more than one, ordered descendingly by the confidence we have that the particular intent matches the query.
    matches :: (Core.Maybe [GoogleCloudDialogflowCxV3Match]),
    -- | If natural language text was provided as input, this field will contain a copy of the text.
    text :: (Core.Maybe Core.Text),
    -- | If natural language speech audio was provided as input, this field will contain the transcript for the audio.
    transcript :: (Core.Maybe Core.Text),
    -- | If an event was provided as input, this field will contain a copy of the event name.
    triggerEvent :: (Core.Maybe Core.Text),
    -- | If an intent was provided as input, this field will contain a copy of the intent identifier. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    triggerIntent :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3MatchIntentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3MatchIntentResponse ::
  GoogleCloudDialogflowCxV3MatchIntentResponse
newGoogleCloudDialogflowCxV3MatchIntentResponse =
  GoogleCloudDialogflowCxV3MatchIntentResponse
    { currentPage =
        Core.Nothing,
      matches = Core.Nothing,
      text = Core.Nothing,
      transcript = Core.Nothing,
      triggerEvent = Core.Nothing,
      triggerIntent = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3MatchIntentResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3MatchIntentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3MatchIntentResponse
            Core.<$> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "matches")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "transcript")
            Core.<*> (o Core..:? "triggerEvent")
            Core.<*> (o Core..:? "triggerIntent")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3MatchIntentResponse where
  toJSON GoogleCloudDialogflowCxV3MatchIntentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("currentPage" Core..=) Core.<$> currentPage,
            ("matches" Core..=) Core.<$> matches,
            ("text" Core..=) Core.<$> text,
            ("transcript" Core..=) Core.<$> transcript,
            ("triggerEvent" Core..=) Core.<$> triggerEvent,
            ("triggerIntent" Core..=) Core.<$> triggerIntent
          ]
      )

-- | Settings related to NLU.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3NluSettings' smart constructor.
data GoogleCloudDialogflowCxV3NluSettings = GoogleCloudDialogflowCxV3NluSettings
  { -- | To filter out false positive results and still get variety in matched natural language inputs for your agent, you can tune the machine learning classification threshold. If the returned score value is less than the threshold value, then a no-match event will be triggered. The score values range from 0.0 (completely uncertain) to 1.0 (completely certain). If set to 0.0, the default of 0.3 is used. You can set a separate classification threshold for the flow in each language enabled for the agent.
    classificationThreshold :: (Core.Maybe Core.Double),
    -- | Indicates NLU model training mode.
    modelTrainingMode :: (Core.Maybe GoogleCloudDialogflowCxV3NluSettings_ModelTrainingMode),
    -- | Indicates the type of NLU model.
    modelType :: (Core.Maybe GoogleCloudDialogflowCxV3NluSettings_ModelType)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3NluSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3NluSettings ::
  GoogleCloudDialogflowCxV3NluSettings
newGoogleCloudDialogflowCxV3NluSettings =
  GoogleCloudDialogflowCxV3NluSettings
    { classificationThreshold =
        Core.Nothing,
      modelTrainingMode = Core.Nothing,
      modelType = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3NluSettings where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3NluSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3NluSettings
            Core.<$> (o Core..:? "classificationThreshold")
            Core.<*> (o Core..:? "modelTrainingMode")
            Core.<*> (o Core..:? "modelType")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3NluSettings where
  toJSON GoogleCloudDialogflowCxV3NluSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("classificationThreshold" Core..=)
              Core.<$> classificationThreshold,
            ("modelTrainingMode" Core..=) Core.<$> modelTrainingMode,
            ("modelType" Core..=) Core.<$> modelType
          ]
      )

-- | Instructs the speech synthesizer how to generate the output audio content.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3OutputAudioConfig' smart constructor.
data GoogleCloudDialogflowCxV3OutputAudioConfig = GoogleCloudDialogflowCxV3OutputAudioConfig
  { -- | Required. Audio encoding of the synthesized audio content.
    audioEncoding ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3OutputAudioConfig_AudioEncoding
      ),
    -- | Optional. The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice\'s natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
    sampleRateHertz :: (Core.Maybe Core.Int32),
    -- | Optional. Configuration of how speech should be synthesized. If not specified, Agent.text/to/speech_settings is applied.
    synthesizeSpeechConfig :: (Core.Maybe GoogleCloudDialogflowCxV3SynthesizeSpeechConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3OutputAudioConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3OutputAudioConfig ::
  GoogleCloudDialogflowCxV3OutputAudioConfig
newGoogleCloudDialogflowCxV3OutputAudioConfig =
  GoogleCloudDialogflowCxV3OutputAudioConfig
    { audioEncoding =
        Core.Nothing,
      sampleRateHertz = Core.Nothing,
      synthesizeSpeechConfig = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3OutputAudioConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3OutputAudioConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3OutputAudioConfig
            Core.<$> (o Core..:? "audioEncoding")
            Core.<*> (o Core..:? "sampleRateHertz")
            Core.<*> (o Core..:? "synthesizeSpeechConfig")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3OutputAudioConfig where
  toJSON GoogleCloudDialogflowCxV3OutputAudioConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("audioEncoding" Core..=) Core.<$> audioEncoding,
            ("sampleRateHertz" Core..=) Core.<$> sampleRateHertz,
            ("synthesizeSpeechConfig" Core..=)
              Core.<$> synthesizeSpeechConfig
          ]
      )

-- | A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the <https://cloud.google.com/dialogflow/cx/docs/concept/page Page guide>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Page' smart constructor.
data GoogleCloudDialogflowCxV3Page = GoogleCloudDialogflowCxV3Page
  { -- | Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettings),
    -- | The description of the page. The maximum length is 500 characters.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the page, unique within the flow.
    displayName :: (Core.Maybe Core.Text),
    -- | The fulfillment to call when the session is entering the page.
    entryFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3Fulfillment),
    -- | Handlers associated with the page to handle events such as webhook errors, no match or no input.
    eventHandlers :: (Core.Maybe [GoogleCloudDialogflowCxV3EventHandler]),
    -- | The form associated with the page, used for collecting parameters relevant to the page.
    form :: (Core.Maybe GoogleCloudDialogflowCxV3Form),
    -- | Optional. Knowledge connector configuration.
    knowledgeConnectorSettings :: (Core.Maybe GoogleCloudDialogflowCxV3KnowledgeConnectorSettings),
    -- | The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    name :: (Core.Maybe Core.Text),
    -- | Ordered list of @TransitionRouteGroups@ added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page\'s transition route -> page\'s transition route group -> flow\'s transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:@projects\/\/locations\/\/agents\/\/flows\/\/transitionRouteGroups\/@ or @projects\/\/locations\/\/agents\/\/transitionRouteGroups\/@ for agent-level groups.
    transitionRouteGroups :: (Core.Maybe [Core.Text]),
    -- | A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow. When we are in a certain page, the TransitionRoutes are evaluated in the following order: * TransitionRoutes defined in the page with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in flow with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in the page with only condition specified. * TransitionRoutes defined in the transition route groups with only condition specified.
    transitionRoutes :: (Core.Maybe [GoogleCloudDialogflowCxV3TransitionRoute])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Page' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Page ::
  GoogleCloudDialogflowCxV3Page
newGoogleCloudDialogflowCxV3Page =
  GoogleCloudDialogflowCxV3Page
    { advancedSettings = Core.Nothing,
      description = Core.Nothing,
      displayName = Core.Nothing,
      entryFulfillment = Core.Nothing,
      eventHandlers = Core.Nothing,
      form = Core.Nothing,
      knowledgeConnectorSettings = Core.Nothing,
      name = Core.Nothing,
      transitionRouteGroups = Core.Nothing,
      transitionRoutes = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Page where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Page"
      ( \o ->
          GoogleCloudDialogflowCxV3Page
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "entryFulfillment")
            Core.<*> (o Core..:? "eventHandlers")
            Core.<*> (o Core..:? "form")
            Core.<*> (o Core..:? "knowledgeConnectorSettings")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "transitionRouteGroups")
            Core.<*> (o Core..:? "transitionRoutes")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Page where
  toJSON GoogleCloudDialogflowCxV3Page {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("entryFulfillment" Core..=) Core.<$> entryFulfillment,
            ("eventHandlers" Core..=) Core.<$> eventHandlers,
            ("form" Core..=) Core.<$> form,
            ("knowledgeConnectorSettings" Core..=)
              Core.<$> knowledgeConnectorSettings,
            ("name" Core..=) Core.<$> name,
            ("transitionRouteGroups" Core..=) Core.<$> transitionRouteGroups,
            ("transitionRoutes" Core..=) Core.<$> transitionRoutes
          ]
      )

-- | Represents page information communicated to and from the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3PageInfo' smart constructor.
data GoogleCloudDialogflowCxV3PageInfo = GoogleCloudDialogflowCxV3PageInfo
  { -- | Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the current page. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    currentPage :: (Core.Maybe Core.Text),
    -- | Always present for WebhookRequest. Ignored for WebhookResponse. The display name of the current page.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional for both WebhookRequest and WebhookResponse. Information about the form.
    formInfo :: (Core.Maybe GoogleCloudDialogflowCxV3PageInfoFormInfo)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3PageInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3PageInfo ::
  GoogleCloudDialogflowCxV3PageInfo
newGoogleCloudDialogflowCxV3PageInfo =
  GoogleCloudDialogflowCxV3PageInfo
    { currentPage = Core.Nothing,
      displayName = Core.Nothing,
      formInfo = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3PageInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3PageInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3PageInfo
            Core.<$> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "formInfo")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3PageInfo where
  toJSON GoogleCloudDialogflowCxV3PageInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("currentPage" Core..=) Core.<$> currentPage,
            ("displayName" Core..=) Core.<$> displayName,
            ("formInfo" Core..=) Core.<$> formInfo
          ]
      )

-- | Represents form information.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3PageInfoFormInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3PageInfoFormInfo = GoogleCloudDialogflowCxV3PageInfoFormInfo
  { -- | Optional for both WebhookRequest and WebhookResponse. The parameters contained in the form. Note that the webhook cannot add or remove any form parameter.
    parameterInfo ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3PageInfoFormInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3PageInfoFormInfo ::
  GoogleCloudDialogflowCxV3PageInfoFormInfo
newGoogleCloudDialogflowCxV3PageInfoFormInfo =
  GoogleCloudDialogflowCxV3PageInfoFormInfo
    { parameterInfo =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3PageInfoFormInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3PageInfoFormInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3PageInfoFormInfo
            Core.<$> (o Core..:? "parameterInfo")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3PageInfoFormInfo where
  toJSON GoogleCloudDialogflowCxV3PageInfoFormInfo {..} =
    Core.object
      (Core.catMaybes [("parameterInfo" Core..=) Core.<$> parameterInfo])

-- | Represents parameter information.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo' smart constructor.
data GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo = GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
  { -- | Always present for WebhookRequest. Required for WebhookResponse. The human-readable name of the parameter, unique within the form. This field cannot be modified by the webhook.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional for WebhookRequest. Ignored for WebhookResponse. Indicates if the parameter value was just collected on the last conversation turn.
    justCollected :: (Core.Maybe Core.Bool),
    -- | Optional for both WebhookRequest and WebhookResponse. Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.
    required :: (Core.Maybe Core.Bool),
    -- | Always present for WebhookRequest. Required for WebhookResponse. The state of the parameter. This field can be set to INVALID by the webhook to invalidate the parameter; other values set by the webhook will be ignored.
    state ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo_State
      ),
    -- | Optional for both WebhookRequest and WebhookResponse. The value of the parameter. This field can be set by the webhook to change the parameter value.
    value :: (Core.Maybe Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo ::
  GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
newGoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo =
  GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
    { displayName =
        Core.Nothing,
      justCollected = Core.Nothing,
      required = Core.Nothing,
      state = Core.Nothing,
      value = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "justCollected")
            Core.<*> (o Core..:? "required")
            Core.<*> (o Core..:? "state")
            Core.<*> (o Core..:? "value")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo
  where
  toJSON GoogleCloudDialogflowCxV3PageInfoFormInfoParameterInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayName" Core..=) Core.<$> displayName,
            ("justCollected" Core..=) Core.<$> justCollected,
            ("required" Core..=) Core.<$> required,
            ("state" Core..=) Core.<$> state,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | Text input which can be used for prompt or banned phrases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Phrase' smart constructor.
newtype GoogleCloudDialogflowCxV3Phrase = GoogleCloudDialogflowCxV3Phrase
  { -- | Required. Text input which can be used for prompt or banned phrases.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Phrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Phrase ::
  GoogleCloudDialogflowCxV3Phrase
newGoogleCloudDialogflowCxV3Phrase =
  GoogleCloudDialogflowCxV3Phrase {text = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3Phrase where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Phrase"
      ( \o ->
          GoogleCloudDialogflowCxV3Phrase Core.<$> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Phrase where
  toJSON GoogleCloudDialogflowCxV3Phrase {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Represents the query input. It can contain one of: 1. A conversational query in the form of text. 2. An intent query that specifies which intent to trigger. 3. Natural language speech audio to be processed. 4. An event to be triggered. 5. DTMF digits to invoke an intent and fill in parameter value. 6. The results of a tool executed by the client.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryInput' smart constructor.
data GoogleCloudDialogflowCxV3QueryInput = GoogleCloudDialogflowCxV3QueryInput
  { -- | The natural language speech audio to be processed.
    audio :: (Core.Maybe GoogleCloudDialogflowCxV3AudioInput),
    -- | The DTMF event to be handled.
    dtmf :: (Core.Maybe GoogleCloudDialogflowCxV3DtmfInput),
    -- | The event to be triggered.
    event :: (Core.Maybe GoogleCloudDialogflowCxV3EventInput),
    -- | The intent to be triggered.
    intent :: (Core.Maybe GoogleCloudDialogflowCxV3IntentInput),
    -- | Required. The language of the input. See <https://cloud.google.com/dialogflow/cx/docs/reference/language Language Support> for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
    languageCode :: (Core.Maybe Core.Text),
    -- | The natural language text to be processed.
    text :: (Core.Maybe GoogleCloudDialogflowCxV3TextInput)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryInput ::
  GoogleCloudDialogflowCxV3QueryInput
newGoogleCloudDialogflowCxV3QueryInput =
  GoogleCloudDialogflowCxV3QueryInput
    { audio = Core.Nothing,
      dtmf = Core.Nothing,
      event = Core.Nothing,
      intent = Core.Nothing,
      languageCode = Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3QueryInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryInput"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryInput
            Core.<$> (o Core..:? "audio")
            Core.<*> (o Core..:? "dtmf")
            Core.<*> (o Core..:? "event")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3QueryInput where
  toJSON GoogleCloudDialogflowCxV3QueryInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("audio" Core..=) Core.<$> audio,
            ("dtmf" Core..=) Core.<$> dtmf,
            ("event" Core..=) Core.<$> event,
            ("intent" Core..=) Core.<$> intent,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Represents the parameters of a conversational query.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryParameters' smart constructor.
data GoogleCloudDialogflowCxV3QueryParameters = GoogleCloudDialogflowCxV3QueryParameters
  { -- | Configures whether sentiment analysis should be performed. If not provided, sentiment analysis is not performed.
    analyzeQueryTextSentiment :: (Core.Maybe Core.Bool),
    -- | The channel which this query is for. If specified, only the ResponseMessage associated with the channel will be returned. If no ResponseMessage is associated with the channel, it falls back to the ResponseMessage with unspecified channel. If unspecified, the ResponseMessage with unspecified channel will be returned.
    channel :: (Core.Maybe Core.Text),
    -- | The unique identifier of the page to override the current page in the session. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@. If @current_page@ is specified, the previous state of the session will be ignored by Dialogflow, including the previous page and the previous session parameters. In most cases, current_page and parameters should be configured together to direct a session to a specific state.
    currentPage :: (Core.Maybe Core.Text),
    -- | Whether to disable webhook calls for this request.
    disableWebhook :: (Core.Maybe Core.Bool),
    -- | Optional. Information about the end-user to improve the relevance and accuracy of generative answers. This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure. Example: @json { \"subscription plan\": \"Business Premium Plus\", \"devices owned\": [ {\"model\": \"Google Pixel 7\"}, {\"model\": \"Google Pixel Tablet\"} ] }@
    endUserMetadata ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
      ),
    -- | A list of flow versions to override for the request. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@. If version 1 of flow X is included in this list, the traffic of flow X will go through version 1 regardless of the version configuration in the environment. Each flow can have at most one version specified in this list.
    flowVersions :: (Core.Maybe [Core.Text]),
    -- | The geo location of this conversational query.
    geoLocation :: (Core.Maybe GoogleTypeLatLng),
    -- | Additional parameters to be put into session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null. You can reference the session parameters in the agent with the following format: $session.params.parameter-id. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowCxV3QueryParameters_Parameters),
    -- | This field can be used to pass custom data into the webhook associated with the agent. Arbitrary JSON objects are supported. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: @{ \"telephony\": { \"caller_id\": \"+18558363987\" } }@
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3QueryParameters_Payload),
    -- | Optional. If set to true and data stores are involved in serving the request then DetectIntentResponse.query/result.data/store/connection/signals will be filled with data that can help evaluations.
    populateDataStoreConnectionSignals :: (Core.Maybe Core.Bool),
    -- | Optional. Search configuration for UCS search queries.
    searchConfig :: (Core.Maybe GoogleCloudDialogflowCxV3SearchConfig),
    -- | Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session of this query.
    sessionEntityTypes :: (Core.Maybe [GoogleCloudDialogflowCxV3SessionEntityType]),
    -- | Optional. Configure lifetime of the Dialogflow session. By default, a Dialogflow session remains active and its data is stored for 30 minutes after the last request is sent for the session. This value should be no longer than 1 day.
    sessionTtl :: (Core.Maybe Core.Duration),
    -- | The time zone of this conversational query from the <https://www.iana.org/time-zones time zone database>, e.g., America\/New_York, Europe\/Paris. If not provided, the time zone specified in the agent is used.
    timeZone :: (Core.Maybe Core.Text),
    -- | This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook along with the headers that have been configured through Dialogflow web console. The headers defined within this field will overwrite the headers configured through Dialogflow console if there is a conflict. Header names are case-insensitive. Google\'s specified headers are not allowed. Including: \"Host\", \"Content-Length\", \"Connection\", \"From\", \"User-Agent\", \"Accept-Encoding\", \"If-Modified-Since\", \"If-None-Match\", \"X-Forwarded-For\", etc.
    webhookHeaders ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryParameters ::
  GoogleCloudDialogflowCxV3QueryParameters
newGoogleCloudDialogflowCxV3QueryParameters =
  GoogleCloudDialogflowCxV3QueryParameters
    { analyzeQueryTextSentiment =
        Core.Nothing,
      channel = Core.Nothing,
      currentPage = Core.Nothing,
      disableWebhook = Core.Nothing,
      endUserMetadata = Core.Nothing,
      flowVersions = Core.Nothing,
      geoLocation = Core.Nothing,
      parameters = Core.Nothing,
      payload = Core.Nothing,
      populateDataStoreConnectionSignals = Core.Nothing,
      searchConfig = Core.Nothing,
      sessionEntityTypes = Core.Nothing,
      sessionTtl = Core.Nothing,
      timeZone = Core.Nothing,
      webhookHeaders = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3QueryParameters where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryParameters
            Core.<$> (o Core..:? "analyzeQueryTextSentiment")
            Core.<*> (o Core..:? "channel")
            Core.<*> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "disableWebhook")
            Core.<*> (o Core..:? "endUserMetadata")
            Core.<*> (o Core..:? "flowVersions")
            Core.<*> (o Core..:? "geoLocation")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "populateDataStoreConnectionSignals")
            Core.<*> (o Core..:? "searchConfig")
            Core.<*> (o Core..:? "sessionEntityTypes")
            Core.<*> (o Core..:? "sessionTtl")
            Core.<*> (o Core..:? "timeZone")
            Core.<*> (o Core..:? "webhookHeaders")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3QueryParameters where
  toJSON GoogleCloudDialogflowCxV3QueryParameters {..} =
    Core.object
      ( Core.catMaybes
          [ ("analyzeQueryTextSentiment" Core..=)
              Core.<$> analyzeQueryTextSentiment,
            ("channel" Core..=) Core.<$> channel,
            ("currentPage" Core..=) Core.<$> currentPage,
            ("disableWebhook" Core..=) Core.<$> disableWebhook,
            ("endUserMetadata" Core..=) Core.<$> endUserMetadata,
            ("flowVersions" Core..=) Core.<$> flowVersions,
            ("geoLocation" Core..=) Core.<$> geoLocation,
            ("parameters" Core..=) Core.<$> parameters,
            ("payload" Core..=) Core.<$> payload,
            ("populateDataStoreConnectionSignals" Core..=)
              Core.<$> populateDataStoreConnectionSignals,
            ("searchConfig" Core..=) Core.<$> searchConfig,
            ("sessionEntityTypes" Core..=) Core.<$> sessionEntityTypes,
            ("sessionTtl" Core..=) Core.<$> sessionTtl,
            ("timeZone" Core..=) Core.<$> timeZone,
            ("webhookHeaders" Core..=) Core.<$> webhookHeaders
          ]
      )

-- | Optional. Information about the end-user to improve the relevance and accuracy of generative answers. This will be interpreted and used by a language model, so, for good results, the data should be self-descriptive, and in a simple structure. Example: @json { \"subscription plan\": \"Business Premium Plus\", \"devices owned\": [ {\"model\": \"Google Pixel 7\"}, {\"model\": \"Google Pixel Tablet\"} ] }@
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata = GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
newGoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
  additional =
    GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata
  where
  toJSON GoogleCloudDialogflowCxV3QueryParameters_EndUserMetadata {..} =
    Core.toJSON additional

-- | Additional parameters to be put into session parameters. To remove a parameter from the session, clients should explicitly set the parameter value to null. You can reference the session parameters in the agent with the following format: $session.params.parameter-id. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryParameters_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryParameters_Parameters = GoogleCloudDialogflowCxV3QueryParameters_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryParameters_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryParameters_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3QueryParameters_Parameters
newGoogleCloudDialogflowCxV3QueryParameters_Parameters additional =
  GoogleCloudDialogflowCxV3QueryParameters_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryParameters_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryParameters_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryParameters_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryParameters_Parameters
  where
  toJSON GoogleCloudDialogflowCxV3QueryParameters_Parameters {..} =
    Core.toJSON additional

-- | This field can be used to pass custom data into the webhook associated with the agent. Arbitrary JSON objects are supported. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: @{ \"telephony\": { \"caller_id\": \"+18558363987\" } }@
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryParameters_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryParameters_Payload = GoogleCloudDialogflowCxV3QueryParameters_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryParameters_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryParameters_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3QueryParameters_Payload
newGoogleCloudDialogflowCxV3QueryParameters_Payload additional =
  GoogleCloudDialogflowCxV3QueryParameters_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryParameters_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryParameters_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryParameters_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryParameters_Payload
  where
  toJSON GoogleCloudDialogflowCxV3QueryParameters_Payload {..} =
    Core.toJSON additional

-- | This field can be used to pass HTTP headers for a webhook call. These headers will be sent to webhook along with the headers that have been configured through Dialogflow web console. The headers defined within this field will overwrite the headers configured through Dialogflow console if there is a conflict. Header names are case-insensitive. Google\'s specified headers are not allowed. Including: \"Host\", \"Content-Length\", \"Connection\", \"From\", \"User-Agent\", \"Accept-Encoding\", \"If-Modified-Since\", \"If-None-Match\", \"X-Forwarded-For\", etc.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders = GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
newGoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
  additional =
    GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders
  where
  toJSON GoogleCloudDialogflowCxV3QueryParameters_WebhookHeaders {..} =
    Core.toJSON additional

-- | Represents the result of a conversational query.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryResult' smart constructor.
data GoogleCloudDialogflowCxV3QueryResult = GoogleCloudDialogflowCxV3QueryResult
  { -- | Returns the current advanced settings including IVR settings. Even though the operations configured by these settings are performed by Dialogflow, the client may need to perform special logic at the moment. For example, if Dialogflow exports audio to Google Cloud Storage, then the client may need to wait for the resulting object to appear in the bucket before proceeding.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3AdvancedSettings),
    -- | Indicates whether the Thumbs up\/Thumbs down rating controls are need to be shown for the response in the Dialogflow Messenger widget.
    allowAnswerFeedback :: (Core.Maybe Core.Bool),
    -- | The current Page. Some, not all fields are filled in this message, including but not limited to @name@ and @display_name@.
    currentPage :: (Core.Maybe GoogleCloudDialogflowCxV3Page),
    -- | Optional. Data store connection feature output signals. Filled only when data stores are involved in serving the query.
    dataStoreConnectionSignals :: (Core.Maybe GoogleCloudDialogflowCxV3DataStoreConnectionSignals),
    -- | The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure. One of the fields is called \"Alternative Matched Intents\", which may aid with debugging. The following describes these intent results: - The list is empty if no intent was matched to end-user input. - Only intents that are referenced in the currently active flow are included. - The matched intent is included. - Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of <https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope scope>, are included. - Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
    diagnosticInfo :: (Core.Maybe GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo),
    -- | If a DTMF was provided as input, this field will contain a copy of the DtmfInput.
    dtmf :: (Core.Maybe GoogleCloudDialogflowCxV3DtmfInput),
    -- | The Intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: @name@ and @display_name@. This field is deprecated, please use QueryResult.match instead.
    intent :: (Core.Maybe GoogleCloudDialogflowCxV3Intent),
    -- | The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. This field is deprecated, please use QueryResult.match instead.
    intentDetectionConfidence :: (Core.Maybe Core.Double),
    -- | The language that was triggered during intent detection. See <https://cloud.google.com/dialogflow/cx/docs/reference/language Language Support> for a list of the currently supported language codes.
    languageCode :: (Core.Maybe Core.Text),
    -- | Intent match result, could be an intent or an event.
    match :: (Core.Maybe GoogleCloudDialogflowCxV3Match),
    -- | The collected session parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowCxV3QueryResult_Parameters),
    -- | The list of rich messages returned to the client. Responses vary from simple text messages to more sophisticated, structured payloads used to drive complex logic.
    responseMessages :: (Core.Maybe [GoogleCloudDialogflowCxV3ResponseMessage]),
    -- | The sentiment analyss result, which depends on @analyze_query_text_sentiment@, specified in the request.
    sentimentAnalysisResult :: (Core.Maybe GoogleCloudDialogflowCxV3SentimentAnalysisResult),
    -- | If natural language text was provided as input, this field will contain a copy of the text.
    text :: (Core.Maybe Core.Text),
    -- | If natural language speech audio was provided as input, this field will contain the transcript for the audio.
    transcript :: (Core.Maybe Core.Text),
    -- | If an event was provided as input, this field will contain the name of the event.
    triggerEvent :: (Core.Maybe Core.Text),
    -- | If an intent was provided as input, this field will contain a copy of the intent identifier. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    triggerIntent :: (Core.Maybe Core.Text),
    -- | The list of webhook payload in WebhookResponse.payload, in the order of call sequence. If some webhook call fails or doesn\'t return any payload, an empty @Struct@ would be used instead.
    webhookPayloads ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem]
      ),
    -- | The list of webhook call status in the order of call sequence.
    webhookStatuses :: (Core.Maybe [GoogleRpcStatus])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryResult ::
  GoogleCloudDialogflowCxV3QueryResult
newGoogleCloudDialogflowCxV3QueryResult =
  GoogleCloudDialogflowCxV3QueryResult
    { advancedSettings =
        Core.Nothing,
      allowAnswerFeedback = Core.Nothing,
      currentPage = Core.Nothing,
      dataStoreConnectionSignals = Core.Nothing,
      diagnosticInfo = Core.Nothing,
      dtmf = Core.Nothing,
      intent = Core.Nothing,
      intentDetectionConfidence = Core.Nothing,
      languageCode = Core.Nothing,
      match = Core.Nothing,
      parameters = Core.Nothing,
      responseMessages = Core.Nothing,
      sentimentAnalysisResult = Core.Nothing,
      text = Core.Nothing,
      transcript = Core.Nothing,
      triggerEvent = Core.Nothing,
      triggerIntent = Core.Nothing,
      webhookPayloads = Core.Nothing,
      webhookStatuses = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3QueryResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryResult"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryResult
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "allowAnswerFeedback")
            Core.<*> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "dataStoreConnectionSignals")
            Core.<*> (o Core..:? "diagnosticInfo")
            Core.<*> (o Core..:? "dtmf")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "intentDetectionConfidence")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "match")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "responseMessages")
            Core.<*> (o Core..:? "sentimentAnalysisResult")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "transcript")
            Core.<*> (o Core..:? "triggerEvent")
            Core.<*> (o Core..:? "triggerIntent")
            Core.<*> (o Core..:? "webhookPayloads")
            Core.<*> (o Core..:? "webhookStatuses")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3QueryResult where
  toJSON GoogleCloudDialogflowCxV3QueryResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("allowAnswerFeedback" Core..=) Core.<$> allowAnswerFeedback,
            ("currentPage" Core..=) Core.<$> currentPage,
            ("dataStoreConnectionSignals" Core..=)
              Core.<$> dataStoreConnectionSignals,
            ("diagnosticInfo" Core..=) Core.<$> diagnosticInfo,
            ("dtmf" Core..=) Core.<$> dtmf,
            ("intent" Core..=) Core.<$> intent,
            ("intentDetectionConfidence" Core..=)
              Core.<$> intentDetectionConfidence,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("match" Core..=) Core.<$> match,
            ("parameters" Core..=) Core.<$> parameters,
            ("responseMessages" Core..=) Core.<$> responseMessages,
            ("sentimentAnalysisResult" Core..=)
              Core.<$> sentimentAnalysisResult,
            ("text" Core..=) Core.<$> text,
            ("transcript" Core..=) Core.<$> transcript,
            ("triggerEvent" Core..=) Core.<$> triggerEvent,
            ("triggerIntent" Core..=) Core.<$> triggerIntent,
            ("webhookPayloads" Core..=) Core.<$> webhookPayloads,
            ("webhookStatuses" Core..=) Core.<$> webhookStatuses
          ]
      )

-- | The free-form diagnostic info. For example, this field could contain webhook call latency. The fields of this data can change without notice, so you should not write code that depends on its structure. One of the fields is called \"Alternative Matched Intents\", which may aid with debugging. The following describes these intent results: - The list is empty if no intent was matched to end-user input. - Only intents that are referenced in the currently active flow are included. - The matched intent is included. - Other intents that could have matched end-user input, but did not match because they are referenced by intent routes that are out of <https://cloud.google.com/dialogflow/cx/docs/concept/handler#scope scope>, are included. - Other intents referenced by intent routes in scope that matched end-user input, but had a lower confidence score.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo = GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
newGoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo additional =
  GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo
  where
  toJSON GoogleCloudDialogflowCxV3QueryResult_DiagnosticInfo {..} =
    Core.toJSON additional

-- | The collected session parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryResult_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryResult_Parameters = GoogleCloudDialogflowCxV3QueryResult_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryResult_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryResult_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3QueryResult_Parameters
newGoogleCloudDialogflowCxV3QueryResult_Parameters additional =
  GoogleCloudDialogflowCxV3QueryResult_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryResult_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryResult_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryResult_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryResult_Parameters
  where
  toJSON GoogleCloudDialogflowCxV3QueryResult_Parameters {..} =
    Core.toJSON additional

--
-- /See:/ 'newGoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem' smart constructor.
newtype GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem = GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
newGoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
  additional =
    GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem"
      ( \o ->
          GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem
  where
  toJSON GoogleCloudDialogflowCxV3QueryResult_WebhookPayloadsItem {..} =
    Core.toJSON additional

-- | Resource name and display name.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResourceName' smart constructor.
data GoogleCloudDialogflowCxV3ResourceName = GoogleCloudDialogflowCxV3ResourceName
  { -- | Display name.
    displayName :: (Core.Maybe Core.Text),
    -- | Name.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResourceName' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResourceName ::
  GoogleCloudDialogflowCxV3ResourceName
newGoogleCloudDialogflowCxV3ResourceName =
  GoogleCloudDialogflowCxV3ResourceName
    { displayName = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ResourceName where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResourceName"
      ( \o ->
          GoogleCloudDialogflowCxV3ResourceName
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ResourceName where
  toJSON GoogleCloudDialogflowCxV3ResourceName {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayName" Core..=) Core.<$> displayName,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessage' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessage = GoogleCloudDialogflowCxV3ResponseMessage
  { -- | The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned.
    channel :: (Core.Maybe Core.Text),
    -- | Indicates that the conversation succeeded.
    conversationSuccess ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
      ),
    -- | Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches @END_SESSION@ page. It is not supposed to be defined by the user. It\'s guaranteed that there is at most one such message in each response.
    endInteraction :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessageEndInteraction),
    -- | Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger.
    knowledgeInfoCard ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
      ),
    -- | Hands off conversation to a human agent.
    liveAgentHandoff ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
      ),
    -- | Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.
    mixedAudio :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessageMixedAudio),
    -- | A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.
    outputAudioText ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
      ),
    -- | Returns a response containing a custom, platform-specific payload.
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessage_Payload),
    -- | Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.
    playAudio :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessagePlayAudio),
    -- | Response type.
    responseType :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessage_ResponseType),
    -- | A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.
    telephonyTransferCall ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
      ),
    -- | Returns a text response.
    text :: (Core.Maybe GoogleCloudDialogflowCxV3ResponseMessageText)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessage ::
  GoogleCloudDialogflowCxV3ResponseMessage
newGoogleCloudDialogflowCxV3ResponseMessage =
  GoogleCloudDialogflowCxV3ResponseMessage
    { channel = Core.Nothing,
      conversationSuccess = Core.Nothing,
      endInteraction = Core.Nothing,
      knowledgeInfoCard = Core.Nothing,
      liveAgentHandoff = Core.Nothing,
      mixedAudio = Core.Nothing,
      outputAudioText = Core.Nothing,
      payload = Core.Nothing,
      playAudio = Core.Nothing,
      responseType = Core.Nothing,
      telephonyTransferCall = Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ResponseMessage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessage"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessage
            Core.<$> (o Core..:? "channel")
            Core.<*> (o Core..:? "conversationSuccess")
            Core.<*> (o Core..:? "endInteraction")
            Core.<*> (o Core..:? "knowledgeInfoCard")
            Core.<*> (o Core..:? "liveAgentHandoff")
            Core.<*> (o Core..:? "mixedAudio")
            Core.<*> (o Core..:? "outputAudioText")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "playAudio")
            Core.<*> (o Core..:? "responseType")
            Core.<*> (o Core..:? "telephonyTransferCall")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ResponseMessage where
  toJSON GoogleCloudDialogflowCxV3ResponseMessage {..} =
    Core.object
      ( Core.catMaybes
          [ ("channel" Core..=) Core.<$> channel,
            ("conversationSuccess" Core..=) Core.<$> conversationSuccess,
            ("endInteraction" Core..=) Core.<$> endInteraction,
            ("knowledgeInfoCard" Core..=) Core.<$> knowledgeInfoCard,
            ("liveAgentHandoff" Core..=) Core.<$> liveAgentHandoff,
            ("mixedAudio" Core..=) Core.<$> mixedAudio,
            ("outputAudioText" Core..=) Core.<$> outputAudioText,
            ("payload" Core..=) Core.<$> payload,
            ("playAudio" Core..=) Core.<$> playAudio,
            ("responseType" Core..=) Core.<$> responseType,
            ("telephonyTransferCall" Core..=) Core.<$> telephonyTransferCall,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Returns a response containing a custom, platform-specific payload.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessage_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessage_Payload = GoogleCloudDialogflowCxV3ResponseMessage_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessage_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessage_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3ResponseMessage_Payload
newGoogleCloudDialogflowCxV3ResponseMessage_Payload additional =
  GoogleCloudDialogflowCxV3ResponseMessage_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessage_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessage_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessage_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessage_Payload
  where
  toJSON GoogleCloudDialogflowCxV3ResponseMessage_Payload {..} =
    Core.toJSON additional

-- | Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. Dialogflow only uses this to determine which conversations should be counted as successful and doesn\'t process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don\'t return ConversationSuccess. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess = GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
  { -- | Custom metadata. Dialogflow doesn\'t impose any structure on this.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess ::
  GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess =
  GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
    { metadata =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
            Core.<$> (o Core..:? "metadata")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess
  where
  toJSON
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess {..} =
      Core.object
        (Core.catMaybes [("metadata" Core..=) Core.<$> metadata])

-- | Custom metadata. Dialogflow doesn\'t impose any structure on this.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata = GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
newGoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
  additional =
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata
  where
  toJSON
    GoogleCloudDialogflowCxV3ResponseMessageConversationSuccess_Metadata {..} =
      Core.toJSON additional

-- | Indicates that interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only and not supposed to be defined by the user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageEndInteraction' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessageEndInteraction = GoogleCloudDialogflowCxV3ResponseMessageEndInteraction
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageEndInteraction' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageEndInteraction ::
  GoogleCloudDialogflowCxV3ResponseMessageEndInteraction
newGoogleCloudDialogflowCxV3ResponseMessageEndInteraction =
  GoogleCloudDialogflowCxV3ResponseMessageEndInteraction

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageEndInteraction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageEndInteraction"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3ResponseMessageEndInteraction
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageEndInteraction
  where
  toJSON = Core.const Core.emptyObject

-- | Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard = GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard ::
  GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
newGoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard =
  GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard"
      ( \o ->
          Core.pure
            GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageKnowledgeInfoCard
  where
  toJSON = Core.const Core.emptyObject

-- | Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff = GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
  { -- | Custom metadata for your handoff procedure. Dialogflow doesn\'t impose any structure on this.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff ::
  GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff =
  GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
    { metadata =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
            Core.<$> (o Core..:? "metadata")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff
  where
  toJSON GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff {..} =
    Core.object
      (Core.catMaybes [("metadata" Core..=) Core.<$> metadata])

-- | Custom metadata for your handoff procedure. Dialogflow doesn\'t impose any structure on this.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata = GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
newGoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
  additional =
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata
  where
  toJSON
    GoogleCloudDialogflowCxV3ResponseMessageLiveAgentHandoff_Metadata {..} =
      Core.toJSON additional

-- | Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. The external URIs are specified via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageMixedAudio' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessageMixedAudio = GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
  { -- | Segments this audio response is composed of.
    segments ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageMixedAudio' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageMixedAudio ::
  GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
newGoogleCloudDialogflowCxV3ResponseMessageMixedAudio =
  GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
    { segments =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageMixedAudio"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
            Core.<$> (o Core..:? "segments")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudio
  where
  toJSON GoogleCloudDialogflowCxV3ResponseMessageMixedAudio {..} =
    Core.object
      (Core.catMaybes [("segments" Core..=) Core.<$> segments])

-- | Represents one segment of audio.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment = GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
  { -- | Output only. Whether the playback of this segment can be interrupted by the end user\'s speech and the client should then start the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Raw audio synthesized from the Dialogflow agent\'s response using the output config specified in the request.
    audio :: (Core.Maybe Core.Base64),
    -- | Client-specific URI that points to an audio clip accessible to the client. Dialogflow does not impose any validation on it.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment ::
  GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
newGoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment =
  GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
    { allowPlaybackInterruption =
        Core.Nothing,
      audio = Core.Nothing,
      uri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "audio")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment
  where
  toJSON
    GoogleCloudDialogflowCxV3ResponseMessageMixedAudioSegment {..} =
      Core.object
        ( Core.catMaybes
            [ ("allowPlaybackInterruption" Core..=)
                Core.<$> allowPlaybackInterruption,
              ("audio" Core..=) Core.<$> audio,
              ("uri" Core..=) Core.<$> uri
            ]
        )

-- | A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageOutputAudioText' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText = GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
  { -- | Output only. Whether the playback of this message can be interrupted by the end user\'s speech and the client can then starts the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | The SSML text to be synthesized. For more information, see </speech/text-to-speech/docs/ssml SSML>.
    ssml :: (Core.Maybe Core.Text),
    -- | The raw text to be synthesized.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageOutputAudioText ::
  GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
newGoogleCloudDialogflowCxV3ResponseMessageOutputAudioText =
  GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
    { allowPlaybackInterruption =
        Core.Nothing,
      ssml = Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "ssml")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText
  where
  toJSON GoogleCloudDialogflowCxV3ResponseMessageOutputAudioText {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowPlaybackInterruption" Core..=)
              Core.<$> allowPlaybackInterruption,
            ("ssml" Core..=) Core.<$> ssml,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Specifies an audio clip to be played by the client as part of the response.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessagePlayAudio' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessagePlayAudio = GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
  { -- | Output only. Whether the playback of this message can be interrupted by the end user\'s speech and the client can then starts the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Required. URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it.
    audioUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessagePlayAudio' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessagePlayAudio ::
  GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
newGoogleCloudDialogflowCxV3ResponseMessagePlayAudio =
  GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
    { allowPlaybackInterruption =
        Core.Nothing,
      audioUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessagePlayAudio"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "audioUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessagePlayAudio
  where
  toJSON GoogleCloudDialogflowCxV3ResponseMessagePlayAudio {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowPlaybackInterruption" Core..=)
              Core.<$> allowPlaybackInterruption,
            ("audioUri" Core..=) Core.<$> audioUri
          ]
      )

-- | Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall' smart constructor.
newtype GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall = GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
  { -- | Transfer the call to a phone number in <https://en.wikipedia.org/wiki/E.164 E.164 format>.
    phoneNumber :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall ::
  GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
newGoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall =
  GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
    { phoneNumber =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
            Core.<$> (o Core..:? "phoneNumber")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall
  where
  toJSON
    GoogleCloudDialogflowCxV3ResponseMessageTelephonyTransferCall {..} =
      Core.object
        (Core.catMaybes [("phoneNumber" Core..=) Core.<$> phoneNumber])

-- | The text response message.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ResponseMessageText' smart constructor.
data GoogleCloudDialogflowCxV3ResponseMessageText = GoogleCloudDialogflowCxV3ResponseMessageText
  { -- | Output only. Whether the playback of this message can be interrupted by the end user\'s speech and the client can then starts the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.
    text :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ResponseMessageText' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ResponseMessageText ::
  GoogleCloudDialogflowCxV3ResponseMessageText
newGoogleCloudDialogflowCxV3ResponseMessageText =
  GoogleCloudDialogflowCxV3ResponseMessageText
    { allowPlaybackInterruption =
        Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ResponseMessageText where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ResponseMessageText"
      ( \o ->
          GoogleCloudDialogflowCxV3ResponseMessageText
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ResponseMessageText where
  toJSON GoogleCloudDialogflowCxV3ResponseMessageText {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowPlaybackInterruption" Core..=)
              Core.<$> allowPlaybackInterruption,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | The request message for Agents.RestoreAgent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RestoreAgentRequest' smart constructor.
data GoogleCloudDialogflowCxV3RestoreAgentRequest = GoogleCloudDialogflowCxV3RestoreAgentRequest
  { -- | Uncompressed raw byte content for agent.
    agentContent :: (Core.Maybe Core.Base64),
    -- | The <https://cloud.google.com/storage/docs/ Google Cloud Storage> URI to restore agent from. The format of this URI must be @gs:\/\/\/@. Dialogflow performs a read operation for the Cloud Storage object on the caller\'s behalf, so your request authentication must have read permissions for the object. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/access-control#storage Dialogflow access control>.
    agentUri :: (Core.Maybe Core.Text),
    -- | Setting for restoring from a git branch
    gitSource :: (Core.Maybe GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource),
    -- | Agent restore mode. If not specified, @KEEP@ is assumed.
    restoreOption ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3RestoreAgentRequest_RestoreOption
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RestoreAgentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RestoreAgentRequest ::
  GoogleCloudDialogflowCxV3RestoreAgentRequest
newGoogleCloudDialogflowCxV3RestoreAgentRequest =
  GoogleCloudDialogflowCxV3RestoreAgentRequest
    { agentContent =
        Core.Nothing,
      agentUri = Core.Nothing,
      gitSource = Core.Nothing,
      restoreOption = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3RestoreAgentRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RestoreAgentRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3RestoreAgentRequest
            Core.<$> (o Core..:? "agentContent")
            Core.<*> (o Core..:? "agentUri")
            Core.<*> (o Core..:? "gitSource")
            Core.<*> (o Core..:? "restoreOption")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3RestoreAgentRequest where
  toJSON GoogleCloudDialogflowCxV3RestoreAgentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentContent" Core..=) Core.<$> agentContent,
            ("agentUri" Core..=) Core.<$> agentUri,
            ("gitSource" Core..=) Core.<$> gitSource,
            ("restoreOption" Core..=) Core.<$> restoreOption
          ]
      )

-- | Settings for restoring from a git branch
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RestoreAgentRequestGitSource' smart constructor.
newtype GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource = GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
  { -- | tracking branch for the git pull
    trackingBranch :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RestoreAgentRequestGitSource ::
  GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
newGoogleCloudDialogflowCxV3RestoreAgentRequestGitSource =
  GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
    { trackingBranch =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource"
      ( \o ->
          GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
            Core.<$> (o Core..:? "trackingBranch")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource
  where
  toJSON GoogleCloudDialogflowCxV3RestoreAgentRequestGitSource {..} =
    Core.object
      ( Core.catMaybes
          [("trackingBranch" Core..=) Core.<$> trackingBranch]
      )

-- | The configuration for auto rollout.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RolloutConfig' smart constructor.
data GoogleCloudDialogflowCxV3RolloutConfig = GoogleCloudDialogflowCxV3RolloutConfig
  { -- | The conditions that are used to evaluate the failure of a rollout step. If not specified, no rollout steps will fail. E.g. \"containment/rate \< 10% OR average/turn_count \< 3\". See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>.
    failureCondition :: (Core.Maybe Core.Text),
    -- | The conditions that are used to evaluate the success of a rollout step. If not specified, all rollout steps will proceed to the next one unless failure conditions are met. E.g. \"containment/rate > 60% AND callback/rate \< 20%\". See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>.
    rolloutCondition :: (Core.Maybe Core.Text),
    -- | Steps to roll out a flow version. Steps should be sorted by percentage in ascending order.
    rolloutSteps :: (Core.Maybe [GoogleCloudDialogflowCxV3RolloutConfigRolloutStep])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RolloutConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RolloutConfig ::
  GoogleCloudDialogflowCxV3RolloutConfig
newGoogleCloudDialogflowCxV3RolloutConfig =
  GoogleCloudDialogflowCxV3RolloutConfig
    { failureCondition =
        Core.Nothing,
      rolloutCondition = Core.Nothing,
      rolloutSteps = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3RolloutConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RolloutConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3RolloutConfig
            Core.<$> (o Core..:? "failureCondition")
            Core.<*> (o Core..:? "rolloutCondition")
            Core.<*> (o Core..:? "rolloutSteps")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3RolloutConfig where
  toJSON GoogleCloudDialogflowCxV3RolloutConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("failureCondition" Core..=) Core.<$> failureCondition,
            ("rolloutCondition" Core..=) Core.<$> rolloutCondition,
            ("rolloutSteps" Core..=) Core.<$> rolloutSteps
          ]
      )

-- | A single rollout step with specified traffic allocation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RolloutConfigRolloutStep' smart constructor.
data GoogleCloudDialogflowCxV3RolloutConfigRolloutStep = GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
  { -- | The name of the rollout step;
    displayName :: (Core.Maybe Core.Text),
    -- | The minimum time that this step should last. Should be longer than 1 hour. If not set, the default minimum duration for each step will be 1 hour.
    minDuration :: (Core.Maybe Core.Duration),
    -- | The percentage of traffic allocated to the flow version of this rollout step. (0%, 100%].
    trafficPercent :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RolloutConfigRolloutStep' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RolloutConfigRolloutStep ::
  GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
newGoogleCloudDialogflowCxV3RolloutConfigRolloutStep =
  GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
    { displayName =
        Core.Nothing,
      minDuration = Core.Nothing,
      trafficPercent = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RolloutConfigRolloutStep"
      ( \o ->
          GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "minDuration")
            Core.<*> (o Core..:? "trafficPercent")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3RolloutConfigRolloutStep
  where
  toJSON GoogleCloudDialogflowCxV3RolloutConfigRolloutStep {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayName" Core..=) Core.<$> displayName,
            ("minDuration" Core..=) Core.<$> minDuration,
            ("trafficPercent" Core..=) Core.<$> trafficPercent
          ]
      )

-- | State of the auto-rollout process.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RolloutState' smart constructor.
data GoogleCloudDialogflowCxV3RolloutState = GoogleCloudDialogflowCxV3RolloutState
  { -- | Start time of the current step.
    startTime :: (Core.Maybe Core.DateTime),
    -- | Display name of the current auto rollout step.
    step :: (Core.Maybe Core.Text),
    -- | Index of the current step in the auto rollout steps list.
    stepIndex :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RolloutState' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RolloutState ::
  GoogleCloudDialogflowCxV3RolloutState
newGoogleCloudDialogflowCxV3RolloutState =
  GoogleCloudDialogflowCxV3RolloutState
    { startTime = Core.Nothing,
      step = Core.Nothing,
      stepIndex = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3RolloutState where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RolloutState"
      ( \o ->
          GoogleCloudDialogflowCxV3RolloutState
            Core.<$> (o Core..:? "startTime")
            Core.<*> (o Core..:? "step")
            Core.<*> (o Core..:? "stepIndex")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3RolloutState where
  toJSON GoogleCloudDialogflowCxV3RolloutState {..} =
    Core.object
      ( Core.catMaybes
          [ ("startTime" Core..=) Core.<$> startTime,
            ("step" Core..=) Core.<$> step,
            ("stepIndex" Core..=) Core.<$> stepIndex
          ]
      )

-- | Metadata returned for the Environments.RunContinuousTest long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RunContinuousTestMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3RunContinuousTestMetadata = GoogleCloudDialogflowCxV3RunContinuousTestMetadata
  { -- | The test errors.
    errors :: (Core.Maybe [GoogleCloudDialogflowCxV3TestError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RunContinuousTestMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RunContinuousTestMetadata ::
  GoogleCloudDialogflowCxV3RunContinuousTestMetadata
newGoogleCloudDialogflowCxV3RunContinuousTestMetadata =
  GoogleCloudDialogflowCxV3RunContinuousTestMetadata
    { errors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3RunContinuousTestMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RunContinuousTestMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3RunContinuousTestMetadata
            Core.<$> (o Core..:? "errors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3RunContinuousTestMetadata
  where
  toJSON GoogleCloudDialogflowCxV3RunContinuousTestMetadata {..} =
    Core.object (Core.catMaybes [("errors" Core..=) Core.<$> errors])

-- | The request message for Environments.RunContinuousTest.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RunContinuousTestRequest' smart constructor.
data GoogleCloudDialogflowCxV3RunContinuousTestRequest = GoogleCloudDialogflowCxV3RunContinuousTestRequest
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RunContinuousTestRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RunContinuousTestRequest ::
  GoogleCloudDialogflowCxV3RunContinuousTestRequest
newGoogleCloudDialogflowCxV3RunContinuousTestRequest =
  GoogleCloudDialogflowCxV3RunContinuousTestRequest

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3RunContinuousTestRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RunContinuousTestRequest"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3RunContinuousTestRequest
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3RunContinuousTestRequest
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for Environments.RunContinuousTest.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RunContinuousTestResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3RunContinuousTestResponse = GoogleCloudDialogflowCxV3RunContinuousTestResponse
  { -- | The result for a continuous test run.
    continuousTestResult :: (Core.Maybe GoogleCloudDialogflowCxV3ContinuousTestResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RunContinuousTestResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RunContinuousTestResponse ::
  GoogleCloudDialogflowCxV3RunContinuousTestResponse
newGoogleCloudDialogflowCxV3RunContinuousTestResponse =
  GoogleCloudDialogflowCxV3RunContinuousTestResponse
    { continuousTestResult =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3RunContinuousTestResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RunContinuousTestResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3RunContinuousTestResponse
            Core.<$> (o Core..:? "continuousTestResult")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3RunContinuousTestResponse
  where
  toJSON GoogleCloudDialogflowCxV3RunContinuousTestResponse {..} =
    Core.object
      ( Core.catMaybes
          [("continuousTestResult" Core..=) Core.<$> continuousTestResult]
      )

-- | Metadata returned for the TestCases.RunTestCase long running operation. This message currently has no fields.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RunTestCaseMetadata' smart constructor.
data GoogleCloudDialogflowCxV3RunTestCaseMetadata = GoogleCloudDialogflowCxV3RunTestCaseMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RunTestCaseMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RunTestCaseMetadata ::
  GoogleCloudDialogflowCxV3RunTestCaseMetadata
newGoogleCloudDialogflowCxV3RunTestCaseMetadata =
  GoogleCloudDialogflowCxV3RunTestCaseMetadata

instance Core.FromJSON GoogleCloudDialogflowCxV3RunTestCaseMetadata where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RunTestCaseMetadata"
      (\o -> Core.pure GoogleCloudDialogflowCxV3RunTestCaseMetadata)

instance Core.ToJSON GoogleCloudDialogflowCxV3RunTestCaseMetadata where
  toJSON = Core.const Core.emptyObject

-- | The request message for TestCases.RunTestCase.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RunTestCaseRequest' smart constructor.
newtype GoogleCloudDialogflowCxV3RunTestCaseRequest = GoogleCloudDialogflowCxV3RunTestCaseRequest
  { -- | Optional. Environment name. If not set, draft environment is assumed. Format: @projects\/\/locations\/\/agents\/\/environments\/@.
    environment :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RunTestCaseRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RunTestCaseRequest ::
  GoogleCloudDialogflowCxV3RunTestCaseRequest
newGoogleCloudDialogflowCxV3RunTestCaseRequest =
  GoogleCloudDialogflowCxV3RunTestCaseRequest
    { environment =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3RunTestCaseRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RunTestCaseRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3RunTestCaseRequest
            Core.<$> (o Core..:? "environment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3RunTestCaseRequest where
  toJSON GoogleCloudDialogflowCxV3RunTestCaseRequest {..} =
    Core.object
      (Core.catMaybes [("environment" Core..=) Core.<$> environment])

-- | The response message for TestCases.RunTestCase.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3RunTestCaseResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3RunTestCaseResponse = GoogleCloudDialogflowCxV3RunTestCaseResponse
  { -- | The result.
    result :: (Core.Maybe GoogleCloudDialogflowCxV3TestCaseResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3RunTestCaseResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3RunTestCaseResponse ::
  GoogleCloudDialogflowCxV3RunTestCaseResponse
newGoogleCloudDialogflowCxV3RunTestCaseResponse =
  GoogleCloudDialogflowCxV3RunTestCaseResponse
    { result =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3RunTestCaseResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3RunTestCaseResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3RunTestCaseResponse
            Core.<$> (o Core..:? "result")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3RunTestCaseResponse where
  toJSON GoogleCloudDialogflowCxV3RunTestCaseResponse {..} =
    Core.object (Core.catMaybes [("result" Core..=) Core.<$> result])

-- | Settings for Generative Safety.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SafetySettings' smart constructor.
newtype GoogleCloudDialogflowCxV3SafetySettings = GoogleCloudDialogflowCxV3SafetySettings
  { -- | Banned phrases for generated text.
    bannedPhrases :: (Core.Maybe [GoogleCloudDialogflowCxV3SafetySettingsPhrase])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SafetySettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SafetySettings ::
  GoogleCloudDialogflowCxV3SafetySettings
newGoogleCloudDialogflowCxV3SafetySettings =
  GoogleCloudDialogflowCxV3SafetySettings
    { bannedPhrases =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3SafetySettings where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SafetySettings"
      ( \o ->
          GoogleCloudDialogflowCxV3SafetySettings
            Core.<$> (o Core..:? "bannedPhrases")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SafetySettings where
  toJSON GoogleCloudDialogflowCxV3SafetySettings {..} =
    Core.object
      (Core.catMaybes [("bannedPhrases" Core..=) Core.<$> bannedPhrases])

-- | Text input which can be used for prompt or banned phrases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SafetySettingsPhrase' smart constructor.
data GoogleCloudDialogflowCxV3SafetySettingsPhrase = GoogleCloudDialogflowCxV3SafetySettingsPhrase
  { -- | Required. Language code of the phrase.
    languageCode :: (Core.Maybe Core.Text),
    -- | Required. Text input which can be used for prompt or banned phrases.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SafetySettingsPhrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SafetySettingsPhrase ::
  GoogleCloudDialogflowCxV3SafetySettingsPhrase
newGoogleCloudDialogflowCxV3SafetySettingsPhrase =
  GoogleCloudDialogflowCxV3SafetySettingsPhrase
    { languageCode =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SafetySettingsPhrase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SafetySettingsPhrase"
      ( \o ->
          GoogleCloudDialogflowCxV3SafetySettingsPhrase
            Core.<$> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SafetySettingsPhrase where
  toJSON GoogleCloudDialogflowCxV3SafetySettingsPhrase {..} =
    Core.object
      ( Core.catMaybes
          [ ("languageCode" Core..=) Core.<$> languageCode,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Search configuration for UCS search queries.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SearchConfig' smart constructor.
data GoogleCloudDialogflowCxV3SearchConfig = GoogleCloudDialogflowCxV3SearchConfig
  { -- | Optional. Boosting configuration for the datastores. Maps from datastore name to their boost configuration. Do not specify more than one BoostSpecs for each datastore name. If multiple BoostSpecs are provided for the same datastore name, the behavior is undefined.
    boostSpecs :: (Core.Maybe [GoogleCloudDialogflowCxV3BoostSpecs]),
    -- | Optional. Filter configuration for the datastores. Maps from datastore name to the filter expression for that datastore. Do not specify more than one FilterSpecs for each datastore name. If multiple FilterSpecs are provided for the same datastore name, the behavior is undefined.
    filterSpecs :: (Core.Maybe [GoogleCloudDialogflowCxV3FilterSpecs])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SearchConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SearchConfig ::
  GoogleCloudDialogflowCxV3SearchConfig
newGoogleCloudDialogflowCxV3SearchConfig =
  GoogleCloudDialogflowCxV3SearchConfig
    { boostSpecs = Core.Nothing,
      filterSpecs = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3SearchConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SearchConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3SearchConfig
            Core.<$> (o Core..:? "boostSpecs")
            Core.<*> (o Core..:? "filterSpecs")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SearchConfig where
  toJSON GoogleCloudDialogflowCxV3SearchConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("boostSpecs" Core..=) Core.<$> boostSpecs,
            ("filterSpecs" Core..=) Core.<$> filterSpecs
          ]
      )

-- | Represents the settings related to security issues, such as data redaction and data retention. It may take hours for updates on the settings to propagate to all the related components and take effect.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SecuritySettings' smart constructor.
data GoogleCloudDialogflowCxV3SecuritySettings = GoogleCloudDialogflowCxV3SecuritySettings
  { -- | Controls audio export settings for post-conversation analytics when ingesting audio to conversations via Participants.AnalyzeContent or Participants.StreamingAnalyzeContent. If retention/strategy is set to REMOVE/AFTER/CONVERSATION or audio/export/settings.gcs/bucket is empty, audio export is disabled. If audio export is enabled, audio is recorded and saved to audio/export/settings.gcs/bucket, subject to retention policy of audio/export/settings.gcs/bucket. This setting won\'t effect audio input for implicit sessions via Sessions.DetectIntent or Sessions.StreamingDetectIntent.
    audioExportSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
      ),
    -- | <https://cloud.google.com/dlp/docs DLP> deidentify template name. Use this template to define de-identification configuration for the content. The @DLP De-identify Templates Reader@ role is needed on the Dialogflow service identity service account (has the form @service-PROJECT_NUMBER\@gcp-sa-dialogflow.iam.gserviceaccount.com@) for your agent\'s project. If empty, Dialogflow replaces sensitive info with @[redacted]@ text. The template name will have one of the following formats: @projects\/\/locations\/\/deidentifyTemplates\/@ OR @organizations\/\/locations\/\/deidentifyTemplates\/@ Note: @deidentify_template@ must be located in the same region as the @SecuritySettings@.
    deidentifyTemplate :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the security settings, unique within the location.
    displayName :: (Core.Maybe Core.Text),
    -- | Controls conversation exporting settings to Insights after conversation is completed. If retention/strategy is set to REMOVE/AFTER_CONVERSATION, Insights export is disabled no matter what you configure here.
    insightsExportSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
      ),
    -- | <https://cloud.google.com/dlp/docs DLP> inspect template name. Use this template to define inspect base settings. The @DLP Inspect Templates Reader@ role is needed on the Dialogflow service identity service account (has the form @service-PROJECT_NUMBER\@gcp-sa-dialogflow.iam.gserviceaccount.com@) for your agent\'s project. If empty, we use the default DLP inspect config. The template name will have one of the following formats: @projects\/\/locations\/\/inspectTemplates\/@ OR @organizations\/\/locations\/\/inspectTemplates\/@ Note: @inspect_template@ must be located in the same region as the @SecuritySettings@.
    inspectTemplate :: (Core.Maybe Core.Text),
    -- | Resource name of the settings. Required for the SecuritySettingsService.UpdateSecuritySettings method. SecuritySettingsService.CreateSecuritySettings populates the name automatically. Format: @projects\/\/locations\/\/securitySettings\/@.
    name :: (Core.Maybe Core.Text),
    -- | List of types of data to remove when retention settings triggers purge.
    purgeDataTypes ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3SecuritySettings_PurgeDataTypesItem]
      ),
    -- | Defines the data for which Dialogflow applies redaction. Dialogflow does not redact data that it does not have access to – for example, Cloud logging.
    redactionScope ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SecuritySettings_RedactionScope
      ),
    -- | Strategy that defines how we do redaction.
    redactionStrategy ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SecuritySettings_RedactionStrategy
      ),
    -- | Specifies the retention behavior defined by SecuritySettings.RetentionStrategy.
    retentionStrategy ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SecuritySettings_RetentionStrategy
      ),
    -- | Retains the data for the specified number of days. User must set a value lower than Dialogflow\'s default 365d TTL (30 days for Agent Assist traffic), higher value will be ignored and use default. Setting a value higher than that has no effect. A missing value or setting to 0 also means we use default TTL. When data retention configuration is changed, it only applies to the data created after the change; the TTL of existing data created before the change stays intact.
    retentionWindowDays :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SecuritySettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SecuritySettings ::
  GoogleCloudDialogflowCxV3SecuritySettings
newGoogleCloudDialogflowCxV3SecuritySettings =
  GoogleCloudDialogflowCxV3SecuritySettings
    { audioExportSettings =
        Core.Nothing,
      deidentifyTemplate = Core.Nothing,
      displayName = Core.Nothing,
      insightsExportSettings = Core.Nothing,
      inspectTemplate = Core.Nothing,
      name = Core.Nothing,
      purgeDataTypes = Core.Nothing,
      redactionScope = Core.Nothing,
      redactionStrategy = Core.Nothing,
      retentionStrategy = Core.Nothing,
      retentionWindowDays = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3SecuritySettings where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SecuritySettings"
      ( \o ->
          GoogleCloudDialogflowCxV3SecuritySettings
            Core.<$> (o Core..:? "audioExportSettings")
            Core.<*> (o Core..:? "deidentifyTemplate")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "insightsExportSettings")
            Core.<*> (o Core..:? "inspectTemplate")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "purgeDataTypes")
            Core.<*> (o Core..:? "redactionScope")
            Core.<*> (o Core..:? "redactionStrategy")
            Core.<*> (o Core..:? "retentionStrategy")
            Core.<*> (o Core..:? "retentionWindowDays")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SecuritySettings where
  toJSON GoogleCloudDialogflowCxV3SecuritySettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("audioExportSettings" Core..=) Core.<$> audioExportSettings,
            ("deidentifyTemplate" Core..=) Core.<$> deidentifyTemplate,
            ("displayName" Core..=) Core.<$> displayName,
            ("insightsExportSettings" Core..=) Core.<$> insightsExportSettings,
            ("inspectTemplate" Core..=) Core.<$> inspectTemplate,
            ("name" Core..=) Core.<$> name,
            ("purgeDataTypes" Core..=) Core.<$> purgeDataTypes,
            ("redactionScope" Core..=) Core.<$> redactionScope,
            ("redactionStrategy" Core..=) Core.<$> redactionStrategy,
            ("retentionStrategy" Core..=) Core.<$> retentionStrategy,
            ("retentionWindowDays" Core..=) Core.<$> retentionWindowDays
          ]
      )

-- | Settings for exporting audio.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings' smart constructor.
data GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings = GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
  { -- | Filename pattern for exported audio.
    audioExportPattern :: (Core.Maybe Core.Text),
    -- | File format for exported audio file. Currently only in telephony recordings.
    audioFormat ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings_AudioFormat
      ),
    -- | Enable audio redaction if it is true. Note that this only redacts end-user audio data; Synthesised audio from the virtual agent is not redacted.
    enableAudioRedaction :: (Core.Maybe Core.Bool),
    -- | Cloud Storage bucket to export audio record to. Setting this field would grant the Storage Object Creator role to the Dialogflow Service Agent. API caller that tries to modify this field should have the permission of storage.buckets.setIamPolicy.
    gcsBucket :: (Core.Maybe Core.Text),
    -- | Whether to store TTS audio. By default, TTS audio from the virtual agent is not exported.
    storeTtsAudio :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings ::
  GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
newGoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings =
  GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
    { audioExportPattern =
        Core.Nothing,
      audioFormat = Core.Nothing,
      enableAudioRedaction =
        Core.Nothing,
      gcsBucket = Core.Nothing,
      storeTtsAudio = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
            Core.<$> (o Core..:? "audioExportPattern")
            Core.<*> (o Core..:? "audioFormat")
            Core.<*> (o Core..:? "enableAudioRedaction")
            Core.<*> (o Core..:? "gcsBucket")
            Core.<*> (o Core..:? "storeTtsAudio")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3SecuritySettingsAudioExportSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("audioExportPattern" Core..=) Core.<$> audioExportPattern,
              ("audioFormat" Core..=) Core.<$> audioFormat,
              ("enableAudioRedaction" Core..=) Core.<$> enableAudioRedaction,
              ("gcsBucket" Core..=) Core.<$> gcsBucket,
              ("storeTtsAudio" Core..=) Core.<$> storeTtsAudio
            ]
        )

-- | Settings for exporting conversations to <https://cloud.google.com/contact-center/insights/docs Insights>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings = GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
  { -- | If enabled, we will automatically exports conversations to Insights and Insights runs its analyzers.
    enableInsightsExport :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings ::
  GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
newGoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings =
  GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
    { enableInsightsExport =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
            Core.<$> (o Core..:? "enableInsightsExport")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3SecuritySettingsInsightsExportSettings {..} =
      Core.object
        ( Core.catMaybes
            [("enableInsightsExport" Core..=) Core.<$> enableInsightsExport]
        )

-- | The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user\'s attitude as positive, negative, or neutral.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SentimentAnalysisResult' smart constructor.
data GoogleCloudDialogflowCxV3SentimentAnalysisResult = GoogleCloudDialogflowCxV3SentimentAnalysisResult
  { -- | A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
    magnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
    score :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SentimentAnalysisResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SentimentAnalysisResult ::
  GoogleCloudDialogflowCxV3SentimentAnalysisResult
newGoogleCloudDialogflowCxV3SentimentAnalysisResult =
  GoogleCloudDialogflowCxV3SentimentAnalysisResult
    { magnitude =
        Core.Nothing,
      score = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SentimentAnalysisResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SentimentAnalysisResult"
      ( \o ->
          GoogleCloudDialogflowCxV3SentimentAnalysisResult
            Core.<$> (o Core..:? "magnitude")
            Core.<*> (o Core..:? "score")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3SentimentAnalysisResult
  where
  toJSON GoogleCloudDialogflowCxV3SentimentAnalysisResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("magnitude" Core..=) Core.<$> magnitude,
            ("score" Core..=) Core.<$> score
          ]
      )

-- | Session entity types are referred to as __User__ entity types and are entities that are built for an individual user such as favorites, preferences, playlists, and so on. You can redefine a session entity type at the session level to extend or replace a custom entity type at the user session level (we refer to the entity types defined at the agent level as \"custom entity types\"). Note: session entity types apply to all queries, regardless of the language. For more information about entity types, see the <https://cloud.google.com/dialogflow/docs/entities-overview Dialogflow documentation>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SessionEntityType' smart constructor.
data GoogleCloudDialogflowCxV3SessionEntityType = GoogleCloudDialogflowCxV3SessionEntityType
  { -- | Required. The collection of entities to override or supplement the custom entity type.
    entities :: (Core.Maybe [GoogleCloudDialogflowCxV3EntityTypeEntity]),
    -- | Required. Indicates whether the additional data should override or supplement the custom entity type definition.
    entityOverrideMode ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3SessionEntityType_EntityOverrideMode
      ),
    -- | Required. The unique identifier of the session entity type. Format: @projects\/\/locations\/\/agents\/\/sessions\/\/entityTypes\/@ or @projects\/\/locations\/\/agents\/\/environments\/\/sessions\/\/entityTypes\/@. If @Environment ID@ is not specified, we assume default \'draft\' environment.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SessionEntityType' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SessionEntityType ::
  GoogleCloudDialogflowCxV3SessionEntityType
newGoogleCloudDialogflowCxV3SessionEntityType =
  GoogleCloudDialogflowCxV3SessionEntityType
    { entities =
        Core.Nothing,
      entityOverrideMode = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3SessionEntityType where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SessionEntityType"
      ( \o ->
          GoogleCloudDialogflowCxV3SessionEntityType
            Core.<$> (o Core..:? "entities")
            Core.<*> (o Core..:? "entityOverrideMode")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SessionEntityType where
  toJSON GoogleCloudDialogflowCxV3SessionEntityType {..} =
    Core.object
      ( Core.catMaybes
          [ ("entities" Core..=) Core.<$> entities,
            ("entityOverrideMode" Core..=) Core.<$> entityOverrideMode,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Represents session information communicated to and from the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SessionInfo' smart constructor.
data GoogleCloudDialogflowCxV3SessionInfo = GoogleCloudDialogflowCxV3SessionInfo
  { -- | Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters\' display names.
    parameters :: (Core.Maybe GoogleCloudDialogflowCxV3SessionInfo_Parameters),
    -- | Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: @projects\/\/locations\/\/agents\/\/sessions\/@ or @projects\/\/locations\/\/agents\/\/environments\/\/sessions\/@ if environment is specified.
    session :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SessionInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SessionInfo ::
  GoogleCloudDialogflowCxV3SessionInfo
newGoogleCloudDialogflowCxV3SessionInfo =
  GoogleCloudDialogflowCxV3SessionInfo
    { parameters = Core.Nothing,
      session = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3SessionInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SessionInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3SessionInfo
            Core.<$> (o Core..:? "parameters")
            Core.<*> (o Core..:? "session")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SessionInfo where
  toJSON GoogleCloudDialogflowCxV3SessionInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("parameters" Core..=) Core.<$> parameters,
            ("session" Core..=) Core.<$> session
          ]
      )

-- | Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters\' display names.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SessionInfo_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3SessionInfo_Parameters = GoogleCloudDialogflowCxV3SessionInfo_Parameters
  { additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SessionInfo_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SessionInfo_Parameters ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3SessionInfo_Parameters
newGoogleCloudDialogflowCxV3SessionInfo_Parameters additional =
  GoogleCloudDialogflowCxV3SessionInfo_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SessionInfo_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SessionInfo_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3SessionInfo_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3SessionInfo_Parameters
  where
  toJSON GoogleCloudDialogflowCxV3SessionInfo_Parameters {..} =
    Core.toJSON additional

-- | Settings related to speech recognition.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SpeechToTextSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3SpeechToTextSettings = GoogleCloudDialogflowCxV3SpeechToTextSettings
  { -- | Whether to use speech adaptation for speech recognition.
    enableSpeechAdaptation :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SpeechToTextSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SpeechToTextSettings ::
  GoogleCloudDialogflowCxV3SpeechToTextSettings
newGoogleCloudDialogflowCxV3SpeechToTextSettings =
  GoogleCloudDialogflowCxV3SpeechToTextSettings
    { enableSpeechAdaptation =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SpeechToTextSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SpeechToTextSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3SpeechToTextSettings
            Core.<$> (o Core..:? "enableSpeechAdaptation")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3SpeechToTextSettings where
  toJSON GoogleCloudDialogflowCxV3SpeechToTextSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableSpeechAdaptation" Core..=)
              Core.<$> enableSpeechAdaptation
          ]
      )

-- | The request message for Experiments.StartExperiment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3StartExperimentRequest' smart constructor.
data GoogleCloudDialogflowCxV3StartExperimentRequest = GoogleCloudDialogflowCxV3StartExperimentRequest
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3StartExperimentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3StartExperimentRequest ::
  GoogleCloudDialogflowCxV3StartExperimentRequest
newGoogleCloudDialogflowCxV3StartExperimentRequest =
  GoogleCloudDialogflowCxV3StartExperimentRequest

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3StartExperimentRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3StartExperimentRequest"
      (\o -> Core.pure GoogleCloudDialogflowCxV3StartExperimentRequest)

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3StartExperimentRequest
  where
  toJSON = Core.const Core.emptyObject

-- | The request message for Experiments.StopExperiment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3StopExperimentRequest' smart constructor.
data GoogleCloudDialogflowCxV3StopExperimentRequest = GoogleCloudDialogflowCxV3StopExperimentRequest
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3StopExperimentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3StopExperimentRequest ::
  GoogleCloudDialogflowCxV3StopExperimentRequest
newGoogleCloudDialogflowCxV3StopExperimentRequest =
  GoogleCloudDialogflowCxV3StopExperimentRequest

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3StopExperimentRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3StopExperimentRequest"
      (\o -> Core.pure GoogleCloudDialogflowCxV3StopExperimentRequest)

instance Core.ToJSON GoogleCloudDialogflowCxV3StopExperimentRequest where
  toJSON = Core.const Core.emptyObject

-- | The request to set the feedback for a bot answer.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest' smart constructor.
data GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest = GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
  { -- | Required. Feedback provided for a bot answer.
    answerFeedback :: (Core.Maybe GoogleCloudDialogflowCxV3AnswerFeedback),
    -- | Required. ID of the response to update its feedback. This is the same as DetectIntentResponse.response_id.
    responseId :: (Core.Maybe Core.Text),
    -- | Optional. The mask to control which fields to update. If the mask is not present, all fields will be updated.
    updateMask :: (Core.Maybe Core.FieldMask)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest ::
  GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
newGoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest =
  GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
    { answerFeedback =
        Core.Nothing,
      responseId = Core.Nothing,
      updateMask = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
            Core.<$> (o Core..:? "answerFeedback")
            Core.<*> (o Core..:? "responseId")
            Core.<*> (o Core..:? "updateMask")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest
  where
  toJSON GoogleCloudDialogflowCxV3SubmitAnswerFeedbackRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerFeedback" Core..=) Core.<$> answerFeedback,
            ("responseId" Core..=) Core.<$> responseId,
            ("updateMask" Core..=) Core.<$> updateMask
          ]
      )

-- | Configuration of how speech should be synthesized.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3SynthesizeSpeechConfig' smart constructor.
data GoogleCloudDialogflowCxV3SynthesizeSpeechConfig = GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
  { -- | Optional. An identifier which selects \'audio effects\' profiles that are applied on (post synthesized) text to speech. Effects are applied on top of each other in the order they are given.
    effectsProfileId :: (Core.Maybe [Core.Text]),
    -- | Optional. Speaking pitch, in the range [-20.0, 20.0]. 20 means increase 20 semitones from the original pitch. -20 means decrease 20 semitones from the original pitch.
    pitch :: (Core.Maybe Core.Double),
    -- | Optional. Speaking rate\/speed, in the range [0.25, 4.0]. 1.0 is the normal native speed supported by the specific voice. 2.0 is twice as fast, and 0.5 is half as fast. If unset(0.0), defaults to the native 1.0 speed. Any other values \< 0.25 or > 4.0 will return an error.
    speakingRate :: (Core.Maybe Core.Double),
    -- | Optional. The desired voice of the synthesized audio.
    voice :: (Core.Maybe GoogleCloudDialogflowCxV3VoiceSelectionParams),
    -- | Optional. Volume gain (in dB) of the normal native volume supported by the specific voice, in the range [-96.0, 16.0]. If unset, or set to a value of 0.0 (dB), will play at normal native signal amplitude. A value of -6.0 (dB) will play at approximately half the amplitude of the normal native signal amplitude. A value of +6.0 (dB) will play at approximately twice the amplitude of the normal native signal amplitude. We strongly recommend not to exceed +10 (dB) as there\'s usually no effective increase in loudness for any value greater than that.
    volumeGainDb :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3SynthesizeSpeechConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3SynthesizeSpeechConfig ::
  GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
newGoogleCloudDialogflowCxV3SynthesizeSpeechConfig =
  GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
    { effectsProfileId =
        Core.Nothing,
      pitch = Core.Nothing,
      speakingRate = Core.Nothing,
      voice = Core.Nothing,
      volumeGainDb = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3SynthesizeSpeechConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
            Core.<$> (o Core..:? "effectsProfileId")
            Core.<*> (o Core..:? "pitch")
            Core.<*> (o Core..:? "speakingRate")
            Core.<*> (o Core..:? "voice")
            Core.<*> (o Core..:? "volumeGainDb")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
  where
  toJSON GoogleCloudDialogflowCxV3SynthesizeSpeechConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("effectsProfileId" Core..=) Core.<$> effectsProfileId,
            ("pitch" Core..=) Core.<$> pitch,
            ("speakingRate" Core..=) Core.<$> speakingRate,
            ("voice" Core..=) Core.<$> voice,
            ("volumeGainDb" Core..=) Core.<$> volumeGainDb
          ]
      )

-- | Represents a test case.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TestCase' smart constructor.
data GoogleCloudDialogflowCxV3TestCase = GoogleCloudDialogflowCxV3TestCase
  { -- | Output only. When the test was created.
    creationTime :: (Core.Maybe Core.DateTime),
    -- | Required. The human-readable name of the test case, unique within the agent. Limit of 200 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | The latest test result.
    lastTestResult :: (Core.Maybe GoogleCloudDialogflowCxV3TestCaseResult),
    -- | The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: @projects\/\/locations\/\/agents\/\/testCases\/@.
    name :: (Core.Maybe Core.Text),
    -- | Additional freeform notes about the test case. Limit of 400 characters.
    notes :: (Core.Maybe Core.Text),
    -- | Tags are short descriptions that users may apply to test cases for organizational and filtering purposes. Each tag should start with \"#\" and has a limit of 30 characters.
    tags :: (Core.Maybe [Core.Text]),
    -- | The conversation turns uttered when the test case was created, in chronological order. These include the canonical set of agent utterances that should occur when the agent is working properly.
    testCaseConversationTurns :: (Core.Maybe [GoogleCloudDialogflowCxV3ConversationTurn]),
    -- | Config for the test case.
    testConfig :: (Core.Maybe GoogleCloudDialogflowCxV3TestConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TestCase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TestCase ::
  GoogleCloudDialogflowCxV3TestCase
newGoogleCloudDialogflowCxV3TestCase =
  GoogleCloudDialogflowCxV3TestCase
    { creationTime = Core.Nothing,
      displayName = Core.Nothing,
      lastTestResult = Core.Nothing,
      name = Core.Nothing,
      notes = Core.Nothing,
      tags = Core.Nothing,
      testCaseConversationTurns = Core.Nothing,
      testConfig = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TestCase where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TestCase"
      ( \o ->
          GoogleCloudDialogflowCxV3TestCase
            Core.<$> (o Core..:? "creationTime")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "lastTestResult")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "notes")
            Core.<*> (o Core..:? "tags")
            Core.<*> (o Core..:? "testCaseConversationTurns")
            Core.<*> (o Core..:? "testConfig")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TestCase where
  toJSON GoogleCloudDialogflowCxV3TestCase {..} =
    Core.object
      ( Core.catMaybes
          [ ("creationTime" Core..=) Core.<$> creationTime,
            ("displayName" Core..=) Core.<$> displayName,
            ("lastTestResult" Core..=) Core.<$> lastTestResult,
            ("name" Core..=) Core.<$> name,
            ("notes" Core..=) Core.<$> notes,
            ("tags" Core..=) Core.<$> tags,
            ("testCaseConversationTurns" Core..=)
              Core.<$> testCaseConversationTurns,
            ("testConfig" Core..=) Core.<$> testConfig
          ]
      )

-- | Error info for importing a test.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TestCaseError' smart constructor.
data GoogleCloudDialogflowCxV3TestCaseError = GoogleCloudDialogflowCxV3TestCaseError
  { -- | The status associated with the test case.
    status :: (Core.Maybe GoogleRpcStatus),
    -- | The test case.
    testCase :: (Core.Maybe GoogleCloudDialogflowCxV3TestCase)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TestCaseError' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TestCaseError ::
  GoogleCloudDialogflowCxV3TestCaseError
newGoogleCloudDialogflowCxV3TestCaseError =
  GoogleCloudDialogflowCxV3TestCaseError
    { status = Core.Nothing,
      testCase = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TestCaseError where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TestCaseError"
      ( \o ->
          GoogleCloudDialogflowCxV3TestCaseError
            Core.<$> (o Core..:? "status")
            Core.<*> (o Core..:? "testCase")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TestCaseError where
  toJSON GoogleCloudDialogflowCxV3TestCaseError {..} =
    Core.object
      ( Core.catMaybes
          [ ("status" Core..=) Core.<$> status,
            ("testCase" Core..=) Core.<$> testCase
          ]
      )

-- | Represents a result from running a test case in an agent environment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TestCaseResult' smart constructor.
data GoogleCloudDialogflowCxV3TestCaseResult = GoogleCloudDialogflowCxV3TestCaseResult
  { -- | The conversation turns uttered during the test case replay in chronological order.
    conversationTurns :: (Core.Maybe [GoogleCloudDialogflowCxV3ConversationTurn]),
    -- | Environment where the test was run. If not set, it indicates the draft environment.
    environment :: (Core.Maybe Core.Text),
    -- | The resource name for the test case result. Format: @projects\/\/locations\/\/agents\/\/testCases\/\/results\/@.
    name :: (Core.Maybe Core.Text),
    -- | Whether the test case passed in the agent environment.
    testResult :: (Core.Maybe GoogleCloudDialogflowCxV3TestCaseResult_TestResult),
    -- | The time that the test was run.
    testTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TestCaseResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TestCaseResult ::
  GoogleCloudDialogflowCxV3TestCaseResult
newGoogleCloudDialogflowCxV3TestCaseResult =
  GoogleCloudDialogflowCxV3TestCaseResult
    { conversationTurns =
        Core.Nothing,
      environment = Core.Nothing,
      name = Core.Nothing,
      testResult = Core.Nothing,
      testTime = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TestCaseResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TestCaseResult"
      ( \o ->
          GoogleCloudDialogflowCxV3TestCaseResult
            Core.<$> (o Core..:? "conversationTurns")
            Core.<*> (o Core..:? "environment")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "testResult")
            Core.<*> (o Core..:? "testTime")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TestCaseResult where
  toJSON GoogleCloudDialogflowCxV3TestCaseResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("conversationTurns" Core..=) Core.<$> conversationTurns,
            ("environment" Core..=) Core.<$> environment,
            ("name" Core..=) Core.<$> name,
            ("testResult" Core..=) Core.<$> testResult,
            ("testTime" Core..=) Core.<$> testTime
          ]
      )

-- | Represents configurations for a test case.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TestConfig' smart constructor.
data GoogleCloudDialogflowCxV3TestConfig = GoogleCloudDialogflowCxV3TestConfig
  { -- | Flow name to start the test case with. Format: @projects\/\/locations\/\/agents\/\/flows\/@. Only one of @flow@ and @page@ should be set to indicate the starting point of the test case. If neither is set, the test case will start with start page on the default start flow.
    flow :: (Core.Maybe Core.Text),
    -- | The page to start the test case with. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@. Only one of @flow@ and @page@ should be set to indicate the starting point of the test case. If neither is set, the test case will start with start page on the default start flow.
    page :: (Core.Maybe Core.Text),
    -- | Session parameters to be compared when calculating differences.
    trackingParameters :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TestConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TestConfig ::
  GoogleCloudDialogflowCxV3TestConfig
newGoogleCloudDialogflowCxV3TestConfig =
  GoogleCloudDialogflowCxV3TestConfig
    { flow = Core.Nothing,
      page = Core.Nothing,
      trackingParameters = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TestConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TestConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3TestConfig
            Core.<$> (o Core..:? "flow")
            Core.<*> (o Core..:? "page")
            Core.<*> (o Core..:? "trackingParameters")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TestConfig where
  toJSON GoogleCloudDialogflowCxV3TestConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("flow" Core..=) Core.<$> flow,
            ("page" Core..=) Core.<$> page,
            ("trackingParameters" Core..=) Core.<$> trackingParameters
          ]
      )

-- | Error info for running a test.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TestError' smart constructor.
data GoogleCloudDialogflowCxV3TestError = GoogleCloudDialogflowCxV3TestError
  { -- | The status associated with the test.
    status :: (Core.Maybe GoogleRpcStatus),
    -- | The test case resource name.
    testCase :: (Core.Maybe Core.Text),
    -- | The timestamp when the test was completed.
    testTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TestError' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TestError ::
  GoogleCloudDialogflowCxV3TestError
newGoogleCloudDialogflowCxV3TestError =
  GoogleCloudDialogflowCxV3TestError
    { status = Core.Nothing,
      testCase = Core.Nothing,
      testTime = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TestError where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TestError"
      ( \o ->
          GoogleCloudDialogflowCxV3TestError
            Core.<$> (o Core..:? "status")
            Core.<*> (o Core..:? "testCase")
            Core.<*> (o Core..:? "testTime")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TestError where
  toJSON GoogleCloudDialogflowCxV3TestError {..} =
    Core.object
      ( Core.catMaybes
          [ ("status" Core..=) Core.<$> status,
            ("testCase" Core..=) Core.<$> testCase,
            ("testTime" Core..=) Core.<$> testTime
          ]
      )

-- | The description of differences between original and replayed agent output.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TestRunDifference' smart constructor.
data GoogleCloudDialogflowCxV3TestRunDifference = GoogleCloudDialogflowCxV3TestRunDifference
  { -- | A human readable description of the diff, showing the actual output vs expected output.
    description :: (Core.Maybe Core.Text),
    -- | The type of diff.
    type' :: (Core.Maybe GoogleCloudDialogflowCxV3TestRunDifference_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TestRunDifference' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TestRunDifference ::
  GoogleCloudDialogflowCxV3TestRunDifference
newGoogleCloudDialogflowCxV3TestRunDifference =
  GoogleCloudDialogflowCxV3TestRunDifference
    { description =
        Core.Nothing,
      type' = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TestRunDifference where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TestRunDifference"
      ( \o ->
          GoogleCloudDialogflowCxV3TestRunDifference
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "type")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TestRunDifference where
  toJSON GoogleCloudDialogflowCxV3TestRunDifference {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Represents the natural language text to be processed.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TextInput' smart constructor.
newtype GoogleCloudDialogflowCxV3TextInput = GoogleCloudDialogflowCxV3TextInput
  { -- | Required. The UTF-8 encoded natural language text to be processed.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TextInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TextInput ::
  GoogleCloudDialogflowCxV3TextInput
newGoogleCloudDialogflowCxV3TextInput =
  GoogleCloudDialogflowCxV3TextInput {text = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3TextInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TextInput"
      ( \o ->
          GoogleCloudDialogflowCxV3TextInput Core.<$> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TextInput where
  toJSON GoogleCloudDialogflowCxV3TextInput {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Settings related to speech synthesizing.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TextToSpeechSettings' smart constructor.
newtype GoogleCloudDialogflowCxV3TextToSpeechSettings = GoogleCloudDialogflowCxV3TextToSpeechSettings
  { -- | Configuration of how speech should be synthesized, mapping from language (https:\/\/cloud.google.com\/dialogflow\/cx\/docs\/reference\/language) to SynthesizeSpeechConfig. These settings affect: - The <https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway phone gateway> synthesize configuration set via Agent.text/to/speech/settings. - How speech is synthesized when invoking session APIs. Agent.text/to/speech/settings only applies if OutputAudioConfig.synthesize/speech/config is not specified.
    synthesizeSpeechConfigs ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TextToSpeechSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TextToSpeechSettings ::
  GoogleCloudDialogflowCxV3TextToSpeechSettings
newGoogleCloudDialogflowCxV3TextToSpeechSettings =
  GoogleCloudDialogflowCxV3TextToSpeechSettings
    { synthesizeSpeechConfigs =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TextToSpeechSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TextToSpeechSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3TextToSpeechSettings
            Core.<$> (o Core..:? "synthesizeSpeechConfigs")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TextToSpeechSettings where
  toJSON GoogleCloudDialogflowCxV3TextToSpeechSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("synthesizeSpeechConfigs" Core..=)
              Core.<$> synthesizeSpeechConfigs
          ]
      )

-- | Configuration of how speech should be synthesized, mapping from language (https:\/\/cloud.google.com\/dialogflow\/cx\/docs\/reference\/language) to SynthesizeSpeechConfig. These settings affect: - The <https://cloud.google.com/dialogflow/cx/docs/concept/integration/phone-gateway phone gateway> synthesize configuration set via Agent.text/to/speech/settings. - How speech is synthesized when invoking session APIs. Agent.text/to/speech/settings only applies if OutputAudioConfig.synthesize/speech/config is not specified.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs' smart constructor.
newtype GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs = GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
  { additional ::
      ( Core.HashMap
          Core.Text
          GoogleCloudDialogflowCxV3SynthesizeSpeechConfig
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    GoogleCloudDialogflowCxV3SynthesizeSpeechConfig ->
  GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
newGoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
  additional =
    GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs"
      ( \o ->
          GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs
  where
  toJSON
    GoogleCloudDialogflowCxV3TextToSpeechSettings_SynthesizeSpeechConfigs {..} =
      Core.toJSON additional

-- | The request message for Flows.TrainFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TrainFlowRequest' smart constructor.
data GoogleCloudDialogflowCxV3TrainFlowRequest = GoogleCloudDialogflowCxV3TrainFlowRequest
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TrainFlowRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TrainFlowRequest ::
  GoogleCloudDialogflowCxV3TrainFlowRequest
newGoogleCloudDialogflowCxV3TrainFlowRequest =
  GoogleCloudDialogflowCxV3TrainFlowRequest

instance Core.FromJSON GoogleCloudDialogflowCxV3TrainFlowRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TrainFlowRequest"
      (\o -> Core.pure GoogleCloudDialogflowCxV3TrainFlowRequest)

instance Core.ToJSON GoogleCloudDialogflowCxV3TrainFlowRequest where
  toJSON = Core.const Core.emptyObject

-- | Transition coverage represents the percentage of all possible page transitions (page-level transition routes and event handlers, excluding transition route groups) present within any of a parent\'s test cases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionCoverage' smart constructor.
data GoogleCloudDialogflowCxV3TransitionCoverage = GoogleCloudDialogflowCxV3TransitionCoverage
  { -- | The percent of transitions in the agent that are covered.
    coverageScore :: (Core.Maybe Core.Double),
    -- | The list of Transitions present in the agent.
    transitions ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3TransitionCoverageTransition]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionCoverage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionCoverage ::
  GoogleCloudDialogflowCxV3TransitionCoverage
newGoogleCloudDialogflowCxV3TransitionCoverage =
  GoogleCloudDialogflowCxV3TransitionCoverage
    { coverageScore =
        Core.Nothing,
      transitions = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TransitionCoverage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionCoverage"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionCoverage
            Core.<$> (o Core..:? "coverageScore")
            Core.<*> (o Core..:? "transitions")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TransitionCoverage where
  toJSON GoogleCloudDialogflowCxV3TransitionCoverage {..} =
    Core.object
      ( Core.catMaybes
          [ ("coverageScore" Core..=) Core.<$> coverageScore,
            ("transitions" Core..=) Core.<$> transitions
          ]
      )

-- | A transition in a page.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionCoverageTransition' smart constructor.
data GoogleCloudDialogflowCxV3TransitionCoverageTransition = GoogleCloudDialogflowCxV3TransitionCoverageTransition
  { -- | Whether the transition is covered by at least one of the agent\'s test cases.
    covered :: (Core.Maybe Core.Bool),
    -- | Event handler.
    eventHandler :: (Core.Maybe GoogleCloudDialogflowCxV3EventHandler),
    -- | The index of a transition in the transition list. Starting from 0.
    index :: (Core.Maybe Core.Int32),
    -- | The start node of a transition.
    source ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
      ),
    -- | The end node of a transition.
    target ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
      ),
    -- | Intent route or condition route.
    transitionRoute :: (Core.Maybe GoogleCloudDialogflowCxV3TransitionRoute)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionCoverageTransition' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionCoverageTransition ::
  GoogleCloudDialogflowCxV3TransitionCoverageTransition
newGoogleCloudDialogflowCxV3TransitionCoverageTransition =
  GoogleCloudDialogflowCxV3TransitionCoverageTransition
    { covered =
        Core.Nothing,
      eventHandler = Core.Nothing,
      index = Core.Nothing,
      source = Core.Nothing,
      target = Core.Nothing,
      transitionRoute = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TransitionCoverageTransition
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionCoverageTransition"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionCoverageTransition
            Core.<$> (o Core..:? "covered")
            Core.<*> (o Core..:? "eventHandler")
            Core.<*> (o Core..:? "index")
            Core.<*> (o Core..:? "source")
            Core.<*> (o Core..:? "target")
            Core.<*> (o Core..:? "transitionRoute")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3TransitionCoverageTransition
  where
  toJSON GoogleCloudDialogflowCxV3TransitionCoverageTransition {..} =
    Core.object
      ( Core.catMaybes
          [ ("covered" Core..=) Core.<$> covered,
            ("eventHandler" Core..=) Core.<$> eventHandler,
            ("index" Core..=) Core.<$> index,
            ("source" Core..=) Core.<$> source,
            ("target" Core..=) Core.<$> target,
            ("transitionRoute" Core..=) Core.<$> transitionRoute
          ]
      )

-- | The source or target of a transition.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionCoverageTransitionNode' smart constructor.
data GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode = GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
  { -- | Indicates a transition to a Flow. Only some fields such as name and displayname will be set.
    flow :: (Core.Maybe GoogleCloudDialogflowCxV3Flow),
    -- | Indicates a transition to a Page. Only some fields such as name and displayname will be set.
    page :: (Core.Maybe GoogleCloudDialogflowCxV3Page)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionCoverageTransitionNode ::
  GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
newGoogleCloudDialogflowCxV3TransitionCoverageTransitionNode =
  GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
    { flow =
        Core.Nothing,
      page = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
            Core.<$> (o Core..:? "flow")
            Core.<*> (o Core..:? "page")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode
  where
  toJSON
    GoogleCloudDialogflowCxV3TransitionCoverageTransitionNode {..} =
      Core.object
        ( Core.catMaybes
            [("flow" Core..=) Core.<$> flow, ("page" Core..=) Core.<$> page]
        )

-- | A transition route specifies a intent that can be matched and\/or a data condition that can be evaluated during a session. When a specified transition is matched, the following actions are taken in order: * If there is a @trigger_fulfillment@ associated with the transition, it will be called. * If there is a @target_page@ associated with the transition, the session will transition into the specified page. * If there is a @target_flow@ associated with the transition, the session will transition into the specified flow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionRoute' smart constructor.
data GoogleCloudDialogflowCxV3TransitionRoute = GoogleCloudDialogflowCxV3TransitionRoute
  { -- | The condition to evaluate against form parameters or session parameters. See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>. At least one of @intent@ or @condition@ must be specified. When both @intent@ and @condition@ are specified, the transition can only happen when both are fulfilled.
    condition :: (Core.Maybe Core.Text),
    -- | Optional. The description of the transition route. The maximum length is 500 characters.
    description :: (Core.Maybe Core.Text),
    -- | The unique identifier of an Intent. Format: @projects\/\/locations\/\/agents\/\/intents\/@. Indicates that the transition can only happen when the given intent is matched. At least one of @intent@ or @condition@ must be specified. When both @intent@ and @condition@ are specified, the transition can only happen when both are fulfilled.
    intent :: (Core.Maybe Core.Text),
    -- | Output only. The unique identifier of this transition route.
    name :: (Core.Maybe Core.Text),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text),
    -- | The fulfillment to call when the condition is satisfied. At least one of @trigger_fulfillment@ and @target@ must be specified. When both are defined, @trigger_fulfillment@ is executed first.
    triggerFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3Fulfillment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionRoute' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionRoute ::
  GoogleCloudDialogflowCxV3TransitionRoute
newGoogleCloudDialogflowCxV3TransitionRoute =
  GoogleCloudDialogflowCxV3TransitionRoute
    { condition =
        Core.Nothing,
      description = Core.Nothing,
      intent = Core.Nothing,
      name = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing,
      triggerFulfillment = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TransitionRoute where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionRoute"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionRoute
            Core.<$> (o Core..:? "condition")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
            Core.<*> (o Core..:? "triggerFulfillment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TransitionRoute where
  toJSON GoogleCloudDialogflowCxV3TransitionRoute {..} =
    Core.object
      ( Core.catMaybes
          [ ("condition" Core..=) Core.<$> condition,
            ("description" Core..=) Core.<$> description,
            ("intent" Core..=) Core.<$> intent,
            ("name" Core..=) Core.<$> name,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage,
            ("triggerFulfillment" Core..=) Core.<$> triggerFulfillment
          ]
      )

-- | A TransitionRouteGroup represents a group of @TransitionRoutes@ to be used by a Page.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionRouteGroup' smart constructor.
data GoogleCloudDialogflowCxV3TransitionRouteGroup = GoogleCloudDialogflowCxV3TransitionRouteGroup
  { -- | Required. The human-readable name of the transition route group, unique within the flow. The display name can be no longer than 30 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | The unique identifier of the transition route group. TransitionRouteGroups.CreateTransitionRouteGroup populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/flows\/\/transitionRouteGroups\/@ .
    name :: (Core.Maybe Core.Text),
    -- | Transition routes associated with the TransitionRouteGroup.
    transitionRoutes :: (Core.Maybe [GoogleCloudDialogflowCxV3TransitionRoute])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionRouteGroup' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionRouteGroup ::
  GoogleCloudDialogflowCxV3TransitionRouteGroup
newGoogleCloudDialogflowCxV3TransitionRouteGroup =
  GoogleCloudDialogflowCxV3TransitionRouteGroup
    { displayName =
        Core.Nothing,
      name = Core.Nothing,
      transitionRoutes = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroup
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionRouteGroup"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionRouteGroup
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "transitionRoutes")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TransitionRouteGroup where
  toJSON GoogleCloudDialogflowCxV3TransitionRouteGroup {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayName" Core..=) Core.<$> displayName,
            ("name" Core..=) Core.<$> name,
            ("transitionRoutes" Core..=) Core.<$> transitionRoutes
          ]
      )

-- | Transition route group coverage represents the percentage of all possible transition routes present within any of a parent\'s test cases. The results are grouped by the transition route group.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverage' smart constructor.
data GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage = GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
  { -- | The percent of transition routes in all the transition route groups that are covered.
    coverageScore :: (Core.Maybe Core.Double),
    -- | Transition route group coverages.
    coverages ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverage ::
  GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverage =
  GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
    { coverageScore =
        Core.Nothing,
      coverages = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
            Core.<$> (o Core..:? "coverageScore")
            Core.<*> (o Core..:? "coverages")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage
  where
  toJSON GoogleCloudDialogflowCxV3TransitionRouteGroupCoverage {..} =
    Core.object
      ( Core.catMaybes
          [ ("coverageScore" Core..=) Core.<$> coverageScore,
            ("coverages" Core..=) Core.<$> coverages
          ]
      )

-- | Coverage result message for one transition route group.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage' smart constructor.
data GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage = GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
  { -- | The percent of transition routes in the transition route group that are covered.
    coverageScore :: (Core.Maybe Core.Double),
    -- | Transition route group metadata. Only name and displayName will be set.
    routeGroup :: (Core.Maybe GoogleCloudDialogflowCxV3TransitionRouteGroup),
    -- | The list of transition routes and coverage in the transition route group.
    transitions ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage ::
  GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage =
  GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
    { coverageScore =
        Core.Nothing,
      routeGroup = Core.Nothing,
      transitions = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
            Core.<$> (o Core..:? "coverageScore")
            Core.<*> (o Core..:? "routeGroup")
            Core.<*> (o Core..:? "transitions")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage
  where
  toJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverage {..} =
      Core.object
        ( Core.catMaybes
            [ ("coverageScore" Core..=) Core.<$> coverageScore,
              ("routeGroup" Core..=) Core.<$> routeGroup,
              ("transitions" Core..=) Core.<$> transitions
            ]
        )

-- | A transition coverage in a transition route group.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition' smart constructor.
data GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition = GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
  { -- | Whether the transition route is covered by at least one of the agent\'s test cases.
    covered :: (Core.Maybe Core.Bool),
    -- | Intent route or condition route.
    transitionRoute :: (Core.Maybe GoogleCloudDialogflowCxV3TransitionRoute)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition ::
  GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
newGoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition =
  GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
    { covered =
        Core.Nothing,
      transitionRoute =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition"
      ( \o ->
          GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
            Core.<$> (o Core..:? "covered")
            Core.<*> (o Core..:? "transitionRoute")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition
  where
  toJSON
    GoogleCloudDialogflowCxV3TransitionRouteGroupCoverageCoverageTransition {..} =
      Core.object
        ( Core.catMaybes
            [ ("covered" Core..=) Core.<$> covered,
              ("transitionRoute" Core..=) Core.<$> transitionRoute
            ]
        )

-- | Collection of all signals that were extracted for a single turn of the conversation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3TurnSignals' smart constructor.
data GoogleCloudDialogflowCxV3TurnSignals = GoogleCloudDialogflowCxV3TurnSignals
  { -- | Whether agent responded with LiveAgentHandoff fulfillment.
    agentEscalated :: (Core.Maybe Core.Bool),
    -- | Whether user was using DTMF input.
    dtmfUsed :: (Core.Maybe Core.Bool),
    -- | Failure reasons of the turn.
    failureReasons ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3TurnSignals_FailureReasonsItem]
      ),
    -- | Whether NLU predicted NO_MATCH.
    noMatch :: (Core.Maybe Core.Bool),
    -- | Whether user provided no input.
    noUserInput :: (Core.Maybe Core.Bool),
    -- | Whether turn resulted in End Session page.
    reachedEndPage :: (Core.Maybe Core.Bool),
    -- | Sentiment magnitude of the user utterance if <https://cloud.google.com/dialogflow/cx/docs/concept/sentiment sentiment> was enabled.
    sentimentMagnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score of the user utterance if <https://cloud.google.com/dialogflow/cx/docs/concept/sentiment sentiment> was enabled.
    sentimentScore :: (Core.Maybe Core.Double),
    -- | Whether user was specifically asking for a live agent.
    userEscalated :: (Core.Maybe Core.Bool),
    -- | Human-readable statuses of the webhooks triggered during this turn.
    webhookStatuses :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3TurnSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3TurnSignals ::
  GoogleCloudDialogflowCxV3TurnSignals
newGoogleCloudDialogflowCxV3TurnSignals =
  GoogleCloudDialogflowCxV3TurnSignals
    { agentEscalated =
        Core.Nothing,
      dtmfUsed = Core.Nothing,
      failureReasons = Core.Nothing,
      noMatch = Core.Nothing,
      noUserInput = Core.Nothing,
      reachedEndPage = Core.Nothing,
      sentimentMagnitude = Core.Nothing,
      sentimentScore = Core.Nothing,
      userEscalated = Core.Nothing,
      webhookStatuses = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3TurnSignals where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3TurnSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3TurnSignals
            Core.<$> (o Core..:? "agentEscalated")
            Core.<*> (o Core..:? "dtmfUsed")
            Core.<*> (o Core..:? "failureReasons")
            Core.<*> (o Core..:? "noMatch")
            Core.<*> (o Core..:? "noUserInput")
            Core.<*> (o Core..:? "reachedEndPage")
            Core.<*> (o Core..:? "sentimentMagnitude")
            Core.<*> (o Core..:? "sentimentScore")
            Core.<*> (o Core..:? "userEscalated")
            Core.<*> (o Core..:? "webhookStatuses")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3TurnSignals where
  toJSON GoogleCloudDialogflowCxV3TurnSignals {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentEscalated" Core..=) Core.<$> agentEscalated,
            ("dtmfUsed" Core..=) Core.<$> dtmfUsed,
            ("failureReasons" Core..=) Core.<$> failureReasons,
            ("noMatch" Core..=) Core.<$> noMatch,
            ("noUserInput" Core..=) Core.<$> noUserInput,
            ("reachedEndPage" Core..=) Core.<$> reachedEndPage,
            ("sentimentMagnitude" Core..=) Core.<$> sentimentMagnitude,
            ("sentimentScore" Core..=) Core.<$> sentimentScore,
            ("userEscalated" Core..=) Core.<$> userEscalated,
            ("webhookStatuses" Core..=) Core.<$> webhookStatuses
          ]
      )

-- | The request message for Agents.ValidateAgent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ValidateAgentRequest' smart constructor.
newtype GoogleCloudDialogflowCxV3ValidateAgentRequest = GoogleCloudDialogflowCxV3ValidateAgentRequest
  { -- | If not specified, the agent\'s default language is used.
    languageCode :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ValidateAgentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ValidateAgentRequest ::
  GoogleCloudDialogflowCxV3ValidateAgentRequest
newGoogleCloudDialogflowCxV3ValidateAgentRequest =
  GoogleCloudDialogflowCxV3ValidateAgentRequest
    { languageCode =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3ValidateAgentRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ValidateAgentRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ValidateAgentRequest
            Core.<$> (o Core..:? "languageCode")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ValidateAgentRequest where
  toJSON GoogleCloudDialogflowCxV3ValidateAgentRequest {..} =
    Core.object
      (Core.catMaybes [("languageCode" Core..=) Core.<$> languageCode])

-- | The request message for Flows.ValidateFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ValidateFlowRequest' smart constructor.
newtype GoogleCloudDialogflowCxV3ValidateFlowRequest = GoogleCloudDialogflowCxV3ValidateFlowRequest
  { -- | If not specified, the agent\'s default language is used.
    languageCode :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ValidateFlowRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ValidateFlowRequest ::
  GoogleCloudDialogflowCxV3ValidateFlowRequest
newGoogleCloudDialogflowCxV3ValidateFlowRequest =
  GoogleCloudDialogflowCxV3ValidateFlowRequest
    { languageCode =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ValidateFlowRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ValidateFlowRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3ValidateFlowRequest
            Core.<$> (o Core..:? "languageCode")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ValidateFlowRequest where
  toJSON GoogleCloudDialogflowCxV3ValidateFlowRequest {..} =
    Core.object
      (Core.catMaybes [("languageCode" Core..=) Core.<$> languageCode])

-- | Agent\/flow validation message.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3ValidationMessage' smart constructor.
data GoogleCloudDialogflowCxV3ValidationMessage = GoogleCloudDialogflowCxV3ValidationMessage
  { -- | The message detail.
    detail :: (Core.Maybe Core.Text),
    -- | The resource names of the resources where the message is found.
    resourceNames :: (Core.Maybe [GoogleCloudDialogflowCxV3ResourceName]),
    -- | The type of the resources where the message is found.
    resourceType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3ValidationMessage_ResourceType
      ),
    -- | The names of the resources where the message is found.
    resources :: (Core.Maybe [Core.Text]),
    -- | Indicates the severity of the message.
    severity :: (Core.Maybe GoogleCloudDialogflowCxV3ValidationMessage_Severity)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3ValidationMessage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3ValidationMessage ::
  GoogleCloudDialogflowCxV3ValidationMessage
newGoogleCloudDialogflowCxV3ValidationMessage =
  GoogleCloudDialogflowCxV3ValidationMessage
    { detail = Core.Nothing,
      resourceNames = Core.Nothing,
      resourceType = Core.Nothing,
      resources = Core.Nothing,
      severity = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3ValidationMessage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3ValidationMessage"
      ( \o ->
          GoogleCloudDialogflowCxV3ValidationMessage
            Core.<$> (o Core..:? "detail")
            Core.<*> (o Core..:? "resourceNames")
            Core.<*> (o Core..:? "resourceType")
            Core.<*> (o Core..:? "resources")
            Core.<*> (o Core..:? "severity")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3ValidationMessage where
  toJSON GoogleCloudDialogflowCxV3ValidationMessage {..} =
    Core.object
      ( Core.catMaybes
          [ ("detail" Core..=) Core.<$> detail,
            ("resourceNames" Core..=) Core.<$> resourceNames,
            ("resourceType" Core..=) Core.<$> resourceType,
            ("resources" Core..=) Core.<$> resources,
            ("severity" Core..=) Core.<$> severity
          ]
      )

-- | The history of variants update.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3VariantsHistory' smart constructor.
data GoogleCloudDialogflowCxV3VariantsHistory = GoogleCloudDialogflowCxV3VariantsHistory
  { -- | Update time of the variants.
    updateTime :: (Core.Maybe Core.DateTime),
    -- | The flow versions as the variants.
    versionVariants :: (Core.Maybe GoogleCloudDialogflowCxV3VersionVariants)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3VariantsHistory' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3VariantsHistory ::
  GoogleCloudDialogflowCxV3VariantsHistory
newGoogleCloudDialogflowCxV3VariantsHistory =
  GoogleCloudDialogflowCxV3VariantsHistory
    { updateTime =
        Core.Nothing,
      versionVariants = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3VariantsHistory where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3VariantsHistory"
      ( \o ->
          GoogleCloudDialogflowCxV3VariantsHistory
            Core.<$> (o Core..:? "updateTime")
            Core.<*> (o Core..:? "versionVariants")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3VariantsHistory where
  toJSON GoogleCloudDialogflowCxV3VariantsHistory {..} =
    Core.object
      ( Core.catMaybes
          [ ("updateTime" Core..=) Core.<$> updateTime,
            ("versionVariants" Core..=) Core.<$> versionVariants
          ]
      )

-- | Represents a version of a flow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Version' smart constructor.
data GoogleCloudDialogflowCxV3Version = GoogleCloudDialogflowCxV3Version
  { -- | Output only. Create time of the version.
    createTime :: (Core.Maybe Core.DateTime),
    -- | The description of the version. The maximum length is 500 characters. If exceeded, the request is rejected.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the version. Limit of 64 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | Format: projects\/\/locations\/\/agents\/\/flows\/\/versions\/. Version ID is a self-increasing number generated by Dialogflow upon version creation.
    name :: (Core.Maybe Core.Text),
    -- | Output only. The NLU settings of the flow at version creation.
    nluSettings :: (Core.Maybe GoogleCloudDialogflowCxV3NluSettings),
    -- | Output only. The state of this version. This field is read-only and cannot be set by create and update methods.
    state :: (Core.Maybe GoogleCloudDialogflowCxV3Version_State)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Version' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Version ::
  GoogleCloudDialogflowCxV3Version
newGoogleCloudDialogflowCxV3Version =
  GoogleCloudDialogflowCxV3Version
    { createTime = Core.Nothing,
      description = Core.Nothing,
      displayName = Core.Nothing,
      name = Core.Nothing,
      nluSettings = Core.Nothing,
      state = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Version where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Version"
      ( \o ->
          GoogleCloudDialogflowCxV3Version
            Core.<$> (o Core..:? "createTime")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "nluSettings")
            Core.<*> (o Core..:? "state")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Version where
  toJSON GoogleCloudDialogflowCxV3Version {..} =
    Core.object
      ( Core.catMaybes
          [ ("createTime" Core..=) Core.<$> createTime,
            ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("name" Core..=) Core.<$> name,
            ("nluSettings" Core..=) Core.<$> nluSettings,
            ("state" Core..=) Core.<$> state
          ]
      )

-- | A list of flow version variants.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3VersionVariants' smart constructor.
newtype GoogleCloudDialogflowCxV3VersionVariants = GoogleCloudDialogflowCxV3VersionVariants
  { -- | A list of flow version variants.
    variants :: (Core.Maybe [GoogleCloudDialogflowCxV3VersionVariantsVariant])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3VersionVariants' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3VersionVariants ::
  GoogleCloudDialogflowCxV3VersionVariants
newGoogleCloudDialogflowCxV3VersionVariants =
  GoogleCloudDialogflowCxV3VersionVariants {variants = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3VersionVariants where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3VersionVariants"
      ( \o ->
          GoogleCloudDialogflowCxV3VersionVariants
            Core.<$> (o Core..:? "variants")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3VersionVariants where
  toJSON GoogleCloudDialogflowCxV3VersionVariants {..} =
    Core.object
      (Core.catMaybes [("variants" Core..=) Core.<$> variants])

-- | A single flow version with specified traffic allocation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3VersionVariantsVariant' smart constructor.
data GoogleCloudDialogflowCxV3VersionVariantsVariant = GoogleCloudDialogflowCxV3VersionVariantsVariant
  { -- | Whether the variant is for the control group.
    isControlGroup :: (Core.Maybe Core.Bool),
    -- | Percentage of the traffic which should be routed to this version of flow. Traffic allocation for a single flow must sum up to 1.0.
    trafficAllocation :: (Core.Maybe Core.Double),
    -- | The name of the flow version. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3VersionVariantsVariant' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3VersionVariantsVariant ::
  GoogleCloudDialogflowCxV3VersionVariantsVariant
newGoogleCloudDialogflowCxV3VersionVariantsVariant =
  GoogleCloudDialogflowCxV3VersionVariantsVariant
    { isControlGroup =
        Core.Nothing,
      trafficAllocation = Core.Nothing,
      version = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3VersionVariantsVariant
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3VersionVariantsVariant"
      ( \o ->
          GoogleCloudDialogflowCxV3VersionVariantsVariant
            Core.<$> (o Core..:? "isControlGroup")
            Core.<*> (o Core..:? "trafficAllocation")
            Core.<*> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3VersionVariantsVariant
  where
  toJSON GoogleCloudDialogflowCxV3VersionVariantsVariant {..} =
    Core.object
      ( Core.catMaybes
          [ ("isControlGroup" Core..=) Core.<$> isControlGroup,
            ("trafficAllocation" Core..=) Core.<$> trafficAllocation,
            ("version" Core..=) Core.<$> version
          ]
      )

-- | Description of which voice to use for speech synthesis.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3VoiceSelectionParams' smart constructor.
data GoogleCloudDialogflowCxV3VoiceSelectionParams = GoogleCloudDialogflowCxV3VoiceSelectionParams
  { -- | Optional. The name of the voice. If not set, the service will choose a voice based on the other parameters such as language/code and ssml/gender. For the list of available voices, please refer to <https://cloud.google.com/text-to-speech/docs/voices Supported voices and languages>.
    name :: (Core.Maybe Core.Text),
    -- | Optional. The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement. If a voice of the appropriate gender is not available, the synthesizer substitutes a voice with a different gender rather than failing the request.
    ssmlGender ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3VoiceSelectionParams_SsmlGender
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3VoiceSelectionParams' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3VoiceSelectionParams ::
  GoogleCloudDialogflowCxV3VoiceSelectionParams
newGoogleCloudDialogflowCxV3VoiceSelectionParams =
  GoogleCloudDialogflowCxV3VoiceSelectionParams
    { name =
        Core.Nothing,
      ssmlGender = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3VoiceSelectionParams
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3VoiceSelectionParams"
      ( \o ->
          GoogleCloudDialogflowCxV3VoiceSelectionParams
            Core.<$> (o Core..:? "name")
            Core.<*> (o Core..:? "ssmlGender")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3VoiceSelectionParams where
  toJSON GoogleCloudDialogflowCxV3VoiceSelectionParams {..} =
    Core.object
      ( Core.catMaybes
          [ ("name" Core..=) Core.<$> name,
            ("ssmlGender" Core..=) Core.<$> ssmlGender
          ]
      )

-- | Webhooks host the developer\'s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow\'s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3Webhook' smart constructor.
data GoogleCloudDialogflowCxV3Webhook = GoogleCloudDialogflowCxV3Webhook
  { -- | Indicates whether the webhook is disabled.
    disabled :: (Core.Maybe Core.Bool),
    -- | Required. The human-readable name of the webhook, unique within the agent.
    displayName :: (Core.Maybe Core.Text),
    -- | Configuration for a generic web service.
    genericWebService :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookGenericWebService),
    -- | The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/webhooks\/@.
    name :: (Core.Maybe Core.Text),
    -- | Configuration for a <https://cloud.google.com/service-directory Service Directory> service.
    serviceDirectory :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig),
    -- | Webhook execution timeout. Execution is considered failed if Dialogflow doesn\'t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    timeout :: (Core.Maybe Core.Duration)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3Webhook' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3Webhook ::
  GoogleCloudDialogflowCxV3Webhook
newGoogleCloudDialogflowCxV3Webhook =
  GoogleCloudDialogflowCxV3Webhook
    { disabled = Core.Nothing,
      displayName = Core.Nothing,
      genericWebService = Core.Nothing,
      name = Core.Nothing,
      serviceDirectory = Core.Nothing,
      timeout = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3Webhook where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3Webhook"
      ( \o ->
          GoogleCloudDialogflowCxV3Webhook
            Core.<$> (o Core..:? "disabled")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "genericWebService")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "serviceDirectory")
            Core.<*> (o Core..:? "timeout")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3Webhook where
  toJSON GoogleCloudDialogflowCxV3Webhook {..} =
    Core.object
      ( Core.catMaybes
          [ ("disabled" Core..=) Core.<$> disabled,
            ("displayName" Core..=) Core.<$> displayName,
            ("genericWebService" Core..=) Core.<$> genericWebService,
            ("name" Core..=) Core.<$> name,
            ("serviceDirectory" Core..=) Core.<$> serviceDirectory,
            ("timeout" Core..=) Core.<$> timeout
          ]
      )

-- | Represents configuration for a generic web service.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookGenericWebService' smart constructor.
data GoogleCloudDialogflowCxV3WebhookGenericWebService = GoogleCloudDialogflowCxV3WebhookGenericWebService
  { -- | Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google\'s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, @openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \<(printf \"\\nsubjectAltName=\'DNS:www.example.com\'\")@
    allowedCaCerts :: (Core.Maybe [Core.Base64]),
    -- | Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    httpMethod ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookGenericWebService_HttpMethod
      ),
    -- | Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
    oauthConfig ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
      ),
    -- | Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
    parameterMapping ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
      ),
    -- | The password for HTTP Basic authentication.
    password :: (Core.Maybe Core.Text),
    -- | Optional. Defines a custom JSON object as request body to send to flexible webhook.
    requestBody :: (Core.Maybe Core.Text),
    -- | The HTTP request headers to send together with webhook requests.
    requestHeaders ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
      ),
    -- | Optional. Indicate the auth token type generated from the <https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent Diglogflow service agent>. The generated token is sent in the Authorization header.
    serviceAgentAuth ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookGenericWebService_ServiceAgentAuth
      ),
    -- | Required. The webhook URI for receiving POST requests. It must use https protocol.
    uri :: (Core.Maybe Core.Text),
    -- | The user name for HTTP Basic authentication.
    username :: (Core.Maybe Core.Text),
    -- | Optional. Type of the webhook.
    webhookType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookGenericWebService_WebhookType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookGenericWebService' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookGenericWebService ::
  GoogleCloudDialogflowCxV3WebhookGenericWebService
newGoogleCloudDialogflowCxV3WebhookGenericWebService =
  GoogleCloudDialogflowCxV3WebhookGenericWebService
    { allowedCaCerts =
        Core.Nothing,
      httpMethod = Core.Nothing,
      oauthConfig = Core.Nothing,
      parameterMapping = Core.Nothing,
      password = Core.Nothing,
      requestBody = Core.Nothing,
      requestHeaders = Core.Nothing,
      serviceAgentAuth = Core.Nothing,
      uri = Core.Nothing,
      username = Core.Nothing,
      webhookType = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookGenericWebService"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookGenericWebService
            Core.<$> (o Core..:? "allowedCaCerts")
            Core.<*> (o Core..:? "httpMethod")
            Core.<*> (o Core..:? "oauthConfig")
            Core.<*> (o Core..:? "parameterMapping")
            Core.<*> (o Core..:? "password")
            Core.<*> (o Core..:? "requestBody")
            Core.<*> (o Core..:? "requestHeaders")
            Core.<*> (o Core..:? "serviceAgentAuth")
            Core.<*> (o Core..:? "uri")
            Core.<*> (o Core..:? "username")
            Core.<*> (o Core..:? "webhookType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService
  where
  toJSON GoogleCloudDialogflowCxV3WebhookGenericWebService {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowedCaCerts" Core..=) Core.<$> allowedCaCerts,
            ("httpMethod" Core..=) Core.<$> httpMethod,
            ("oauthConfig" Core..=) Core.<$> oauthConfig,
            ("parameterMapping" Core..=) Core.<$> parameterMapping,
            ("password" Core..=) Core.<$> password,
            ("requestBody" Core..=) Core.<$> requestBody,
            ("requestHeaders" Core..=) Core.<$> requestHeaders,
            ("serviceAgentAuth" Core..=) Core.<$> serviceAgentAuth,
            ("uri" Core..=) Core.<$> uri,
            ("username" Core..=) Core.<$> username,
            ("webhookType" Core..=) Core.<$> webhookType
          ]
      )

-- | Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping' smart constructor.
newtype GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping = GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    Core.Text ->
  GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
newGoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
  additional =
    GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService_ParameterMapping {..} =
      Core.toJSON additional

-- | The HTTP request headers to send together with webhook requests.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders' smart constructor.
newtype GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders = GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
newGoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
  additional =
    GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebService_RequestHeaders {..} =
      Core.toJSON additional

-- | Represents configuration of OAuth client credential flow for 3rd party API authentication.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig' smart constructor.
data GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig = GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
  { -- | Required. The client ID provided by the 3rd party platform.
    clientId :: (Core.Maybe Core.Text),
    -- | Optional. The client secret provided by the 3rd party platform.
    clientSecret :: (Core.Maybe Core.Text),
    -- | Optional. The OAuth scopes to grant.
    scopes :: (Core.Maybe [Core.Text]),
    -- | Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    tokenEndpoint :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig ::
  GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
newGoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig =
  GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
    { clientId =
        Core.Nothing,
      clientSecret = Core.Nothing,
      scopes = Core.Nothing,
      tokenEndpoint = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
            Core.<$> (o Core..:? "clientId")
            Core.<*> (o Core..:? "clientSecret")
            Core.<*> (o Core..:? "scopes")
            Core.<*> (o Core..:? "tokenEndpoint")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookGenericWebServiceOAuthConfig {..} =
      Core.object
        ( Core.catMaybes
            [ ("clientId" Core..=) Core.<$> clientId,
              ("clientSecret" Core..=) Core.<$> clientSecret,
              ("scopes" Core..=) Core.<$> scopes,
              ("tokenEndpoint" Core..=) Core.<$> tokenEndpoint
            ]
        )

-- | The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. You may see undocumented fields in an actual request. These fields are used internally by Dialogflow and should be ignored.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequest' smart constructor.
data GoogleCloudDialogflowCxV3WebhookRequest = GoogleCloudDialogflowCxV3WebhookRequest
  { -- | Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.
    detectIntentResponseId :: (Core.Maybe Core.Text),
    -- | If DTMF was provided as input, this field will contain the DTMF digits.
    dtmfDigits :: (Core.Maybe Core.Text),
    -- | Always present. Information about the fulfillment that triggered this webhook call.
    fulfillmentInfo :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo),
    -- | Information about the last matched intent.
    intentInfo :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookRequestIntentInfo),
    -- | The language code specified in the original request.
    languageCode :: (Core.Maybe Core.Text),
    -- | Information about the language of the request.
    languageInfo :: (Core.Maybe GoogleCloudDialogflowCxV3LanguageInfo),
    -- | The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;
    messages :: (Core.Maybe [GoogleCloudDialogflowCxV3ResponseMessage]),
    -- | Information about page status.
    pageInfo :: (Core.Maybe GoogleCloudDialogflowCxV3PageInfo),
    -- | Custom data set in QueryParameters.payload.
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookRequest_Payload),
    -- | The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request.
    sentimentAnalysisResult ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
      ),
    -- | Information about session status.
    sessionInfo :: (Core.Maybe GoogleCloudDialogflowCxV3SessionInfo),
    -- | If natural language text was provided as input, this field will contain a copy of the text.
    text :: (Core.Maybe Core.Text),
    -- | If natural language speech audio was provided as input, this field will contain the transcript for the audio.
    transcript :: (Core.Maybe Core.Text),
    -- | If an event was provided as input, this field will contain the name of the event.
    triggerEvent :: (Core.Maybe Core.Text),
    -- | If an intent was provided as input, this field will contain a copy of the intent identifier. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    triggerIntent :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequest ::
  GoogleCloudDialogflowCxV3WebhookRequest
newGoogleCloudDialogflowCxV3WebhookRequest =
  GoogleCloudDialogflowCxV3WebhookRequest
    { detectIntentResponseId =
        Core.Nothing,
      dtmfDigits = Core.Nothing,
      fulfillmentInfo = Core.Nothing,
      intentInfo = Core.Nothing,
      languageCode = Core.Nothing,
      languageInfo = Core.Nothing,
      messages = Core.Nothing,
      pageInfo = Core.Nothing,
      payload = Core.Nothing,
      sentimentAnalysisResult = Core.Nothing,
      sessionInfo = Core.Nothing,
      text = Core.Nothing,
      transcript = Core.Nothing,
      triggerEvent = Core.Nothing,
      triggerIntent = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3WebhookRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequest
            Core.<$> (o Core..:? "detectIntentResponseId")
            Core.<*> (o Core..:? "dtmfDigits")
            Core.<*> (o Core..:? "fulfillmentInfo")
            Core.<*> (o Core..:? "intentInfo")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "languageInfo")
            Core.<*> (o Core..:? "messages")
            Core.<*> (o Core..:? "pageInfo")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "sentimentAnalysisResult")
            Core.<*> (o Core..:? "sessionInfo")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "transcript")
            Core.<*> (o Core..:? "triggerEvent")
            Core.<*> (o Core..:? "triggerIntent")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3WebhookRequest where
  toJSON GoogleCloudDialogflowCxV3WebhookRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("detectIntentResponseId" Core..=)
              Core.<$> detectIntentResponseId,
            ("dtmfDigits" Core..=) Core.<$> dtmfDigits,
            ("fulfillmentInfo" Core..=) Core.<$> fulfillmentInfo,
            ("intentInfo" Core..=) Core.<$> intentInfo,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("languageInfo" Core..=) Core.<$> languageInfo,
            ("messages" Core..=) Core.<$> messages,
            ("pageInfo" Core..=) Core.<$> pageInfo,
            ("payload" Core..=) Core.<$> payload,
            ("sentimentAnalysisResult" Core..=)
              Core.<$> sentimentAnalysisResult,
            ("sessionInfo" Core..=) Core.<$> sessionInfo,
            ("text" Core..=) Core.<$> text,
            ("transcript" Core..=) Core.<$> transcript,
            ("triggerEvent" Core..=) Core.<$> triggerEvent,
            ("triggerIntent" Core..=) Core.<$> triggerIntent
          ]
      )

-- | Custom data set in QueryParameters.payload.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequest_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3WebhookRequest_Payload = GoogleCloudDialogflowCxV3WebhookRequest_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequest_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequest_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3WebhookRequest_Payload
newGoogleCloudDialogflowCxV3WebhookRequest_Payload additional =
  GoogleCloudDialogflowCxV3WebhookRequest_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookRequest_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequest_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequest_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookRequest_Payload
  where
  toJSON GoogleCloudDialogflowCxV3WebhookRequest_Payload {..} =
    Core.toJSON additional

-- | Represents fulfillment information communicated to the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo = GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
  { -- | Always present. The value of the Fulfillment.tag field will be populated in this field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes.
    tag :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo ::
  GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
newGoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo =
  GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
    { tag =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
            Core.<$> (o Core..:? "tag")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo
  where
  toJSON GoogleCloudDialogflowCxV3WebhookRequestFulfillmentInfo {..} =
    Core.object (Core.catMaybes [("tag" Core..=) Core.<$> tag])

-- | Represents intent information communicated to the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo' smart constructor.
data GoogleCloudDialogflowCxV3WebhookRequestIntentInfo = GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
  { -- | The confidence of the matched intent. Values range from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | Always present. The display name of the last matched intent.
    displayName :: (Core.Maybe Core.Text),
    -- | Always present. The unique identifier of the last matched intent. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    lastMatchedIntent :: (Core.Maybe Core.Text),
    -- | Parameters identified as a result of intent matching. This is a map of the name of the identified parameter to the value of the parameter identified from the user\'s utterance. All parameters defined in the matched intent that are identified will be surfaced here.
    parameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequestIntentInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo ::
  GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo =
  GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
    { confidence =
        Core.Nothing,
      displayName = Core.Nothing,
      lastMatchedIntent = Core.Nothing,
      parameters = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequestIntentInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "lastMatchedIntent")
            Core.<*> (o Core..:? "parameters")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo
  where
  toJSON GoogleCloudDialogflowCxV3WebhookRequestIntentInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("displayName" Core..=) Core.<$> displayName,
            ("lastMatchedIntent" Core..=) Core.<$> lastMatchedIntent,
            ("parameters" Core..=) Core.<$> parameters
          ]
      )

-- | Parameters identified as a result of intent matching. This is a map of the name of the identified parameter to the value of the parameter identified from the user\'s utterance. All parameters defined in the matched intent that are identified will be surfaced here.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters = GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
  { additional ::
      ( Core.HashMap
          Core.Text
          GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue ->
  GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
newGoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
  additional =
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfo_Parameters {..} =
      Core.toJSON additional

-- | Represents a value for an intent parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue' smart constructor.
data GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue = GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
  { -- | Always present. Original text value extracted from user utterance.
    originalValue :: (Core.Maybe Core.Text),
    -- | Always present. Structured value for the parameter extracted from user utterance.
    resolvedValue :: (Core.Maybe Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue ::
  GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
newGoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue =
  GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
    { originalValue =
        Core.Nothing,
      resolvedValue =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
            Core.<$> (o Core..:? "originalValue")
            Core.<*> (o Core..:? "resolvedValue")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookRequestIntentInfoIntentParameterValue {..} =
      Core.object
        ( Core.catMaybes
            [ ("originalValue" Core..=) Core.<$> originalValue,
              ("resolvedValue" Core..=) Core.<$> resolvedValue
            ]
        )

-- | Represents the result of sentiment analysis.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult' smart constructor.
data GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult = GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
  { -- | A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
    magnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
    score :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult ::
  GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
newGoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult =
  GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
    { magnitude =
        Core.Nothing,
      score = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
            Core.<$> (o Core..:? "magnitude")
            Core.<*> (o Core..:? "score")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookRequestSentimentAnalysisResult {..} =
      Core.object
        ( Core.catMaybes
            [ ("magnitude" Core..=) Core.<$> magnitude,
              ("score" Core..=) Core.<$> score
            ]
        )

-- | The response message for a webhook call.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookResponse' smart constructor.
data GoogleCloudDialogflowCxV3WebhookResponse = GoogleCloudDialogflowCxV3WebhookResponse
  { -- | The fulfillment response to send to the user. This field can be omitted by the webhook if it does not intend to send any response to the user.
    fulfillmentResponse ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
      ),
    -- | Information about page status. This field can be omitted by the webhook if it does not intend to modify page status.
    pageInfo :: (Core.Maybe GoogleCloudDialogflowCxV3PageInfo),
    -- | Value to append directly to QueryResult.webhook_payloads.
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookResponse_Payload),
    -- | Information about session status. This field can be omitted by the webhook if it does not intend to modify session status.
    sessionInfo :: (Core.Maybe GoogleCloudDialogflowCxV3SessionInfo),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookResponse ::
  GoogleCloudDialogflowCxV3WebhookResponse
newGoogleCloudDialogflowCxV3WebhookResponse =
  GoogleCloudDialogflowCxV3WebhookResponse
    { fulfillmentResponse =
        Core.Nothing,
      pageInfo = Core.Nothing,
      payload = Core.Nothing,
      sessionInfo = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3WebhookResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookResponse
            Core.<$> (o Core..:? "fulfillmentResponse")
            Core.<*> (o Core..:? "pageInfo")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "sessionInfo")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3WebhookResponse where
  toJSON GoogleCloudDialogflowCxV3WebhookResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("fulfillmentResponse" Core..=) Core.<$> fulfillmentResponse,
            ("pageInfo" Core..=) Core.<$> pageInfo,
            ("payload" Core..=) Core.<$> payload,
            ("sessionInfo" Core..=) Core.<$> sessionInfo,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage
          ]
      )

-- | Value to append directly to QueryResult.webhook_payloads.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookResponse_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3WebhookResponse_Payload = GoogleCloudDialogflowCxV3WebhookResponse_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookResponse_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookResponse_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3WebhookResponse_Payload
newGoogleCloudDialogflowCxV3WebhookResponse_Payload additional =
  GoogleCloudDialogflowCxV3WebhookResponse_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookResponse_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookResponse_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookResponse_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookResponse_Payload
  where
  toJSON GoogleCloudDialogflowCxV3WebhookResponse_Payload {..} =
    Core.toJSON additional

-- | Represents a fulfillment response to the user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse' smart constructor.
data GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse = GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
  { -- | Merge behavior for @messages@.
    mergeBehavior ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse_MergeBehavior
      ),
    -- | The list of rich message responses to present to the user.
    messages :: (Core.Maybe [GoogleCloudDialogflowCxV3ResponseMessage])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse ::
  GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
newGoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse =
  GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
    { mergeBehavior =
        Core.Nothing,
      messages = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
            Core.<$> (o Core..:? "mergeBehavior")
            Core.<*> (o Core..:? "messages")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse
  where
  toJSON
    GoogleCloudDialogflowCxV3WebhookResponseFulfillmentResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("mergeBehavior" Core..=) Core.<$> mergeBehavior,
              ("messages" Core..=) Core.<$> messages
            ]
        )

-- | Represents configuration for a <https://cloud.google.com/service-directory Service Directory> service.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig' smart constructor.
data GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig = GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
  { -- | Generic Service configuration of this webhook.
    genericWebService :: (Core.Maybe GoogleCloudDialogflowCxV3WebhookGenericWebService),
    -- | Required. The name of <https://cloud.google.com/service-directory Service Directory> service. Format: @projects\/\/locations\/\/namespaces\/\/services\/@. @Location ID@ of the service directory must be the same as the location of the agent.
    service :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig ::
  GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
newGoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig =
  GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
    { genericWebService =
        Core.Nothing,
      service = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
            Core.<$> (o Core..:? "genericWebService")
            Core.<*> (o Core..:? "service")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig
  where
  toJSON GoogleCloudDialogflowCxV3WebhookServiceDirectoryConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("genericWebService" Core..=) Core.<$> genericWebService,
            ("service" Core..=) Core.<$> service
          ]
      )

-- | Hierarchical advanced settings for agent\/flow\/page\/fulfillment\/parameter. Settings exposed at lower level overrides the settings exposed at higher level. Overriding occurs at the sub-setting level. For example, the playback/interruption/settings at fulfillment level only overrides the playback/interruption/settings at the agent level, leaving other settings at the agent level unchanged. DTMF settings does not override each other. DTMF settings set at different levels define DTMF detections running in parallel. Hierarchy: Agent->Flow->Page->Fulfillment\/Parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1AdvancedSettings' smart constructor.
data GoogleCloudDialogflowCxV3beta1AdvancedSettings = GoogleCloudDialogflowCxV3beta1AdvancedSettings
  { -- | If present, incoming audio is exported by Dialogflow to the configured Google Cloud Storage destination. Exposed at the following levels: - Agent level - Flow level
    audioExportGcsDestination :: (Core.Maybe GoogleCloudDialogflowCxV3beta1GcsDestination),
    -- | Settings for DTMF. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level.
    dtmfSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
      ),
    -- | Settings for logging. Settings for Dialogflow History, Contact Center messages, StackDriver logs, and speech logging. Exposed at the following levels: - Agent level.
    loggingSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
      ),
    -- | Settings for speech to text detection. Exposed at the following levels: - Agent level - Flow level - Page level - Parameter level
    speechSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1AdvancedSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1AdvancedSettings ::
  GoogleCloudDialogflowCxV3beta1AdvancedSettings
newGoogleCloudDialogflowCxV3beta1AdvancedSettings =
  GoogleCloudDialogflowCxV3beta1AdvancedSettings
    { audioExportGcsDestination =
        Core.Nothing,
      dtmfSettings = Core.Nothing,
      loggingSettings = Core.Nothing,
      speechSettings = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1AdvancedSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1AdvancedSettings
            Core.<$> (o Core..:? "audioExportGcsDestination")
            Core.<*> (o Core..:? "dtmfSettings")
            Core.<*> (o Core..:? "loggingSettings")
            Core.<*> (o Core..:? "speechSettings")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1AdvancedSettings where
  toJSON GoogleCloudDialogflowCxV3beta1AdvancedSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("audioExportGcsDestination" Core..=)
              Core.<$> audioExportGcsDestination,
            ("dtmfSettings" Core..=) Core.<$> dtmfSettings,
            ("loggingSettings" Core..=) Core.<$> loggingSettings,
            ("speechSettings" Core..=) Core.<$> speechSettings
          ]
      )

-- | Define behaviors for DTMF (dual tone multi frequency).
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings' smart constructor.
data GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings = GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
  { -- | If true, incoming audio is processed for DTMF (dual tone multi frequency) events. For example, if the caller presses a button on their telephone keypad and DTMF processing is enabled, Dialogflow will detect the event (e.g. a \"3\" was pressed) in the incoming audio and pass the event to the bot to drive business logic (e.g. when 3 is pressed, return the account balance).
    enabled :: (Core.Maybe Core.Bool),
    -- | Endpoint timeout setting for matching dtmf input to regex.
    endpointingTimeoutDuration :: (Core.Maybe Core.Duration),
    -- | The digit that terminates a DTMF digit sequence.
    finishDigit :: (Core.Maybe Core.Text),
    -- | Interdigit timeout setting for matching dtmf input to regex.
    interdigitTimeoutDuration :: (Core.Maybe Core.Duration),
    -- | Max length of DTMF digits.
    maxDigits :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings ::
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings =
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
    { enabled =
        Core.Nothing,
      endpointingTimeoutDuration =
        Core.Nothing,
      finishDigit = Core.Nothing,
      interdigitTimeoutDuration =
        Core.Nothing,
      maxDigits = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
            Core.<$> (o Core..:? "enabled")
            Core.<*> (o Core..:? "endpointingTimeoutDuration")
            Core.<*> (o Core..:? "finishDigit")
            Core.<*> (o Core..:? "interdigitTimeoutDuration")
            Core.<*> (o Core..:? "maxDigits")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsDtmfSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("enabled" Core..=) Core.<$> enabled,
              ("endpointingTimeoutDuration" Core..=)
                Core.<$> endpointingTimeoutDuration,
              ("finishDigit" Core..=) Core.<$> finishDigit,
              ("interdigitTimeoutDuration" Core..=)
                Core.<$> interdigitTimeoutDuration,
              ("maxDigits" Core..=) Core.<$> maxDigits
            ]
        )

-- | Define behaviors on logging.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings' smart constructor.
data GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings = GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
  { -- | Enables consent-based end-user input redaction, if true, a pre-defined session parameter @$session.params.conversation-redaction@ will be used to determine if the utterance should be redacted.
    enableConsentBasedRedaction :: (Core.Maybe Core.Bool),
    -- | Enables DF Interaction logging.
    enableInteractionLogging :: (Core.Maybe Core.Bool),
    -- | Enables Google Cloud Logging.
    enableStackdriverLogging :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings ::
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings =
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
    { enableConsentBasedRedaction =
        Core.Nothing,
      enableInteractionLogging =
        Core.Nothing,
      enableStackdriverLogging =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
            Core.<$> (o Core..:? "enableConsentBasedRedaction")
            Core.<*> (o Core..:? "enableInteractionLogging")
            Core.<*> (o Core..:? "enableStackdriverLogging")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsLoggingSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("enableConsentBasedRedaction" Core..=)
                Core.<$> enableConsentBasedRedaction,
              ("enableInteractionLogging" Core..=)
                Core.<$> enableInteractionLogging,
              ("enableStackdriverLogging" Core..=)
                Core.<$> enableStackdriverLogging
            ]
        )

-- | Define behaviors of speech to text detection.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings' smart constructor.
data GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings = GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
  { -- | Sensitivity of the speech model that detects the end of speech. Scale from 0 to 100.
    endpointerSensitivity :: (Core.Maybe Core.Int32),
    -- | Mapping from language to Speech-to-Text model. The mapped Speech-to-Text model will be selected for requests from its corresponding language. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models Speech models>.
    models ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
      ),
    -- | Timeout before detecting no speech.
    noSpeechTimeout :: (Core.Maybe Core.Duration),
    -- | Use timeout based endpointing, interpreting endpointer sensitivity as seconds of timeout value.
    useTimeoutBasedEndpointing :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings ::
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings =
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
    { endpointerSensitivity =
        Core.Nothing,
      models = Core.Nothing,
      noSpeechTimeout = Core.Nothing,
      useTimeoutBasedEndpointing =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
            Core.<$> (o Core..:? "endpointerSensitivity")
            Core.<*> (o Core..:? "models")
            Core.<*> (o Core..:? "noSpeechTimeout")
            Core.<*> (o Core..:? "useTimeoutBasedEndpointing")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings {..} =
      Core.object
        ( Core.catMaybes
            [ ("endpointerSensitivity" Core..=) Core.<$> endpointerSensitivity,
              ("models" Core..=) Core.<$> models,
              ("noSpeechTimeout" Core..=) Core.<$> noSpeechTimeout,
              ("useTimeoutBasedEndpointing" Core..=)
                Core.<$> useTimeoutBasedEndpointing
            ]
        )

-- | Mapping from language to Speech-to-Text model. The mapped Speech-to-Text model will be selected for requests from its corresponding language. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models Speech models>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models = GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    Core.Text ->
  GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
newGoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
  additional =
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1AdvancedSettingsSpeechSettings_Models {..} =
      Core.toJSON additional

-- | Represents the natural speech audio to be processed.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1AudioInput' smart constructor.
data GoogleCloudDialogflowCxV3beta1AudioInput = GoogleCloudDialogflowCxV3beta1AudioInput
  { -- | The natural language speech audio to be processed. A single request can contain up to 2 minutes of speech audio data. The transcribed text cannot contain more than 256 bytes. For non-streaming audio detect intent, both @config@ and @audio@ must be provided. For streaming audio detect intent, @config@ must be provided in the first request and @audio@ must be provided in all following requests.
    audio :: (Core.Maybe Core.Base64),
    -- | Required. Instructs the speech recognizer how to process the speech audio.
    config :: (Core.Maybe GoogleCloudDialogflowCxV3beta1InputAudioConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1AudioInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1AudioInput ::
  GoogleCloudDialogflowCxV3beta1AudioInput
newGoogleCloudDialogflowCxV3beta1AudioInput =
  GoogleCloudDialogflowCxV3beta1AudioInput
    { audio = Core.Nothing,
      config = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1AudioInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1AudioInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1AudioInput
            Core.<$> (o Core..:? "audio")
            Core.<*> (o Core..:? "config")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1AudioInput where
  toJSON GoogleCloudDialogflowCxV3beta1AudioInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("audio" Core..=) Core.<$> audio,
            ("config" Core..=) Core.<$> config
          ]
      )

-- | Configuration of the barge-in behavior. Barge-in instructs the API to return a detected utterance at a proper time while the client is playing back the response audio from a previous request. When the client sees the utterance, it should stop the playback and immediately get ready for receiving the responses for the current request. The barge-in handling requires the client to start streaming audio input as soon as it starts playing back the audio from the previous response. The playback is modeled into two phases: * No barge-in phase: which goes first and during which speech detection should not be carried out. * Barge-in phase: which follows the no barge-in phase and during which the API starts speech detection and may inform the client that an utterance has been detected. Note that no-speech event is not expected in this phase. The client provides this configuration in terms of the durations of those two phases. The durations are measured in terms of the audio length from the start of the input audio.
-- No-speech event is a response with END/OF/UTTERANCE without any transcript following up.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1BargeInConfig' smart constructor.
data GoogleCloudDialogflowCxV3beta1BargeInConfig = GoogleCloudDialogflowCxV3beta1BargeInConfig
  { -- | Duration that is not eligible for barge-in at the beginning of the input audio.
    noBargeInDuration :: (Core.Maybe Core.Duration),
    -- | Total duration for the playback at the beginning of the input audio.
    totalDuration :: (Core.Maybe Core.Duration)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1BargeInConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1BargeInConfig ::
  GoogleCloudDialogflowCxV3beta1BargeInConfig
newGoogleCloudDialogflowCxV3beta1BargeInConfig =
  GoogleCloudDialogflowCxV3beta1BargeInConfig
    { noBargeInDuration =
        Core.Nothing,
      totalDuration = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1BargeInConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1BargeInConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1BargeInConfig
            Core.<$> (o Core..:? "noBargeInDuration")
            Core.<*> (o Core..:? "totalDuration")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1BargeInConfig where
  toJSON GoogleCloudDialogflowCxV3beta1BargeInConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("noBargeInDuration" Core..=) Core.<$> noBargeInDuration,
            ("totalDuration" Core..=) Core.<$> totalDuration
          ]
      )

-- | Metadata returned for the TestCases.BatchRunTestCases long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata = GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
  { -- | The test errors.
    errors :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TestError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata ::
  GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata =
  GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
    { errors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
            Core.<$> (o Core..:? "errors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata
  where
  toJSON GoogleCloudDialogflowCxV3beta1BatchRunTestCasesMetadata {..} =
    Core.object (Core.catMaybes [("errors" Core..=) Core.<$> errors])

-- | The response message for TestCases.BatchRunTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse = GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
  { -- | The test case results. The detailed conversation turns are empty in this response.
    results :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TestCaseResult])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse ::
  GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
newGoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse =
  GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
    { results =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
            Core.<$> (o Core..:? "results")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1BatchRunTestCasesResponse {..} =
    Core.object
      (Core.catMaybes [("results" Core..=) Core.<$> results])

-- | Represents a result from running a test case in an agent environment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ContinuousTestResult' smart constructor.
data GoogleCloudDialogflowCxV3beta1ContinuousTestResult = GoogleCloudDialogflowCxV3beta1ContinuousTestResult
  { -- | The resource name for the continuous test result. Format: @projects\/\/locations\/\/agents\/\/environments\/\/continuousTestResults\/@.
    name :: (Core.Maybe Core.Text),
    -- | The result of this continuous test run, i.e. whether all the tests in this continuous test run pass or not.
    result ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ContinuousTestResult_Result
      ),
    -- | Time when the continuous testing run starts.
    runTime :: (Core.Maybe Core.DateTime),
    -- | A list of individual test case results names in this continuous test run.
    testCaseResults :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ContinuousTestResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ContinuousTestResult ::
  GoogleCloudDialogflowCxV3beta1ContinuousTestResult
newGoogleCloudDialogflowCxV3beta1ContinuousTestResult =
  GoogleCloudDialogflowCxV3beta1ContinuousTestResult
    { name =
        Core.Nothing,
      result = Core.Nothing,
      runTime = Core.Nothing,
      testCaseResults = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ContinuousTestResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ContinuousTestResult"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ContinuousTestResult
            Core.<$> (o Core..:? "name")
            Core.<*> (o Core..:? "result")
            Core.<*> (o Core..:? "runTime")
            Core.<*> (o Core..:? "testCaseResults")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ContinuousTestResult
  where
  toJSON GoogleCloudDialogflowCxV3beta1ContinuousTestResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("name" Core..=) Core.<$> name,
            ("result" Core..=) Core.<$> result,
            ("runTime" Core..=) Core.<$> runTime,
            ("testCaseResults" Core..=) Core.<$> testCaseResults
          ]
      )

-- | This message is used to hold all the Conversation Signals data, which will be converted to JSON and exported to BigQuery.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationSignals' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ConversationSignals = GoogleCloudDialogflowCxV3beta1ConversationSignals
  { -- | Required. Turn signals for the current turn.
    turnSignals :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TurnSignals)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationSignals ::
  GoogleCloudDialogflowCxV3beta1ConversationSignals
newGoogleCloudDialogflowCxV3beta1ConversationSignals =
  GoogleCloudDialogflowCxV3beta1ConversationSignals
    { turnSignals =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationSignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationSignals
            Core.<$> (o Core..:? "turnSignals")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ConversationSignals
  where
  toJSON GoogleCloudDialogflowCxV3beta1ConversationSignals {..} =
    Core.object
      (Core.catMaybes [("turnSignals" Core..=) Core.<$> turnSignals])

-- | One interaction between a human and virtual agent. The human provides some input and the virtual agent provides a response.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationTurn' smart constructor.
data GoogleCloudDialogflowCxV3beta1ConversationTurn = GoogleCloudDialogflowCxV3beta1ConversationTurn
  { -- | The user input.
    userInput ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
      ),
    -- | The virtual agent output.
    virtualAgentOutput ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationTurn' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationTurn ::
  GoogleCloudDialogflowCxV3beta1ConversationTurn
newGoogleCloudDialogflowCxV3beta1ConversationTurn =
  GoogleCloudDialogflowCxV3beta1ConversationTurn
    { userInput =
        Core.Nothing,
      virtualAgentOutput = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurn
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationTurn"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationTurn
            Core.<$> (o Core..:? "userInput")
            Core.<*> (o Core..:? "virtualAgentOutput")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1ConversationTurn where
  toJSON GoogleCloudDialogflowCxV3beta1ConversationTurn {..} =
    Core.object
      ( Core.catMaybes
          [ ("userInput" Core..=) Core.<$> userInput,
            ("virtualAgentOutput" Core..=) Core.<$> virtualAgentOutput
          ]
      )

-- | The input from the human user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput' smart constructor.
data GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput = GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
  { -- | Whether sentiment analysis is enabled.
    enableSentimentAnalysis :: (Core.Maybe Core.Bool),
    -- | Parameters that need to be injected into the conversation during intent detection.
    injectedParameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
      ),
    -- | Supports text input, event input, dtmf input in the test case.
    input :: (Core.Maybe GoogleCloudDialogflowCxV3beta1QueryInput),
    -- | If webhooks should be allowed to trigger in response to the user utterance. Often if parameters are injected, webhooks should not be enabled.
    isWebhookEnabled :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput ::
  GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput =
  GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
    { enableSentimentAnalysis =
        Core.Nothing,
      injectedParameters = Core.Nothing,
      input = Core.Nothing,
      isWebhookEnabled = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
            Core.<$> (o Core..:? "enableSentimentAnalysis")
            Core.<*> (o Core..:? "injectedParameters")
            Core.<*> (o Core..:? "input")
            Core.<*> (o Core..:? "isWebhookEnabled")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput
  where
  toJSON GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableSentimentAnalysis" Core..=)
              Core.<$> enableSentimentAnalysis,
            ("injectedParameters" Core..=) Core.<$> injectedParameters,
            ("input" Core..=) Core.<$> input,
            ("isWebhookEnabled" Core..=) Core.<$> isWebhookEnabled
          ]
      )

-- | Parameters that need to be injected into the conversation during intent detection.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters = GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
newGoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
  additional =
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnUserInput_InjectedParameters {..} =
      Core.toJSON additional

-- | The output from the virtual agent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput' smart constructor.
data GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput = GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
  { -- | The Page on which the utterance was spoken. Only name and displayName will be set.
    currentPage :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Page),
    -- | Required. Input only. The diagnostic info output for the turn. Required to calculate the testing coverage.
    diagnosticInfo ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
      ),
    -- | Output only. If this is part of a result conversation turn, the list of differences between the original run and the replay for this output, if any.
    differences :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TestRunDifference]),
    -- | The session parameters available to the bot at this point.
    sessionParameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
      ),
    -- | Response error from the agent in the test result. If set, other output is empty.
    status :: (Core.Maybe GoogleRpcStatus),
    -- | The text responses from the agent for the turn.
    textResponses :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1ResponseMessageText]),
    -- | The Intent that triggered the response. Only name and displayName will be set.
    triggeredIntent :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Intent)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput ::
  GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput =
  GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
    { currentPage =
        Core.Nothing,
      diagnosticInfo = Core.Nothing,
      differences = Core.Nothing,
      sessionParameters =
        Core.Nothing,
      status = Core.Nothing,
      textResponses = Core.Nothing,
      triggeredIntent = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
            Core.<$> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "diagnosticInfo")
            Core.<*> (o Core..:? "differences")
            Core.<*> (o Core..:? "sessionParameters")
            Core.<*> (o Core..:? "status")
            Core.<*> (o Core..:? "textResponses")
            Core.<*> (o Core..:? "triggeredIntent")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput {..} =
      Core.object
        ( Core.catMaybes
            [ ("currentPage" Core..=) Core.<$> currentPage,
              ("diagnosticInfo" Core..=) Core.<$> diagnosticInfo,
              ("differences" Core..=) Core.<$> differences,
              ("sessionParameters" Core..=) Core.<$> sessionParameters,
              ("status" Core..=) Core.<$> status,
              ("textResponses" Core..=) Core.<$> textResponses,
              ("triggeredIntent" Core..=) Core.<$> triggeredIntent
            ]
        )

-- | Required. Input only. The diagnostic info output for the turn. Required to calculate the testing coverage.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo = GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
  additional =
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_DiagnosticInfo {..} =
      Core.toJSON additional

-- | The session parameters available to the bot at this point.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters = GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
newGoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
  additional =
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ConversationTurnVirtualAgentOutput_SessionParameters {..} =
      Core.toJSON additional

-- | Metadata associated with the long running operation for Versions.CreateVersion.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata = GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
  { -- | Name of the created version. Format: @projects\/\/locations\/\/agents\/\/flows\/\/versions\/@.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata ::
  GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
newGoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata =
  GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
    { version =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
            Core.<$> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1CreateVersionOperationMetadata {..} =
      Core.object
        (Core.catMaybes [("version" Core..=) Core.<$> version])

-- | A data store connection. It represents a data store in Discovery Engine and the type of the contents it contains.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1DataStoreConnection' smart constructor.
data GoogleCloudDialogflowCxV3beta1DataStoreConnection = GoogleCloudDialogflowCxV3beta1DataStoreConnection
  { -- | The full name of the referenced data store. Formats: @projects\/{project}\/locations\/{location}\/collections\/{collection}\/dataStores\/{data_store}@ @projects\/{project}\/locations\/{location}\/dataStores\/{data_store}@
    dataStore :: (Core.Maybe Core.Text),
    -- | The type of the connected data store.
    dataStoreType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1DataStoreConnection_DataStoreType
      ),
    -- | The document processing mode for the data store connection. Should only be set for PUBLIC_WEB and UNSTRUCTURED data stores. If not set it is considered as DOCUMENTS, as this is the legacy mode.
    documentProcessingMode ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1DataStoreConnection_DocumentProcessingMode
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1DataStoreConnection' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1DataStoreConnection ::
  GoogleCloudDialogflowCxV3beta1DataStoreConnection
newGoogleCloudDialogflowCxV3beta1DataStoreConnection =
  GoogleCloudDialogflowCxV3beta1DataStoreConnection
    { dataStore =
        Core.Nothing,
      dataStoreType = Core.Nothing,
      documentProcessingMode = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1DataStoreConnection
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1DataStoreConnection"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1DataStoreConnection
            Core.<$> (o Core..:? "dataStore")
            Core.<*> (o Core..:? "dataStoreType")
            Core.<*> (o Core..:? "documentProcessingMode")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1DataStoreConnection
  where
  toJSON GoogleCloudDialogflowCxV3beta1DataStoreConnection {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataStore" Core..=) Core.<$> dataStore,
            ("dataStoreType" Core..=) Core.<$> dataStoreType,
            ("documentProcessingMode" Core..=)
              Core.<$> documentProcessingMode
          ]
      )

-- | Metadata returned for the Environments.DeployFlow long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1DeployFlowMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1DeployFlowMetadata = GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
  { -- | Errors of running deployment tests.
    testErrors :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TestError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1DeployFlowMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1DeployFlowMetadata ::
  GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
newGoogleCloudDialogflowCxV3beta1DeployFlowMetadata =
  GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
    { testErrors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1DeployFlowMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
            Core.<$> (o Core..:? "testErrors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1DeployFlowMetadata
  where
  toJSON GoogleCloudDialogflowCxV3beta1DeployFlowMetadata {..} =
    Core.object
      (Core.catMaybes [("testErrors" Core..=) Core.<$> testErrors])

-- | The response message for Environments.DeployFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1DeployFlowResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1DeployFlowResponse = GoogleCloudDialogflowCxV3beta1DeployFlowResponse
  { -- | The name of the flow version deployment. Format: @projects\/\/locations\/\/agents\/\/environments\/\/deployments\/@.
    deployment :: (Core.Maybe Core.Text),
    -- | The updated environment where the flow is deployed.
    environment :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Environment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1DeployFlowResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1DeployFlowResponse ::
  GoogleCloudDialogflowCxV3beta1DeployFlowResponse
newGoogleCloudDialogflowCxV3beta1DeployFlowResponse =
  GoogleCloudDialogflowCxV3beta1DeployFlowResponse
    { deployment =
        Core.Nothing,
      environment = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1DeployFlowResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1DeployFlowResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1DeployFlowResponse
            Core.<$> (o Core..:? "deployment")
            Core.<*> (o Core..:? "environment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1DeployFlowResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1DeployFlowResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("deployment" Core..=) Core.<$> deployment,
            ("environment" Core..=) Core.<$> environment
          ]
      )

-- | Represents the input for dtmf event.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1DtmfInput' smart constructor.
data GoogleCloudDialogflowCxV3beta1DtmfInput = GoogleCloudDialogflowCxV3beta1DtmfInput
  { -- | The dtmf digits.
    digits :: (Core.Maybe Core.Text),
    -- | The finish digit (if any).
    finishDigit :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1DtmfInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1DtmfInput ::
  GoogleCloudDialogflowCxV3beta1DtmfInput
newGoogleCloudDialogflowCxV3beta1DtmfInput =
  GoogleCloudDialogflowCxV3beta1DtmfInput
    { digits = Core.Nothing,
      finishDigit = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1DtmfInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1DtmfInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1DtmfInput
            Core.<$> (o Core..:? "digits")
            Core.<*> (o Core..:? "finishDigit")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1DtmfInput where
  toJSON GoogleCloudDialogflowCxV3beta1DtmfInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("digits" Core..=) Core.<$> digits,
            ("finishDigit" Core..=) Core.<$> finishDigit
          ]
      )

-- | Represents an environment for an agent. You can create multiple versions of your agent and publish them to separate environments. When you edit an agent, you are editing the draft agent. At any point, you can save the draft agent as an agent version, which is an immutable snapshot of your agent. When you save the draft agent, it is published to the default environment. When you create agent versions, you can publish them to custom environments. You can create a variety of custom environments for testing, development, production, etc.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Environment' smart constructor.
data GoogleCloudDialogflowCxV3beta1Environment = GoogleCloudDialogflowCxV3beta1Environment
  { -- | The human-readable description of the environment. The maximum length is 500 characters. If exceeded, the request is rejected.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the environment (unique in an agent). Limit of 64 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | The name of the environment. Format: @projects\/\/locations\/\/agents\/\/environments\/@.
    name :: (Core.Maybe Core.Text),
    -- | The test cases config for continuous tests of this environment.
    testCasesConfig ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
      ),
    -- | Output only. Update time of this environment.
    updateTime :: (Core.Maybe Core.DateTime),
    -- | A list of configurations for flow versions. You should include version configs for all flows that are reachable from @Start Flow@ in the agent. Otherwise, an error will be returned.
    versionConfigs ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig]
      ),
    -- | The webhook configuration for this environment.
    webhookConfig :: (Core.Maybe GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Environment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Environment ::
  GoogleCloudDialogflowCxV3beta1Environment
newGoogleCloudDialogflowCxV3beta1Environment =
  GoogleCloudDialogflowCxV3beta1Environment
    { description =
        Core.Nothing,
      displayName = Core.Nothing,
      name = Core.Nothing,
      testCasesConfig = Core.Nothing,
      updateTime = Core.Nothing,
      versionConfigs = Core.Nothing,
      webhookConfig = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Environment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Environment"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Environment
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "testCasesConfig")
            Core.<*> (o Core..:? "updateTime")
            Core.<*> (o Core..:? "versionConfigs")
            Core.<*> (o Core..:? "webhookConfig")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Environment where
  toJSON GoogleCloudDialogflowCxV3beta1Environment {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("name" Core..=) Core.<$> name,
            ("testCasesConfig" Core..=) Core.<$> testCasesConfig,
            ("updateTime" Core..=) Core.<$> updateTime,
            ("versionConfigs" Core..=) Core.<$> versionConfigs,
            ("webhookConfig" Core..=) Core.<$> webhookConfig
          ]
      )

-- | The configuration for continuous tests.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig' smart constructor.
data GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig = GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
  { -- | Whether to run test cases in TestCasesConfig.test_cases periodically. Default false. If set to true, run once a day.
    enableContinuousRun :: (Core.Maybe Core.Bool),
    -- | Whether to run test cases in TestCasesConfig.test_cases before deploying a flow version to the environment. Default false.
    enablePredeploymentRun :: (Core.Maybe Core.Bool),
    -- | A list of test case names to run. They should be under the same agent. Format of each test case name: @projects\/\/locations\/\/agents\/\/testCases\/@
    testCases :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig ::
  GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
newGoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig =
  GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
    { enableContinuousRun =
        Core.Nothing,
      enablePredeploymentRun = Core.Nothing,
      testCases = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
            Core.<$> (o Core..:? "enableContinuousRun")
            Core.<*> (o Core..:? "enablePredeploymentRun")
            Core.<*> (o Core..:? "testCases")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig
  where
  toJSON GoogleCloudDialogflowCxV3beta1EnvironmentTestCasesConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("enableContinuousRun" Core..=) Core.<$> enableContinuousRun,
            ("enablePredeploymentRun" Core..=) Core.<$> enablePredeploymentRun,
            ("testCases" Core..=) Core.<$> testCases
          ]
      )

-- | Configuration for the version.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig = GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
  { -- | Required. Both flow and playbook versions are supported. Format for flow version: projects\/\/locations\/\/agents\/\/flows\/\/versions\/. Format for playbook version: projects\/\/locations\/\/agents\/\/playbooks\/\/versions\/.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig ::
  GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
newGoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig =
  GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
    { version =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
            Core.<$> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig
  where
  toJSON GoogleCloudDialogflowCxV3beta1EnvironmentVersionConfig {..} =
    Core.object
      (Core.catMaybes [("version" Core..=) Core.<$> version])

-- | Configuration for webhooks.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig = GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
  { -- | The list of webhooks to override for the agent environment. The webhook must exist in the agent. You can override fields in @generic_web_service@ and @service_directory@.
    webhookOverrides :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1Webhook])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig ::
  GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
newGoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig =
  GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
    { webhookOverrides =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
            Core.<$> (o Core..:? "webhookOverrides")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig
  where
  toJSON GoogleCloudDialogflowCxV3beta1EnvironmentWebhookConfig {..} =
    Core.object
      ( Core.catMaybes
          [("webhookOverrides" Core..=) Core.<$> webhookOverrides]
      )

-- | An event handler specifies an event that can be handled during a session. When the specified event happens, the following actions are taken in order: * If there is a @trigger_fulfillment@ associated with the event, it will be called. * If there is a @target_page@ associated with the event, the session will transition into the specified page. * If there is a @target_flow@ associated with the event, the session will transition into the specified flow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1EventHandler' smart constructor.
data GoogleCloudDialogflowCxV3beta1EventHandler = GoogleCloudDialogflowCxV3beta1EventHandler
  { -- | Required. The name of the event to handle.
    event :: (Core.Maybe Core.Text),
    -- | Output only. The unique identifier of this event handler.
    name :: (Core.Maybe Core.Text),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text),
    -- | The target playbook to transition to. Format: @projects\/\/locations\/\/agents\/\/playbooks\/@.
    targetPlaybook :: (Core.Maybe Core.Text),
    -- | The fulfillment to call when the event occurs. Handling webhook errors with a fulfillment enabled with webhook could cause infinite loop. It is invalid to specify such fulfillment for a handler handling webhooks.
    triggerFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Fulfillment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1EventHandler' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1EventHandler ::
  GoogleCloudDialogflowCxV3beta1EventHandler
newGoogleCloudDialogflowCxV3beta1EventHandler =
  GoogleCloudDialogflowCxV3beta1EventHandler
    { event = Core.Nothing,
      name = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing,
      targetPlaybook = Core.Nothing,
      triggerFulfillment = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1EventHandler where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1EventHandler"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1EventHandler
            Core.<$> (o Core..:? "event")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
            Core.<*> (o Core..:? "targetPlaybook")
            Core.<*> (o Core..:? "triggerFulfillment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1EventHandler where
  toJSON GoogleCloudDialogflowCxV3beta1EventHandler {..} =
    Core.object
      ( Core.catMaybes
          [ ("event" Core..=) Core.<$> event,
            ("name" Core..=) Core.<$> name,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage,
            ("targetPlaybook" Core..=) Core.<$> targetPlaybook,
            ("triggerFulfillment" Core..=) Core.<$> triggerFulfillment
          ]
      )

-- | Represents the event to trigger.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1EventInput' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1EventInput = GoogleCloudDialogflowCxV3beta1EventInput
  { -- | Name of the event.
    event :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1EventInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1EventInput ::
  GoogleCloudDialogflowCxV3beta1EventInput
newGoogleCloudDialogflowCxV3beta1EventInput =
  GoogleCloudDialogflowCxV3beta1EventInput {event = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1EventInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1EventInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1EventInput
            Core.<$> (o Core..:? "event")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1EventInput where
  toJSON GoogleCloudDialogflowCxV3beta1EventInput {..} =
    Core.object (Core.catMaybes [("event" Core..=) Core.<$> event])

-- | The response message for Agents.ExportAgent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportAgentResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportAgentResponse = GoogleCloudDialogflowCxV3beta1ExportAgentResponse
  { -- | Uncompressed raw byte content for agent. This field is populated if none of @agent_uri@ and @git_destination@ are specified in ExportAgentRequest.
    agentContent :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported agent. This field is populated if @agent_uri@ is specified in ExportAgentRequest.
    agentUri :: (Core.Maybe Core.Text),
    -- | Commit SHA of the git push. This field is populated if @git_destination@ is specified in ExportAgentRequest.
    commitSha :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportAgentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportAgentResponse ::
  GoogleCloudDialogflowCxV3beta1ExportAgentResponse
newGoogleCloudDialogflowCxV3beta1ExportAgentResponse =
  GoogleCloudDialogflowCxV3beta1ExportAgentResponse
    { agentContent =
        Core.Nothing,
      agentUri = Core.Nothing,
      commitSha = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportAgentResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportAgentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ExportAgentResponse
            Core.<$> (o Core..:? "agentContent")
            Core.<*> (o Core..:? "agentUri")
            Core.<*> (o Core..:? "commitSha")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportAgentResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ExportAgentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentContent" Core..=) Core.<$> agentContent,
            ("agentUri" Core..=) Core.<$> agentUri,
            ("commitSha" Core..=) Core.<$> commitSha
          ]
      )

-- | Metadata returned for the EntityTypes.ExportEntityTypes long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata = GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata ::
  GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata
newGoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata =
  GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportEntityTypesMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for EntityTypes.ExportEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse = GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
  { -- | Uncompressed byte content for entity types. This field is populated only if @entity_types_content_inline@ is set to true in ExportEntityTypesRequest.
    entityTypesContent :: (Core.Maybe GoogleCloudDialogflowCxV3beta1InlineDestination),
    -- | The URI to a file containing the exported entity types. This field is populated only if @entity_types_uri@ is specified in ExportEntityTypesRequest.
    entityTypesUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse ::
  GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
newGoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse =
  GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
    { entityTypesContent =
        Core.Nothing,
      entityTypesUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
            Core.<$> (o Core..:? "entityTypesContent")
            Core.<*> (o Core..:? "entityTypesUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ExportEntityTypesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityTypesContent" Core..=) Core.<$> entityTypesContent,
            ("entityTypesUri" Core..=) Core.<$> entityTypesUri
          ]
      )

-- | The response message for Flows.ExportFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportFlowResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportFlowResponse = GoogleCloudDialogflowCxV3beta1ExportFlowResponse
  { -- | Uncompressed raw byte content for flow.
    flowContent :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported flow. This field is populated only if @flow_uri@ is specified in ExportFlowRequest.
    flowUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportFlowResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportFlowResponse ::
  GoogleCloudDialogflowCxV3beta1ExportFlowResponse
newGoogleCloudDialogflowCxV3beta1ExportFlowResponse =
  GoogleCloudDialogflowCxV3beta1ExportFlowResponse
    { flowContent =
        Core.Nothing,
      flowUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportFlowResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportFlowResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ExportFlowResponse
            Core.<$> (o Core..:? "flowContent")
            Core.<*> (o Core..:? "flowUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportFlowResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ExportFlowResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("flowContent" Core..=) Core.<$> flowContent,
            ("flowUri" Core..=) Core.<$> flowUri
          ]
      )

-- | Metadata returned for the Intents.ExportIntents long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportIntentsMetadata' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata = GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportIntentsMetadata ::
  GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata
newGoogleCloudDialogflowCxV3beta1ExportIntentsMetadata =
  GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportIntentsMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for Intents.ExportIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportIntentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportIntentsResponse = GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
  { -- | Uncompressed byte content for intents. This field is populated only if @intents_content_inline@ is set to true in ExportIntentsRequest.
    intentsContent :: (Core.Maybe GoogleCloudDialogflowCxV3beta1InlineDestination),
    -- | The URI to a file containing the exported intents. This field is populated only if @intents_uri@ is specified in ExportIntentsRequest.
    intentsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportIntentsResponse ::
  GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
newGoogleCloudDialogflowCxV3beta1ExportIntentsResponse =
  GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
    { intentsContent =
        Core.Nothing,
      intentsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
            Core.<$> (o Core..:? "intentsContent")
            Core.<*> (o Core..:? "intentsUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportIntentsResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ExportIntentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("intentsContent" Core..=) Core.<$> intentsContent,
            ("intentsUri" Core..=) Core.<$> intentsUri
          ]
      )

-- | Metadata returned for the TestCases.ExportTestCases long running operation. This message currently has no fields.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata = GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata ::
  GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
newGoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata =
  GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportTestCasesMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for TestCases.ExportTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ExportTestCasesResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse = GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
  { -- | Uncompressed raw byte content for test cases.
    content :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported test cases. This field is populated only if @gcs_uri@ is specified in ExportTestCasesRequest.
    gcsUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ExportTestCasesResponse ::
  GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
newGoogleCloudDialogflowCxV3beta1ExportTestCasesResponse =
  GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
    { content =
        Core.Nothing,
      gcsUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
            Core.<$> (o Core..:? "content")
            Core.<*> (o Core..:? "gcsUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ExportTestCasesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("content" Core..=) Core.<$> content,
            ("gcsUri" Core..=) Core.<$> gcsUri
          ]
      )

-- | A form is a data model that groups related parameters that can be collected from the user. The process in which the agent prompts the user and collects parameter values from the user is called form filling. A form can be added to a page. When form filling is done, the filled parameters will be written to the session.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Form' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1Form = GoogleCloudDialogflowCxV3beta1Form
  { -- | Parameters to collect from the user.
    parameters :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1FormParameter])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Form' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Form ::
  GoogleCloudDialogflowCxV3beta1Form
newGoogleCloudDialogflowCxV3beta1Form =
  GoogleCloudDialogflowCxV3beta1Form {parameters = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Form where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Form"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Form
            Core.<$> (o Core..:? "parameters")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Form where
  toJSON GoogleCloudDialogflowCxV3beta1Form {..} =
    Core.object
      (Core.catMaybes [("parameters" Core..=) Core.<$> parameters])

-- | Represents a form parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1FormParameter' smart constructor.
data GoogleCloudDialogflowCxV3beta1FormParameter = GoogleCloudDialogflowCxV3beta1FormParameter
  { -- | Hierarchical advanced settings for this parameter. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3beta1AdvancedSettings),
    -- | The default value of an optional parameter. If the parameter is required, the default value will be ignored.
    defaultValue :: (Core.Maybe Core.Value),
    -- | Required. The human-readable name of the parameter, unique within the form.
    displayName :: (Core.Maybe Core.Text),
    -- | Required. The entity type of the parameter. Format: @projects\/-\/locations\/-\/agents\/-\/entityTypes\/@ for system entity types (for example, @projects\/-\/locations\/-\/agents\/-\/entityTypes\/sys.date@), or @projects\/\/locations\/\/agents\/\/entityTypes\/@ for developer entity types.
    entityType :: (Core.Maybe Core.Text),
    -- | Required. Defines fill behavior for the parameter.
    fillBehavior ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
      ),
    -- | Indicates whether the parameter represents a list of values.
    isList :: (Core.Maybe Core.Bool),
    -- | Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
    redact :: (Core.Maybe Core.Bool),
    -- | Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.
    required :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1FormParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1FormParameter ::
  GoogleCloudDialogflowCxV3beta1FormParameter
newGoogleCloudDialogflowCxV3beta1FormParameter =
  GoogleCloudDialogflowCxV3beta1FormParameter
    { advancedSettings =
        Core.Nothing,
      defaultValue = Core.Nothing,
      displayName = Core.Nothing,
      entityType = Core.Nothing,
      fillBehavior = Core.Nothing,
      isList = Core.Nothing,
      redact = Core.Nothing,
      required = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1FormParameter where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1FormParameter"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1FormParameter
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "defaultValue")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "entityType")
            Core.<*> (o Core..:? "fillBehavior")
            Core.<*> (o Core..:? "isList")
            Core.<*> (o Core..:? "redact")
            Core.<*> (o Core..:? "required")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1FormParameter where
  toJSON GoogleCloudDialogflowCxV3beta1FormParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("defaultValue" Core..=) Core.<$> defaultValue,
            ("displayName" Core..=) Core.<$> displayName,
            ("entityType" Core..=) Core.<$> entityType,
            ("fillBehavior" Core..=) Core.<$> fillBehavior,
            ("isList" Core..=) Core.<$> isList,
            ("redact" Core..=) Core.<$> redact,
            ("required" Core..=) Core.<$> required
          ]
      )

-- | Configuration for how the filling of a parameter should be handled.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1FormParameterFillBehavior' smart constructor.
data GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior = GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
  { -- | Required. The fulfillment to provide the initial prompt that the agent can present to the user in order to fill the parameter.
    initialPromptFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Fulfillment),
    -- | The handlers for parameter-level events, used to provide reprompt for the parameter or transition to a different page\/flow. The supported events are: * @sys.no-match-@, where N can be from 1 to 6 * @sys.no-match-default@ * @sys.no-input-@, where N can be from 1 to 6 * @sys.no-input-default@ * @sys.invalid-parameter@ @initial_prompt_fulfillment@ provides the first prompt for the parameter. If the user\'s response does not fill the parameter, a no-match\/no-input event will be triggered, and the fulfillment associated with the @sys.no-match-1@\/@sys.no-input-1@ handler (if defined) will be called to provide a prompt. The @sys.no-match-2@\/@sys.no-input-2@ handler (if defined) will respond to the next no-match\/no-input event, and so on. A @sys.no-match-default@ or @sys.no-input-default@ handler will be used to handle all following no-match\/no-input events after all numbered no-match\/no-input handlers for the parameter are consumed. A @sys.invalid-parameter@ handler can be defined to handle the case where the
    -- parameter values have been @invalidated@ by webhook. For example, if the user\'s response fill the parameter, however the parameter was invalidated by webhook, the fulfillment associated with the @sys.invalid-parameter@ handler (if defined) will be called to provide a prompt. If the event handler for the corresponding event can\'t be found on the parameter, @initial_prompt_fulfillment@ will be re-prompted.
    repromptEventHandlers :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1EventHandler])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1FormParameterFillBehavior ::
  GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
newGoogleCloudDialogflowCxV3beta1FormParameterFillBehavior =
  GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
    { initialPromptFulfillment =
        Core.Nothing,
      repromptEventHandlers = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
            Core.<$> (o Core..:? "initialPromptFulfillment")
            Core.<*> (o Core..:? "repromptEventHandlers")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior
  where
  toJSON GoogleCloudDialogflowCxV3beta1FormParameterFillBehavior {..} =
    Core.object
      ( Core.catMaybes
          [ ("initialPromptFulfillment" Core..=)
              Core.<$> initialPromptFulfillment,
            ("repromptEventHandlers" Core..=) Core.<$> repromptEventHandlers
          ]
      )

-- | A fulfillment can do one or more of the following actions at the same time: * Generate rich message responses. * Set parameter values. * Call the webhook. Fulfillments can be called at various stages in the Page or Form lifecycle. For example, when a DetectIntentRequest drives a session to enter a new page, the page\'s entry fulfillment can add a static response to the QueryResult in the returning DetectIntentResponse, call the webhook (for example, to load user data from a database), or both.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Fulfillment' smart constructor.
data GoogleCloudDialogflowCxV3beta1Fulfillment = GoogleCloudDialogflowCxV3beta1Fulfillment
  { -- | Hierarchical advanced settings for this fulfillment. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3beta1AdvancedSettings),
    -- | Conditional cases for this fulfillment.
    conditionalCases ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases]
      ),
    -- | If the flag is true, the agent will utilize LLM to generate a text response. If LLM generation fails, the defined responses in the fulfillment will be respected. This flag is only useful for fulfillments associated with no-match event handlers.
    enableGenerativeFallback :: (Core.Maybe Core.Bool),
    -- | The list of rich message responses to present to the user.
    messages :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1ResponseMessage]),
    -- | Whether Dialogflow should return currently queued fulfillment response messages in streaming APIs. If a webhook is specified, it happens before Dialogflow invokes webhook. Warning: 1) This flag only affects streaming API. Responses are still queued and returned once in non-streaming API. 2) The flag can be enabled in any fulfillment but only the first 3 partial responses will be returned. You may only want to apply it to fulfillments that have slow webhooks.
    returnPartialResponses :: (Core.Maybe Core.Bool),
    -- | Set parameter values before executing the webhook.
    setParameterActions ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction]
      ),
    -- | The value of this field will be populated in the WebhookRequest @fulfillmentInfo.tag@ field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes. This field is required if @webhook@ is specified.
    tag :: (Core.Maybe Core.Text),
    -- | The webhook to call. Format: @projects\/\/locations\/\/agents\/\/webhooks\/@.
    webhook :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Fulfillment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Fulfillment ::
  GoogleCloudDialogflowCxV3beta1Fulfillment
newGoogleCloudDialogflowCxV3beta1Fulfillment =
  GoogleCloudDialogflowCxV3beta1Fulfillment
    { advancedSettings =
        Core.Nothing,
      conditionalCases = Core.Nothing,
      enableGenerativeFallback = Core.Nothing,
      messages = Core.Nothing,
      returnPartialResponses = Core.Nothing,
      setParameterActions = Core.Nothing,
      tag = Core.Nothing,
      webhook = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Fulfillment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Fulfillment"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Fulfillment
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "conditionalCases")
            Core.<*> (o Core..:? "enableGenerativeFallback")
            Core.<*> (o Core..:? "messages")
            Core.<*> (o Core..:? "returnPartialResponses")
            Core.<*> (o Core..:? "setParameterActions")
            Core.<*> (o Core..:? "tag")
            Core.<*> (o Core..:? "webhook")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Fulfillment where
  toJSON GoogleCloudDialogflowCxV3beta1Fulfillment {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("conditionalCases" Core..=) Core.<$> conditionalCases,
            ("enableGenerativeFallback" Core..=)
              Core.<$> enableGenerativeFallback,
            ("messages" Core..=) Core.<$> messages,
            ("returnPartialResponses" Core..=) Core.<$> returnPartialResponses,
            ("setParameterActions" Core..=) Core.<$> setParameterActions,
            ("tag" Core..=) Core.<$> tag,
            ("webhook" Core..=) Core.<$> webhook
          ]
      )

-- | A list of cascading if-else conditions. Cases are mutually exclusive. The first one with a matching condition is selected, all the rest ignored.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases = GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
  { -- | A list of cascading if-else conditions.
    cases ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases ::
  GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases =
  GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
    { cases =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
            Core.<$> (o Core..:? "cases")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases {..} =
      Core.object (Core.catMaybes [("cases" Core..=) Core.<$> cases])

-- | Each case has a Boolean condition. When it is evaluated to be True, the corresponding messages will be selected and evaluated recursively.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase' smart constructor.
data GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase = GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
  { -- | A list of case content.
    caseContent ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent]
      ),
    -- | The condition to activate and select this case. Empty means the condition is always true. The condition is evaluated against form parameters or session parameters. See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>.
    condition :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase ::
  GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase =
  GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
    { caseContent =
        Core.Nothing,
      condition = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
            Core.<$> (o Core..:? "caseContent")
            Core.<*> (o Core..:? "condition")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCase {..} =
      Core.object
        ( Core.catMaybes
            [ ("caseContent" Core..=) Core.<$> caseContent,
              ("condition" Core..=) Core.<$> condition
            ]
        )

-- | The list of messages or conditional cases to activate for this case.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent' smart constructor.
data GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent = GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
  { -- | Additional cases to be evaluated.
    additionalCases ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCases
      ),
    -- | Returned message.
    message :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ResponseMessage)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent ::
  GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
newGoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent =
  GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
    { additionalCases =
        Core.Nothing,
      message = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
            Core.<$> (o Core..:? "additionalCases")
            Core.<*> (o Core..:? "message")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentConditionalCasesCaseCaseContent {..} =
      Core.object
        ( Core.catMaybes
            [ ("additionalCases" Core..=) Core.<$> additionalCases,
              ("message" Core..=) Core.<$> message
            ]
        )

-- | Setting a parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction' smart constructor.
data GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction = GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
  { -- | Display name of the parameter.
    parameter :: (Core.Maybe Core.Text),
    -- | The new value of the parameter. A null value clears the parameter.
    value :: (Core.Maybe Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction ::
  GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
newGoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction =
  GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
    { parameter =
        Core.Nothing,
      value = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
            Core.<$> (o Core..:? "parameter")
            Core.<*> (o Core..:? "value")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1FulfillmentSetParameterAction {..} =
      Core.object
        ( Core.catMaybes
            [ ("parameter" Core..=) Core.<$> parameter,
              ("value" Core..=) Core.<$> value
            ]
        )

-- | Google Cloud Storage location for a Dialogflow operation that writes or exports objects (e.g. exported agent or transcripts) outside of Dialogflow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1GcsDestination' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1GcsDestination = GoogleCloudDialogflowCxV3beta1GcsDestination
  { -- | Required. The Google Cloud Storage URI for the exported objects. A URI is of the form: @gs:\/\/bucket\/object-name-or-prefix@ Whether a full object name, or just a prefix, its usage depends on the Dialogflow operation.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1GcsDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1GcsDestination ::
  GoogleCloudDialogflowCxV3beta1GcsDestination
newGoogleCloudDialogflowCxV3beta1GcsDestination =
  GoogleCloudDialogflowCxV3beta1GcsDestination {uri = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1GcsDestination where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1GcsDestination"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1GcsDestination
            Core.<$> (o Core..:? "uri")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1GcsDestination where
  toJSON GoogleCloudDialogflowCxV3beta1GcsDestination {..} =
    Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Metadata returned for the EntityTypes.ImportEntityTypes long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata' smart constructor.
data GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata = GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata ::
  GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata
newGoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata =
  GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for EntityTypes.ImportEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse = GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
  { -- | Info which resources have conflicts when REPORT/CONFLICT merge/option is set in ImportEntityTypesRequest.
    conflictingResources ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
      ),
    -- | The unique identifier of the imported entity types. Format: @projects\/\/locations\/\/agents\/\/entity_types\/@.
    entityTypes :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse ::
  GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse =
  GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
    { conflictingResources =
        Core.Nothing,
      entityTypes = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
            Core.<$> (o Core..:? "conflictingResources")
            Core.<*> (o Core..:? "entityTypes")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("conflictingResources" Core..=) Core.<$> conflictingResources,
            ("entityTypes" Core..=) Core.<$> entityTypes
          ]
      )

-- | Conflicting resources detected during the import process. Only filled when REPORT_CONFLICT is set in the request and there are conflicts in the display names.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources' smart constructor.
data GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources = GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
  { -- | Display names of conflicting entities.
    entityDisplayNames :: (Core.Maybe [Core.Text]),
    -- | Display names of conflicting entity types.
    entityTypeDisplayNames :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources ::
  GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
newGoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources =
  GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
    { entityDisplayNames =
        Core.Nothing,
      entityTypeDisplayNames =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
            Core.<$> (o Core..:? "entityDisplayNames")
            Core.<*> (o Core..:? "entityTypeDisplayNames")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ImportEntityTypesResponseConflictingResources {..} =
      Core.object
        ( Core.catMaybes
            [ ("entityDisplayNames" Core..=) Core.<$> entityDisplayNames,
              ("entityTypeDisplayNames" Core..=)
                Core.<$> entityTypeDisplayNames
            ]
        )

-- | The response message for Flows.ImportFlow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportFlowResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ImportFlowResponse = GoogleCloudDialogflowCxV3beta1ImportFlowResponse
  { -- | The unique identifier of the new flow. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    flow :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportFlowResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportFlowResponse ::
  GoogleCloudDialogflowCxV3beta1ImportFlowResponse
newGoogleCloudDialogflowCxV3beta1ImportFlowResponse =
  GoogleCloudDialogflowCxV3beta1ImportFlowResponse
    { flow =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportFlowResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportFlowResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportFlowResponse
            Core.<$> (o Core..:? "flow")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportFlowResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ImportFlowResponse {..} =
    Core.object (Core.catMaybes [("flow" Core..=) Core.<$> flow])

-- | Metadata returned for the Intents.ImportIntents long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportIntentsMetadata' smart constructor.
data GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata = GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportIntentsMetadata ::
  GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata
newGoogleCloudDialogflowCxV3beta1ImportIntentsMetadata =
  GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for Intents.ImportIntents.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportIntentsResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1ImportIntentsResponse = GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
  { -- | Info which resources have conflicts when REPORT/CONFLICT merge/option is set in ImportIntentsRequest.
    conflictingResources ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
      ),
    -- | The unique identifier of the imported intents. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    intents :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportIntentsResponse ::
  GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
newGoogleCloudDialogflowCxV3beta1ImportIntentsResponse =
  GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
    { conflictingResources =
        Core.Nothing,
      intents = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
            Core.<$> (o Core..:? "conflictingResources")
            Core.<*> (o Core..:? "intents")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ImportIntentsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("conflictingResources" Core..=) Core.<$> conflictingResources,
            ("intents" Core..=) Core.<$> intents
          ]
      )

-- | Conflicting resources detected during the import process. Only filled when REPORT_CONFLICT is set in the request and there are conflicts in the display names.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources' smart constructor.
data GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources = GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
  { -- | Display names of conflicting entities.
    entityDisplayNames :: (Core.Maybe [Core.Text]),
    -- | Display names of conflicting intents.
    intentDisplayNames :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources ::
  GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
newGoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources =
  GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
    { entityDisplayNames =
        Core.Nothing,
      intentDisplayNames =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
            Core.<$> (o Core..:? "entityDisplayNames")
            Core.<*> (o Core..:? "intentDisplayNames")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ImportIntentsResponseConflictingResources {..} =
      Core.object
        ( Core.catMaybes
            [ ("entityDisplayNames" Core..=) Core.<$> entityDisplayNames,
              ("intentDisplayNames" Core..=) Core.<$> intentDisplayNames
            ]
        )

-- | Metadata returned for the TestCases.ImportTestCases long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata = GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
  { -- | Errors for failed test cases.
    errors :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TestCaseError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata ::
  GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
newGoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata =
  GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
    { errors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
            Core.<$> (o Core..:? "errors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata
  where
  toJSON GoogleCloudDialogflowCxV3beta1ImportTestCasesMetadata {..} =
    Core.object (Core.catMaybes [("errors" Core..=) Core.<$> errors])

-- | The response message for TestCases.ImportTestCases.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ImportTestCasesResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse = GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
  { -- | The unique identifiers of the new test cases. Format: @projects\/\/locations\/\/agents\/\/testCases\/@.
    names :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ImportTestCasesResponse ::
  GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
newGoogleCloudDialogflowCxV3beta1ImportTestCasesResponse =
  GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
    { names =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
            Core.<$> (o Core..:? "names")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1ImportTestCasesResponse {..} =
    Core.object (Core.catMaybes [("names" Core..=) Core.<$> names])

-- | Inline destination for a Dialogflow operation that writes or exports objects (e.g. intents) outside of Dialogflow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1InlineDestination' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1InlineDestination = GoogleCloudDialogflowCxV3beta1InlineDestination
  { -- | Output only. The uncompressed byte content for the objects. Only populated in responses.
    content :: (Core.Maybe Core.Base64)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1InlineDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1InlineDestination ::
  GoogleCloudDialogflowCxV3beta1InlineDestination
newGoogleCloudDialogflowCxV3beta1InlineDestination =
  GoogleCloudDialogflowCxV3beta1InlineDestination
    { content =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1InlineDestination
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1InlineDestination"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1InlineDestination
            Core.<$> (o Core..:? "content")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1InlineDestination
  where
  toJSON GoogleCloudDialogflowCxV3beta1InlineDestination {..} =
    Core.object
      (Core.catMaybes [("content" Core..=) Core.<$> content])

-- | Instructs the speech recognizer on how to process the audio content.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1InputAudioConfig' smart constructor.
data GoogleCloudDialogflowCxV3beta1InputAudioConfig = GoogleCloudDialogflowCxV3beta1InputAudioConfig
  { -- | Required. Audio encoding of the audio content to process.
    audioEncoding ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1InputAudioConfig_AudioEncoding
      ),
    -- | Configuration of barge-in behavior during the streaming of input audio.
    bargeInConfig :: (Core.Maybe GoogleCloudDialogflowCxV3beta1BargeInConfig),
    -- | Optional. If @true@, Dialogflow returns SpeechWordInfo in StreamingRecognitionResult with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn\'t return any word-level information.
    enableWordInfo :: (Core.Maybe Core.Bool),
    -- | Optional. Which Speech model to select for the given request. For more information, see <https://cloud.google.com/dialogflow/cx/docs/concept/speech-models Speech models>.
    model :: (Core.Maybe Core.Text),
    -- | Optional. Which variant of the Speech model to use.
    modelVariant ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1InputAudioConfig_ModelVariant
      ),
    -- | If @true@, the request will opt out for STT conformer model migration. This field will be deprecated once force migration takes place in June 2024. Please refer to <https://cloud.google.com/dialogflow/cx/docs/concept/speech-model-migration Dialogflow CX Speech model migration>.
    optOutConformerModelMigration :: (Core.Maybe Core.Bool),
    -- | Optional. A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood. See <https://cloud.google.com/speech-to-text/docs/basics#phrase-hints the Cloud Speech documentation> for more details.
    phraseHints :: (Core.Maybe [Core.Text]),
    -- | Sample rate (in Hertz) of the audio content sent in the query. Refer to <https://cloud.google.com/speech-to-text/docs/basics Cloud Speech API documentation> for more details.
    sampleRateHertz :: (Core.Maybe Core.Int32),
    -- | Optional. If @false@ (default), recognition does not cease until the client closes the stream. If @true@, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio\'s voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods.
    singleUtterance :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1InputAudioConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1InputAudioConfig ::
  GoogleCloudDialogflowCxV3beta1InputAudioConfig
newGoogleCloudDialogflowCxV3beta1InputAudioConfig =
  GoogleCloudDialogflowCxV3beta1InputAudioConfig
    { audioEncoding =
        Core.Nothing,
      bargeInConfig = Core.Nothing,
      enableWordInfo = Core.Nothing,
      model = Core.Nothing,
      modelVariant = Core.Nothing,
      optOutConformerModelMigration = Core.Nothing,
      phraseHints = Core.Nothing,
      sampleRateHertz = Core.Nothing,
      singleUtterance = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1InputAudioConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1InputAudioConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1InputAudioConfig
            Core.<$> (o Core..:? "audioEncoding")
            Core.<*> (o Core..:? "bargeInConfig")
            Core.<*> (o Core..:? "enableWordInfo")
            Core.<*> (o Core..:? "model")
            Core.<*> (o Core..:? "modelVariant")
            Core.<*> (o Core..:? "optOutConformerModelMigration")
            Core.<*> (o Core..:? "phraseHints")
            Core.<*> (o Core..:? "sampleRateHertz")
            Core.<*> (o Core..:? "singleUtterance")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1InputAudioConfig where
  toJSON GoogleCloudDialogflowCxV3beta1InputAudioConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("audioEncoding" Core..=) Core.<$> audioEncoding,
            ("bargeInConfig" Core..=) Core.<$> bargeInConfig,
            ("enableWordInfo" Core..=) Core.<$> enableWordInfo,
            ("model" Core..=) Core.<$> model,
            ("modelVariant" Core..=) Core.<$> modelVariant,
            ("optOutConformerModelMigration" Core..=)
              Core.<$> optOutConformerModelMigration,
            ("phraseHints" Core..=) Core.<$> phraseHints,
            ("sampleRateHertz" Core..=) Core.<$> sampleRateHertz,
            ("singleUtterance" Core..=) Core.<$> singleUtterance
          ]
      )

-- | An intent represents a user\'s intent to interact with a conversational agent. You can provide information for the Dialogflow API to use to match user input to an intent by adding training phrases (i.e., examples of user input) to your intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Intent' smart constructor.
data GoogleCloudDialogflowCxV3beta1Intent = GoogleCloudDialogflowCxV3beta1Intent
  { -- | Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the intent, unique within the agent.
    displayName :: (Core.Maybe Core.Text),
    -- | Indicates whether this is a fallback intent. Currently only default fallback intent is allowed in the agent, which is added upon agent creation. Adding training phrases to fallback intent is useful in the case of requests that are mistakenly matched, since training phrases assigned to fallback intents act as negative examples that triggers no-match event.
    isFallback :: (Core.Maybe Core.Bool),
    -- | The key\/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols \'-\' and \'_\'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix \"sys-\" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. \"sys-head\" means the intent is a head intent. \"sys-contextual\" means the intent is a contextual intent.
    labels :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Intent_Labels),
    -- | The unique identifier of the intent. Required for the Intents.UpdateIntent method. Intents.CreateIntent populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    name :: (Core.Maybe Core.Text),
    -- | The collection of parameters associated with the intent.
    parameters :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1IntentParameter]),
    -- | The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the @Normal@ priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.
    priority :: (Core.Maybe Core.Int32),
    -- | The collection of training phrases the agent is trained on to identify the intent.
    trainingPhrases :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Intent' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Intent ::
  GoogleCloudDialogflowCxV3beta1Intent
newGoogleCloudDialogflowCxV3beta1Intent =
  GoogleCloudDialogflowCxV3beta1Intent
    { description = Core.Nothing,
      displayName = Core.Nothing,
      isFallback = Core.Nothing,
      labels = Core.Nothing,
      name = Core.Nothing,
      parameters = Core.Nothing,
      priority = Core.Nothing,
      trainingPhrases = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Intent where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Intent"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Intent
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "isFallback")
            Core.<*> (o Core..:? "labels")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "priority")
            Core.<*> (o Core..:? "trainingPhrases")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Intent where
  toJSON GoogleCloudDialogflowCxV3beta1Intent {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("isFallback" Core..=) Core.<$> isFallback,
            ("labels" Core..=) Core.<$> labels,
            ("name" Core..=) Core.<$> name,
            ("parameters" Core..=) Core.<$> parameters,
            ("priority" Core..=) Core.<$> priority,
            ("trainingPhrases" Core..=) Core.<$> trainingPhrases
          ]
      )

-- | The key\/value metadata to label an intent. Labels can contain lowercase letters, digits and the symbols \'-\' and \'_\'. International characters are allowed, including letters from unicase alphabets. Keys must start with a letter. Keys and values can be no longer than 63 characters and no more than 128 bytes. Prefix \"sys-\" is reserved for Dialogflow defined labels. Currently allowed Dialogflow defined labels include: * sys-head * sys-contextual The above labels do not require value. \"sys-head\" means the intent is a head intent. \"sys-contextual\" means the intent is a contextual intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Intent_Labels' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1Intent_Labels = GoogleCloudDialogflowCxV3beta1Intent_Labels
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Intent_Labels' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Intent_Labels ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowCxV3beta1Intent_Labels
newGoogleCloudDialogflowCxV3beta1Intent_Labels additional =
  GoogleCloudDialogflowCxV3beta1Intent_Labels
    { additional =
        additional
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Intent_Labels where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Intent_Labels"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Intent_Labels
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Intent_Labels where
  toJSON GoogleCloudDialogflowCxV3beta1Intent_Labels {..} =
    Core.toJSON additional

-- | Represents the intent to trigger programmatically rather than as a result of natural language processing.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1IntentInput' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1IntentInput = GoogleCloudDialogflowCxV3beta1IntentInput
  { -- | Required. The unique identifier of the intent. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    intent :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1IntentInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1IntentInput ::
  GoogleCloudDialogflowCxV3beta1IntentInput
newGoogleCloudDialogflowCxV3beta1IntentInput =
  GoogleCloudDialogflowCxV3beta1IntentInput {intent = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1IntentInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1IntentInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1IntentInput
            Core.<$> (o Core..:? "intent")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1IntentInput where
  toJSON GoogleCloudDialogflowCxV3beta1IntentInput {..} =
    Core.object (Core.catMaybes [("intent" Core..=) Core.<$> intent])

-- | Represents an intent parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1IntentParameter' smart constructor.
data GoogleCloudDialogflowCxV3beta1IntentParameter = GoogleCloudDialogflowCxV3beta1IntentParameter
  { -- | Required. The entity type of the parameter. Format: @projects\/-\/locations\/-\/agents\/-\/entityTypes\/@ for system entity types (for example, @projects\/-\/locations\/-\/agents\/-\/entityTypes\/sys.date@), or @projects\/\/locations\/\/agents\/\/entityTypes\/@ for developer entity types.
    entityType :: (Core.Maybe Core.Text),
    -- | Required. The unique identifier of the parameter. This field is used by training phrases to annotate their parts.
    id :: (Core.Maybe Core.Text),
    -- | Indicates whether the parameter represents a list of values.
    isList :: (Core.Maybe Core.Bool),
    -- | Indicates whether the parameter content should be redacted in log. If redaction is enabled, the parameter content will be replaced by parameter name during logging. Note: the parameter content is subject to redaction if either parameter level redaction or entity type level redaction is enabled.
    redact :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1IntentParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1IntentParameter ::
  GoogleCloudDialogflowCxV3beta1IntentParameter
newGoogleCloudDialogflowCxV3beta1IntentParameter =
  GoogleCloudDialogflowCxV3beta1IntentParameter
    { entityType =
        Core.Nothing,
      id = Core.Nothing,
      isList = Core.Nothing,
      redact = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1IntentParameter
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1IntentParameter"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1IntentParameter
            Core.<$> (o Core..:? "entityType")
            Core.<*> (o Core..:? "id")
            Core.<*> (o Core..:? "isList")
            Core.<*> (o Core..:? "redact")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1IntentParameter where
  toJSON GoogleCloudDialogflowCxV3beta1IntentParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityType" Core..=) Core.<$> entityType,
            ("id" Core..=) Core.<$> id,
            ("isList" Core..=) Core.<$> isList,
            ("redact" Core..=) Core.<$> redact
          ]
      )

-- | Represents an example that the agent is trained on to identify the intent.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrase' smart constructor.
data GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase = GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
  { -- | Output only. The unique identifier of the training phrase.
    id :: (Core.Maybe Core.Text),
    -- | Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - @Part.text@ is set to a part of the phrase that has no parameters. - @Part.text@ is set to a part of the phrase that you want to annotate, and the @parameter_id@ field is set.
    parts ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart]
      ),
    -- | Indicates how many times this example was added to the intent.
    repeatCount :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrase ::
  GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrase =
  GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
    { id =
        Core.Nothing,
      parts = Core.Nothing,
      repeatCount = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
            Core.<$> (o Core..:? "id")
            Core.<*> (o Core..:? "parts")
            Core.<*> (o Core..:? "repeatCount")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase
  where
  toJSON GoogleCloudDialogflowCxV3beta1IntentTrainingPhrase {..} =
    Core.object
      ( Core.catMaybes
          [ ("id" Core..=) Core.<$> id,
            ("parts" Core..=) Core.<$> parts,
            ("repeatCount" Core..=) Core.<$> repeatCount
          ]
      )

-- | Represents a part of a training phrase.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart' smart constructor.
data GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart = GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
  { -- | The parameter used to annotate this part of the training phrase. This field is required for annotated parts of the training phrase.
    parameterId :: (Core.Maybe Core.Text),
    -- | Required. The text for this part.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart ::
  GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
newGoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart =
  GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
    { parameterId =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
            Core.<$> (o Core..:? "parameterId")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart
  where
  toJSON GoogleCloudDialogflowCxV3beta1IntentTrainingPhrasePart {..} =
    Core.object
      ( Core.catMaybes
          [ ("parameterId" Core..=) Core.<$> parameterId,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | The Knowledge Connector settings for this page or flow. This includes information such as the attached Knowledge Bases, and the way to execute fulfillment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings' smart constructor.
data GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings = GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
  { -- | Optional. List of related data store connections.
    dataStoreConnections :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1DataStoreConnection]),
    -- | Whether Knowledge Connector is enabled or not.
    enabled :: (Core.Maybe Core.Bool),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text),
    -- | The fulfillment to be triggered. When the answers from the Knowledge Connector are selected by Dialogflow, you can utitlize the request scoped parameter @$request.knowledge.answers@ (contains up to the 5 highest confidence answers) and @$request.knowledge.questions@ (contains the corresponding questions) to construct the fulfillment.
    triggerFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Fulfillment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings ::
  GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
newGoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings =
  GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
    { dataStoreConnections =
        Core.Nothing,
      enabled = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing,
      triggerFulfillment = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
            Core.<$> (o Core..:? "dataStoreConnections")
            Core.<*> (o Core..:? "enabled")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
            Core.<*> (o Core..:? "triggerFulfillment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
  where
  toJSON GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings {..} =
    Core.object
      ( Core.catMaybes
          [ ("dataStoreConnections" Core..=) Core.<$> dataStoreConnections,
            ("enabled" Core..=) Core.<$> enabled,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage,
            ("triggerFulfillment" Core..=) Core.<$> triggerFulfillment
          ]
      )

-- | Represents the language information of the request.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1LanguageInfo' smart constructor.
data GoogleCloudDialogflowCxV3beta1LanguageInfo = GoogleCloudDialogflowCxV3beta1LanguageInfo
  { -- | The confidence score of the detected language between 0 and 1.
    confidenceScore :: (Core.Maybe Core.Double),
    -- | The language code specified in the original request.
    inputLanguageCode :: (Core.Maybe Core.Text),
    -- | The language code detected for this request based on the user conversation.
    resolvedLanguageCode :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1LanguageInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1LanguageInfo ::
  GoogleCloudDialogflowCxV3beta1LanguageInfo
newGoogleCloudDialogflowCxV3beta1LanguageInfo =
  GoogleCloudDialogflowCxV3beta1LanguageInfo
    { confidenceScore =
        Core.Nothing,
      inputLanguageCode = Core.Nothing,
      resolvedLanguageCode = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1LanguageInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1LanguageInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1LanguageInfo
            Core.<$> (o Core..:? "confidenceScore")
            Core.<*> (o Core..:? "inputLanguageCode")
            Core.<*> (o Core..:? "resolvedLanguageCode")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1LanguageInfo where
  toJSON GoogleCloudDialogflowCxV3beta1LanguageInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidenceScore" Core..=) Core.<$> confidenceScore,
            ("inputLanguageCode" Core..=) Core.<$> inputLanguageCode,
            ("resolvedLanguageCode" Core..=) Core.<$> resolvedLanguageCode
          ]
      )

-- | A Dialogflow CX conversation (session) can be described and visualized as a state machine. The states of a CX session are represented by pages. For each flow, you define many pages, where your combined pages can handle a complete conversation on the topics the flow is designed for. At any given moment, exactly one page is the current page, the current page is considered active, and the flow associated with that page is considered active. Every flow has a special start page. When a flow initially becomes active, the start page page becomes the current page. For each conversational turn, the current page will either stay the same or transition to another page. You configure each page to collect information from the end-user that is relevant for the conversational state represented by the page. For more information, see the <https://cloud.google.com/dialogflow/cx/docs/concept/page Page guide>.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Page' smart constructor.
data GoogleCloudDialogflowCxV3beta1Page = GoogleCloudDialogflowCxV3beta1Page
  { -- | Hierarchical advanced settings for this page. The settings exposed at the lower level overrides the settings exposed at the higher level.
    advancedSettings :: (Core.Maybe GoogleCloudDialogflowCxV3beta1AdvancedSettings),
    -- | The description of the page. The maximum length is 500 characters.
    description :: (Core.Maybe Core.Text),
    -- | Required. The human-readable name of the page, unique within the flow.
    displayName :: (Core.Maybe Core.Text),
    -- | The fulfillment to call when the session is entering the page.
    entryFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Fulfillment),
    -- | Handlers associated with the page to handle events such as webhook errors, no match or no input.
    eventHandlers :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1EventHandler]),
    -- | The form associated with the page, used for collecting parameters relevant to the page.
    form :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Form),
    -- | Optional. Knowledge connector configuration.
    knowledgeConnectorSettings ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1KnowledgeConnectorSettings
      ),
    -- | The unique identifier of the page. Required for the Pages.UpdatePage method. Pages.CreatePage populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    name :: (Core.Maybe Core.Text),
    -- | Ordered list of @TransitionRouteGroups@ added to the page. Transition route groups must be unique within a page. If the page links both flow-level transition route groups and agent-level transition route groups, the flow-level ones will have higher priority and will be put before the agent-level ones. * If multiple transition routes within a page scope refer to the same intent, then the precedence order is: page\'s transition route -> page\'s transition route group -> flow\'s transition routes. * If multiple transition route groups within a page contain the same intent, then the first group in the ordered list takes precedence. Format:@projects\/\/locations\/\/agents\/\/flows\/\/transitionRouteGroups\/@ or @projects\/\/locations\/\/agents\/\/transitionRouteGroups\/@ for agent-level groups.
    transitionRouteGroups :: (Core.Maybe [Core.Text]),
    -- | A list of transitions for the transition rules of this page. They route the conversation to another page in the same flow, or another flow. When we are in a certain page, the TransitionRoutes are evaluated in the following order: * TransitionRoutes defined in the page with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in flow with intent specified. * TransitionRoutes defined in the transition route groups with intent specified. * TransitionRoutes defined in the page with only condition specified. * TransitionRoutes defined in the transition route groups with only condition specified.
    transitionRoutes :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TransitionRoute])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Page' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Page ::
  GoogleCloudDialogflowCxV3beta1Page
newGoogleCloudDialogflowCxV3beta1Page =
  GoogleCloudDialogflowCxV3beta1Page
    { advancedSettings =
        Core.Nothing,
      description = Core.Nothing,
      displayName = Core.Nothing,
      entryFulfillment = Core.Nothing,
      eventHandlers = Core.Nothing,
      form = Core.Nothing,
      knowledgeConnectorSettings = Core.Nothing,
      name = Core.Nothing,
      transitionRouteGroups = Core.Nothing,
      transitionRoutes = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Page where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Page"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Page
            Core.<$> (o Core..:? "advancedSettings")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "entryFulfillment")
            Core.<*> (o Core..:? "eventHandlers")
            Core.<*> (o Core..:? "form")
            Core.<*> (o Core..:? "knowledgeConnectorSettings")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "transitionRouteGroups")
            Core.<*> (o Core..:? "transitionRoutes")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Page where
  toJSON GoogleCloudDialogflowCxV3beta1Page {..} =
    Core.object
      ( Core.catMaybes
          [ ("advancedSettings" Core..=) Core.<$> advancedSettings,
            ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("entryFulfillment" Core..=) Core.<$> entryFulfillment,
            ("eventHandlers" Core..=) Core.<$> eventHandlers,
            ("form" Core..=) Core.<$> form,
            ("knowledgeConnectorSettings" Core..=)
              Core.<$> knowledgeConnectorSettings,
            ("name" Core..=) Core.<$> name,
            ("transitionRouteGroups" Core..=) Core.<$> transitionRouteGroups,
            ("transitionRoutes" Core..=) Core.<$> transitionRoutes
          ]
      )

-- | Represents page information communicated to and from the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1PageInfo' smart constructor.
data GoogleCloudDialogflowCxV3beta1PageInfo = GoogleCloudDialogflowCxV3beta1PageInfo
  { -- | Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the current page. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    currentPage :: (Core.Maybe Core.Text),
    -- | Always present for WebhookRequest. Ignored for WebhookResponse. The display name of the current page.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional for both WebhookRequest and WebhookResponse. Information about the form.
    formInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1PageInfoFormInfo)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1PageInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1PageInfo ::
  GoogleCloudDialogflowCxV3beta1PageInfo
newGoogleCloudDialogflowCxV3beta1PageInfo =
  GoogleCloudDialogflowCxV3beta1PageInfo
    { currentPage =
        Core.Nothing,
      displayName = Core.Nothing,
      formInfo = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1PageInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1PageInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1PageInfo
            Core.<$> (o Core..:? "currentPage")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "formInfo")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1PageInfo where
  toJSON GoogleCloudDialogflowCxV3beta1PageInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("currentPage" Core..=) Core.<$> currentPage,
            ("displayName" Core..=) Core.<$> displayName,
            ("formInfo" Core..=) Core.<$> formInfo
          ]
      )

-- | Represents form information.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1PageInfoFormInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1PageInfoFormInfo = GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
  { -- | Optional for both WebhookRequest and WebhookResponse. The parameters contained in the form. Note that the webhook cannot add or remove any form parameter.
    parameterInfo ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1PageInfoFormInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1PageInfoFormInfo ::
  GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
newGoogleCloudDialogflowCxV3beta1PageInfoFormInfo =
  GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
    { parameterInfo =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1PageInfoFormInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1PageInfoFormInfo
            Core.<$> (o Core..:? "parameterInfo")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1PageInfoFormInfo where
  toJSON GoogleCloudDialogflowCxV3beta1PageInfoFormInfo {..} =
    Core.object
      (Core.catMaybes [("parameterInfo" Core..=) Core.<$> parameterInfo])

-- | Represents parameter information.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo' smart constructor.
data GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo = GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
  { -- | Always present for WebhookRequest. Required for WebhookResponse. The human-readable name of the parameter, unique within the form. This field cannot be modified by the webhook.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional for WebhookRequest. Ignored for WebhookResponse. Indicates if the parameter value was just collected on the last conversation turn.
    justCollected :: (Core.Maybe Core.Bool),
    -- | Optional for both WebhookRequest and WebhookResponse. Indicates whether the parameter is required. Optional parameters will not trigger prompts; however, they are filled if the user specifies them. Required parameters must be filled before form filling concludes.
    required :: (Core.Maybe Core.Bool),
    -- | Always present for WebhookRequest. Required for WebhookResponse. The state of the parameter. This field can be set to INVALID by the webhook to invalidate the parameter; other values set by the webhook will be ignored.
    state ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo_State
      ),
    -- | Optional for both WebhookRequest and WebhookResponse. The value of the parameter. This field can be set by the webhook to change the parameter value.
    value :: (Core.Maybe Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo ::
  GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
newGoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo =
  GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
    { displayName =
        Core.Nothing,
      justCollected = Core.Nothing,
      required = Core.Nothing,
      state = Core.Nothing,
      value = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "justCollected")
            Core.<*> (o Core..:? "required")
            Core.<*> (o Core..:? "state")
            Core.<*> (o Core..:? "value")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1PageInfoFormInfoParameterInfo {..} =
      Core.object
        ( Core.catMaybes
            [ ("displayName" Core..=) Core.<$> displayName,
              ("justCollected" Core..=) Core.<$> justCollected,
              ("required" Core..=) Core.<$> required,
              ("state" Core..=) Core.<$> state,
              ("value" Core..=) Core.<$> value
            ]
        )

-- | Represents the query input. It can contain one of: 1. A conversational query in the form of text. 2. An intent query that specifies which intent to trigger. 3. Natural language speech audio to be processed. 4. An event to be triggered. 5. DTMF digits to invoke an intent and fill in parameter value. 6. The results of a tool executed by the client.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1QueryInput' smart constructor.
data GoogleCloudDialogflowCxV3beta1QueryInput = GoogleCloudDialogflowCxV3beta1QueryInput
  { -- | The natural language speech audio to be processed.
    audio :: (Core.Maybe GoogleCloudDialogflowCxV3beta1AudioInput),
    -- | The DTMF event to be handled.
    dtmf :: (Core.Maybe GoogleCloudDialogflowCxV3beta1DtmfInput),
    -- | The event to be triggered.
    event :: (Core.Maybe GoogleCloudDialogflowCxV3beta1EventInput),
    -- | The intent to be triggered.
    intent :: (Core.Maybe GoogleCloudDialogflowCxV3beta1IntentInput),
    -- | Required. The language of the input. See <https://cloud.google.com/dialogflow/cx/docs/reference/language Language Support> for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.
    languageCode :: (Core.Maybe Core.Text),
    -- | The natural language text to be processed.
    text :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TextInput),
    -- | The results of a tool executed by the client.
    toolCallResult :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ToolCallResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1QueryInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1QueryInput ::
  GoogleCloudDialogflowCxV3beta1QueryInput
newGoogleCloudDialogflowCxV3beta1QueryInput =
  GoogleCloudDialogflowCxV3beta1QueryInput
    { audio = Core.Nothing,
      dtmf = Core.Nothing,
      event = Core.Nothing,
      intent = Core.Nothing,
      languageCode = Core.Nothing,
      text = Core.Nothing,
      toolCallResult = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1QueryInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1QueryInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1QueryInput
            Core.<$> (o Core..:? "audio")
            Core.<*> (o Core..:? "dtmf")
            Core.<*> (o Core..:? "event")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "toolCallResult")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1QueryInput where
  toJSON GoogleCloudDialogflowCxV3beta1QueryInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("audio" Core..=) Core.<$> audio,
            ("dtmf" Core..=) Core.<$> dtmf,
            ("event" Core..=) Core.<$> event,
            ("intent" Core..=) Core.<$> intent,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("text" Core..=) Core.<$> text,
            ("toolCallResult" Core..=) Core.<$> toolCallResult
          ]
      )

-- | Represents a response message that can be returned by a conversational agent. Response messages are also used for output audio synthesis. The approach is as follows: * If at least one OutputAudioText response is present, then all OutputAudioText responses are linearly concatenated, and the result is used for output audio synthesis. * If the OutputAudioText responses are a mixture of text and SSML, then the concatenated result is treated as SSML; otherwise, the result is treated as either text or SSML as appropriate. The agent designer should ideally use either text or SSML consistently throughout the bot design. * Otherwise, all Text responses are linearly concatenated, and the result is used for output audio synthesis. This approach allows for more sophisticated user experience scenarios, where the text displayed to the user may differ from what is heard.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessage' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessage = GoogleCloudDialogflowCxV3beta1ResponseMessage
  { -- | The channel which the response is associated with. Clients can specify the channel via QueryParameters.channel, and only associated channel response will be returned.
    channel :: (Core.Maybe Core.Text),
    -- | Indicates that the conversation succeeded.
    conversationSuccess ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
      ),
    -- | Output only. A signal that indicates the interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only when the conversation reaches @END_SESSION@ page. It is not supposed to be defined by the user. It\'s guaranteed that there is at most one such message in each response.
    endInteraction ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
      ),
    -- | Represents info card for knowledge answers, to be better rendered in Dialogflow Messenger.
    knowledgeInfoCard ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
      ),
    -- | Hands off conversation to a human agent.
    liveAgentHandoff ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
      ),
    -- | Output only. An audio response message composed of both the synthesized Dialogflow agent responses and responses defined via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.
    mixedAudio ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
      ),
    -- | A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.
    outputAudioText ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
      ),
    -- | Returns a response containing a custom, platform-specific payload.
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload),
    -- | Signal that the client should play an audio clip hosted at a client-specific URI. Dialogflow uses this to construct mixed_audio. However, Dialogflow itself does not try to read or process the URI in any way.
    playAudio :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio),
    -- | A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.
    telephonyTransferCall ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
      ),
    -- | Returns a text response.
    text :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ResponseMessageText),
    -- | Returns the definition of a tool call that should be executed by the client.
    toolCall :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ToolCall)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessage' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessage ::
  GoogleCloudDialogflowCxV3beta1ResponseMessage
newGoogleCloudDialogflowCxV3beta1ResponseMessage =
  GoogleCloudDialogflowCxV3beta1ResponseMessage
    { channel =
        Core.Nothing,
      conversationSuccess = Core.Nothing,
      endInteraction = Core.Nothing,
      knowledgeInfoCard = Core.Nothing,
      liveAgentHandoff = Core.Nothing,
      mixedAudio = Core.Nothing,
      outputAudioText = Core.Nothing,
      payload = Core.Nothing,
      playAudio = Core.Nothing,
      telephonyTransferCall = Core.Nothing,
      text = Core.Nothing,
      toolCall = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessage
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessage"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessage
            Core.<$> (o Core..:? "channel")
            Core.<*> (o Core..:? "conversationSuccess")
            Core.<*> (o Core..:? "endInteraction")
            Core.<*> (o Core..:? "knowledgeInfoCard")
            Core.<*> (o Core..:? "liveAgentHandoff")
            Core.<*> (o Core..:? "mixedAudio")
            Core.<*> (o Core..:? "outputAudioText")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "playAudio")
            Core.<*> (o Core..:? "telephonyTransferCall")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "toolCall")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1ResponseMessage where
  toJSON GoogleCloudDialogflowCxV3beta1ResponseMessage {..} =
    Core.object
      ( Core.catMaybes
          [ ("channel" Core..=) Core.<$> channel,
            ("conversationSuccess" Core..=) Core.<$> conversationSuccess,
            ("endInteraction" Core..=) Core.<$> endInteraction,
            ("knowledgeInfoCard" Core..=) Core.<$> knowledgeInfoCard,
            ("liveAgentHandoff" Core..=) Core.<$> liveAgentHandoff,
            ("mixedAudio" Core..=) Core.<$> mixedAudio,
            ("outputAudioText" Core..=) Core.<$> outputAudioText,
            ("payload" Core..=) Core.<$> payload,
            ("playAudio" Core..=) Core.<$> playAudio,
            ("telephonyTransferCall" Core..=) Core.<$> telephonyTransferCall,
            ("text" Core..=) Core.<$> text,
            ("toolCall" Core..=) Core.<$> toolCall
          ]
      )

-- | Returns a response containing a custom, platform-specific payload.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessage_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload = GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessage_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
newGoogleCloudDialogflowCxV3beta1ResponseMessage_Payload additional =
  GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload
  where
  toJSON GoogleCloudDialogflowCxV3beta1ResponseMessage_Payload {..} =
    Core.toJSON additional

-- | Indicates that the conversation succeeded, i.e., the bot handled the issue that the customer talked to it about. Dialogflow only uses this to determine which conversations should be counted as successful and doesn\'t process the metadata in this message in any way. Note that Dialogflow also considers conversations that get to the conversation end page as successful even if they don\'t return ConversationSuccess. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates that the conversation succeeded. * In a webhook response when you determine that you handled the customer issue.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess = GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
  { -- | Custom metadata. Dialogflow doesn\'t impose any structure on this.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess =
  GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
    { metadata =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
            Core.<$> (o Core..:? "metadata")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess {..} =
      Core.object
        (Core.catMaybes [("metadata" Core..=) Core.<$> metadata])

-- | Custom metadata. Dialogflow doesn\'t impose any structure on this.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata = GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
newGoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
  additional =
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageConversationSuccess_Metadata {..} =
      Core.toJSON additional

-- | Indicates that interaction with the Dialogflow agent has ended. This message is generated by Dialogflow only and not supposed to be defined by the user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction = GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
newGoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction =
  GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction"
      ( \o ->
          Core.pure
            GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageEndInteraction
  where
  toJSON = Core.const Core.emptyObject

-- | Represents info card response. If the response contains generative knowledge prediction, Dialogflow will return a payload with Infobot Messenger compatible info card. Otherwise, the info card response is skipped.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard = GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
newGoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard =
  GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard"
      ( \o ->
          Core.pure
            GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageKnowledgeInfoCard
  where
  toJSON = Core.const Core.emptyObject

-- | Indicates that the conversation should be handed off to a live agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry_fulfillment of a Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff = GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
  { -- | Custom metadata for your handoff procedure. Dialogflow doesn\'t impose any structure on this.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff =
  GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
    { metadata =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
            Core.<$> (o Core..:? "metadata")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff {..} =
      Core.object
        (Core.catMaybes [("metadata" Core..=) Core.<$> metadata])

-- | Custom metadata for your handoff procedure. Dialogflow doesn\'t impose any structure on this.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata = GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
newGoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
  additional =
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageLiveAgentHandoff_Metadata {..} =
      Core.toJSON additional

-- | Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs. The external URIs are specified via play_audio. This message is generated by Dialogflow only and not supposed to be defined by the user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio = GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
  { -- | Segments this audio response is composed of.
    segments ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio =
  GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
    { segments =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
            Core.<$> (o Core..:? "segments")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio
  where
  toJSON GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudio {..} =
    Core.object
      (Core.catMaybes [("segments" Core..=) Core.<$> segments])

-- | Represents one segment of audio.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment = GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
  { -- | Output only. Whether the playback of this segment can be interrupted by the end user\'s speech and the client should then start the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Raw audio synthesized from the Dialogflow agent\'s response using the output config specified in the request.
    audio :: (Core.Maybe Core.Base64),
    -- | Client-specific URI that points to an audio clip accessible to the client. Dialogflow does not impose any validation on it.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
newGoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment =
  GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
    { allowPlaybackInterruption =
        Core.Nothing,
      audio = Core.Nothing,
      uri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "audio")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageMixedAudioSegment {..} =
      Core.object
        ( Core.catMaybes
            [ ("allowPlaybackInterruption" Core..=)
                Core.<$> allowPlaybackInterruption,
              ("audio" Core..=) Core.<$> audio,
              ("uri" Core..=) Core.<$> uri
            ]
        )

-- | A text or ssml response that is preferentially used for TTS output audio synthesis, as described in the comment on the ResponseMessage message.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText = GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
  { -- | Output only. Whether the playback of this message can be interrupted by the end user\'s speech and the client can then starts the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | The SSML text to be synthesized. For more information, see </speech/text-to-speech/docs/ssml SSML>.
    ssml :: (Core.Maybe Core.Text),
    -- | The raw text to be synthesized.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
newGoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText =
  GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
    { allowPlaybackInterruption =
        Core.Nothing,
      ssml = Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "ssml")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageOutputAudioText {..} =
      Core.object
        ( Core.catMaybes
            [ ("allowPlaybackInterruption" Core..=)
                Core.<$> allowPlaybackInterruption,
              ("ssml" Core..=) Core.<$> ssml,
              ("text" Core..=) Core.<$> text
            ]
        )

-- | Specifies an audio clip to be played by the client as part of the response.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio = GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
  { -- | Output only. Whether the playback of this message can be interrupted by the end user\'s speech and the client can then starts the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Required. URI of the audio clip. Dialogflow does not impose any validation on this value. It is specific to the client that reads it.
    audioUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio ::
  GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
newGoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio =
  GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
    { allowPlaybackInterruption =
        Core.Nothing,
      audioUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "audioUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio
  where
  toJSON GoogleCloudDialogflowCxV3beta1ResponseMessagePlayAudio {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowPlaybackInterruption" Core..=)
              Core.<$> allowPlaybackInterruption,
            ("audioUri" Core..=) Core.<$> audioUri
          ]
      )

-- | Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall = GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
  { -- | Transfer the call to a phone number in <https://en.wikipedia.org/wiki/E.164 E.164 format>.
    phoneNumber :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
newGoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall =
  GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
    { phoneNumber =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
            Core.<$> (o Core..:? "phoneNumber")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageTelephonyTransferCall {..} =
      Core.object
        (Core.catMaybes [("phoneNumber" Core..=) Core.<$> phoneNumber])

-- | The text response message.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ResponseMessageText' smart constructor.
data GoogleCloudDialogflowCxV3beta1ResponseMessageText = GoogleCloudDialogflowCxV3beta1ResponseMessageText
  { -- | Output only. Whether the playback of this message can be interrupted by the end user\'s speech and the client can then starts the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Required. A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.
    text :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ResponseMessageText' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ResponseMessageText ::
  GoogleCloudDialogflowCxV3beta1ResponseMessageText
newGoogleCloudDialogflowCxV3beta1ResponseMessageText =
  GoogleCloudDialogflowCxV3beta1ResponseMessageText
    { allowPlaybackInterruption =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageText
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ResponseMessageText"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ResponseMessageText
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ResponseMessageText
  where
  toJSON GoogleCloudDialogflowCxV3beta1ResponseMessageText {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowPlaybackInterruption" Core..=)
              Core.<$> allowPlaybackInterruption,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Metadata returned for the Environments.RunContinuousTest long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata = GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
  { -- | The test errors.
    errors :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1TestError])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata ::
  GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
newGoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata =
  GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
    { errors =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
            Core.<$> (o Core..:? "errors")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata
  where
  toJSON GoogleCloudDialogflowCxV3beta1RunContinuousTestMetadata {..} =
    Core.object (Core.catMaybes [("errors" Core..=) Core.<$> errors])

-- | The response message for Environments.RunContinuousTest.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1RunContinuousTestResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse = GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
  { -- | The result for a continuous test run.
    continuousTestResult :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ContinuousTestResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1RunContinuousTestResponse ::
  GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
newGoogleCloudDialogflowCxV3beta1RunContinuousTestResponse =
  GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
    { continuousTestResult =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
            Core.<$> (o Core..:? "continuousTestResult")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1RunContinuousTestResponse {..} =
    Core.object
      ( Core.catMaybes
          [("continuousTestResult" Core..=) Core.<$> continuousTestResult]
      )

-- | Metadata returned for the TestCases.RunTestCase long running operation. This message currently has no fields.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1RunTestCaseMetadata' smart constructor.
data GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata = GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1RunTestCaseMetadata ::
  GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata
newGoogleCloudDialogflowCxV3beta1RunTestCaseMetadata =
  GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata"
      ( \o ->
          Core.pure GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1RunTestCaseMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | The response message for TestCases.RunTestCase.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1RunTestCaseResponse' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1RunTestCaseResponse = GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
  { -- | The result.
    result :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TestCaseResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1RunTestCaseResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1RunTestCaseResponse ::
  GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
newGoogleCloudDialogflowCxV3beta1RunTestCaseResponse =
  GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
    { result =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1RunTestCaseResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
            Core.<$> (o Core..:? "result")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1RunTestCaseResponse
  where
  toJSON GoogleCloudDialogflowCxV3beta1RunTestCaseResponse {..} =
    Core.object (Core.catMaybes [("result" Core..=) Core.<$> result])

-- | Represents session information communicated to and from the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1SessionInfo' smart constructor.
data GoogleCloudDialogflowCxV3beta1SessionInfo = GoogleCloudDialogflowCxV3beta1SessionInfo
  { -- | Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters\' display names.
    parameters :: (Core.Maybe GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters),
    -- | Always present for WebhookRequest. Ignored for WebhookResponse. The unique identifier of the session. This field can be used by the webhook to identify a session. Format: @projects\/\/locations\/\/agents\/\/sessions\/@ or @projects\/\/locations\/\/agents\/\/environments\/\/sessions\/@ if environment is specified.
    session :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1SessionInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1SessionInfo ::
  GoogleCloudDialogflowCxV3beta1SessionInfo
newGoogleCloudDialogflowCxV3beta1SessionInfo =
  GoogleCloudDialogflowCxV3beta1SessionInfo
    { parameters =
        Core.Nothing,
      session = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1SessionInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1SessionInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1SessionInfo
            Core.<$> (o Core..:? "parameters")
            Core.<*> (o Core..:? "session")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1SessionInfo where
  toJSON GoogleCloudDialogflowCxV3beta1SessionInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("parameters" Core..=) Core.<$> parameters,
            ("session" Core..=) Core.<$> session
          ]
      )

-- | Optional for WebhookRequest. Optional for WebhookResponse. All parameters collected from forms and intents during the session. Parameters can be created, updated, or removed by the webhook. To remove a parameter from the session, the webhook should explicitly set the parameter value to null in WebhookResponse. The map is keyed by parameters\' display names.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1SessionInfo_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters = GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
  { additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1SessionInfo_Parameters ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
newGoogleCloudDialogflowCxV3beta1SessionInfo_Parameters additional =
  GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters
  where
  toJSON GoogleCloudDialogflowCxV3beta1SessionInfo_Parameters {..} =
    Core.toJSON additional

-- | Represents a test case.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TestCase' smart constructor.
data GoogleCloudDialogflowCxV3beta1TestCase = GoogleCloudDialogflowCxV3beta1TestCase
  { -- | Output only. When the test was created.
    creationTime :: (Core.Maybe Core.DateTime),
    -- | Required. The human-readable name of the test case, unique within the agent. Limit of 200 characters.
    displayName :: (Core.Maybe Core.Text),
    -- | The latest test result.
    lastTestResult :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TestCaseResult),
    -- | The unique identifier of the test case. TestCases.CreateTestCase will populate the name automatically. Otherwise use format: @projects\/\/locations\/\/agents\/\/testCases\/@.
    name :: (Core.Maybe Core.Text),
    -- | Additional freeform notes about the test case. Limit of 400 characters.
    notes :: (Core.Maybe Core.Text),
    -- | Tags are short descriptions that users may apply to test cases for organizational and filtering purposes. Each tag should start with \"#\" and has a limit of 30 characters.
    tags :: (Core.Maybe [Core.Text]),
    -- | The conversation turns uttered when the test case was created, in chronological order. These include the canonical set of agent utterances that should occur when the agent is working properly.
    testCaseConversationTurns :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1ConversationTurn]),
    -- | Config for the test case.
    testConfig :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TestConfig)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TestCase' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TestCase ::
  GoogleCloudDialogflowCxV3beta1TestCase
newGoogleCloudDialogflowCxV3beta1TestCase =
  GoogleCloudDialogflowCxV3beta1TestCase
    { creationTime =
        Core.Nothing,
      displayName = Core.Nothing,
      lastTestResult = Core.Nothing,
      name = Core.Nothing,
      notes = Core.Nothing,
      tags = Core.Nothing,
      testCaseConversationTurns = Core.Nothing,
      testConfig = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TestCase where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TestCase"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TestCase
            Core.<$> (o Core..:? "creationTime")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "lastTestResult")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "notes")
            Core.<*> (o Core..:? "tags")
            Core.<*> (o Core..:? "testCaseConversationTurns")
            Core.<*> (o Core..:? "testConfig")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TestCase where
  toJSON GoogleCloudDialogflowCxV3beta1TestCase {..} =
    Core.object
      ( Core.catMaybes
          [ ("creationTime" Core..=) Core.<$> creationTime,
            ("displayName" Core..=) Core.<$> displayName,
            ("lastTestResult" Core..=) Core.<$> lastTestResult,
            ("name" Core..=) Core.<$> name,
            ("notes" Core..=) Core.<$> notes,
            ("tags" Core..=) Core.<$> tags,
            ("testCaseConversationTurns" Core..=)
              Core.<$> testCaseConversationTurns,
            ("testConfig" Core..=) Core.<$> testConfig
          ]
      )

-- | Error info for importing a test.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TestCaseError' smart constructor.
data GoogleCloudDialogflowCxV3beta1TestCaseError = GoogleCloudDialogflowCxV3beta1TestCaseError
  { -- | The status associated with the test case.
    status :: (Core.Maybe GoogleRpcStatus),
    -- | The test case.
    testCase :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TestCase)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TestCaseError' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TestCaseError ::
  GoogleCloudDialogflowCxV3beta1TestCaseError
newGoogleCloudDialogflowCxV3beta1TestCaseError =
  GoogleCloudDialogflowCxV3beta1TestCaseError
    { status =
        Core.Nothing,
      testCase = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TestCaseError where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TestCaseError"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TestCaseError
            Core.<$> (o Core..:? "status")
            Core.<*> (o Core..:? "testCase")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TestCaseError where
  toJSON GoogleCloudDialogflowCxV3beta1TestCaseError {..} =
    Core.object
      ( Core.catMaybes
          [ ("status" Core..=) Core.<$> status,
            ("testCase" Core..=) Core.<$> testCase
          ]
      )

-- | Represents a result from running a test case in an agent environment.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TestCaseResult' smart constructor.
data GoogleCloudDialogflowCxV3beta1TestCaseResult = GoogleCloudDialogflowCxV3beta1TestCaseResult
  { -- | The conversation turns uttered during the test case replay in chronological order.
    conversationTurns :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1ConversationTurn]),
    -- | Environment where the test was run. If not set, it indicates the draft environment.
    environment :: (Core.Maybe Core.Text),
    -- | The resource name for the test case result. Format: @projects\/\/locations\/\/agents\/\/testCases\/\/results\/@.
    name :: (Core.Maybe Core.Text),
    -- | Whether the test case passed in the agent environment.
    testResult ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1TestCaseResult_TestResult
      ),
    -- | The time that the test was run.
    testTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TestCaseResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TestCaseResult ::
  GoogleCloudDialogflowCxV3beta1TestCaseResult
newGoogleCloudDialogflowCxV3beta1TestCaseResult =
  GoogleCloudDialogflowCxV3beta1TestCaseResult
    { conversationTurns =
        Core.Nothing,
      environment = Core.Nothing,
      name = Core.Nothing,
      testResult = Core.Nothing,
      testTime = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TestCaseResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TestCaseResult"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TestCaseResult
            Core.<$> (o Core..:? "conversationTurns")
            Core.<*> (o Core..:? "environment")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "testResult")
            Core.<*> (o Core..:? "testTime")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TestCaseResult where
  toJSON GoogleCloudDialogflowCxV3beta1TestCaseResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("conversationTurns" Core..=) Core.<$> conversationTurns,
            ("environment" Core..=) Core.<$> environment,
            ("name" Core..=) Core.<$> name,
            ("testResult" Core..=) Core.<$> testResult,
            ("testTime" Core..=) Core.<$> testTime
          ]
      )

-- | Represents configurations for a test case.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TestConfig' smart constructor.
data GoogleCloudDialogflowCxV3beta1TestConfig = GoogleCloudDialogflowCxV3beta1TestConfig
  { -- | Flow name to start the test case with. Format: @projects\/\/locations\/\/agents\/\/flows\/@. Only one of @flow@ and @page@ should be set to indicate the starting point of the test case. If neither is set, the test case will start with start page on the default start flow.
    flow :: (Core.Maybe Core.Text),
    -- | The page to start the test case with. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@. Only one of @flow@ and @page@ should be set to indicate the starting point of the test case. If neither is set, the test case will start with start page on the default start flow.
    page :: (Core.Maybe Core.Text),
    -- | Session parameters to be compared when calculating differences.
    trackingParameters :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TestConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TestConfig ::
  GoogleCloudDialogflowCxV3beta1TestConfig
newGoogleCloudDialogflowCxV3beta1TestConfig =
  GoogleCloudDialogflowCxV3beta1TestConfig
    { flow = Core.Nothing,
      page = Core.Nothing,
      trackingParameters = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TestConfig where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TestConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TestConfig
            Core.<$> (o Core..:? "flow")
            Core.<*> (o Core..:? "page")
            Core.<*> (o Core..:? "trackingParameters")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TestConfig where
  toJSON GoogleCloudDialogflowCxV3beta1TestConfig {..} =
    Core.object
      ( Core.catMaybes
          [ ("flow" Core..=) Core.<$> flow,
            ("page" Core..=) Core.<$> page,
            ("trackingParameters" Core..=) Core.<$> trackingParameters
          ]
      )

-- | Error info for running a test.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TestError' smart constructor.
data GoogleCloudDialogflowCxV3beta1TestError = GoogleCloudDialogflowCxV3beta1TestError
  { -- | The status associated with the test.
    status :: (Core.Maybe GoogleRpcStatus),
    -- | The test case resource name.
    testCase :: (Core.Maybe Core.Text),
    -- | The timestamp when the test was completed.
    testTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TestError' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TestError ::
  GoogleCloudDialogflowCxV3beta1TestError
newGoogleCloudDialogflowCxV3beta1TestError =
  GoogleCloudDialogflowCxV3beta1TestError
    { status = Core.Nothing,
      testCase = Core.Nothing,
      testTime = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TestError where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TestError"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TestError
            Core.<$> (o Core..:? "status")
            Core.<*> (o Core..:? "testCase")
            Core.<*> (o Core..:? "testTime")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TestError where
  toJSON GoogleCloudDialogflowCxV3beta1TestError {..} =
    Core.object
      ( Core.catMaybes
          [ ("status" Core..=) Core.<$> status,
            ("testCase" Core..=) Core.<$> testCase,
            ("testTime" Core..=) Core.<$> testTime
          ]
      )

-- | The description of differences between original and replayed agent output.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TestRunDifference' smart constructor.
data GoogleCloudDialogflowCxV3beta1TestRunDifference = GoogleCloudDialogflowCxV3beta1TestRunDifference
  { -- | A human readable description of the diff, showing the actual output vs expected output.
    description :: (Core.Maybe Core.Text),
    -- | The type of diff.
    type' :: (Core.Maybe GoogleCloudDialogflowCxV3beta1TestRunDifference_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TestRunDifference' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TestRunDifference ::
  GoogleCloudDialogflowCxV3beta1TestRunDifference
newGoogleCloudDialogflowCxV3beta1TestRunDifference =
  GoogleCloudDialogflowCxV3beta1TestRunDifference
    { description =
        Core.Nothing,
      type' = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1TestRunDifference
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TestRunDifference"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TestRunDifference
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "type")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1TestRunDifference
  where
  toJSON GoogleCloudDialogflowCxV3beta1TestRunDifference {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Represents the natural language text to be processed.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TextInput' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1TextInput = GoogleCloudDialogflowCxV3beta1TextInput
  { -- | Required. The UTF-8 encoded natural language text to be processed.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TextInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TextInput ::
  GoogleCloudDialogflowCxV3beta1TextInput
newGoogleCloudDialogflowCxV3beta1TextInput =
  GoogleCloudDialogflowCxV3beta1TextInput {text = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TextInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TextInput"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TextInput
            Core.<$> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TextInput where
  toJSON GoogleCloudDialogflowCxV3beta1TextInput {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Represents a call of a specific tool\'s action with the specified inputs.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ToolCall' smart constructor.
data GoogleCloudDialogflowCxV3beta1ToolCall = GoogleCloudDialogflowCxV3beta1ToolCall
  { -- | Required. The name of the tool\'s action associated with this call.
    action :: (Core.Maybe Core.Text),
    -- | Optional. The action\'s input parameters.
    inputParameters :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters),
    -- | Required. The tool associated with this call. Format: @projects\/\/locations\/\/agents\/\/tools\/@.
    tool :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ToolCall' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ToolCall ::
  GoogleCloudDialogflowCxV3beta1ToolCall
newGoogleCloudDialogflowCxV3beta1ToolCall =
  GoogleCloudDialogflowCxV3beta1ToolCall
    { action = Core.Nothing,
      inputParameters = Core.Nothing,
      tool = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1ToolCall where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ToolCall"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ToolCall
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "inputParameters")
            Core.<*> (o Core..:? "tool")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1ToolCall where
  toJSON GoogleCloudDialogflowCxV3beta1ToolCall {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("inputParameters" Core..=) Core.<$> inputParameters,
            ("tool" Core..=) Core.<$> tool
          ]
      )

-- | Optional. The action\'s input parameters.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ToolCall_InputParameters' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters = GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ToolCall_InputParameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
newGoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
  additional =
    GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters
  where
  toJSON GoogleCloudDialogflowCxV3beta1ToolCall_InputParameters {..} =
    Core.toJSON additional

-- | The result of calling a tool\'s action that has been executed by the client.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ToolCallResult' smart constructor.
data GoogleCloudDialogflowCxV3beta1ToolCallResult = GoogleCloudDialogflowCxV3beta1ToolCallResult
  { -- | Required. The name of the tool\'s action associated with this call.
    action :: (Core.Maybe Core.Text),
    -- | The tool call\'s error.
    error :: (Core.Maybe GoogleCloudDialogflowCxV3beta1ToolCallResultError),
    -- | The tool call\'s output parameters.
    outputParameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
      ),
    -- | Required. The tool associated with this call. Format: @projects\/\/locations\/\/agents\/\/tools\/@.
    tool :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ToolCallResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ToolCallResult ::
  GoogleCloudDialogflowCxV3beta1ToolCallResult
newGoogleCloudDialogflowCxV3beta1ToolCallResult =
  GoogleCloudDialogflowCxV3beta1ToolCallResult
    { action =
        Core.Nothing,
      error = Core.Nothing,
      outputParameters = Core.Nothing,
      tool = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1ToolCallResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ToolCallResult"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ToolCallResult
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "error")
            Core.<*> (o Core..:? "outputParameters")
            Core.<*> (o Core..:? "tool")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1ToolCallResult where
  toJSON GoogleCloudDialogflowCxV3beta1ToolCallResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("error" Core..=) Core.<$> error,
            ("outputParameters" Core..=) Core.<$> outputParameters,
            ("tool" Core..=) Core.<$> tool
          ]
      )

-- | The tool call\'s output parameters.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters = GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
newGoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
  additional =
    GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1ToolCallResult_OutputParameters {..} =
      Core.toJSON additional

-- | An error produced by the tool call.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1ToolCallResultError' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1ToolCallResultError = GoogleCloudDialogflowCxV3beta1ToolCallResultError
  { -- | Optional. The error message of the function.
    message :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1ToolCallResultError' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1ToolCallResultError ::
  GoogleCloudDialogflowCxV3beta1ToolCallResultError
newGoogleCloudDialogflowCxV3beta1ToolCallResultError =
  GoogleCloudDialogflowCxV3beta1ToolCallResultError
    { message =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1ToolCallResultError
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1ToolCallResultError"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1ToolCallResultError
            Core.<$> (o Core..:? "message")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1ToolCallResultError
  where
  toJSON GoogleCloudDialogflowCxV3beta1ToolCallResultError {..} =
    Core.object
      (Core.catMaybes [("message" Core..=) Core.<$> message])

-- | A transition route specifies a intent that can be matched and\/or a data condition that can be evaluated during a session. When a specified transition is matched, the following actions are taken in order: * If there is a @trigger_fulfillment@ associated with the transition, it will be called. * If there is a @target_page@ associated with the transition, the session will transition into the specified page. * If there is a @target_flow@ associated with the transition, the session will transition into the specified flow.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TransitionRoute' smart constructor.
data GoogleCloudDialogflowCxV3beta1TransitionRoute = GoogleCloudDialogflowCxV3beta1TransitionRoute
  { -- | The condition to evaluate against form parameters or session parameters. See the <https://cloud.google.com/dialogflow/cx/docs/reference/condition conditions reference>. At least one of @intent@ or @condition@ must be specified. When both @intent@ and @condition@ are specified, the transition can only happen when both are fulfilled.
    condition :: (Core.Maybe Core.Text),
    -- | Optional. The description of the transition route. The maximum length is 500 characters.
    description :: (Core.Maybe Core.Text),
    -- | The unique identifier of an Intent. Format: @projects\/\/locations\/\/agents\/\/intents\/@. Indicates that the transition can only happen when the given intent is matched. At least one of @intent@ or @condition@ must be specified. When both @intent@ and @condition@ are specified, the transition can only happen when both are fulfilled.
    intent :: (Core.Maybe Core.Text),
    -- | Output only. The unique identifier of this transition route.
    name :: (Core.Maybe Core.Text),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text),
    -- | The fulfillment to call when the condition is satisfied. At least one of @trigger_fulfillment@ and @target@ must be specified. When both are defined, @trigger_fulfillment@ is executed first.
    triggerFulfillment :: (Core.Maybe GoogleCloudDialogflowCxV3beta1Fulfillment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TransitionRoute' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TransitionRoute ::
  GoogleCloudDialogflowCxV3beta1TransitionRoute
newGoogleCloudDialogflowCxV3beta1TransitionRoute =
  GoogleCloudDialogflowCxV3beta1TransitionRoute
    { condition =
        Core.Nothing,
      description = Core.Nothing,
      intent = Core.Nothing,
      name = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing,
      triggerFulfillment = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1TransitionRoute
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TransitionRoute"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TransitionRoute
            Core.<$> (o Core..:? "condition")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
            Core.<*> (o Core..:? "triggerFulfillment")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TransitionRoute where
  toJSON GoogleCloudDialogflowCxV3beta1TransitionRoute {..} =
    Core.object
      ( Core.catMaybes
          [ ("condition" Core..=) Core.<$> condition,
            ("description" Core..=) Core.<$> description,
            ("intent" Core..=) Core.<$> intent,
            ("name" Core..=) Core.<$> name,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage,
            ("triggerFulfillment" Core..=) Core.<$> triggerFulfillment
          ]
      )

-- | Collection of all signals that were extracted for a single turn of the conversation.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1TurnSignals' smart constructor.
data GoogleCloudDialogflowCxV3beta1TurnSignals = GoogleCloudDialogflowCxV3beta1TurnSignals
  { -- | Whether agent responded with LiveAgentHandoff fulfillment.
    agentEscalated :: (Core.Maybe Core.Bool),
    -- | Whether user was using DTMF input.
    dtmfUsed :: (Core.Maybe Core.Bool),
    -- | Failure reasons of the turn.
    failureReasons ::
      ( Core.Maybe
          [GoogleCloudDialogflowCxV3beta1TurnSignals_FailureReasonsItem]
      ),
    -- | Whether NLU predicted NO_MATCH.
    noMatch :: (Core.Maybe Core.Bool),
    -- | Whether user provided no input.
    noUserInput :: (Core.Maybe Core.Bool),
    -- | Whether turn resulted in End Session page.
    reachedEndPage :: (Core.Maybe Core.Bool),
    -- | Sentiment magnitude of the user utterance if <https://cloud.google.com/dialogflow/cx/docs/concept/sentiment sentiment> was enabled.
    sentimentMagnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score of the user utterance if <https://cloud.google.com/dialogflow/cx/docs/concept/sentiment sentiment> was enabled.
    sentimentScore :: (Core.Maybe Core.Double),
    -- | Whether user was specifically asking for a live agent.
    userEscalated :: (Core.Maybe Core.Bool),
    -- | Human-readable statuses of the webhooks triggered during this turn.
    webhookStatuses :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1TurnSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1TurnSignals ::
  GoogleCloudDialogflowCxV3beta1TurnSignals
newGoogleCloudDialogflowCxV3beta1TurnSignals =
  GoogleCloudDialogflowCxV3beta1TurnSignals
    { agentEscalated =
        Core.Nothing,
      dtmfUsed = Core.Nothing,
      failureReasons = Core.Nothing,
      noMatch = Core.Nothing,
      noUserInput = Core.Nothing,
      reachedEndPage = Core.Nothing,
      sentimentMagnitude = Core.Nothing,
      sentimentScore = Core.Nothing,
      userEscalated = Core.Nothing,
      webhookStatuses = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1TurnSignals where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1TurnSignals"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1TurnSignals
            Core.<$> (o Core..:? "agentEscalated")
            Core.<*> (o Core..:? "dtmfUsed")
            Core.<*> (o Core..:? "failureReasons")
            Core.<*> (o Core..:? "noMatch")
            Core.<*> (o Core..:? "noUserInput")
            Core.<*> (o Core..:? "reachedEndPage")
            Core.<*> (o Core..:? "sentimentMagnitude")
            Core.<*> (o Core..:? "sentimentScore")
            Core.<*> (o Core..:? "userEscalated")
            Core.<*> (o Core..:? "webhookStatuses")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1TurnSignals where
  toJSON GoogleCloudDialogflowCxV3beta1TurnSignals {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentEscalated" Core..=) Core.<$> agentEscalated,
            ("dtmfUsed" Core..=) Core.<$> dtmfUsed,
            ("failureReasons" Core..=) Core.<$> failureReasons,
            ("noMatch" Core..=) Core.<$> noMatch,
            ("noUserInput" Core..=) Core.<$> noUserInput,
            ("reachedEndPage" Core..=) Core.<$> reachedEndPage,
            ("sentimentMagnitude" Core..=) Core.<$> sentimentMagnitude,
            ("sentimentScore" Core..=) Core.<$> sentimentScore,
            ("userEscalated" Core..=) Core.<$> userEscalated,
            ("webhookStatuses" Core..=) Core.<$> webhookStatuses
          ]
      )

-- | Webhooks host the developer\'s business logic. During a session, webhooks allow the developer to use the data extracted by Dialogflow\'s natural language processing to generate dynamic responses, validate collected data, or trigger actions on the backend.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1Webhook' smart constructor.
data GoogleCloudDialogflowCxV3beta1Webhook = GoogleCloudDialogflowCxV3beta1Webhook
  { -- | Indicates whether the webhook is disabled.
    disabled :: (Core.Maybe Core.Bool),
    -- | Required. The human-readable name of the webhook, unique within the agent.
    displayName :: (Core.Maybe Core.Text),
    -- | Configuration for a generic web service.
    genericWebService :: (Core.Maybe GoogleCloudDialogflowCxV3beta1WebhookGenericWebService),
    -- | The unique identifier of the webhook. Required for the Webhooks.UpdateWebhook method. Webhooks.CreateWebhook populates the name automatically. Format: @projects\/\/locations\/\/agents\/\/webhooks\/@.
    name :: (Core.Maybe Core.Text),
    -- | Configuration for a <https://cloud.google.com/service-directory Service Directory> service.
    serviceDirectory ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
      ),
    -- | Webhook execution timeout. Execution is considered failed if Dialogflow doesn\'t receive a response from webhook at the end of the timeout period. Defaults to 5 seconds, maximum allowed timeout is 30 seconds.
    timeout :: (Core.Maybe Core.Duration)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1Webhook' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1Webhook ::
  GoogleCloudDialogflowCxV3beta1Webhook
newGoogleCloudDialogflowCxV3beta1Webhook =
  GoogleCloudDialogflowCxV3beta1Webhook
    { disabled = Core.Nothing,
      displayName = Core.Nothing,
      genericWebService = Core.Nothing,
      name = Core.Nothing,
      serviceDirectory = Core.Nothing,
      timeout = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1Webhook where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1Webhook"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1Webhook
            Core.<$> (o Core..:? "disabled")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "genericWebService")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "serviceDirectory")
            Core.<*> (o Core..:? "timeout")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1Webhook where
  toJSON GoogleCloudDialogflowCxV3beta1Webhook {..} =
    Core.object
      ( Core.catMaybes
          [ ("disabled" Core..=) Core.<$> disabled,
            ("displayName" Core..=) Core.<$> displayName,
            ("genericWebService" Core..=) Core.<$> genericWebService,
            ("name" Core..=) Core.<$> name,
            ("serviceDirectory" Core..=) Core.<$> serviceDirectory,
            ("timeout" Core..=) Core.<$> timeout
          ]
      )

-- | Represents configuration for a generic web service.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookGenericWebService = GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
  { -- | Optional. Specifies a list of allowed custom CA certificates (in DER format) for HTTPS verification. This overrides the default SSL trust store. If this is empty or unspecified, Dialogflow will use Google\'s default trust store to verify certificates. N.B. Make sure the HTTPS server certificates are signed with \"subject alt name\". For instance a certificate can be self-signed using the following command, @openssl x509 -req -days 200 -in example.com.csr \\ -signkey example.com.key \\ -out example.com.crt \\ -extfile \<(printf \"\\nsubjectAltName=\'DNS:www.example.com\'\")@
    allowedCaCerts :: (Core.Maybe [Core.Base64]),
    -- | Optional. HTTP method for the flexible webhook calls. Standard webhook always uses POST.
    httpMethod ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_HttpMethod
      ),
    -- | Optional. The OAuth configuration of the webhook. If specified, Dialogflow will initiate the OAuth client credential flow to exchange an access token from the 3rd party platform and put it in the auth header.
    oauthConfig ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
      ),
    -- | Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
    parameterMapping ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
      ),
    -- | The password for HTTP Basic authentication.
    password :: (Core.Maybe Core.Text),
    -- | Optional. Defines a custom JSON object as request body to send to flexible webhook.
    requestBody :: (Core.Maybe Core.Text),
    -- | The HTTP request headers to send together with webhook requests.
    requestHeaders ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
      ),
    -- | Optional. Indicate the auth token type generated from the <https://cloud.google.com/iam/docs/service-agents#dialogflow-service-agent Diglogflow service agent>. The generated token is sent in the Authorization header.
    serviceAgentAuth ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ServiceAgentAuth
      ),
    -- | Required. The webhook URI for receiving POST requests. It must use https protocol.
    uri :: (Core.Maybe Core.Text),
    -- | The user name for HTTP Basic authentication.
    username :: (Core.Maybe Core.Text),
    -- | Optional. Type of the webhook.
    webhookType ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_WebhookType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookGenericWebService' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService ::
  GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService =
  GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
    { allowedCaCerts =
        Core.Nothing,
      httpMethod = Core.Nothing,
      oauthConfig = Core.Nothing,
      parameterMapping = Core.Nothing,
      password = Core.Nothing,
      requestBody = Core.Nothing,
      requestHeaders = Core.Nothing,
      serviceAgentAuth = Core.Nothing,
      uri = Core.Nothing,
      username = Core.Nothing,
      webhookType = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookGenericWebService"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
            Core.<$> (o Core..:? "allowedCaCerts")
            Core.<*> (o Core..:? "httpMethod")
            Core.<*> (o Core..:? "oauthConfig")
            Core.<*> (o Core..:? "parameterMapping")
            Core.<*> (o Core..:? "password")
            Core.<*> (o Core..:? "requestBody")
            Core.<*> (o Core..:? "requestHeaders")
            Core.<*> (o Core..:? "serviceAgentAuth")
            Core.<*> (o Core..:? "uri")
            Core.<*> (o Core..:? "username")
            Core.<*> (o Core..:? "webhookType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService
  where
  toJSON GoogleCloudDialogflowCxV3beta1WebhookGenericWebService {..} =
    Core.object
      ( Core.catMaybes
          [ ("allowedCaCerts" Core..=) Core.<$> allowedCaCerts,
            ("httpMethod" Core..=) Core.<$> httpMethod,
            ("oauthConfig" Core..=) Core.<$> oauthConfig,
            ("parameterMapping" Core..=) Core.<$> parameterMapping,
            ("password" Core..=) Core.<$> password,
            ("requestBody" Core..=) Core.<$> requestBody,
            ("requestHeaders" Core..=) Core.<$> requestHeaders,
            ("serviceAgentAuth" Core..=) Core.<$> serviceAgentAuth,
            ("uri" Core..=) Core.<$> uri,
            ("username" Core..=) Core.<$> username,
            ("webhookType" Core..=) Core.<$> webhookType
          ]
      )

-- | Optional. Maps the values extracted from specific fields of the flexible webhook response into session parameters. - Key: session parameter name - Value: field path in the webhook response
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping = GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    Core.Text ->
  GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
  additional =
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_ParameterMapping {..} =
      Core.toJSON additional

-- | The HTTP request headers to send together with webhook requests.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders = GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    Core.Text ->
  GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
  additional =
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebService_RequestHeaders {..} =
      Core.toJSON additional

-- | Represents configuration of OAuth client credential flow for 3rd party API authentication.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig = GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
  { -- | Required. The client ID provided by the 3rd party platform.
    clientId :: (Core.Maybe Core.Text),
    -- | Optional. The client secret provided by the 3rd party platform.
    clientSecret :: (Core.Maybe Core.Text),
    -- | Optional. The OAuth scopes to grant.
    scopes :: (Core.Maybe [Core.Text]),
    -- | Required. The token endpoint provided by the 3rd party platform to exchange an access token.
    tokenEndpoint :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig ::
  GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
newGoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig =
  GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
    { clientId =
        Core.Nothing,
      clientSecret = Core.Nothing,
      scopes = Core.Nothing,
      tokenEndpoint = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
            Core.<$> (o Core..:? "clientId")
            Core.<*> (o Core..:? "clientSecret")
            Core.<*> (o Core..:? "scopes")
            Core.<*> (o Core..:? "tokenEndpoint")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookGenericWebServiceOAuthConfig {..} =
      Core.object
        ( Core.catMaybes
            [ ("clientId" Core..=) Core.<$> clientId,
              ("clientSecret" Core..=) Core.<$> clientSecret,
              ("scopes" Core..=) Core.<$> scopes,
              ("tokenEndpoint" Core..=) Core.<$> tokenEndpoint
            ]
        )

-- | The request message for a webhook call. The request is sent as a JSON object and the field names will be presented in camel cases. You may see undocumented fields in an actual request. These fields are used internally by Dialogflow and should be ignored.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequest' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookRequest = GoogleCloudDialogflowCxV3beta1WebhookRequest
  { -- | Always present. The unique identifier of the DetectIntentResponse that will be returned to the API caller.
    detectIntentResponseId :: (Core.Maybe Core.Text),
    -- | If DTMF was provided as input, this field will contain the DTMF digits.
    dtmfDigits :: (Core.Maybe Core.Text),
    -- | Always present. Information about the fulfillment that triggered this webhook call.
    fulfillmentInfo ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
      ),
    -- | Information about the last matched intent.
    intentInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo),
    -- | The language code specified in the original request.
    languageCode :: (Core.Maybe Core.Text),
    -- | Information about the language of the request.
    languageInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1LanguageInfo),
    -- | The list of rich message responses to present to the user. Webhook can choose to append or replace this list in WebhookResponse.fulfillment_response;
    messages :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1ResponseMessage]),
    -- | Information about page status.
    pageInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1PageInfo),
    -- | Custom data set in QueryParameters.payload.
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload),
    -- | The sentiment analysis result of the current user request. The field is filled when sentiment analysis is configured to be enabled for the request.
    sentimentAnalysisResult ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
      ),
    -- | Information about session status.
    sessionInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1SessionInfo),
    -- | If natural language text was provided as input, this field will contain a copy of the text.
    text :: (Core.Maybe Core.Text),
    -- | If natural language speech audio was provided as input, this field will contain the transcript for the audio.
    transcript :: (Core.Maybe Core.Text),
    -- | If an event was provided as input, this field will contain the name of the event.
    triggerEvent :: (Core.Maybe Core.Text),
    -- | If an intent was provided as input, this field will contain a copy of the intent identifier. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    triggerIntent :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequest ::
  GoogleCloudDialogflowCxV3beta1WebhookRequest
newGoogleCloudDialogflowCxV3beta1WebhookRequest =
  GoogleCloudDialogflowCxV3beta1WebhookRequest
    { detectIntentResponseId =
        Core.Nothing,
      dtmfDigits = Core.Nothing,
      fulfillmentInfo = Core.Nothing,
      intentInfo = Core.Nothing,
      languageCode = Core.Nothing,
      languageInfo = Core.Nothing,
      messages = Core.Nothing,
      pageInfo = Core.Nothing,
      payload = Core.Nothing,
      sentimentAnalysisResult = Core.Nothing,
      sessionInfo = Core.Nothing,
      text = Core.Nothing,
      transcript = Core.Nothing,
      triggerEvent = Core.Nothing,
      triggerIntent = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowCxV3beta1WebhookRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequest"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequest
            Core.<$> (o Core..:? "detectIntentResponseId")
            Core.<*> (o Core..:? "dtmfDigits")
            Core.<*> (o Core..:? "fulfillmentInfo")
            Core.<*> (o Core..:? "intentInfo")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "languageInfo")
            Core.<*> (o Core..:? "messages")
            Core.<*> (o Core..:? "pageInfo")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "sentimentAnalysisResult")
            Core.<*> (o Core..:? "sessionInfo")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "transcript")
            Core.<*> (o Core..:? "triggerEvent")
            Core.<*> (o Core..:? "triggerIntent")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1WebhookRequest where
  toJSON GoogleCloudDialogflowCxV3beta1WebhookRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("detectIntentResponseId" Core..=)
              Core.<$> detectIntentResponseId,
            ("dtmfDigits" Core..=) Core.<$> dtmfDigits,
            ("fulfillmentInfo" Core..=) Core.<$> fulfillmentInfo,
            ("intentInfo" Core..=) Core.<$> intentInfo,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("languageInfo" Core..=) Core.<$> languageInfo,
            ("messages" Core..=) Core.<$> messages,
            ("pageInfo" Core..=) Core.<$> pageInfo,
            ("payload" Core..=) Core.<$> payload,
            ("sentimentAnalysisResult" Core..=)
              Core.<$> sentimentAnalysisResult,
            ("sessionInfo" Core..=) Core.<$> sessionInfo,
            ("text" Core..=) Core.<$> text,
            ("transcript" Core..=) Core.<$> transcript,
            ("triggerEvent" Core..=) Core.<$> triggerEvent,
            ("triggerIntent" Core..=) Core.<$> triggerIntent
          ]
      )

-- | Custom data set in QueryParameters.payload.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequest_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload = GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequest_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
newGoogleCloudDialogflowCxV3beta1WebhookRequest_Payload additional =
  GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload
  where
  toJSON GoogleCloudDialogflowCxV3beta1WebhookRequest_Payload {..} =
    Core.toJSON additional

-- | Represents fulfillment information communicated to the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo = GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
  { -- | Always present. The value of the Fulfillment.tag field will be populated in this field by Dialogflow when the associated webhook is called. The tag is typically used by the webhook service to identify which fulfillment is being called, but it could be used for other purposes.
    tag :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo ::
  GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
newGoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo =
  GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
    { tag =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
            Core.<$> (o Core..:? "tag")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestFulfillmentInfo {..} =
      Core.object (Core.catMaybes [("tag" Core..=) Core.<$> tag])

-- | Represents intent information communicated to the webhook.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo = GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
  { -- | The confidence of the matched intent. Values range from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | Always present. The display name of the last matched intent.
    displayName :: (Core.Maybe Core.Text),
    -- | Always present. The unique identifier of the last matched intent. Format: @projects\/\/locations\/\/agents\/\/intents\/@.
    lastMatchedIntent :: (Core.Maybe Core.Text),
    -- | Parameters identified as a result of intent matching. This is a map of the name of the identified parameter to the value of the parameter identified from the user\'s utterance. All parameters defined in the matched intent that are identified will be surfaced here.
    parameters ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo ::
  GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo =
  GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
    { confidence =
        Core.Nothing,
      displayName = Core.Nothing,
      lastMatchedIntent = Core.Nothing,
      parameters = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "lastMatchedIntent")
            Core.<*> (o Core..:? "parameters")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo
  where
  toJSON GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("displayName" Core..=) Core.<$> displayName,
            ("lastMatchedIntent" Core..=) Core.<$> lastMatchedIntent,
            ("parameters" Core..=) Core.<$> parameters
          ]
      )

-- | Parameters identified as a result of intent matching. This is a map of the name of the identified parameter to the value of the parameter identified from the user\'s utterance. All parameters defined in the matched intent that are identified will be surfaced here.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters = GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
  { additional ::
      ( Core.HashMap
          Core.Text
          GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters ::
  -- |  See 'additional'.
  Core.HashMap
    Core.Text
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue ->
  GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
  additional =
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfo_Parameters {..} =
      Core.toJSON additional

-- | Represents a value for an intent parameter.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue = GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
  { -- | Always present. Original text value extracted from user utterance.
    originalValue :: (Core.Maybe Core.Text),
    -- | Always present. Structured value for the parameter extracted from user utterance.
    resolvedValue :: (Core.Maybe Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue ::
  GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
newGoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue =
  GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
    { originalValue =
        Core.Nothing,
      resolvedValue =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
            Core.<$> (o Core..:? "originalValue")
            Core.<*> (o Core..:? "resolvedValue")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestIntentInfoIntentParameterValue {..} =
      Core.object
        ( Core.catMaybes
            [ ("originalValue" Core..=) Core.<$> originalValue,
              ("resolvedValue" Core..=) Core.<$> resolvedValue
            ]
        )

-- | Represents the result of sentiment analysis.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult = GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
  { -- | A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
    magnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
    score :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult ::
  GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
newGoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult =
  GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
    { magnitude =
        Core.Nothing,
      score = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
            Core.<$> (o Core..:? "magnitude")
            Core.<*> (o Core..:? "score")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookRequestSentimentAnalysisResult {..} =
      Core.object
        ( Core.catMaybes
            [ ("magnitude" Core..=) Core.<$> magnitude,
              ("score" Core..=) Core.<$> score
            ]
        )

-- | The response message for a webhook call.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookResponse = GoogleCloudDialogflowCxV3beta1WebhookResponse
  { -- | The fulfillment response to send to the user. This field can be omitted by the webhook if it does not intend to send any response to the user.
    fulfillmentResponse ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
      ),
    -- | Information about page status. This field can be omitted by the webhook if it does not intend to modify page status.
    pageInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1PageInfo),
    -- | Value to append directly to QueryResult.webhook_payloads.
    payload :: (Core.Maybe GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload),
    -- | Information about session status. This field can be omitted by the webhook if it does not intend to modify session status.
    sessionInfo :: (Core.Maybe GoogleCloudDialogflowCxV3beta1SessionInfo),
    -- | The target flow to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/@.
    targetFlow :: (Core.Maybe Core.Text),
    -- | The target page to transition to. Format: @projects\/\/locations\/\/agents\/\/flows\/\/pages\/@.
    targetPage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookResponse ::
  GoogleCloudDialogflowCxV3beta1WebhookResponse
newGoogleCloudDialogflowCxV3beta1WebhookResponse =
  GoogleCloudDialogflowCxV3beta1WebhookResponse
    { fulfillmentResponse =
        Core.Nothing,
      pageInfo = Core.Nothing,
      payload = Core.Nothing,
      sessionInfo = Core.Nothing,
      targetFlow = Core.Nothing,
      targetPage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookResponse
            Core.<$> (o Core..:? "fulfillmentResponse")
            Core.<*> (o Core..:? "pageInfo")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "sessionInfo")
            Core.<*> (o Core..:? "targetFlow")
            Core.<*> (o Core..:? "targetPage")
      )

instance Core.ToJSON GoogleCloudDialogflowCxV3beta1WebhookResponse where
  toJSON GoogleCloudDialogflowCxV3beta1WebhookResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("fulfillmentResponse" Core..=) Core.<$> fulfillmentResponse,
            ("pageInfo" Core..=) Core.<$> pageInfo,
            ("payload" Core..=) Core.<$> payload,
            ("sessionInfo" Core..=) Core.<$> sessionInfo,
            ("targetFlow" Core..=) Core.<$> targetFlow,
            ("targetPage" Core..=) Core.<$> targetPage
          ]
      )

-- | Value to append directly to QueryResult.webhook_payloads.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookResponse_Payload' smart constructor.
newtype GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload = GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookResponse_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
newGoogleCloudDialogflowCxV3beta1WebhookResponse_Payload additional =
  GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload
  where
  toJSON GoogleCloudDialogflowCxV3beta1WebhookResponse_Payload {..} =
    Core.toJSON additional

-- | Represents a fulfillment response to the user.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse = GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
  { -- | Merge behavior for @messages@.
    mergeBehavior ::
      ( Core.Maybe
          GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse_MergeBehavior
      ),
    -- | The list of rich message responses to present to the user.
    messages :: (Core.Maybe [GoogleCloudDialogflowCxV3beta1ResponseMessage])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse ::
  GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
newGoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse =
  GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
    { mergeBehavior =
        Core.Nothing,
      messages = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
            Core.<$> (o Core..:? "mergeBehavior")
            Core.<*> (o Core..:? "messages")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookResponseFulfillmentResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("mergeBehavior" Core..=) Core.<$> mergeBehavior,
              ("messages" Core..=) Core.<$> messages
            ]
        )

-- | Represents configuration for a <https://cloud.google.com/service-directory Service Directory> service.
--
-- /See:/ 'newGoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig' smart constructor.
data GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig = GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
  { -- | Generic Service configuration of this webhook.
    genericWebService :: (Core.Maybe GoogleCloudDialogflowCxV3beta1WebhookGenericWebService),
    -- | Required. The name of <https://cloud.google.com/service-directory Service Directory> service. Format: @projects\/\/locations\/\/namespaces\/\/services\/@. @Location ID@ of the service directory must be the same as the location of the agent.
    service :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig' with the minimum fields required to make a request.
newGoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig ::
  GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
newGoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig =
  GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
    { genericWebService =
        Core.Nothing,
      service = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig"
      ( \o ->
          GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
            Core.<$> (o Core..:? "genericWebService")
            Core.<*> (o Core..:? "service")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig
  where
  toJSON
    GoogleCloudDialogflowCxV3beta1WebhookServiceDirectoryConfig {..} =
      Core.object
        ( Core.catMaybes
            [ ("genericWebService" Core..=) Core.<$> genericWebService,
              ("service" Core..=) Core.<$> service
            ]
        )

-- | Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start\/end.
--
-- /See:/ 'newGoogleCloudDialogflowV2AnnotatedMessagePart' smart constructor.
data GoogleCloudDialogflowV2AnnotatedMessagePart = GoogleCloudDialogflowV2AnnotatedMessagePart
  { -- | The <https://cloud.google.com/dialogflow/docs/reference/system-entities Dialogflow system entity type> of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
    entityType :: (Core.Maybe Core.Text),
    -- | The <https://cloud.google.com/dialogflow/docs/reference/system-entities Dialogflow system entity formatted value> of this message part. For example for a system entity of type @\@sys.unit-currency@, this may contain: { \"amount\": 5, \"currency\": \"USD\" }
    formattedValue :: (Core.Maybe Core.Value),
    -- | A part of a message possibly annotated with an entity.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2AnnotatedMessagePart' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2AnnotatedMessagePart ::
  GoogleCloudDialogflowV2AnnotatedMessagePart
newGoogleCloudDialogflowV2AnnotatedMessagePart =
  GoogleCloudDialogflowV2AnnotatedMessagePart
    { entityType =
        Core.Nothing,
      formattedValue = Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2AnnotatedMessagePart where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2AnnotatedMessagePart"
      ( \o ->
          GoogleCloudDialogflowV2AnnotatedMessagePart
            Core.<$> (o Core..:? "entityType")
            Core.<*> (o Core..:? "formattedValue")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2AnnotatedMessagePart where
  toJSON GoogleCloudDialogflowV2AnnotatedMessagePart {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityType" Core..=) Core.<$> entityType,
            ("formattedValue" Core..=) Core.<$> formattedValue,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Represents article answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2ArticleAnswer' smart constructor.
data GoogleCloudDialogflowV2ArticleAnswer = GoogleCloudDialogflowV2ArticleAnswer
  { -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | Article match confidence. The system\'s confidence score that this article is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | A map that contains metadata about the answer and the document from which it originates.
    metadata :: (Core.Maybe GoogleCloudDialogflowV2ArticleAnswer_Metadata),
    -- | Article snippets.
    snippets :: (Core.Maybe [Core.Text]),
    -- | The article title.
    title :: (Core.Maybe Core.Text),
    -- | The article URI.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ArticleAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ArticleAnswer ::
  GoogleCloudDialogflowV2ArticleAnswer
newGoogleCloudDialogflowV2ArticleAnswer =
  GoogleCloudDialogflowV2ArticleAnswer
    { answerRecord = Core.Nothing,
      confidence = Core.Nothing,
      metadata = Core.Nothing,
      snippets = Core.Nothing,
      title = Core.Nothing,
      uri = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2ArticleAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ArticleAnswer"
      ( \o ->
          GoogleCloudDialogflowV2ArticleAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "confidence")
            Core.<*> (o Core..:? "metadata")
            Core.<*> (o Core..:? "snippets")
            Core.<*> (o Core..:? "title")
            Core.<*> (o Core..:? "uri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2ArticleAnswer where
  toJSON GoogleCloudDialogflowV2ArticleAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("confidence" Core..=) Core.<$> confidence,
            ("metadata" Core..=) Core.<$> metadata,
            ("snippets" Core..=) Core.<$> snippets,
            ("title" Core..=) Core.<$> title,
            ("uri" Core..=) Core.<$> uri
          ]
      )

-- | A map that contains metadata about the answer and the document from which it originates.
--
-- /See:/ 'newGoogleCloudDialogflowV2ArticleAnswer_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2ArticleAnswer_Metadata = GoogleCloudDialogflowV2ArticleAnswer_Metadata
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ArticleAnswer_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ArticleAnswer_Metadata ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowV2ArticleAnswer_Metadata
newGoogleCloudDialogflowV2ArticleAnswer_Metadata additional =
  GoogleCloudDialogflowV2ArticleAnswer_Metadata
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ArticleAnswer_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ArticleAnswer_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2ArticleAnswer_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2ArticleAnswer_Metadata where
  toJSON GoogleCloudDialogflowV2ArticleAnswer_Metadata {..} =
    Core.toJSON additional

-- | Metadata for article suggestion models.
--
-- /See:/ 'newGoogleCloudDialogflowV2ArticleSuggestionModelMetadata' smart constructor.
newtype GoogleCloudDialogflowV2ArticleSuggestionModelMetadata = GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
  { -- | Optional. Type of the article suggestion model. If not provided, model_type is used.
    trainingModelType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2ArticleSuggestionModelMetadata_TrainingModelType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ArticleSuggestionModelMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ArticleSuggestionModelMetadata ::
  GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
newGoogleCloudDialogflowV2ArticleSuggestionModelMetadata =
  GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
    { trainingModelType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ArticleSuggestionModelMetadata"
      ( \o ->
          GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
            Core.<$> (o Core..:? "trainingModelType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2ArticleSuggestionModelMetadata
  where
  toJSON GoogleCloudDialogflowV2ArticleSuggestionModelMetadata {..} =
    Core.object
      ( Core.catMaybes
          [("trainingModelType" Core..=) Core.<$> trainingModelType]
      )

-- | The response message for EntityTypes.BatchUpdateEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse' smart constructor.
newtype GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse = GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
  { -- | The collection of updated or created entity types.
    entityTypes :: (Core.Maybe [GoogleCloudDialogflowV2EntityType])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse ::
  GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
newGoogleCloudDialogflowV2BatchUpdateEntityTypesResponse =
  GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
    { entityTypes =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
            Core.<$> (o Core..:? "entityTypes")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse
  where
  toJSON GoogleCloudDialogflowV2BatchUpdateEntityTypesResponse {..} =
    Core.object
      (Core.catMaybes [("entityTypes" Core..=) Core.<$> entityTypes])

-- | The response message for Intents.BatchUpdateIntents.
--
-- /See:/ 'newGoogleCloudDialogflowV2BatchUpdateIntentsResponse' smart constructor.
newtype GoogleCloudDialogflowV2BatchUpdateIntentsResponse = GoogleCloudDialogflowV2BatchUpdateIntentsResponse
  { -- | The collection of updated or created intents.
    intents :: (Core.Maybe [GoogleCloudDialogflowV2Intent])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2BatchUpdateIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2BatchUpdateIntentsResponse ::
  GoogleCloudDialogflowV2BatchUpdateIntentsResponse
newGoogleCloudDialogflowV2BatchUpdateIntentsResponse =
  GoogleCloudDialogflowV2BatchUpdateIntentsResponse
    { intents =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2BatchUpdateIntentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2BatchUpdateIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowV2BatchUpdateIntentsResponse
            Core.<$> (o Core..:? "intents")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2BatchUpdateIntentsResponse
  where
  toJSON GoogleCloudDialogflowV2BatchUpdateIntentsResponse {..} =
    Core.object
      (Core.catMaybes [("intents" Core..=) Core.<$> intents])

-- | Metadata for a ConversationProfiles.ClearSuggestionFeatureConfig operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata = GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
  { -- | The resource name of the conversation profile. Format: @projects\/\/locations\/\/conversationProfiles\/@
    conversationProfile :: (Core.Maybe Core.Text),
    -- | Timestamp whe the request was created. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Required. The participant role to remove the suggestion feature config. Only HUMAN/AGENT or END/USER can be used.
    participantRole ::
      ( Core.Maybe
          GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata_ParticipantRole
      ),
    -- | Required. The type of the suggestion feature to remove.
    suggestionFeatureType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata_SuggestionFeatureType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata ::
  GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
newGoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata =
  GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
    { conversationProfile =
        Core.Nothing,
      createTime = Core.Nothing,
      participantRole =
        Core.Nothing,
      suggestionFeatureType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
            Core.<$> (o Core..:? "conversationProfile")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "participantRole")
            Core.<*> (o Core..:? "suggestionFeatureType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2ClearSuggestionFeatureConfigOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationProfile" Core..=) Core.<$> conversationProfile,
              ("createTime" Core..=) Core.<$> createTime,
              ("participantRole" Core..=) Core.<$> participantRole,
              ("suggestionFeatureType" Core..=) Core.<$> suggestionFeatureType
            ]
        )

-- | Dialogflow contexts are similar to natural language context. If a person says to you \"they are orange\", you need context in order to understand what \"they\" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the <https://cloud.google.com/dialogflow/docs/contexts-overview Contexts guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2Context' smart constructor.
data GoogleCloudDialogflowV2Context = GoogleCloudDialogflowV2Context
  { -- | Optional. The number of conversational query requests after which the context expires. The default is @0@. If set to @0@, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
    lifespanCount :: (Core.Maybe Core.Int32),
    -- | Required. The unique identifier of the context. Format: @projects\/\/agent\/sessions\/\/contexts\/@, or @projects\/\/agent\/environments\/\/users\/\/sessions\/\/contexts\/@. The @Context ID@ is always converted to lowercase, may only contain characters in @a-zA-Z0-9_-%@ and may be at most 250 bytes long. If @Environment ID@ is not specified, we assume default \'draft\' environment. If @User ID@ is not specified, we assume default \'-\' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * @__system_counters__@ * @*_id_dialog_context@ * @*_dialog_params_size@
    name :: (Core.Maybe Core.Text),
    -- | Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowV2Context_Parameters)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2Context' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2Context ::
  GoogleCloudDialogflowV2Context
newGoogleCloudDialogflowV2Context =
  GoogleCloudDialogflowV2Context
    { lifespanCount = Core.Nothing,
      name = Core.Nothing,
      parameters = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2Context where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2Context"
      ( \o ->
          GoogleCloudDialogflowV2Context
            Core.<$> (o Core..:? "lifespanCount")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "parameters")
      )

instance Core.ToJSON GoogleCloudDialogflowV2Context where
  toJSON GoogleCloudDialogflowV2Context {..} =
    Core.object
      ( Core.catMaybes
          [ ("lifespanCount" Core..=) Core.<$> lifespanCount,
            ("name" Core..=) Core.<$> name,
            ("parameters" Core..=) Core.<$> parameters
          ]
      )

-- | Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowV2Context_Parameters' smart constructor.
newtype GoogleCloudDialogflowV2Context_Parameters = GoogleCloudDialogflowV2Context_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2Context_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2Context_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2Context_Parameters
newGoogleCloudDialogflowV2Context_Parameters additional =
  GoogleCloudDialogflowV2Context_Parameters
    { additional =
        additional
    }

instance Core.FromJSON GoogleCloudDialogflowV2Context_Parameters where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2Context_Parameters"
      ( \o ->
          GoogleCloudDialogflowV2Context_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2Context_Parameters where
  toJSON GoogleCloudDialogflowV2Context_Parameters {..} =
    Core.toJSON additional

-- | Represents a notification sent to Pub\/Sub subscribers for conversation lifecycle events.
--
-- /See:/ 'newGoogleCloudDialogflowV2ConversationEvent' smart constructor.
data GoogleCloudDialogflowV2ConversationEvent = GoogleCloudDialogflowV2ConversationEvent
  { -- | The unique identifier of the conversation this notification refers to. Format: @projects\/\/conversations\/@.
    conversation :: (Core.Maybe Core.Text),
    -- | More detailed information about an error. Only set for type UNRECOVERABLE/ERROR/IN/PHONE/CALL.
    errorStatus :: (Core.Maybe GoogleRpcStatus),
    -- | Payload of NEW_MESSAGE event.
    newMessagePayload' :: (Core.Maybe GoogleCloudDialogflowV2Message),
    -- | Payload of NEW/RECOGNITION/RESULT event.
    newRecognitionResultPayload' :: (Core.Maybe GoogleCloudDialogflowV2StreamingRecognitionResult),
    -- | The type of the event that this notification refers to.
    type' :: (Core.Maybe GoogleCloudDialogflowV2ConversationEvent_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ConversationEvent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ConversationEvent ::
  GoogleCloudDialogflowV2ConversationEvent
newGoogleCloudDialogflowV2ConversationEvent =
  GoogleCloudDialogflowV2ConversationEvent
    { conversation =
        Core.Nothing,
      errorStatus = Core.Nothing,
      newMessagePayload' = Core.Nothing,
      newRecognitionResultPayload' = Core.Nothing,
      type' = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2ConversationEvent where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ConversationEvent"
      ( \o ->
          GoogleCloudDialogflowV2ConversationEvent
            Core.<$> (o Core..:? "conversation")
            Core.<*> (o Core..:? "errorStatus")
            Core.<*> (o Core..:? "newMessagePayload")
            Core.<*> (o Core..:? "newRecognitionResultPayload")
            Core.<*> (o Core..:? "type")
      )

instance Core.ToJSON GoogleCloudDialogflowV2ConversationEvent where
  toJSON GoogleCloudDialogflowV2ConversationEvent {..} =
    Core.object
      ( Core.catMaybes
          [ ("conversation" Core..=) Core.<$> conversation,
            ("errorStatus" Core..=) Core.<$> errorStatus,
            ("newMessagePayload" Core..=) Core.<$> newMessagePayload',
            ("newRecognitionResultPayload" Core..=)
              Core.<$> newRecognitionResultPayload',
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Represents a conversation model.
--
-- /See:/ 'newGoogleCloudDialogflowV2ConversationModel' smart constructor.
data GoogleCloudDialogflowV2ConversationModel = GoogleCloudDialogflowV2ConversationModel
  { -- | Metadata for article suggestion models.
    articleSuggestionModelMetadata :: (Core.Maybe GoogleCloudDialogflowV2ArticleSuggestionModelMetadata),
    -- | Output only. Creation time of this model.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Required. Datasets used to create model.
    datasets :: (Core.Maybe [GoogleCloudDialogflowV2InputDataset]),
    -- | Required. The display name of the model. At most 64 bytes long.
    displayName :: (Core.Maybe Core.Text),
    -- | Language code for the conversation model. If not specified, the language is en-US. Language at ConversationModel should be set for all non en-us languages. This should be a <https://www.rfc-editor.org/rfc/bcp/bcp47.txt BCP-47> language tag. Example: \"en-US\".
    languageCode :: (Core.Maybe Core.Text),
    -- | ConversationModel resource name. Format: @projects\/\/conversationModels\/@
    name :: (Core.Maybe Core.Text),
    -- | Output only. A read only boolean field reflecting Zone Isolation status of the model.
    satisfiesPzi :: (Core.Maybe Core.Bool),
    -- | Output only. A read only boolean field reflecting Zone Separation status of the model.
    satisfiesPzs :: (Core.Maybe Core.Bool),
    -- | Metadata for smart reply models.
    smartReplyModelMetadata :: (Core.Maybe GoogleCloudDialogflowV2SmartReplyModelMetadata),
    -- | Output only. State of the model. A model can only serve prediction requests after it gets deployed.
    state :: (Core.Maybe GoogleCloudDialogflowV2ConversationModel_State)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ConversationModel' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ConversationModel ::
  GoogleCloudDialogflowV2ConversationModel
newGoogleCloudDialogflowV2ConversationModel =
  GoogleCloudDialogflowV2ConversationModel
    { articleSuggestionModelMetadata =
        Core.Nothing,
      createTime = Core.Nothing,
      datasets = Core.Nothing,
      displayName = Core.Nothing,
      languageCode = Core.Nothing,
      name = Core.Nothing,
      satisfiesPzi = Core.Nothing,
      satisfiesPzs = Core.Nothing,
      smartReplyModelMetadata = Core.Nothing,
      state = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2ConversationModel where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ConversationModel"
      ( \o ->
          GoogleCloudDialogflowV2ConversationModel
            Core.<$> (o Core..:? "articleSuggestionModelMetadata")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "datasets")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "satisfiesPzi")
            Core.<*> (o Core..:? "satisfiesPzs")
            Core.<*> (o Core..:? "smartReplyModelMetadata")
            Core.<*> (o Core..:? "state")
      )

instance Core.ToJSON GoogleCloudDialogflowV2ConversationModel where
  toJSON GoogleCloudDialogflowV2ConversationModel {..} =
    Core.object
      ( Core.catMaybes
          [ ("articleSuggestionModelMetadata" Core..=)
              Core.<$> articleSuggestionModelMetadata,
            ("createTime" Core..=) Core.<$> createTime,
            ("datasets" Core..=) Core.<$> datasets,
            ("displayName" Core..=) Core.<$> displayName,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("name" Core..=) Core.<$> name,
            ("satisfiesPzi" Core..=) Core.<$> satisfiesPzi,
            ("satisfiesPzs" Core..=) Core.<$> satisfiesPzs,
            ("smartReplyModelMetadata" Core..=)
              Core.<$> smartReplyModelMetadata,
            ("state" Core..=) Core.<$> state
          ]
      )

-- | Metadata for CreateConversationDataset.
--
-- /See:/ 'newGoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata' smart constructor.
newtype GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata = GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
  { -- | The resource name of the conversation dataset that will be created. Format: @projects\/\/locations\/\/conversationDatasets\/@
    conversationDataset :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata ::
  GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
newGoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata =
  GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
    { conversationDataset =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
            Core.<$> (o Core..:? "conversationDataset")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2CreateConversationDatasetOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [("conversationDataset" Core..=) Core.<$> conversationDataset]
        )

-- | Metadata for a ConversationModels.CreateConversationModelEvaluation operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata = GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
  { -- | The resource name of the conversation model. Format: @projects\/\/locations\/\/conversationModels\/@
    conversationModel :: (Core.Maybe Core.Text),
    -- | The resource name of the conversation model. Format: @projects\/\/locations\/\/conversationModels\/\/evaluations\/@
    conversationModelEvaluation :: (Core.Maybe Core.Text),
    -- | Timestamp when the request to create conversation model was submitted. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | State of CreateConversationModel operation.
    state ::
      ( Core.Maybe
          GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata_State
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata ::
  GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
newGoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata =
  GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
    { conversationModel =
        Core.Nothing,
      conversationModelEvaluation =
        Core.Nothing,
      createTime =
        Core.Nothing,
      state = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
            Core.<$> (o Core..:? "conversationModel")
            Core.<*> (o Core..:? "conversationModelEvaluation")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "state")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2CreateConversationModelEvaluationOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationModel" Core..=) Core.<$> conversationModel,
              ("conversationModelEvaluation" Core..=)
                Core.<$> conversationModelEvaluation,
              ("createTime" Core..=) Core.<$> createTime,
              ("state" Core..=) Core.<$> state
            ]
        )

-- | Metadata for a ConversationModels.CreateConversationModel operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2CreateConversationModelOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2CreateConversationModelOperationMetadata = GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
  { -- | The resource name of the conversation model. Format: @projects\/\/conversationModels\/@
    conversationModel :: (Core.Maybe Core.Text),
    -- | Timestamp when the request to create conversation model is submitted. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | State of CreateConversationModel operation.
    state ::
      ( Core.Maybe
          GoogleCloudDialogflowV2CreateConversationModelOperationMetadata_State
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2CreateConversationModelOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2CreateConversationModelOperationMetadata ::
  GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
newGoogleCloudDialogflowV2CreateConversationModelOperationMetadata =
  GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
    { conversationModel =
        Core.Nothing,
      createTime = Core.Nothing,
      state = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2CreateConversationModelOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
            Core.<$> (o Core..:? "conversationModel")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "state")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2CreateConversationModelOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2CreateConversationModelOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationModel" Core..=) Core.<$> conversationModel,
              ("createTime" Core..=) Core.<$> createTime,
              ("state" Core..=) Core.<$> state
            ]
        )

-- | Metadata for DeleteConversationDataset.
--
-- /See:/ 'newGoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata = GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata ::
  GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata
newGoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata =
  GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata

instance
  Core.FromJSON
    GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata"
      ( \o ->
          Core.pure
            GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2DeleteConversationDatasetOperationMetadata
  where
  toJSON = Core.const Core.emptyObject

-- | Metadata for a ConversationModels.DeleteConversationModel operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2DeleteConversationModelOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata = GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
  { -- | The resource name of the conversation model. Format: @projects\/\/conversationModels\/@
    conversationModel :: (Core.Maybe Core.Text),
    -- | Timestamp when delete conversation model request was created. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2DeleteConversationModelOperationMetadata ::
  GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
newGoogleCloudDialogflowV2DeleteConversationModelOperationMetadata =
  GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
    { conversationModel =
        Core.Nothing,
      createTime = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
            Core.<$> (o Core..:? "conversationModel")
            Core.<*> (o Core..:? "createTime")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2DeleteConversationModelOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationModel" Core..=) Core.<$> conversationModel,
              ("createTime" Core..=) Core.<$> createTime
            ]
        )

-- | Metadata for a ConversationModels.DeployConversationModel operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2DeployConversationModelOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2DeployConversationModelOperationMetadata = GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
  { -- | The resource name of the conversation model. Format: @projects\/\/conversationModels\/@
    conversationModel :: (Core.Maybe Core.Text),
    -- | Timestamp when request to deploy conversation model was submitted. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2DeployConversationModelOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2DeployConversationModelOperationMetadata ::
  GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
newGoogleCloudDialogflowV2DeployConversationModelOperationMetadata =
  GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
    { conversationModel =
        Core.Nothing,
      createTime = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2DeployConversationModelOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
            Core.<$> (o Core..:? "conversationModel")
            Core.<*> (o Core..:? "createTime")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2DeployConversationModelOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2DeployConversationModelOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationModel" Core..=) Core.<$> conversationModel,
              ("createTime" Core..=) Core.<$> createTime
            ]
        )

-- | A customer-managed encryption key specification that can be applied to all created resources (e.g. Conversation).
--
-- /See:/ 'newGoogleCloudDialogflowV2EncryptionSpec' smart constructor.
data GoogleCloudDialogflowV2EncryptionSpec = GoogleCloudDialogflowV2EncryptionSpec
  { -- | Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by the default Google encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format: @projects\/{project}\/locations\/{location}\/keyRings\/{keyRing}\/cryptoKeys\/{key}@
    kmsKey :: (Core.Maybe Core.Text),
    -- | Immutable. The resource name of the encryption key specification resource. Format: projects\/{project}\/locations\/{location}\/encryptionSpec
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2EncryptionSpec' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2EncryptionSpec ::
  GoogleCloudDialogflowV2EncryptionSpec
newGoogleCloudDialogflowV2EncryptionSpec =
  GoogleCloudDialogflowV2EncryptionSpec
    { kmsKey = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2EncryptionSpec where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2EncryptionSpec"
      ( \o ->
          GoogleCloudDialogflowV2EncryptionSpec
            Core.<$> (o Core..:? "kmsKey")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowV2EncryptionSpec where
  toJSON GoogleCloudDialogflowV2EncryptionSpec {..} =
    Core.object
      ( Core.catMaybes
          [ ("kmsKey" Core..=) Core.<$> kmsKey,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the <https://cloud.google.com/dialogflow/docs/entities-overview Entity guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2EntityType' smart constructor.
data GoogleCloudDialogflowV2EntityType = GoogleCloudDialogflowV2EntityType
  { -- | Optional. Indicates whether the entity type can be automatically expanded.
    autoExpansionMode :: (Core.Maybe GoogleCloudDialogflowV2EntityType_AutoExpansionMode),
    -- | Required. The name of the entity type.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. Enables fuzzy entity extraction during classification.
    enableFuzzyExtraction :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of entity entries associated with the entity type.
    entities :: (Core.Maybe [GoogleCloudDialogflowV2EntityTypeEntity]),
    -- | Required. Indicates the kind of entity type.
    kind :: (Core.Maybe GoogleCloudDialogflowV2EntityType_Kind),
    -- | The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Format: @projects\/\/agent\/entityTypes\/@.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2EntityType' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2EntityType ::
  GoogleCloudDialogflowV2EntityType
newGoogleCloudDialogflowV2EntityType =
  GoogleCloudDialogflowV2EntityType
    { autoExpansionMode =
        Core.Nothing,
      displayName = Core.Nothing,
      enableFuzzyExtraction = Core.Nothing,
      entities = Core.Nothing,
      kind = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2EntityType where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2EntityType"
      ( \o ->
          GoogleCloudDialogflowV2EntityType
            Core.<$> (o Core..:? "autoExpansionMode")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "enableFuzzyExtraction")
            Core.<*> (o Core..:? "entities")
            Core.<*> (o Core..:? "kind")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowV2EntityType where
  toJSON GoogleCloudDialogflowV2EntityType {..} =
    Core.object
      ( Core.catMaybes
          [ ("autoExpansionMode" Core..=) Core.<$> autoExpansionMode,
            ("displayName" Core..=) Core.<$> displayName,
            ("enableFuzzyExtraction" Core..=) Core.<$> enableFuzzyExtraction,
            ("entities" Core..=) Core.<$> entities,
            ("kind" Core..=) Core.<$> kind,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | An __entity entry__ for an associated entity type.
--
-- /See:/ 'newGoogleCloudDialogflowV2EntityTypeEntity' smart constructor.
data GoogleCloudDialogflowV2EntityTypeEntity = GoogleCloudDialogflowV2EntityTypeEntity
  { -- | Required. A collection of value synonyms. For example, if the entity type is /vegetable/, and @value@ is /scallions/, a synonym could be /green onions/. For @KIND_LIST@ entity types: * This collection must contain exactly one synonym equal to @value@.
    synonyms :: (Core.Maybe [Core.Text]),
    -- | Required. The primary value associated with this entity entry. For example, if the entity type is /vegetable/, the value could be /scallions/. For @KIND_MAP@ entity types: * A reference value to be used in place of synonyms. For @KIND_LIST@ entity types: * A string that can contain references to other entity types (with or without aliases).
    value :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2EntityTypeEntity' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2EntityTypeEntity ::
  GoogleCloudDialogflowV2EntityTypeEntity
newGoogleCloudDialogflowV2EntityTypeEntity =
  GoogleCloudDialogflowV2EntityTypeEntity
    { synonyms = Core.Nothing,
      value = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2EntityTypeEntity where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2EntityTypeEntity"
      ( \o ->
          GoogleCloudDialogflowV2EntityTypeEntity
            Core.<$> (o Core..:? "synonyms")
            Core.<*> (o Core..:? "value")
      )

instance Core.ToJSON GoogleCloudDialogflowV2EntityTypeEntity where
  toJSON GoogleCloudDialogflowV2EntityTypeEntity {..} =
    Core.object
      ( Core.catMaybes
          [ ("synonyms" Core..=) Core.<$> synonyms,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | Events allow for matching intents by event name instead of the natural language input. For instance, input \`@can trigger a personalized welcome response. The parameter@name@may be used by the agent in the response:@\"Hello #welcome_event.name! What can I do for you today?\"\`.
--
-- /See:/ 'newGoogleCloudDialogflowV2EventInput' smart constructor.
data GoogleCloudDialogflowV2EventInput = GoogleCloudDialogflowV2EventInput
  { -- | Required. The language of this query. See <https://cloud.google.com/dialogflow/docs/reference/language Language Support> for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a WebhookResponse.followup/event/input field, because the language was already defined in the originating detect intent request.
    languageCode :: (Core.Maybe Core.Text),
    -- | Required. The unique identifier of the event.
    name :: (Core.Maybe Core.Text),
    -- | The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowV2EventInput_Parameters)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2EventInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2EventInput ::
  GoogleCloudDialogflowV2EventInput
newGoogleCloudDialogflowV2EventInput =
  GoogleCloudDialogflowV2EventInput
    { languageCode = Core.Nothing,
      name = Core.Nothing,
      parameters = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2EventInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2EventInput"
      ( \o ->
          GoogleCloudDialogflowV2EventInput
            Core.<$> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "parameters")
      )

instance Core.ToJSON GoogleCloudDialogflowV2EventInput where
  toJSON GoogleCloudDialogflowV2EventInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("languageCode" Core..=) Core.<$> languageCode,
            ("name" Core..=) Core.<$> name,
            ("parameters" Core..=) Core.<$> parameters
          ]
      )

-- | The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowV2EventInput_Parameters' smart constructor.
newtype GoogleCloudDialogflowV2EventInput_Parameters = GoogleCloudDialogflowV2EventInput_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2EventInput_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2EventInput_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2EventInput_Parameters
newGoogleCloudDialogflowV2EventInput_Parameters additional =
  GoogleCloudDialogflowV2EventInput_Parameters
    { additional =
        additional
    }

instance Core.FromJSON GoogleCloudDialogflowV2EventInput_Parameters where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2EventInput_Parameters"
      ( \o ->
          GoogleCloudDialogflowV2EventInput_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2EventInput_Parameters where
  toJSON GoogleCloudDialogflowV2EventInput_Parameters {..} =
    Core.toJSON additional

-- | The response message for Agents.ExportAgent.
--
-- /See:/ 'newGoogleCloudDialogflowV2ExportAgentResponse' smart constructor.
data GoogleCloudDialogflowV2ExportAgentResponse = GoogleCloudDialogflowV2ExportAgentResponse
  { -- | Zip compressed raw byte content for agent.
    agentContent :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported agent. This field is populated only if @agent_uri@ is specified in @ExportAgentRequest@.
    agentUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ExportAgentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ExportAgentResponse ::
  GoogleCloudDialogflowV2ExportAgentResponse
newGoogleCloudDialogflowV2ExportAgentResponse =
  GoogleCloudDialogflowV2ExportAgentResponse
    { agentContent =
        Core.Nothing,
      agentUri = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2ExportAgentResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ExportAgentResponse"
      ( \o ->
          GoogleCloudDialogflowV2ExportAgentResponse
            Core.<$> (o Core..:? "agentContent")
            Core.<*> (o Core..:? "agentUri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2ExportAgentResponse where
  toJSON GoogleCloudDialogflowV2ExportAgentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentContent" Core..=) Core.<$> agentContent,
            ("agentUri" Core..=) Core.<$> agentUri
          ]
      )

-- | Metadata related to the Export Data Operations (e.g. ExportDocument).
--
-- /See:/ 'newGoogleCloudDialogflowV2ExportOperationMetadata' smart constructor.
newtype GoogleCloudDialogflowV2ExportOperationMetadata = GoogleCloudDialogflowV2ExportOperationMetadata
  { -- | Cloud Storage file path of the exported data.
    exportedGcsDestination :: (Core.Maybe GoogleCloudDialogflowV2GcsDestination)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ExportOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ExportOperationMetadata ::
  GoogleCloudDialogflowV2ExportOperationMetadata
newGoogleCloudDialogflowV2ExportOperationMetadata =
  GoogleCloudDialogflowV2ExportOperationMetadata
    { exportedGcsDestination =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ExportOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ExportOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2ExportOperationMetadata
            Core.<$> (o Core..:? "exportedGcsDestination")
      )

instance Core.ToJSON GoogleCloudDialogflowV2ExportOperationMetadata where
  toJSON GoogleCloudDialogflowV2ExportOperationMetadata {..} =
    Core.object
      ( Core.catMaybes
          [ ("exportedGcsDestination" Core..=)
              Core.<$> exportedGcsDestination
          ]
      )

-- | Represents answer from \"frequently asked questions\".
--
-- /See:/ 'newGoogleCloudDialogflowV2FaqAnswer' smart constructor.
data GoogleCloudDialogflowV2FaqAnswer = GoogleCloudDialogflowV2FaqAnswer
  { -- | The piece of text from the @source@ knowledge base document.
    answer :: (Core.Maybe Core.Text),
    -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | The system\'s confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | A map that contains metadata about the answer and the document from which it originates.
    metadata :: (Core.Maybe GoogleCloudDialogflowV2FaqAnswer_Metadata),
    -- | The corresponding FAQ question.
    question :: (Core.Maybe Core.Text),
    -- | Indicates which Knowledge Document this answer was extracted from. Format: @projects\/\/locations\/\/agent\/knowledgeBases\/\/documents\/@.
    source :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2FaqAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2FaqAnswer ::
  GoogleCloudDialogflowV2FaqAnswer
newGoogleCloudDialogflowV2FaqAnswer =
  GoogleCloudDialogflowV2FaqAnswer
    { answer = Core.Nothing,
      answerRecord = Core.Nothing,
      confidence = Core.Nothing,
      metadata = Core.Nothing,
      question = Core.Nothing,
      source = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2FaqAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2FaqAnswer"
      ( \o ->
          GoogleCloudDialogflowV2FaqAnswer
            Core.<$> (o Core..:? "answer")
            Core.<*> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "confidence")
            Core.<*> (o Core..:? "metadata")
            Core.<*> (o Core..:? "question")
            Core.<*> (o Core..:? "source")
      )

instance Core.ToJSON GoogleCloudDialogflowV2FaqAnswer where
  toJSON GoogleCloudDialogflowV2FaqAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answer" Core..=) Core.<$> answer,
            ("answerRecord" Core..=) Core.<$> answerRecord,
            ("confidence" Core..=) Core.<$> confidence,
            ("metadata" Core..=) Core.<$> metadata,
            ("question" Core..=) Core.<$> question,
            ("source" Core..=) Core.<$> source
          ]
      )

-- | A map that contains metadata about the answer and the document from which it originates.
--
-- /See:/ 'newGoogleCloudDialogflowV2FaqAnswer_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2FaqAnswer_Metadata = GoogleCloudDialogflowV2FaqAnswer_Metadata
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2FaqAnswer_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2FaqAnswer_Metadata ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowV2FaqAnswer_Metadata
newGoogleCloudDialogflowV2FaqAnswer_Metadata additional =
  GoogleCloudDialogflowV2FaqAnswer_Metadata
    { additional =
        additional
    }

instance Core.FromJSON GoogleCloudDialogflowV2FaqAnswer_Metadata where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2FaqAnswer_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2FaqAnswer_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2FaqAnswer_Metadata where
  toJSON GoogleCloudDialogflowV2FaqAnswer_Metadata {..} =
    Core.toJSON additional

-- | Google Cloud Storage location for the output.
--
-- /See:/ 'newGoogleCloudDialogflowV2GcsDestination' smart constructor.
newtype GoogleCloudDialogflowV2GcsDestination = GoogleCloudDialogflowV2GcsDestination
  { -- | The Google Cloud Storage URIs for the output. A URI is of the form: @gs:\/\/bucket\/object-prefix-or-name@ Whether a prefix or name is used depends on the use case. The requesting user must have \"write-permission\" to the bucket.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2GcsDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2GcsDestination ::
  GoogleCloudDialogflowV2GcsDestination
newGoogleCloudDialogflowV2GcsDestination =
  GoogleCloudDialogflowV2GcsDestination {uri = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowV2GcsDestination where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2GcsDestination"
      ( \o ->
          GoogleCloudDialogflowV2GcsDestination Core.<$> (o Core..:? "uri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2GcsDestination where
  toJSON GoogleCloudDialogflowV2GcsDestination {..} =
    Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Represents a notification sent to Cloud Pub\/Sub subscribers for human agent assistant events in a specific conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV2HumanAgentAssistantEvent' smart constructor.
data GoogleCloudDialogflowV2HumanAgentAssistantEvent = GoogleCloudDialogflowV2HumanAgentAssistantEvent
  { -- | The conversation this notification refers to. Format: @projects\/\/conversations\/@.
    conversation :: (Core.Maybe Core.Text),
    -- | The participant that the suggestion is compiled for. Format: @projects\/\/conversations\/\/participants\/@. It will not be set in legacy workflow.
    participant :: (Core.Maybe Core.Text),
    -- | The suggestion results payload that this notification refers to.
    suggestionResults :: (Core.Maybe [GoogleCloudDialogflowV2SuggestionResult])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2HumanAgentAssistantEvent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2HumanAgentAssistantEvent ::
  GoogleCloudDialogflowV2HumanAgentAssistantEvent
newGoogleCloudDialogflowV2HumanAgentAssistantEvent =
  GoogleCloudDialogflowV2HumanAgentAssistantEvent
    { conversation =
        Core.Nothing,
      participant = Core.Nothing,
      suggestionResults = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2HumanAgentAssistantEvent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2HumanAgentAssistantEvent"
      ( \o ->
          GoogleCloudDialogflowV2HumanAgentAssistantEvent
            Core.<$> (o Core..:? "conversation")
            Core.<*> (o Core..:? "participant")
            Core.<*> (o Core..:? "suggestionResults")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2HumanAgentAssistantEvent
  where
  toJSON GoogleCloudDialogflowV2HumanAgentAssistantEvent {..} =
    Core.object
      ( Core.catMaybes
          [ ("conversation" Core..=) Core.<$> conversation,
            ("participant" Core..=) Core.<$> participant,
            ("suggestionResults" Core..=) Core.<$> suggestionResults
          ]
      )

-- | Metadata for a ConversationDatasets.ImportConversationData operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2ImportConversationDataOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2ImportConversationDataOperationMetadata = GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
  { -- | The resource name of the imported conversation dataset. Format: @projects\/\/locations\/\/conversationDatasets\/@
    conversationDataset :: (Core.Maybe Core.Text),
    -- | Timestamp when import conversation data request was created. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Partial failures are failures that don\'t fail the whole long running operation, e.g. single files that couldn\'t be read.
    partialFailures :: (Core.Maybe [GoogleRpcStatus])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ImportConversationDataOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ImportConversationDataOperationMetadata ::
  GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
newGoogleCloudDialogflowV2ImportConversationDataOperationMetadata =
  GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
    { conversationDataset =
        Core.Nothing,
      createTime = Core.Nothing,
      partialFailures = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ImportConversationDataOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
            Core.<$> (o Core..:? "conversationDataset")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "partialFailures")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2ImportConversationDataOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2ImportConversationDataOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationDataset" Core..=) Core.<$> conversationDataset,
              ("createTime" Core..=) Core.<$> createTime,
              ("partialFailures" Core..=) Core.<$> partialFailures
            ]
        )

-- | Response used for ConversationDatasets.ImportConversationData long running operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2ImportConversationDataOperationResponse' smart constructor.
data GoogleCloudDialogflowV2ImportConversationDataOperationResponse = GoogleCloudDialogflowV2ImportConversationDataOperationResponse
  { -- | The resource name of the imported conversation dataset. Format: @projects\/\/locations\/\/conversationDatasets\/@
    conversationDataset :: (Core.Maybe Core.Text),
    -- | Number of conversations imported successfully.
    importCount :: (Core.Maybe Core.Int32)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ImportConversationDataOperationResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ImportConversationDataOperationResponse ::
  GoogleCloudDialogflowV2ImportConversationDataOperationResponse
newGoogleCloudDialogflowV2ImportConversationDataOperationResponse =
  GoogleCloudDialogflowV2ImportConversationDataOperationResponse
    { conversationDataset =
        Core.Nothing,
      importCount = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ImportConversationDataOperationResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ImportConversationDataOperationResponse"
      ( \o ->
          GoogleCloudDialogflowV2ImportConversationDataOperationResponse
            Core.<$> (o Core..:? "conversationDataset")
            Core.<*> (o Core..:? "importCount")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2ImportConversationDataOperationResponse
  where
  toJSON
    GoogleCloudDialogflowV2ImportConversationDataOperationResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationDataset" Core..=) Core.<$> conversationDataset,
              ("importCount" Core..=) Core.<$> importCount
            ]
        )

-- | Response message for Documents.ImportDocuments.
--
-- /See:/ 'newGoogleCloudDialogflowV2ImportDocumentsResponse' smart constructor.
newtype GoogleCloudDialogflowV2ImportDocumentsResponse = GoogleCloudDialogflowV2ImportDocumentsResponse
  { -- | Includes details about skipped documents or any other warnings.
    warnings :: (Core.Maybe [GoogleRpcStatus])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2ImportDocumentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2ImportDocumentsResponse ::
  GoogleCloudDialogflowV2ImportDocumentsResponse
newGoogleCloudDialogflowV2ImportDocumentsResponse =
  GoogleCloudDialogflowV2ImportDocumentsResponse
    { warnings =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2ImportDocumentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2ImportDocumentsResponse"
      ( \o ->
          GoogleCloudDialogflowV2ImportDocumentsResponse
            Core.<$> (o Core..:? "warnings")
      )

instance Core.ToJSON GoogleCloudDialogflowV2ImportDocumentsResponse where
  toJSON GoogleCloudDialogflowV2ImportDocumentsResponse {..} =
    Core.object
      (Core.catMaybes [("warnings" Core..=) Core.<$> warnings])

-- | Metadata for initializing a location-level encryption specification.
--
-- /See:/ 'newGoogleCloudDialogflowV2InitializeEncryptionSpecMetadata' smart constructor.
newtype GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata = GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
  { -- | Output only. The original request for initialization.
    request' :: (Core.Maybe GoogleCloudDialogflowV2InitializeEncryptionSpecRequest)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2InitializeEncryptionSpecMetadata ::
  GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
newGoogleCloudDialogflowV2InitializeEncryptionSpecMetadata =
  GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
    { request' =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata"
      ( \o ->
          GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
            Core.<$> (o Core..:? "request")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata
  where
  toJSON GoogleCloudDialogflowV2InitializeEncryptionSpecMetadata {..} =
    Core.object
      (Core.catMaybes [("request" Core..=) Core.<$> request'])

-- | The request to initialize a location-level encryption specification.
--
-- /See:/ 'newGoogleCloudDialogflowV2InitializeEncryptionSpecRequest' smart constructor.
newtype GoogleCloudDialogflowV2InitializeEncryptionSpecRequest = GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
  { -- | Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms/key/name is left empty, no encryption will be enforced.
    encryptionSpec :: (Core.Maybe GoogleCloudDialogflowV2EncryptionSpec)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2InitializeEncryptionSpecRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2InitializeEncryptionSpecRequest ::
  GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
newGoogleCloudDialogflowV2InitializeEncryptionSpecRequest =
  GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
    { encryptionSpec =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2InitializeEncryptionSpecRequest"
      ( \o ->
          GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
            Core.<$> (o Core..:? "encryptionSpec")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2InitializeEncryptionSpecRequest
  where
  toJSON GoogleCloudDialogflowV2InitializeEncryptionSpecRequest {..} =
    Core.object
      ( Core.catMaybes
          [("encryptionSpec" Core..=) Core.<$> encryptionSpec]
      )

-- | InputDataset used to create model or do evaluation. NextID:5
--
-- /See:/ 'newGoogleCloudDialogflowV2InputDataset' smart constructor.
newtype GoogleCloudDialogflowV2InputDataset = GoogleCloudDialogflowV2InputDataset
  { -- | Required. ConversationDataset resource name. Format: @projects\/\/locations\/\/conversationDatasets\/@
    dataset :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2InputDataset' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2InputDataset ::
  GoogleCloudDialogflowV2InputDataset
newGoogleCloudDialogflowV2InputDataset =
  GoogleCloudDialogflowV2InputDataset {dataset = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowV2InputDataset where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2InputDataset"
      ( \o ->
          GoogleCloudDialogflowV2InputDataset
            Core.<$> (o Core..:? "dataset")
      )

instance Core.ToJSON GoogleCloudDialogflowV2InputDataset where
  toJSON GoogleCloudDialogflowV2InputDataset {..} =
    Core.object
      (Core.catMaybes [("dataset" Core..=) Core.<$> dataset])

-- | An intent categorizes an end-user\'s intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the <https://cloud.google.com/dialogflow/docs/intents-overview intent guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2Intent' smart constructor.
data GoogleCloudDialogflowV2Intent = GoogleCloudDialogflowV2Intent
  { -- | Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces.
    action :: (Core.Maybe Core.Text),
    -- | Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
    defaultResponsePlatforms ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2Intent_DefaultResponsePlatformsItem]
      ),
    -- | Required. The name of this intent.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.
    endInteraction :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.
    events :: (Core.Maybe [Core.Text]),
    -- | Output only. Read-only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output.
    followupIntentInfo :: (Core.Maybe [GoogleCloudDialogflowV2IntentFollowupIntentInfo]),
    -- | Optional. The list of context names required for this intent to be triggered. Format: @projects\/\/agent\/sessions\/-\/contexts\/@.
    inputContextNames :: (Core.Maybe [Core.Text]),
    -- | Optional. Indicates whether this is a fallback intent.
    isFallback :: (Core.Maybe Core.Bool),
    -- | Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.
    liveAgentHandoff :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of rich messages corresponding to the @Response@ field in the Dialogflow console.
    messages :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessage]),
    -- | Optional. Indicates whether Machine Learning is disabled for the intent. Note: If @ml_disabled@ setting is set to true, then this intent is not taken into account during inference in @ML ONLY@ match mode. Also, auto-markup in the UI is turned off.
    mlDisabled :: (Core.Maybe Core.Bool),
    -- | Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Format: @projects\/\/agent\/intents\/@.
    name :: (Core.Maybe Core.Text),
    -- | Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the @lifespan_count@ to 0 will reset the context when the intent is matched. Format: @projects\/\/agent\/sessions\/-\/contexts\/@.
    outputContexts :: (Core.Maybe [GoogleCloudDialogflowV2Context]),
    -- | Optional. The collection of parameters associated with the intent.
    parameters :: (Core.Maybe [GoogleCloudDialogflowV2IntentParameter]),
    -- | Read-only after creation. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: @projects\/\/agent\/intents\/@.
    parentFollowupIntentName :: (Core.Maybe Core.Text),
    -- | Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the @Normal@ priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.
    priority :: (Core.Maybe Core.Int32),
    -- | Optional. Indicates whether to delete all contexts in the current session when this intent is matched.
    resetContexts :: (Core.Maybe Core.Bool),
    -- | Output only. Read-only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. We populate this field only in the output. Format: @projects\/\/agent\/intents\/@.
    rootFollowupIntentName :: (Core.Maybe Core.Text),
    -- | Optional. The collection of examples that the agent is trained on.
    trainingPhrases :: (Core.Maybe [GoogleCloudDialogflowV2IntentTrainingPhrase]),
    -- | Optional. Indicates whether webhooks are enabled for the intent.
    webhookState :: (Core.Maybe GoogleCloudDialogflowV2Intent_WebhookState)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2Intent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2Intent ::
  GoogleCloudDialogflowV2Intent
newGoogleCloudDialogflowV2Intent =
  GoogleCloudDialogflowV2Intent
    { action = Core.Nothing,
      defaultResponsePlatforms = Core.Nothing,
      displayName = Core.Nothing,
      endInteraction = Core.Nothing,
      events = Core.Nothing,
      followupIntentInfo = Core.Nothing,
      inputContextNames = Core.Nothing,
      isFallback = Core.Nothing,
      liveAgentHandoff = Core.Nothing,
      messages = Core.Nothing,
      mlDisabled = Core.Nothing,
      name = Core.Nothing,
      outputContexts = Core.Nothing,
      parameters = Core.Nothing,
      parentFollowupIntentName = Core.Nothing,
      priority = Core.Nothing,
      resetContexts = Core.Nothing,
      rootFollowupIntentName = Core.Nothing,
      trainingPhrases = Core.Nothing,
      webhookState = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2Intent where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2Intent"
      ( \o ->
          GoogleCloudDialogflowV2Intent
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "defaultResponsePlatforms")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "endInteraction")
            Core.<*> (o Core..:? "events")
            Core.<*> (o Core..:? "followupIntentInfo")
            Core.<*> (o Core..:? "inputContextNames")
            Core.<*> (o Core..:? "isFallback")
            Core.<*> (o Core..:? "liveAgentHandoff")
            Core.<*> (o Core..:? "messages")
            Core.<*> (o Core..:? "mlDisabled")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "outputContexts")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "parentFollowupIntentName")
            Core.<*> (o Core..:? "priority")
            Core.<*> (o Core..:? "resetContexts")
            Core.<*> (o Core..:? "rootFollowupIntentName")
            Core.<*> (o Core..:? "trainingPhrases")
            Core.<*> (o Core..:? "webhookState")
      )

instance Core.ToJSON GoogleCloudDialogflowV2Intent where
  toJSON GoogleCloudDialogflowV2Intent {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("defaultResponsePlatforms" Core..=)
              Core.<$> defaultResponsePlatforms,
            ("displayName" Core..=) Core.<$> displayName,
            ("endInteraction" Core..=) Core.<$> endInteraction,
            ("events" Core..=) Core.<$> events,
            ("followupIntentInfo" Core..=) Core.<$> followupIntentInfo,
            ("inputContextNames" Core..=) Core.<$> inputContextNames,
            ("isFallback" Core..=) Core.<$> isFallback,
            ("liveAgentHandoff" Core..=) Core.<$> liveAgentHandoff,
            ("messages" Core..=) Core.<$> messages,
            ("mlDisabled" Core..=) Core.<$> mlDisabled,
            ("name" Core..=) Core.<$> name,
            ("outputContexts" Core..=) Core.<$> outputContexts,
            ("parameters" Core..=) Core.<$> parameters,
            ("parentFollowupIntentName" Core..=)
              Core.<$> parentFollowupIntentName,
            ("priority" Core..=) Core.<$> priority,
            ("resetContexts" Core..=) Core.<$> resetContexts,
            ("rootFollowupIntentName" Core..=) Core.<$> rootFollowupIntentName,
            ("trainingPhrases" Core..=) Core.<$> trainingPhrases,
            ("webhookState" Core..=) Core.<$> webhookState
          ]
      )

-- | Represents a single followup intent in the chain.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentFollowupIntentInfo' smart constructor.
data GoogleCloudDialogflowV2IntentFollowupIntentInfo = GoogleCloudDialogflowV2IntentFollowupIntentInfo
  { -- | The unique identifier of the followup intent. Format: @projects\/\/agent\/intents\/@.
    followupIntentName :: (Core.Maybe Core.Text),
    -- | The unique identifier of the followup intent\'s parent. Format: @projects\/\/agent\/intents\/@.
    parentFollowupIntentName :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentFollowupIntentInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentFollowupIntentInfo ::
  GoogleCloudDialogflowV2IntentFollowupIntentInfo
newGoogleCloudDialogflowV2IntentFollowupIntentInfo =
  GoogleCloudDialogflowV2IntentFollowupIntentInfo
    { followupIntentName =
        Core.Nothing,
      parentFollowupIntentName = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentFollowupIntentInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentFollowupIntentInfo"
      ( \o ->
          GoogleCloudDialogflowV2IntentFollowupIntentInfo
            Core.<$> (o Core..:? "followupIntentName")
            Core.<*> (o Core..:? "parentFollowupIntentName")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentFollowupIntentInfo
  where
  toJSON GoogleCloudDialogflowV2IntentFollowupIntentInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("followupIntentName" Core..=) Core.<$> followupIntentName,
            ("parentFollowupIntentName" Core..=)
              Core.<$> parentFollowupIntentName
          ]
      )

-- | A rich response message. Corresponds to the intent @Response@ field in the Dialogflow console. For more information, see <https://cloud.google.com/dialogflow/docs/intents-rich-messages Rich response messages>.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessage' smart constructor.
data GoogleCloudDialogflowV2IntentMessage = GoogleCloudDialogflowV2IntentMessage
  { -- | The basic card response for Actions on Google.
    basicCard :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageBasicCard),
    -- | Browse carousel card for Actions on Google.
    browseCarouselCard :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard),
    -- | The card response.
    card :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageCard),
    -- | The carousel card response for Actions on Google.
    carouselSelect :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageCarouselSelect),
    -- | The image response.
    image :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | The link out suggestion chip for Actions on Google.
    linkOutSuggestion :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion),
    -- | The list card response for Actions on Google.
    listSelect :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageListSelect),
    -- | The media content card for Actions on Google.
    mediaContent :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageMediaContent),
    -- | A custom platform-specific response.
    payload :: (Core.Maybe GoogleCloudDialogflowV2IntentMessage_Payload),
    -- | Optional. The platform that this message is intended for.
    platform :: (Core.Maybe GoogleCloudDialogflowV2IntentMessage_Platform),
    -- | The quick replies response.
    quickReplies :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageQuickReplies),
    -- | The voice and text-only responses for Actions on Google.
    simpleResponses :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageSimpleResponses),
    -- | The suggestion chips for Actions on Google.
    suggestions :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageSuggestions),
    -- | Table card for Actions on Google.
    tableCard :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageTableCard),
    -- | The text response.
    text :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageText)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessage' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessage ::
  GoogleCloudDialogflowV2IntentMessage
newGoogleCloudDialogflowV2IntentMessage =
  GoogleCloudDialogflowV2IntentMessage
    { basicCard = Core.Nothing,
      browseCarouselCard = Core.Nothing,
      card = Core.Nothing,
      carouselSelect = Core.Nothing,
      image = Core.Nothing,
      linkOutSuggestion = Core.Nothing,
      listSelect = Core.Nothing,
      mediaContent = Core.Nothing,
      payload = Core.Nothing,
      platform = Core.Nothing,
      quickReplies = Core.Nothing,
      simpleResponses = Core.Nothing,
      suggestions = Core.Nothing,
      tableCard = Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2IntentMessage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessage"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessage
            Core.<$> (o Core..:? "basicCard")
            Core.<*> (o Core..:? "browseCarouselCard")
            Core.<*> (o Core..:? "card")
            Core.<*> (o Core..:? "carouselSelect")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "linkOutSuggestion")
            Core.<*> (o Core..:? "listSelect")
            Core.<*> (o Core..:? "mediaContent")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "platform")
            Core.<*> (o Core..:? "quickReplies")
            Core.<*> (o Core..:? "simpleResponses")
            Core.<*> (o Core..:? "suggestions")
            Core.<*> (o Core..:? "tableCard")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessage where
  toJSON GoogleCloudDialogflowV2IntentMessage {..} =
    Core.object
      ( Core.catMaybes
          [ ("basicCard" Core..=) Core.<$> basicCard,
            ("browseCarouselCard" Core..=) Core.<$> browseCarouselCard,
            ("card" Core..=) Core.<$> card,
            ("carouselSelect" Core..=) Core.<$> carouselSelect,
            ("image" Core..=) Core.<$> image,
            ("linkOutSuggestion" Core..=) Core.<$> linkOutSuggestion,
            ("listSelect" Core..=) Core.<$> listSelect,
            ("mediaContent" Core..=) Core.<$> mediaContent,
            ("payload" Core..=) Core.<$> payload,
            ("platform" Core..=) Core.<$> platform,
            ("quickReplies" Core..=) Core.<$> quickReplies,
            ("simpleResponses" Core..=) Core.<$> simpleResponses,
            ("suggestions" Core..=) Core.<$> suggestions,
            ("tableCard" Core..=) Core.<$> tableCard,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | A custom platform-specific response.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessage_Payload' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessage_Payload = GoogleCloudDialogflowV2IntentMessage_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessage_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessage_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2IntentMessage_Payload
newGoogleCloudDialogflowV2IntentMessage_Payload additional =
  GoogleCloudDialogflowV2IntentMessage_Payload
    { additional =
        additional
    }

instance Core.FromJSON GoogleCloudDialogflowV2IntentMessage_Payload where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessage_Payload"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessage_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessage_Payload where
  toJSON GoogleCloudDialogflowV2IntentMessage_Payload {..} =
    Core.toJSON additional

-- | The basic card message. Useful for displaying information.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageBasicCard' smart constructor.
data GoogleCloudDialogflowV2IntentMessageBasicCard = GoogleCloudDialogflowV2IntentMessageBasicCard
  { -- | Optional. The collection of card buttons.
    buttons :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageBasicCardButton]),
    -- | Required, unless image is present. The body text of the card.
    formattedText :: (Core.Maybe Core.Text),
    -- | Optional. The image for the card.
    image :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Optional. The subtitle of the card.
    subtitle :: (Core.Maybe Core.Text),
    -- | Optional. The title of the card.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageBasicCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageBasicCard ::
  GoogleCloudDialogflowV2IntentMessageBasicCard
newGoogleCloudDialogflowV2IntentMessageBasicCard =
  GoogleCloudDialogflowV2IntentMessageBasicCard
    { buttons =
        Core.Nothing,
      formattedText = Core.Nothing,
      image = Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageBasicCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageBasicCard"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageBasicCard
            Core.<$> (o Core..:? "buttons")
            Core.<*> (o Core..:? "formattedText")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageBasicCard where
  toJSON GoogleCloudDialogflowV2IntentMessageBasicCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("buttons" Core..=) Core.<$> buttons,
            ("formattedText" Core..=) Core.<$> formattedText,
            ("image" Core..=) Core.<$> image,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | The button object that appears at the bottom of a card.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageBasicCardButton' smart constructor.
data GoogleCloudDialogflowV2IntentMessageBasicCardButton = GoogleCloudDialogflowV2IntentMessageBasicCardButton
  { -- | Required. Action to take when a user taps on the button.
    openUriAction ::
      ( Core.Maybe
          GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
      ),
    -- | Required. The title of the button.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageBasicCardButton' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageBasicCardButton ::
  GoogleCloudDialogflowV2IntentMessageBasicCardButton
newGoogleCloudDialogflowV2IntentMessageBasicCardButton =
  GoogleCloudDialogflowV2IntentMessageBasicCardButton
    { openUriAction =
        Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageBasicCardButton
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageBasicCardButton"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageBasicCardButton
            Core.<$> (o Core..:? "openUriAction")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageBasicCardButton
  where
  toJSON GoogleCloudDialogflowV2IntentMessageBasicCardButton {..} =
    Core.object
      ( Core.catMaybes
          [ ("openUriAction" Core..=) Core.<$> openUriAction,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Opens the given URI.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction = GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
  { -- | Required. The HTTP or HTTPS scheme URI.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction ::
  GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
newGoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction =
  GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
    { uri =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
            Core.<$> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction
  where
  toJSON
    GoogleCloudDialogflowV2IntentMessageBasicCardButtonOpenUriAction {..} =
      Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Browse Carousel Card for Actions on Google. https:\/\/developers.google.com\/actions\/assistant\/responses#browsing_carousel
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard' smart constructor.
data GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard = GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
  { -- | Optional. Settings for displaying the image. Applies to every image in items.
    imageDisplayOptions ::
      ( Core.Maybe
          GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard_ImageDisplayOptions
      ),
    -- | Required. List of items in the Browse Carousel Card. Minimum of two items, maximum of ten.
    items ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard ::
  GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCard =
  GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
    { imageDisplayOptions =
        Core.Nothing,
      items = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
            Core.<$> (o Core..:? "imageDisplayOptions")
            Core.<*> (o Core..:? "items")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard
  where
  toJSON GoogleCloudDialogflowV2IntentMessageBrowseCarouselCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("imageDisplayOptions" Core..=) Core.<$> imageDisplayOptions,
            ("items" Core..=) Core.<$> items
          ]
      )

-- | Browsing carousel tile
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem' smart constructor.
data GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem = GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
  { -- | Optional. Description of the carousel item. Maximum of four lines of text.
    description :: (Core.Maybe Core.Text),
    -- | Optional. Text that appears at the bottom of the Browse Carousel Card. Maximum of one line of text.
    footer :: (Core.Maybe Core.Text),
    -- | Optional. Hero image for the carousel item.
    image :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Required. Action to present to the user.
    openUriAction ::
      ( Core.Maybe
          GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
      ),
    -- | Required. Title of the carousel item. Maximum of two lines of text.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem ::
  GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem =
  GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
    { description =
        Core.Nothing,
      footer =
        Core.Nothing,
      image =
        Core.Nothing,
      openUriAction =
        Core.Nothing,
      title =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "footer")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "openUriAction")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem
  where
  toJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItem {..} =
      Core.object
        ( Core.catMaybes
            [ ("description" Core..=) Core.<$> description,
              ("footer" Core..=) Core.<$> footer,
              ("image" Core..=) Core.<$> image,
              ("openUriAction" Core..=) Core.<$> openUriAction,
              ("title" Core..=) Core.<$> title
            ]
        )

-- | Actions on Google action to open a given url.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction' smart constructor.
data GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction = GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
  { -- | Required. URL
    url :: (Core.Maybe Core.Text),
    -- | Optional. Specifies the type of viewer that is used when opening the URL. Defaults to opening via web browser.
    urlTypeHint ::
      ( Core.Maybe
          GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction_UrlTypeHint
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction ::
  GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
newGoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction =
  GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
    { url =
        Core.Nothing,
      urlTypeHint =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
            Core.<$> (o Core..:? "url")
            Core.<*> (o Core..:? "urlTypeHint")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
  where
  toJSON
    GoogleCloudDialogflowV2IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction {..} =
      Core.object
        ( Core.catMaybes
            [ ("url" Core..=) Core.<$> url,
              ("urlTypeHint" Core..=) Core.<$> urlTypeHint
            ]
        )

-- | The card response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageCard' smart constructor.
data GoogleCloudDialogflowV2IntentMessageCard = GoogleCloudDialogflowV2IntentMessageCard
  { -- | Optional. The collection of card buttons.
    buttons :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageCardButton]),
    -- | Optional. The public URI to an image file for the card.
    imageUri :: (Core.Maybe Core.Text),
    -- | Optional. The subtitle of the card.
    subtitle :: (Core.Maybe Core.Text),
    -- | Optional. The title of the card.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageCard ::
  GoogleCloudDialogflowV2IntentMessageCard
newGoogleCloudDialogflowV2IntentMessageCard =
  GoogleCloudDialogflowV2IntentMessageCard
    { buttons = Core.Nothing,
      imageUri = Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2IntentMessageCard where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageCard"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageCard
            Core.<$> (o Core..:? "buttons")
            Core.<*> (o Core..:? "imageUri")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageCard where
  toJSON GoogleCloudDialogflowV2IntentMessageCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("buttons" Core..=) Core.<$> buttons,
            ("imageUri" Core..=) Core.<$> imageUri,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Contains information about a button.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageCardButton' smart constructor.
data GoogleCloudDialogflowV2IntentMessageCardButton = GoogleCloudDialogflowV2IntentMessageCardButton
  { -- | Optional. The text to send back to the Dialogflow API or a URI to open.
    postback :: (Core.Maybe Core.Text),
    -- | Optional. The text to show on the button.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageCardButton' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageCardButton ::
  GoogleCloudDialogflowV2IntentMessageCardButton
newGoogleCloudDialogflowV2IntentMessageCardButton =
  GoogleCloudDialogflowV2IntentMessageCardButton
    { postback =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageCardButton
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageCardButton"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageCardButton
            Core.<$> (o Core..:? "postback")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageCardButton where
  toJSON GoogleCloudDialogflowV2IntentMessageCardButton {..} =
    Core.object
      ( Core.catMaybes
          [ ("postback" Core..=) Core.<$> postback,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | The card for presenting a carousel of options to select from.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageCarouselSelect' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageCarouselSelect = GoogleCloudDialogflowV2IntentMessageCarouselSelect
  { -- | Required. Carousel items.
    items ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2IntentMessageCarouselSelectItem]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageCarouselSelect' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageCarouselSelect ::
  GoogleCloudDialogflowV2IntentMessageCarouselSelect
newGoogleCloudDialogflowV2IntentMessageCarouselSelect =
  GoogleCloudDialogflowV2IntentMessageCarouselSelect
    { items =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageCarouselSelect
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageCarouselSelect"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageCarouselSelect
            Core.<$> (o Core..:? "items")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageCarouselSelect
  where
  toJSON GoogleCloudDialogflowV2IntentMessageCarouselSelect {..} =
    Core.object (Core.catMaybes [("items" Core..=) Core.<$> items])

-- | An item in the carousel.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageCarouselSelectItem' smart constructor.
data GoogleCloudDialogflowV2IntentMessageCarouselSelectItem = GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
  { -- | Optional. The body text of the card.
    description :: (Core.Maybe Core.Text),
    -- | Optional. The image to display.
    image :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Required. Additional info about the option item.
    info :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageSelectItemInfo),
    -- | Required. Title of the carousel item.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageCarouselSelectItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageCarouselSelectItem ::
  GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
newGoogleCloudDialogflowV2IntentMessageCarouselSelectItem =
  GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
    { description =
        Core.Nothing,
      image = Core.Nothing,
      info = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageCarouselSelectItem"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "info")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageCarouselSelectItem
  where
  toJSON GoogleCloudDialogflowV2IntentMessageCarouselSelectItem {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("image" Core..=) Core.<$> image,
            ("info" Core..=) Core.<$> info,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Column properties for TableCard.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageColumnProperties' smart constructor.
data GoogleCloudDialogflowV2IntentMessageColumnProperties = GoogleCloudDialogflowV2IntentMessageColumnProperties
  { -- | Required. Column heading.
    header :: (Core.Maybe Core.Text),
    -- | Optional. Defines text alignment for all cells in this column.
    horizontalAlignment ::
      ( Core.Maybe
          GoogleCloudDialogflowV2IntentMessageColumnProperties_HorizontalAlignment
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageColumnProperties' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageColumnProperties ::
  GoogleCloudDialogflowV2IntentMessageColumnProperties
newGoogleCloudDialogflowV2IntentMessageColumnProperties =
  GoogleCloudDialogflowV2IntentMessageColumnProperties
    { header =
        Core.Nothing,
      horizontalAlignment = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageColumnProperties
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageColumnProperties"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageColumnProperties
            Core.<$> (o Core..:? "header")
            Core.<*> (o Core..:? "horizontalAlignment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageColumnProperties
  where
  toJSON GoogleCloudDialogflowV2IntentMessageColumnProperties {..} =
    Core.object
      ( Core.catMaybes
          [ ("header" Core..=) Core.<$> header,
            ("horizontalAlignment" Core..=) Core.<$> horizontalAlignment
          ]
      )

-- | The image response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageImage' smart constructor.
data GoogleCloudDialogflowV2IntentMessageImage = GoogleCloudDialogflowV2IntentMessageImage
  { -- | Optional. A text description of the image to be used for accessibility, e.g., screen readers.
    accessibilityText :: (Core.Maybe Core.Text),
    -- | Optional. The public URI to an image file.
    imageUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageImage' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageImage ::
  GoogleCloudDialogflowV2IntentMessageImage
newGoogleCloudDialogflowV2IntentMessageImage =
  GoogleCloudDialogflowV2IntentMessageImage
    { accessibilityText =
        Core.Nothing,
      imageUri = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2IntentMessageImage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageImage"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageImage
            Core.<$> (o Core..:? "accessibilityText")
            Core.<*> (o Core..:? "imageUri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageImage where
  toJSON GoogleCloudDialogflowV2IntentMessageImage {..} =
    Core.object
      ( Core.catMaybes
          [ ("accessibilityText" Core..=) Core.<$> accessibilityText,
            ("imageUri" Core..=) Core.<$> imageUri
          ]
      )

-- | The suggestion chip message that allows the user to jump out to the app or website associated with this agent.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion' smart constructor.
data GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion = GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
  { -- | Required. The name of the app or site this chip is linking to.
    destinationName :: (Core.Maybe Core.Text),
    -- | Required. The URI of the app or site to open when the user taps the suggestion chip.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion ::
  GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
newGoogleCloudDialogflowV2IntentMessageLinkOutSuggestion =
  GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
    { destinationName =
        Core.Nothing,
      uri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
            Core.<$> (o Core..:? "destinationName")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion
  where
  toJSON GoogleCloudDialogflowV2IntentMessageLinkOutSuggestion {..} =
    Core.object
      ( Core.catMaybes
          [ ("destinationName" Core..=) Core.<$> destinationName,
            ("uri" Core..=) Core.<$> uri
          ]
      )

-- | The card for presenting a list of options to select from.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageListSelect' smart constructor.
data GoogleCloudDialogflowV2IntentMessageListSelect = GoogleCloudDialogflowV2IntentMessageListSelect
  { -- | Required. List items.
    items :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageListSelectItem]),
    -- | Optional. Subtitle of the list.
    subtitle :: (Core.Maybe Core.Text),
    -- | Optional. The overall title of the list.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageListSelect' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageListSelect ::
  GoogleCloudDialogflowV2IntentMessageListSelect
newGoogleCloudDialogflowV2IntentMessageListSelect =
  GoogleCloudDialogflowV2IntentMessageListSelect
    { items =
        Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageListSelect
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageListSelect"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageListSelect
            Core.<$> (o Core..:? "items")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageListSelect where
  toJSON GoogleCloudDialogflowV2IntentMessageListSelect {..} =
    Core.object
      ( Core.catMaybes
          [ ("items" Core..=) Core.<$> items,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | An item in the list.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageListSelectItem' smart constructor.
data GoogleCloudDialogflowV2IntentMessageListSelectItem = GoogleCloudDialogflowV2IntentMessageListSelectItem
  { -- | Optional. The main text describing the item.
    description :: (Core.Maybe Core.Text),
    -- | Optional. The image to display.
    image :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Required. Additional information about this option.
    info :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageSelectItemInfo),
    -- | Required. The title of the list item.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageListSelectItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageListSelectItem ::
  GoogleCloudDialogflowV2IntentMessageListSelectItem
newGoogleCloudDialogflowV2IntentMessageListSelectItem =
  GoogleCloudDialogflowV2IntentMessageListSelectItem
    { description =
        Core.Nothing,
      image = Core.Nothing,
      info = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageListSelectItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageListSelectItem"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageListSelectItem
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "info")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageListSelectItem
  where
  toJSON GoogleCloudDialogflowV2IntentMessageListSelectItem {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("image" Core..=) Core.<$> image,
            ("info" Core..=) Core.<$> info,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | The media content card for Actions on Google.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageMediaContent' smart constructor.
data GoogleCloudDialogflowV2IntentMessageMediaContent = GoogleCloudDialogflowV2IntentMessageMediaContent
  { -- | Required. List of media objects.
    mediaObjects ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject]
      ),
    -- | Optional. What type of media is the content (ie \"audio\").
    mediaType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2IntentMessageMediaContent_MediaType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageMediaContent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageMediaContent ::
  GoogleCloudDialogflowV2IntentMessageMediaContent
newGoogleCloudDialogflowV2IntentMessageMediaContent =
  GoogleCloudDialogflowV2IntentMessageMediaContent
    { mediaObjects =
        Core.Nothing,
      mediaType = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageMediaContent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageMediaContent"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageMediaContent
            Core.<$> (o Core..:? "mediaObjects")
            Core.<*> (o Core..:? "mediaType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageMediaContent
  where
  toJSON GoogleCloudDialogflowV2IntentMessageMediaContent {..} =
    Core.object
      ( Core.catMaybes
          [ ("mediaObjects" Core..=) Core.<$> mediaObjects,
            ("mediaType" Core..=) Core.<$> mediaType
          ]
      )

-- | Response media object for media content card.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject' smart constructor.
data GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject = GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
  { -- | Required. Url where the media is stored.
    contentUrl :: (Core.Maybe Core.Text),
    -- | Optional. Description of media card.
    description :: (Core.Maybe Core.Text),
    -- | Optional. Icon to display above media content.
    icon :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Optional. Image to display above media content.
    largeImage :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Required. Name of media card.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject ::
  GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
newGoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject =
  GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
    { contentUrl =
        Core.Nothing,
      description = Core.Nothing,
      icon = Core.Nothing,
      largeImage = Core.Nothing,
      name = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
            Core.<$> (o Core..:? "contentUrl")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "icon")
            Core.<*> (o Core..:? "largeImage")
            Core.<*> (o Core..:? "name")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject
  where
  toJSON
    GoogleCloudDialogflowV2IntentMessageMediaContentResponseMediaObject {..} =
      Core.object
        ( Core.catMaybes
            [ ("contentUrl" Core..=) Core.<$> contentUrl,
              ("description" Core..=) Core.<$> description,
              ("icon" Core..=) Core.<$> icon,
              ("largeImage" Core..=) Core.<$> largeImage,
              ("name" Core..=) Core.<$> name
            ]
        )

-- | The quick replies response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageQuickReplies' smart constructor.
data GoogleCloudDialogflowV2IntentMessageQuickReplies = GoogleCloudDialogflowV2IntentMessageQuickReplies
  { -- | Optional. The collection of quick replies.
    quickReplies :: (Core.Maybe [Core.Text]),
    -- | Optional. The title of the collection of quick replies.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageQuickReplies' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageQuickReplies ::
  GoogleCloudDialogflowV2IntentMessageQuickReplies
newGoogleCloudDialogflowV2IntentMessageQuickReplies =
  GoogleCloudDialogflowV2IntentMessageQuickReplies
    { quickReplies =
        Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageQuickReplies
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageQuickReplies"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageQuickReplies
            Core.<$> (o Core..:? "quickReplies")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageQuickReplies
  where
  toJSON GoogleCloudDialogflowV2IntentMessageQuickReplies {..} =
    Core.object
      ( Core.catMaybes
          [ ("quickReplies" Core..=) Core.<$> quickReplies,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Additional info about the select item for when it is triggered in a dialog.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageSelectItemInfo' smart constructor.
data GoogleCloudDialogflowV2IntentMessageSelectItemInfo = GoogleCloudDialogflowV2IntentMessageSelectItemInfo
  { -- | Required. A unique key that will be sent back to the agent if this response is given.
    key :: (Core.Maybe Core.Text),
    -- | Optional. A list of synonyms that can also be used to trigger this item in dialog.
    synonyms :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageSelectItemInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageSelectItemInfo ::
  GoogleCloudDialogflowV2IntentMessageSelectItemInfo
newGoogleCloudDialogflowV2IntentMessageSelectItemInfo =
  GoogleCloudDialogflowV2IntentMessageSelectItemInfo
    { key =
        Core.Nothing,
      synonyms = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageSelectItemInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageSelectItemInfo"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageSelectItemInfo
            Core.<$> (o Core..:? "key")
            Core.<*> (o Core..:? "synonyms")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageSelectItemInfo
  where
  toJSON GoogleCloudDialogflowV2IntentMessageSelectItemInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("key" Core..=) Core.<$> key,
            ("synonyms" Core..=) Core.<$> synonyms
          ]
      )

-- | The simple response message containing speech or text.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageSimpleResponse' smart constructor.
data GoogleCloudDialogflowV2IntentMessageSimpleResponse = GoogleCloudDialogflowV2IntentMessageSimpleResponse
  { -- | Optional. The text to display.
    displayText :: (Core.Maybe Core.Text),
    -- | One of text/to/speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text/to/speech.
    ssml :: (Core.Maybe Core.Text),
    -- | One of text/to/speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml.
    textToSpeech :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageSimpleResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageSimpleResponse ::
  GoogleCloudDialogflowV2IntentMessageSimpleResponse
newGoogleCloudDialogflowV2IntentMessageSimpleResponse =
  GoogleCloudDialogflowV2IntentMessageSimpleResponse
    { displayText =
        Core.Nothing,
      ssml = Core.Nothing,
      textToSpeech = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageSimpleResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageSimpleResponse"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageSimpleResponse
            Core.<$> (o Core..:? "displayText")
            Core.<*> (o Core..:? "ssml")
            Core.<*> (o Core..:? "textToSpeech")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageSimpleResponse
  where
  toJSON GoogleCloudDialogflowV2IntentMessageSimpleResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayText" Core..=) Core.<$> displayText,
            ("ssml" Core..=) Core.<$> ssml,
            ("textToSpeech" Core..=) Core.<$> textToSpeech
          ]
      )

-- | The collection of simple response candidates. This message in @QueryResult.fulfillment_messages@ and @WebhookResponse.fulfillment_messages@ should contain only one @SimpleResponse@.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageSimpleResponses' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageSimpleResponses = GoogleCloudDialogflowV2IntentMessageSimpleResponses
  { -- | Required. The list of simple responses.
    simpleResponses :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageSimpleResponse])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageSimpleResponses' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageSimpleResponses ::
  GoogleCloudDialogflowV2IntentMessageSimpleResponses
newGoogleCloudDialogflowV2IntentMessageSimpleResponses =
  GoogleCloudDialogflowV2IntentMessageSimpleResponses
    { simpleResponses =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageSimpleResponses
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageSimpleResponses"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageSimpleResponses
            Core.<$> (o Core..:? "simpleResponses")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageSimpleResponses
  where
  toJSON GoogleCloudDialogflowV2IntentMessageSimpleResponses {..} =
    Core.object
      ( Core.catMaybes
          [("simpleResponses" Core..=) Core.<$> simpleResponses]
      )

-- | The suggestion chip message that the user can tap to quickly post a reply to the conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageSuggestion' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageSuggestion = GoogleCloudDialogflowV2IntentMessageSuggestion
  { -- | Required. The text shown the in the suggestion chip.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageSuggestion' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageSuggestion ::
  GoogleCloudDialogflowV2IntentMessageSuggestion
newGoogleCloudDialogflowV2IntentMessageSuggestion =
  GoogleCloudDialogflowV2IntentMessageSuggestion
    { title =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageSuggestion
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageSuggestion"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageSuggestion
            Core.<$> (o Core..:? "title")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageSuggestion where
  toJSON GoogleCloudDialogflowV2IntentMessageSuggestion {..} =
    Core.object (Core.catMaybes [("title" Core..=) Core.<$> title])

-- | The collection of suggestions.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageSuggestions' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageSuggestions = GoogleCloudDialogflowV2IntentMessageSuggestions
  { -- | Required. The list of suggested replies.
    suggestions :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageSuggestion])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageSuggestions' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageSuggestions ::
  GoogleCloudDialogflowV2IntentMessageSuggestions
newGoogleCloudDialogflowV2IntentMessageSuggestions =
  GoogleCloudDialogflowV2IntentMessageSuggestions
    { suggestions =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageSuggestions
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageSuggestions"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageSuggestions
            Core.<$> (o Core..:? "suggestions")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageSuggestions
  where
  toJSON GoogleCloudDialogflowV2IntentMessageSuggestions {..} =
    Core.object
      (Core.catMaybes [("suggestions" Core..=) Core.<$> suggestions])

-- | Table card for Actions on Google.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageTableCard' smart constructor.
data GoogleCloudDialogflowV2IntentMessageTableCard = GoogleCloudDialogflowV2IntentMessageTableCard
  { -- | Optional. List of buttons for the card.
    buttons :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageBasicCardButton]),
    -- | Optional. Display properties for the columns in this table.
    columnProperties :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageColumnProperties]),
    -- | Optional. Image which should be displayed on the card.
    image :: (Core.Maybe GoogleCloudDialogflowV2IntentMessageImage),
    -- | Optional. Rows in this table of data.
    rows :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageTableCardRow]),
    -- | Optional. Subtitle to the title.
    subtitle :: (Core.Maybe Core.Text),
    -- | Required. Title of the card.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageTableCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageTableCard ::
  GoogleCloudDialogflowV2IntentMessageTableCard
newGoogleCloudDialogflowV2IntentMessageTableCard =
  GoogleCloudDialogflowV2IntentMessageTableCard
    { buttons =
        Core.Nothing,
      columnProperties = Core.Nothing,
      image = Core.Nothing,
      rows = Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageTableCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageTableCard"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageTableCard
            Core.<$> (o Core..:? "buttons")
            Core.<*> (o Core..:? "columnProperties")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "rows")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageTableCard where
  toJSON GoogleCloudDialogflowV2IntentMessageTableCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("buttons" Core..=) Core.<$> buttons,
            ("columnProperties" Core..=) Core.<$> columnProperties,
            ("image" Core..=) Core.<$> image,
            ("rows" Core..=) Core.<$> rows,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Cell of TableCardRow.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageTableCardCell' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageTableCardCell = GoogleCloudDialogflowV2IntentMessageTableCardCell
  { -- | Required. Text in this cell.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageTableCardCell' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageTableCardCell ::
  GoogleCloudDialogflowV2IntentMessageTableCardCell
newGoogleCloudDialogflowV2IntentMessageTableCardCell =
  GoogleCloudDialogflowV2IntentMessageTableCardCell
    { text =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageTableCardCell
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageTableCardCell"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageTableCardCell
            Core.<$> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageTableCardCell
  where
  toJSON GoogleCloudDialogflowV2IntentMessageTableCardCell {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Row of TableCard.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageTableCardRow' smart constructor.
data GoogleCloudDialogflowV2IntentMessageTableCardRow = GoogleCloudDialogflowV2IntentMessageTableCardRow
  { -- | Optional. List of cells that make up this row.
    cells :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessageTableCardCell]),
    -- | Optional. Whether to add a visual divider after this row.
    dividerAfter :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageTableCardRow' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageTableCardRow ::
  GoogleCloudDialogflowV2IntentMessageTableCardRow
newGoogleCloudDialogflowV2IntentMessageTableCardRow =
  GoogleCloudDialogflowV2IntentMessageTableCardRow
    { cells =
        Core.Nothing,
      dividerAfter = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentMessageTableCardRow
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageTableCardRow"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageTableCardRow
            Core.<$> (o Core..:? "cells")
            Core.<*> (o Core..:? "dividerAfter")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentMessageTableCardRow
  where
  toJSON GoogleCloudDialogflowV2IntentMessageTableCardRow {..} =
    Core.object
      ( Core.catMaybes
          [ ("cells" Core..=) Core.<$> cells,
            ("dividerAfter" Core..=) Core.<$> dividerAfter
          ]
      )

-- | The text response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentMessageText' smart constructor.
newtype GoogleCloudDialogflowV2IntentMessageText = GoogleCloudDialogflowV2IntentMessageText
  { -- | Optional. The collection of the agent\'s responses.
    text :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentMessageText' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentMessageText ::
  GoogleCloudDialogflowV2IntentMessageText
newGoogleCloudDialogflowV2IntentMessageText =
  GoogleCloudDialogflowV2IntentMessageText {text = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowV2IntentMessageText where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentMessageText"
      ( \o ->
          GoogleCloudDialogflowV2IntentMessageText
            Core.<$> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentMessageText where
  toJSON GoogleCloudDialogflowV2IntentMessageText {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Represents intent parameters.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentParameter' smart constructor.
data GoogleCloudDialogflowV2IntentParameter = GoogleCloudDialogflowV2IntentParameter
  { -- | Optional. The default value to use when the @value@ yields an empty result. Default values can be extracted from contexts by using the following syntax: @#context_name.parameter_name@.
    defaultValue :: (Core.Maybe Core.Text),
    -- | Required. The name of the parameter.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. The name of the entity type, prefixed with @\@@, that describes values of the parameter. If the parameter is required, this must be provided.
    entityTypeDisplayName :: (Core.Maybe Core.Text),
    -- | Optional. Indicates whether the parameter represents a list of values.
    isList :: (Core.Maybe Core.Bool),
    -- | Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value.
    mandatory :: (Core.Maybe Core.Bool),
    -- | The unique identifier of this parameter.
    name :: (Core.Maybe Core.Text),
    -- | Optional. The collection of prompts that the agent can present to the user in order to collect a value for the parameter.
    prompts :: (Core.Maybe [Core.Text]),
    -- | Optional. The definition of the parameter value. It can be: - a constant string, - a parameter value defined as @$parameter_name@, - an original parameter value defined as @$parameter_name.original@, - a parameter value from some context defined as @#context_name.parameter_name@.
    value :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentParameter ::
  GoogleCloudDialogflowV2IntentParameter
newGoogleCloudDialogflowV2IntentParameter =
  GoogleCloudDialogflowV2IntentParameter
    { defaultValue =
        Core.Nothing,
      displayName = Core.Nothing,
      entityTypeDisplayName = Core.Nothing,
      isList = Core.Nothing,
      mandatory = Core.Nothing,
      name = Core.Nothing,
      prompts = Core.Nothing,
      value = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2IntentParameter where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentParameter"
      ( \o ->
          GoogleCloudDialogflowV2IntentParameter
            Core.<$> (o Core..:? "defaultValue")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "entityTypeDisplayName")
            Core.<*> (o Core..:? "isList")
            Core.<*> (o Core..:? "mandatory")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "prompts")
            Core.<*> (o Core..:? "value")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentParameter where
  toJSON GoogleCloudDialogflowV2IntentParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("defaultValue" Core..=) Core.<$> defaultValue,
            ("displayName" Core..=) Core.<$> displayName,
            ("entityTypeDisplayName" Core..=) Core.<$> entityTypeDisplayName,
            ("isList" Core..=) Core.<$> isList,
            ("mandatory" Core..=) Core.<$> mandatory,
            ("name" Core..=) Core.<$> name,
            ("prompts" Core..=) Core.<$> prompts,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | Represents an example that the agent is trained on.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentTrainingPhrase' smart constructor.
data GoogleCloudDialogflowV2IntentTrainingPhrase = GoogleCloudDialogflowV2IntentTrainingPhrase
  { -- | Output only. The unique identifier of this training phrase.
    name :: (Core.Maybe Core.Text),
    -- | Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - @Part.text@ is set to a part of the phrase that has no parameters. - @Part.text@ is set to a part of the phrase that you want to annotate, and the @entity_type@, @alias@, and @user_defined@ fields are all set.
    parts :: (Core.Maybe [GoogleCloudDialogflowV2IntentTrainingPhrasePart]),
    -- | Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased.
    timesAddedCount :: (Core.Maybe Core.Int32),
    -- | Required. The type of the training phrase.
    type' :: (Core.Maybe GoogleCloudDialogflowV2IntentTrainingPhrase_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentTrainingPhrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentTrainingPhrase ::
  GoogleCloudDialogflowV2IntentTrainingPhrase
newGoogleCloudDialogflowV2IntentTrainingPhrase =
  GoogleCloudDialogflowV2IntentTrainingPhrase
    { name = Core.Nothing,
      parts = Core.Nothing,
      timesAddedCount = Core.Nothing,
      type' = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2IntentTrainingPhrase where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentTrainingPhrase"
      ( \o ->
          GoogleCloudDialogflowV2IntentTrainingPhrase
            Core.<$> (o Core..:? "name")
            Core.<*> (o Core..:? "parts")
            Core.<*> (o Core..:? "timesAddedCount")
            Core.<*> (o Core..:? "type")
      )

instance Core.ToJSON GoogleCloudDialogflowV2IntentTrainingPhrase where
  toJSON GoogleCloudDialogflowV2IntentTrainingPhrase {..} =
    Core.object
      ( Core.catMaybes
          [ ("name" Core..=) Core.<$> name,
            ("parts" Core..=) Core.<$> parts,
            ("timesAddedCount" Core..=) Core.<$> timesAddedCount,
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Represents a part of a training phrase.
--
-- /See:/ 'newGoogleCloudDialogflowV2IntentTrainingPhrasePart' smart constructor.
data GoogleCloudDialogflowV2IntentTrainingPhrasePart = GoogleCloudDialogflowV2IntentTrainingPhrasePart
  { -- | Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase.
    alias :: (Core.Maybe Core.Text),
    -- | Optional. The entity type name prefixed with @\@@. This field is required for annotated parts of the training phrase.
    entityType :: (Core.Maybe Core.Text),
    -- | Required. The text for this part.
    text :: (Core.Maybe Core.Text),
    -- | Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.
    userDefined :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2IntentTrainingPhrasePart' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2IntentTrainingPhrasePart ::
  GoogleCloudDialogflowV2IntentTrainingPhrasePart
newGoogleCloudDialogflowV2IntentTrainingPhrasePart =
  GoogleCloudDialogflowV2IntentTrainingPhrasePart
    { alias =
        Core.Nothing,
      entityType = Core.Nothing,
      text = Core.Nothing,
      userDefined = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2IntentTrainingPhrasePart
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2IntentTrainingPhrasePart"
      ( \o ->
          GoogleCloudDialogflowV2IntentTrainingPhrasePart
            Core.<$> (o Core..:? "alias")
            Core.<*> (o Core..:? "entityType")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "userDefined")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2IntentTrainingPhrasePart
  where
  toJSON GoogleCloudDialogflowV2IntentTrainingPhrasePart {..} =
    Core.object
      ( Core.catMaybes
          [ ("alias" Core..=) Core.<$> alias,
            ("entityType" Core..=) Core.<$> entityType,
            ("text" Core..=) Core.<$> text,
            ("userDefined" Core..=) Core.<$> userDefined
          ]
      )

-- | Represents a Knowledge Assist answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswer' smart constructor.
data GoogleCloudDialogflowV2KnowledgeAssistAnswer = GoogleCloudDialogflowV2KnowledgeAssistAnswer
  { -- | The name of the answer record. Format: @projects\/\/locations\/\/answer Records\/@.
    answerRecord :: (Core.Maybe Core.Text),
    -- | The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion.
    suggestedQuery ::
      ( Core.Maybe
          GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
      ),
    -- | The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query.
    suggestedQueryAnswer ::
      ( Core.Maybe
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswer ::
  GoogleCloudDialogflowV2KnowledgeAssistAnswer
newGoogleCloudDialogflowV2KnowledgeAssistAnswer =
  GoogleCloudDialogflowV2KnowledgeAssistAnswer
    { answerRecord =
        Core.Nothing,
      suggestedQuery = Core.Nothing,
      suggestedQueryAnswer = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2KnowledgeAssistAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswer"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "suggestedQuery")
            Core.<*> (o Core..:? "suggestedQueryAnswer")
      )

instance Core.ToJSON GoogleCloudDialogflowV2KnowledgeAssistAnswer where
  toJSON GoogleCloudDialogflowV2KnowledgeAssistAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("suggestedQuery" Core..=) Core.<$> suggestedQuery,
            ("suggestedQueryAnswer" Core..=) Core.<$> suggestedQueryAnswer
          ]
      )

-- | Represents an answer from Knowledge. Currently supports FAQ and Generative answers.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer' smart constructor.
data GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer = GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
  { -- | The piece of text from the @source@ that answers this suggested query.
    answerText :: (Core.Maybe Core.Text),
    -- | Populated if the prediction came from FAQ.
    faqSource ::
      ( Core.Maybe
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
      ),
    -- | Populated if the prediction was Generative.
    generativeSource ::
      ( Core.Maybe
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer ::
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer =
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
    { answerText =
        Core.Nothing,
      faqSource = Core.Nothing,
      generativeSource = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
            Core.<$> (o Core..:? "answerText")
            Core.<*> (o Core..:? "faqSource")
            Core.<*> (o Core..:? "generativeSource")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer
  where
  toJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswer {..} =
      Core.object
        ( Core.catMaybes
            [ ("answerText" Core..=) Core.<$> answerText,
              ("faqSource" Core..=) Core.<$> faqSource,
              ("generativeSource" Core..=) Core.<$> generativeSource
            ]
        )

-- | Details about source of FAQ answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource' smart constructor.
newtype GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource = GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
  { -- | The corresponding FAQ question.
    question :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource ::
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource =
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
    { question =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
            Core.<$> (o Core..:? "question")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource
  where
  toJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerFaqSource {..} =
      Core.object
        (Core.catMaybes [("question" Core..=) Core.<$> question])

-- | Details about source of Generative answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource' smart constructor.
newtype GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource = GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
  { -- | All snippets used for this Generative Prediction, with their source URI and data.
    snippets ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource ::
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource =
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
    { snippets =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
            Core.<$> (o Core..:? "snippets")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
  where
  toJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource {..} =
      Core.object
        (Core.catMaybes [("snippets" Core..=) Core.<$> snippets])

-- | Snippet Source for a Generative Prediction.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet' smart constructor.
data GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet = GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
  { -- | Metadata of the document.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
      ),
    -- | Text taken from that URI.
    text :: (Core.Maybe Core.Text),
    -- | Title of the document.
    title :: (Core.Maybe Core.Text),
    -- | URI the data is sourced from.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet ::
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet =
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
    { metadata =
        Core.Nothing,
      text =
        Core.Nothing,
      title =
        Core.Nothing,
      uri =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
            Core.<$> (o Core..:? "metadata")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "title")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
  where
  toJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet {..} =
      Core.object
        ( Core.catMaybes
            [ ("metadata" Core..=) Core.<$> metadata,
              ("text" Core..=) Core.<$> text,
              ("title" Core..=) Core.<$> title,
              ("uri" Core..=) Core.<$> uri
            ]
        )

-- | Metadata of the document.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata = GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
newGoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  additional =
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  where
  toJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata {..} =
      Core.toJSON additional

-- | Represents a suggested query.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery' smart constructor.
newtype GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery = GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
  { -- | Suggested query text.
    queryText :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery ::
  GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
newGoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery =
  GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
    { queryText =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
            Core.<$> (o Core..:? "queryText")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery
  where
  toJSON
    GoogleCloudDialogflowV2KnowledgeAssistAnswerSuggestedQuery {..} =
      Core.object
        (Core.catMaybes [("queryText" Core..=) Core.<$> queryText])

-- | Metadata in google::longrunning::Operation for Knowledge operations.
--
-- /See:/ 'newGoogleCloudDialogflowV2KnowledgeOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2KnowledgeOperationMetadata = GoogleCloudDialogflowV2KnowledgeOperationMetadata
  { -- | Metadata for the Export Data Operation such as the destination of export.
    exportOperationMetadata :: (Core.Maybe GoogleCloudDialogflowV2ExportOperationMetadata),
    -- | The name of the knowledge base interacted with during the operation.
    knowledgeBase :: (Core.Maybe Core.Text),
    -- | Output only. The current state of this operation.
    state ::
      ( Core.Maybe
          GoogleCloudDialogflowV2KnowledgeOperationMetadata_State
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2KnowledgeOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2KnowledgeOperationMetadata ::
  GoogleCloudDialogflowV2KnowledgeOperationMetadata
newGoogleCloudDialogflowV2KnowledgeOperationMetadata =
  GoogleCloudDialogflowV2KnowledgeOperationMetadata
    { exportOperationMetadata =
        Core.Nothing,
      knowledgeBase = Core.Nothing,
      state = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2KnowledgeOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2KnowledgeOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2KnowledgeOperationMetadata
            Core.<$> (o Core..:? "exportOperationMetadata")
            Core.<*> (o Core..:? "knowledgeBase")
            Core.<*> (o Core..:? "state")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2KnowledgeOperationMetadata
  where
  toJSON GoogleCloudDialogflowV2KnowledgeOperationMetadata {..} =
    Core.object
      ( Core.catMaybes
          [ ("exportOperationMetadata" Core..=)
              Core.<$> exportOperationMetadata,
            ("knowledgeBase" Core..=) Core.<$> knowledgeBase,
            ("state" Core..=) Core.<$> state
          ]
      )

-- | Represents a message posted into a conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV2Message' smart constructor.
data GoogleCloudDialogflowV2Message = GoogleCloudDialogflowV2Message
  { -- | Required. The message content.
    content :: (Core.Maybe Core.Text),
    -- | Output only. The time when the message was created in Contact Center AI.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Optional. The message language. This should be a <https://www.rfc-editor.org/rfc/bcp/bcp47.txt BCP-47> language tag. Example: \"en-US\".
    languageCode :: (Core.Maybe Core.Text),
    -- | Output only. The annotation for the message.
    messageAnnotation :: (Core.Maybe GoogleCloudDialogflowV2MessageAnnotation),
    -- | Optional. The unique identifier of the message. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    name :: (Core.Maybe Core.Text),
    -- | Output only. The participant that sends this message.
    participant :: (Core.Maybe Core.Text),
    -- | Output only. The role of the participant.
    participantRole :: (Core.Maybe GoogleCloudDialogflowV2Message_ParticipantRole),
    -- | Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
    sendTime :: (Core.Maybe Core.DateTime),
    -- | Output only. The sentiment analysis result for the message.
    sentimentAnalysis :: (Core.Maybe GoogleCloudDialogflowV2SentimentAnalysisResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2Message' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2Message ::
  GoogleCloudDialogflowV2Message
newGoogleCloudDialogflowV2Message =
  GoogleCloudDialogflowV2Message
    { content = Core.Nothing,
      createTime = Core.Nothing,
      languageCode = Core.Nothing,
      messageAnnotation = Core.Nothing,
      name = Core.Nothing,
      participant = Core.Nothing,
      participantRole = Core.Nothing,
      sendTime = Core.Nothing,
      sentimentAnalysis = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2Message where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2Message"
      ( \o ->
          GoogleCloudDialogflowV2Message
            Core.<$> (o Core..:? "content")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "messageAnnotation")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "participant")
            Core.<*> (o Core..:? "participantRole")
            Core.<*> (o Core..:? "sendTime")
            Core.<*> (o Core..:? "sentimentAnalysis")
      )

instance Core.ToJSON GoogleCloudDialogflowV2Message where
  toJSON GoogleCloudDialogflowV2Message {..} =
    Core.object
      ( Core.catMaybes
          [ ("content" Core..=) Core.<$> content,
            ("createTime" Core..=) Core.<$> createTime,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("messageAnnotation" Core..=) Core.<$> messageAnnotation,
            ("name" Core..=) Core.<$> name,
            ("participant" Core..=) Core.<$> participant,
            ("participantRole" Core..=) Core.<$> participantRole,
            ("sendTime" Core..=) Core.<$> sendTime,
            ("sentimentAnalysis" Core..=) Core.<$> sentimentAnalysis
          ]
      )

-- | Represents the result of annotation for the message.
--
-- /See:/ 'newGoogleCloudDialogflowV2MessageAnnotation' smart constructor.
data GoogleCloudDialogflowV2MessageAnnotation = GoogleCloudDialogflowV2MessageAnnotation
  { -- | Indicates whether the text message contains entities.
    containEntities :: (Core.Maybe Core.Bool),
    -- | The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
    parts :: (Core.Maybe [GoogleCloudDialogflowV2AnnotatedMessagePart])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2MessageAnnotation' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2MessageAnnotation ::
  GoogleCloudDialogflowV2MessageAnnotation
newGoogleCloudDialogflowV2MessageAnnotation =
  GoogleCloudDialogflowV2MessageAnnotation
    { containEntities =
        Core.Nothing,
      parts = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2MessageAnnotation where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2MessageAnnotation"
      ( \o ->
          GoogleCloudDialogflowV2MessageAnnotation
            Core.<$> (o Core..:? "containEntities")
            Core.<*> (o Core..:? "parts")
      )

instance Core.ToJSON GoogleCloudDialogflowV2MessageAnnotation where
  toJSON GoogleCloudDialogflowV2MessageAnnotation {..} =
    Core.object
      ( Core.catMaybes
          [ ("containEntities" Core..=) Core.<$> containEntities,
            ("parts" Core..=) Core.<$> parts
          ]
      )

-- | Represents the contents of the original request that was passed to the @[Streaming]DetectIntent@ call.
--
-- /See:/ 'newGoogleCloudDialogflowV2OriginalDetectIntentRequest' smart constructor.
data GoogleCloudDialogflowV2OriginalDetectIntentRequest = GoogleCloudDialogflowV2OriginalDetectIntentRequest
  { -- | Optional. This field is set to the value of the @QueryParameters.payload@ field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: { \"telephony\": { \"caller_id\": \"+18558363987\" } } Note: The caller ID field (@caller_id@) will be redacted for Trial Edition agents and populated with the caller ID in <https://en.wikipedia.org/wiki/E.164 E.164 format> for Essentials Edition agents.
    payload ::
      ( Core.Maybe
          GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
      ),
    -- | The source of this request, e.g., @google@, @facebook@, @slack@. It is set by Dialogflow-owned servers.
    source :: (Core.Maybe Core.Text),
    -- | Optional. The version of the protocol used for this request. This field is AoG-specific.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2OriginalDetectIntentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2OriginalDetectIntentRequest ::
  GoogleCloudDialogflowV2OriginalDetectIntentRequest
newGoogleCloudDialogflowV2OriginalDetectIntentRequest =
  GoogleCloudDialogflowV2OriginalDetectIntentRequest
    { payload =
        Core.Nothing,
      source = Core.Nothing,
      version = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2OriginalDetectIntentRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2OriginalDetectIntentRequest"
      ( \o ->
          GoogleCloudDialogflowV2OriginalDetectIntentRequest
            Core.<$> (o Core..:? "payload")
            Core.<*> (o Core..:? "source")
            Core.<*> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2OriginalDetectIntentRequest
  where
  toJSON GoogleCloudDialogflowV2OriginalDetectIntentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("payload" Core..=) Core.<$> payload,
            ("source" Core..=) Core.<$> source,
            ("version" Core..=) Core.<$> version
          ]
      )

-- | Optional. This field is set to the value of the @QueryParameters.payload@ field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: { \"telephony\": { \"caller_id\": \"+18558363987\" } } Note: The caller ID field (@caller_id@) will be redacted for Trial Edition agents and populated with the caller ID in <https://en.wikipedia.org/wiki/E.164 E.164 format> for Essentials Edition agents.
--
-- /See:/ 'newGoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload' smart constructor.
newtype GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload = GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
newGoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
  additional =
    GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload"
      ( \o ->
          GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload
  where
  toJSON
    GoogleCloudDialogflowV2OriginalDetectIntentRequest_Payload {..} =
      Core.toJSON additional

-- | Represents the result of conversational query or event processing.
--
-- /See:/ 'newGoogleCloudDialogflowV2QueryResult' smart constructor.
data GoogleCloudDialogflowV2QueryResult = GoogleCloudDialogflowV2QueryResult
  { -- | The action name from the matched intent.
    action :: (Core.Maybe Core.Text),
    -- | This field is set to: - @false@ if the matched intent has required parameters and not all of the required parameter values have been collected. - @true@ if all required parameter values have been collected, or if the matched intent doesn\'t contain any required parameters.
    allRequiredParamsPresent :: (Core.Maybe Core.Bool),
    -- | Indicates whether the conversational query triggers a cancellation for slot filling. For more information, see the <https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel cancel slot filling documentation>.
    cancelsSlotFilling :: (Core.Maybe Core.Bool),
    -- | Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain: - webhook call latency - webhook errors
    diagnosticInfo :: (Core.Maybe GoogleCloudDialogflowV2QueryResult_DiagnosticInfo),
    -- | The collection of rich messages to present to the user.
    fulfillmentMessages :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessage]),
    -- | The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, @fulfillment_messages@ should be preferred.
    fulfillmentText :: (Core.Maybe Core.Text),
    -- | The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: @name@, @display_name@, @end_interaction@ and @is_fallback@.
    intent :: (Core.Maybe GoogleCloudDialogflowV2Intent),
    -- | The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. If there are @multiple knowledge_answers@ messages, this value is set to the greatest @knowledgeAnswers.match_confidence@ value in the list.
    intentDetectionConfidence :: (Core.Maybe Core.Double),
    -- | The language that was triggered during intent detection. See <https://cloud.google.com/dialogflow/docs/reference/language Language Support> for a list of the currently supported language codes.
    languageCode :: (Core.Maybe Core.Text),
    -- | The collection of output contexts. If applicable, @output_contexts.parameters@ contains entries with name @.original@ containing the original parameter values before the query.
    outputContexts :: (Core.Maybe [GoogleCloudDialogflowV2Context]),
    -- | The collection of extracted parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowV2QueryResult_Parameters),
    -- | The original conversational query text: - If natural language text was provided as input, @query_text@ contains a copy of the input. - If natural language speech audio was provided as input, @query_text@ contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If automatic spell correction is enabled, @query_text@ will contain the corrected user input.
    queryText :: (Core.Maybe Core.Text),
    -- | The sentiment analysis result, which depends on the @sentiment_analysis_request_config@ specified in the request.
    sentimentAnalysisResult :: (Core.Maybe GoogleCloudDialogflowV2SentimentAnalysisResult),
    -- | The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be accurate or set. In particular this field isn\'t set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult.
    speechRecognitionConfidence :: (Core.Maybe Core.Double),
    -- | If the query was fulfilled by a webhook call, this field is set to the value of the @payload@ field returned in the webhook response.
    webhookPayload :: (Core.Maybe GoogleCloudDialogflowV2QueryResult_WebhookPayload),
    -- | If the query was fulfilled by a webhook call, this field is set to the value of the @source@ field returned in the webhook response.
    webhookSource :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2QueryResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2QueryResult ::
  GoogleCloudDialogflowV2QueryResult
newGoogleCloudDialogflowV2QueryResult =
  GoogleCloudDialogflowV2QueryResult
    { action = Core.Nothing,
      allRequiredParamsPresent = Core.Nothing,
      cancelsSlotFilling = Core.Nothing,
      diagnosticInfo = Core.Nothing,
      fulfillmentMessages = Core.Nothing,
      fulfillmentText = Core.Nothing,
      intent = Core.Nothing,
      intentDetectionConfidence = Core.Nothing,
      languageCode = Core.Nothing,
      outputContexts = Core.Nothing,
      parameters = Core.Nothing,
      queryText = Core.Nothing,
      sentimentAnalysisResult = Core.Nothing,
      speechRecognitionConfidence = Core.Nothing,
      webhookPayload = Core.Nothing,
      webhookSource = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2QueryResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2QueryResult"
      ( \o ->
          GoogleCloudDialogflowV2QueryResult
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "allRequiredParamsPresent")
            Core.<*> (o Core..:? "cancelsSlotFilling")
            Core.<*> (o Core..:? "diagnosticInfo")
            Core.<*> (o Core..:? "fulfillmentMessages")
            Core.<*> (o Core..:? "fulfillmentText")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "intentDetectionConfidence")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "outputContexts")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "queryText")
            Core.<*> (o Core..:? "sentimentAnalysisResult")
            Core.<*> (o Core..:? "speechRecognitionConfidence")
            Core.<*> (o Core..:? "webhookPayload")
            Core.<*> (o Core..:? "webhookSource")
      )

instance Core.ToJSON GoogleCloudDialogflowV2QueryResult where
  toJSON GoogleCloudDialogflowV2QueryResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("allRequiredParamsPresent" Core..=)
              Core.<$> allRequiredParamsPresent,
            ("cancelsSlotFilling" Core..=) Core.<$> cancelsSlotFilling,
            ("diagnosticInfo" Core..=) Core.<$> diagnosticInfo,
            ("fulfillmentMessages" Core..=) Core.<$> fulfillmentMessages,
            ("fulfillmentText" Core..=) Core.<$> fulfillmentText,
            ("intent" Core..=) Core.<$> intent,
            ("intentDetectionConfidence" Core..=)
              Core.<$> intentDetectionConfidence,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("outputContexts" Core..=) Core.<$> outputContexts,
            ("parameters" Core..=) Core.<$> parameters,
            ("queryText" Core..=) Core.<$> queryText,
            ("sentimentAnalysisResult" Core..=)
              Core.<$> sentimentAnalysisResult,
            ("speechRecognitionConfidence" Core..=)
              Core.<$> speechRecognitionConfidence,
            ("webhookPayload" Core..=) Core.<$> webhookPayload,
            ("webhookSource" Core..=) Core.<$> webhookSource
          ]
      )

-- | Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain: - webhook call latency - webhook errors
--
-- /See:/ 'newGoogleCloudDialogflowV2QueryResult_DiagnosticInfo' smart constructor.
newtype GoogleCloudDialogflowV2QueryResult_DiagnosticInfo = GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2QueryResult_DiagnosticInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2QueryResult_DiagnosticInfo ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
newGoogleCloudDialogflowV2QueryResult_DiagnosticInfo additional =
  GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2QueryResult_DiagnosticInfo"
      ( \o ->
          GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2QueryResult_DiagnosticInfo
  where
  toJSON GoogleCloudDialogflowV2QueryResult_DiagnosticInfo {..} =
    Core.toJSON additional

-- | The collection of extracted parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowV2QueryResult_Parameters' smart constructor.
newtype GoogleCloudDialogflowV2QueryResult_Parameters = GoogleCloudDialogflowV2QueryResult_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2QueryResult_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2QueryResult_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2QueryResult_Parameters
newGoogleCloudDialogflowV2QueryResult_Parameters additional =
  GoogleCloudDialogflowV2QueryResult_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2QueryResult_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2QueryResult_Parameters"
      ( \o ->
          GoogleCloudDialogflowV2QueryResult_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2QueryResult_Parameters where
  toJSON GoogleCloudDialogflowV2QueryResult_Parameters {..} =
    Core.toJSON additional

-- | If the query was fulfilled by a webhook call, this field is set to the value of the @payload@ field returned in the webhook response.
--
-- /See:/ 'newGoogleCloudDialogflowV2QueryResult_WebhookPayload' smart constructor.
newtype GoogleCloudDialogflowV2QueryResult_WebhookPayload = GoogleCloudDialogflowV2QueryResult_WebhookPayload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2QueryResult_WebhookPayload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2QueryResult_WebhookPayload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2QueryResult_WebhookPayload
newGoogleCloudDialogflowV2QueryResult_WebhookPayload additional =
  GoogleCloudDialogflowV2QueryResult_WebhookPayload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2QueryResult_WebhookPayload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2QueryResult_WebhookPayload"
      ( \o ->
          GoogleCloudDialogflowV2QueryResult_WebhookPayload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2QueryResult_WebhookPayload
  where
  toJSON GoogleCloudDialogflowV2QueryResult_WebhookPayload {..} =
    Core.toJSON additional

-- | The sentiment, such as positive\/negative feeling or association, for a unit of analysis, such as the query text. See: https:\/\/cloud.google.com\/natural-language\/docs\/basics#interpreting/sentiment/analysis_values for how to interpret the result.
--
-- /See:/ 'newGoogleCloudDialogflowV2Sentiment' smart constructor.
data GoogleCloudDialogflowV2Sentiment = GoogleCloudDialogflowV2Sentiment
  { -- | A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
    magnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
    score :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2Sentiment' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2Sentiment ::
  GoogleCloudDialogflowV2Sentiment
newGoogleCloudDialogflowV2Sentiment =
  GoogleCloudDialogflowV2Sentiment
    { magnitude = Core.Nothing,
      score = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2Sentiment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2Sentiment"
      ( \o ->
          GoogleCloudDialogflowV2Sentiment
            Core.<$> (o Core..:? "magnitude")
            Core.<*> (o Core..:? "score")
      )

instance Core.ToJSON GoogleCloudDialogflowV2Sentiment where
  toJSON GoogleCloudDialogflowV2Sentiment {..} =
    Core.object
      ( Core.catMaybes
          [ ("magnitude" Core..=) Core.<$> magnitude,
            ("score" Core..=) Core.<$> score
          ]
      )

-- | The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user\'s attitude as positive, negative, or neutral. For DetectIntent, it needs to be configured in DetectIntentRequest.query/params. For StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query/params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human/agent/assistant_config
--
-- /See:/ 'newGoogleCloudDialogflowV2SentimentAnalysisResult' smart constructor.
newtype GoogleCloudDialogflowV2SentimentAnalysisResult = GoogleCloudDialogflowV2SentimentAnalysisResult
  { -- | The sentiment analysis result for @query_text@.
    queryTextSentiment :: (Core.Maybe GoogleCloudDialogflowV2Sentiment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SentimentAnalysisResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SentimentAnalysisResult ::
  GoogleCloudDialogflowV2SentimentAnalysisResult
newGoogleCloudDialogflowV2SentimentAnalysisResult =
  GoogleCloudDialogflowV2SentimentAnalysisResult
    { queryTextSentiment =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SentimentAnalysisResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SentimentAnalysisResult"
      ( \o ->
          GoogleCloudDialogflowV2SentimentAnalysisResult
            Core.<$> (o Core..:? "queryTextSentiment")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SentimentAnalysisResult where
  toJSON GoogleCloudDialogflowV2SentimentAnalysisResult {..} =
    Core.object
      ( Core.catMaybes
          [("queryTextSentiment" Core..=) Core.<$> queryTextSentiment]
      )

-- | A session represents a conversation between a Dialogflow agent and an end-user. You can create special entities, called session entities, during a session. Session entities can extend or replace custom entity types and only exist during the session that they were created for. All session data, including session entities, is stored by Dialogflow for 20 minutes. For more information, see the <https://cloud.google.com/dialogflow/docs/entities-session session entity guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2SessionEntityType' smart constructor.
data GoogleCloudDialogflowV2SessionEntityType = GoogleCloudDialogflowV2SessionEntityType
  { -- | Required. The collection of entities associated with this session entity type.
    entities :: (Core.Maybe [GoogleCloudDialogflowV2EntityTypeEntity]),
    -- | Required. Indicates whether the additional data should override or supplement the custom entity type definition.
    entityOverrideMode ::
      ( Core.Maybe
          GoogleCloudDialogflowV2SessionEntityType_EntityOverrideMode
      ),
    -- | Required. The unique identifier of this session entity type. Format: @projects\/\/agent\/sessions\/\/entityTypes\/@, or @projects\/\/agent\/environments\/\/users\/\/sessions\/\/entityTypes\/@. If @Environment ID@ is not specified, we assume default \'draft\' environment. If @User ID@ is not specified, we assume default \'-\' user. \`\` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SessionEntityType' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SessionEntityType ::
  GoogleCloudDialogflowV2SessionEntityType
newGoogleCloudDialogflowV2SessionEntityType =
  GoogleCloudDialogflowV2SessionEntityType
    { entities = Core.Nothing,
      entityOverrideMode = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2SessionEntityType where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SessionEntityType"
      ( \o ->
          GoogleCloudDialogflowV2SessionEntityType
            Core.<$> (o Core..:? "entities")
            Core.<*> (o Core..:? "entityOverrideMode")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SessionEntityType where
  toJSON GoogleCloudDialogflowV2SessionEntityType {..} =
    Core.object
      ( Core.catMaybes
          [ ("entities" Core..=) Core.<$> entities,
            ("entityOverrideMode" Core..=) Core.<$> entityOverrideMode,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Metadata for a ConversationProfiles.SetSuggestionFeatureConfig operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata = GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
  { -- | The resource name of the conversation profile. Format: @projects\/\/locations\/\/conversationProfiles\/@
    conversationProfile :: (Core.Maybe Core.Text),
    -- | Timestamp whe the request was created. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Required. The participant role to add or update the suggestion feature config. Only HUMAN/AGENT or END/USER can be used.
    participantRole ::
      ( Core.Maybe
          GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata_ParticipantRole
      ),
    -- | Required. The type of the suggestion feature to add or update.
    suggestionFeatureType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata_SuggestionFeatureType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata ::
  GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
newGoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata =
  GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
    { conversationProfile =
        Core.Nothing,
      createTime = Core.Nothing,
      participantRole =
        Core.Nothing,
      suggestionFeatureType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
            Core.<$> (o Core..:? "conversationProfile")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "participantRole")
            Core.<*> (o Core..:? "suggestionFeatureType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2SetSuggestionFeatureConfigOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationProfile" Core..=) Core.<$> conversationProfile,
              ("createTime" Core..=) Core.<$> createTime,
              ("participantRole" Core..=) Core.<$> participantRole,
              ("suggestionFeatureType" Core..=) Core.<$> suggestionFeatureType
            ]
        )

-- | Represents a smart reply answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2SmartReplyAnswer' smart constructor.
data GoogleCloudDialogflowV2SmartReplyAnswer = GoogleCloudDialogflowV2SmartReplyAnswer
  { -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | Smart reply confidence. The system\'s confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | The content of the reply.
    reply :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SmartReplyAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SmartReplyAnswer ::
  GoogleCloudDialogflowV2SmartReplyAnswer
newGoogleCloudDialogflowV2SmartReplyAnswer =
  GoogleCloudDialogflowV2SmartReplyAnswer
    { answerRecord =
        Core.Nothing,
      confidence = Core.Nothing,
      reply = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2SmartReplyAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SmartReplyAnswer"
      ( \o ->
          GoogleCloudDialogflowV2SmartReplyAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "confidence")
            Core.<*> (o Core..:? "reply")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SmartReplyAnswer where
  toJSON GoogleCloudDialogflowV2SmartReplyAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("confidence" Core..=) Core.<$> confidence,
            ("reply" Core..=) Core.<$> reply
          ]
      )

-- | Metadata for smart reply models.
--
-- /See:/ 'newGoogleCloudDialogflowV2SmartReplyModelMetadata' smart constructor.
newtype GoogleCloudDialogflowV2SmartReplyModelMetadata = GoogleCloudDialogflowV2SmartReplyModelMetadata
  { -- | Optional. Type of the smart reply model. If not provided, model_type is used.
    trainingModelType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2SmartReplyModelMetadata_TrainingModelType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SmartReplyModelMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SmartReplyModelMetadata ::
  GoogleCloudDialogflowV2SmartReplyModelMetadata
newGoogleCloudDialogflowV2SmartReplyModelMetadata =
  GoogleCloudDialogflowV2SmartReplyModelMetadata
    { trainingModelType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SmartReplyModelMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SmartReplyModelMetadata"
      ( \o ->
          GoogleCloudDialogflowV2SmartReplyModelMetadata
            Core.<$> (o Core..:? "trainingModelType")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SmartReplyModelMetadata where
  toJSON GoogleCloudDialogflowV2SmartReplyModelMetadata {..} =
    Core.object
      ( Core.catMaybes
          [("trainingModelType" Core..=) Core.<$> trainingModelType]
      )

-- | Information for a word recognized by the speech recognizer.
--
-- /See:/ 'newGoogleCloudDialogflowV2SpeechWordInfo' smart constructor.
data GoogleCloudDialogflowV2SpeechWordInfo = GoogleCloudDialogflowV2SpeechWordInfo
  { -- | The Speech confidence between 0.0 and 1.0 for this word. A higher number indicates an estimated greater likelihood that the recognized word is correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be fully stable over time for the same audio input. Users should also not rely on it to always be provided.
    confidence :: (Core.Maybe Core.Double),
    -- | Time offset relative to the beginning of the audio that corresponds to the end of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.
    endOffset :: (Core.Maybe Core.Duration),
    -- | Time offset relative to the beginning of the audio that corresponds to the start of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.
    startOffset :: (Core.Maybe Core.Duration),
    -- | The word this info is for.
    word :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SpeechWordInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SpeechWordInfo ::
  GoogleCloudDialogflowV2SpeechWordInfo
newGoogleCloudDialogflowV2SpeechWordInfo =
  GoogleCloudDialogflowV2SpeechWordInfo
    { confidence = Core.Nothing,
      endOffset = Core.Nothing,
      startOffset = Core.Nothing,
      word = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2SpeechWordInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SpeechWordInfo"
      ( \o ->
          GoogleCloudDialogflowV2SpeechWordInfo
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "endOffset")
            Core.<*> (o Core..:? "startOffset")
            Core.<*> (o Core..:? "word")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SpeechWordInfo where
  toJSON GoogleCloudDialogflowV2SpeechWordInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("endOffset" Core..=) Core.<$> endOffset,
            ("startOffset" Core..=) Core.<$> startOffset,
            ("word" Core..=) Core.<$> word
          ]
      )

-- | Contains a speech recognition result corresponding to a portion of the audio that is currently being processed or an indication that this is the end of the single requested utterance. While end-user audio is being processed, Dialogflow sends a series of results. Each result may contain a @transcript@ value. A transcript represents a portion of the utterance. While the recognizer is processing audio, transcript values may be interim values or finalized values. Once a transcript is finalized, the @is_final@ value is set to true and processing continues for the next transcript. If @StreamingDetectIntentRequest.query_input.audio_config.single_utterance@ was true, and the recognizer has completed processing audio, the @message_type@ value is set to
-- @END_OF_SINGLE_UTTERANCE and the following (last) result contains the last finalized transcript. The complete end-user utterance is determined by concatenating the finalized transcript values received for the series of results. In the following example, single utterance is enabled. In the case where single utterance is not enabled, result 7 would not occur. \`\`\` Num | transcript | message_type | is_final --- | ----------------------- | ----------------------- | -------- 1 | \"tube\" | TRANSCRIPT | false 2 | \"to be a\" | TRANSCRIPT | false 3 | \"to be\" | TRANSCRIPT | false 4 | \"to be or not to be\" | TRANSCRIPT | true 5 | \"that\'s\" | TRANSCRIPT | false 6 | \"that is | TRANSCRIPT | false 7 | unset | END_OF_SINGLE_UTTERANCE | unset 8 | \" that is the question\" | TRANSCRIPT | true \`\`\` Concatenating the finalized transcripts with@is_final\` set to true, the complete utterance becomes \"to be or not to be that is the question\".
--
-- /See:/ 'newGoogleCloudDialogflowV2StreamingRecognitionResult' smart constructor.
data GoogleCloudDialogflowV2StreamingRecognitionResult = GoogleCloudDialogflowV2StreamingRecognitionResult
  { -- | The Speech confidence between 0.0 and 1.0 for the current portion of audio. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is typically only provided if @is_final@ is true and you should not rely on it being accurate or even set.
    confidence :: (Core.Maybe Core.Double),
    -- | If @false@, the @StreamingRecognitionResult@ represents an interim result that may change. If @true@, the recognizer will not return any further hypotheses about this piece of the audio. May only be populated for @message_type@ = @TRANSCRIPT@.
    isFinal :: (Core.Maybe Core.Bool),
    -- | Detected language code for the transcript.
    languageCode :: (Core.Maybe Core.Text),
    -- | Type of the result message.
    messageType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2StreamingRecognitionResult_MessageType
      ),
    -- | Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for @message_type@ = @TRANSCRIPT@.
    speechEndOffset :: (Core.Maybe Core.Duration),
    -- | Word-specific information for the words recognized by Speech in transcript. Populated if and only if @message_type@ = @TRANSCRIPT@ and [InputAudioConfig.enable/word/info] is set.
    speechWordInfo :: (Core.Maybe [GoogleCloudDialogflowV2SpeechWordInfo]),
    -- | Transcript text representing the words that the user spoke. Populated if and only if @message_type@ = @TRANSCRIPT@.
    transcript :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2StreamingRecognitionResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2StreamingRecognitionResult ::
  GoogleCloudDialogflowV2StreamingRecognitionResult
newGoogleCloudDialogflowV2StreamingRecognitionResult =
  GoogleCloudDialogflowV2StreamingRecognitionResult
    { confidence =
        Core.Nothing,
      isFinal = Core.Nothing,
      languageCode = Core.Nothing,
      messageType = Core.Nothing,
      speechEndOffset = Core.Nothing,
      speechWordInfo = Core.Nothing,
      transcript = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2StreamingRecognitionResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2StreamingRecognitionResult"
      ( \o ->
          GoogleCloudDialogflowV2StreamingRecognitionResult
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "isFinal")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "messageType")
            Core.<*> (o Core..:? "speechEndOffset")
            Core.<*> (o Core..:? "speechWordInfo")
            Core.<*> (o Core..:? "transcript")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2StreamingRecognitionResult
  where
  toJSON GoogleCloudDialogflowV2StreamingRecognitionResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("isFinal" Core..=) Core.<$> isFinal,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("messageType" Core..=) Core.<$> messageType,
            ("speechEndOffset" Core..=) Core.<$> speechEndOffset,
            ("speechWordInfo" Core..=) Core.<$> speechWordInfo,
            ("transcript" Core..=) Core.<$> transcript
          ]
      )

-- | The response message for Participants.SuggestArticles.
--
-- /See:/ 'newGoogleCloudDialogflowV2SuggestArticlesResponse' smart constructor.
data GoogleCloudDialogflowV2SuggestArticlesResponse = GoogleCloudDialogflowV2SuggestArticlesResponse
  { -- | Articles ordered by score in descending order.
    articleAnswers :: (Core.Maybe [GoogleCloudDialogflowV2ArticleAnswer]),
    -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestArticlesRequest.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SuggestArticlesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SuggestArticlesResponse ::
  GoogleCloudDialogflowV2SuggestArticlesResponse
newGoogleCloudDialogflowV2SuggestArticlesResponse =
  GoogleCloudDialogflowV2SuggestArticlesResponse
    { articleAnswers =
        Core.Nothing,
      contextSize = Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SuggestArticlesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SuggestArticlesResponse"
      ( \o ->
          GoogleCloudDialogflowV2SuggestArticlesResponse
            Core.<$> (o Core..:? "articleAnswers")
            Core.<*> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "latestMessage")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SuggestArticlesResponse where
  toJSON GoogleCloudDialogflowV2SuggestArticlesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("articleAnswers" Core..=) Core.<$> articleAnswers,
            ("contextSize" Core..=) Core.<$> contextSize,
            ("latestMessage" Core..=) Core.<$> latestMessage
          ]
      )

-- | The request message for Participants.SuggestFaqAnswers.
--
-- /See:/ 'newGoogleCloudDialogflowV2SuggestFaqAnswersResponse' smart constructor.
data GoogleCloudDialogflowV2SuggestFaqAnswersResponse = GoogleCloudDialogflowV2SuggestFaqAnswersResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | Answers extracted from FAQ documents.
    faqAnswers :: (Core.Maybe [GoogleCloudDialogflowV2FaqAnswer]),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SuggestFaqAnswersResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SuggestFaqAnswersResponse ::
  GoogleCloudDialogflowV2SuggestFaqAnswersResponse
newGoogleCloudDialogflowV2SuggestFaqAnswersResponse =
  GoogleCloudDialogflowV2SuggestFaqAnswersResponse
    { contextSize =
        Core.Nothing,
      faqAnswers = Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SuggestFaqAnswersResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SuggestFaqAnswersResponse"
      ( \o ->
          GoogleCloudDialogflowV2SuggestFaqAnswersResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "faqAnswers")
            Core.<*> (o Core..:? "latestMessage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2SuggestFaqAnswersResponse
  where
  toJSON GoogleCloudDialogflowV2SuggestFaqAnswersResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("contextSize" Core..=) Core.<$> contextSize,
            ("faqAnswers" Core..=) Core.<$> faqAnswers,
            ("latestMessage" Core..=) Core.<$> latestMessage
          ]
      )

-- | The response message for Participants.SuggestKnowledgeAssist.
--
-- /See:/ 'newGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse' smart constructor.
data GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse = GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context/size field in the request if there are fewer messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | Output only. Knowledge Assist suggestion.
    knowledgeAssistAnswer :: (Core.Maybe GoogleCloudDialogflowV2KnowledgeAssistAnswer),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse ::
  GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
newGoogleCloudDialogflowV2SuggestKnowledgeAssistResponse =
  GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
    { contextSize =
        Core.Nothing,
      knowledgeAssistAnswer = Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse"
      ( \o ->
          GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "knowledgeAssistAnswer")
            Core.<*> (o Core..:? "latestMessage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse
  where
  toJSON GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("contextSize" Core..=) Core.<$> contextSize,
            ("knowledgeAssistAnswer" Core..=) Core.<$> knowledgeAssistAnswer,
            ("latestMessage" Core..=) Core.<$> latestMessage
          ]
      )

-- | The response message for Participants.SuggestSmartReplies.
--
-- /See:/ 'newGoogleCloudDialogflowV2SuggestSmartRepliesResponse' smart constructor.
data GoogleCloudDialogflowV2SuggestSmartRepliesResponse = GoogleCloudDialogflowV2SuggestSmartRepliesResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text),
    -- | Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.
    smartReplyAnswers :: (Core.Maybe [GoogleCloudDialogflowV2SmartReplyAnswer])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SuggestSmartRepliesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SuggestSmartRepliesResponse ::
  GoogleCloudDialogflowV2SuggestSmartRepliesResponse
newGoogleCloudDialogflowV2SuggestSmartRepliesResponse =
  GoogleCloudDialogflowV2SuggestSmartRepliesResponse
    { contextSize =
        Core.Nothing,
      latestMessage = Core.Nothing,
      smartReplyAnswers = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2SuggestSmartRepliesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SuggestSmartRepliesResponse"
      ( \o ->
          GoogleCloudDialogflowV2SuggestSmartRepliesResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "latestMessage")
            Core.<*> (o Core..:? "smartReplyAnswers")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2SuggestSmartRepliesResponse
  where
  toJSON GoogleCloudDialogflowV2SuggestSmartRepliesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("contextSize" Core..=) Core.<$> contextSize,
            ("latestMessage" Core..=) Core.<$> latestMessage,
            ("smartReplyAnswers" Core..=) Core.<$> smartReplyAnswers
          ]
      )

-- | One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.
--
-- /See:/ 'newGoogleCloudDialogflowV2SuggestionResult' smart constructor.
data GoogleCloudDialogflowV2SuggestionResult = GoogleCloudDialogflowV2SuggestionResult
  { -- | Error status if the request failed.
    error :: (Core.Maybe GoogleRpcStatus),
    -- | SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
    suggestArticlesResponse :: (Core.Maybe GoogleCloudDialogflowV2SuggestArticlesResponse),
    -- | SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
    suggestFaqAnswersResponse :: (Core.Maybe GoogleCloudDialogflowV2SuggestFaqAnswersResponse),
    -- | SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST.
    suggestKnowledgeAssistResponse :: (Core.Maybe GoogleCloudDialogflowV2SuggestKnowledgeAssistResponse),
    -- | SuggestSmartRepliesResponse if request is for SMART_REPLY.
    suggestSmartRepliesResponse :: (Core.Maybe GoogleCloudDialogflowV2SuggestSmartRepliesResponse)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2SuggestionResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2SuggestionResult ::
  GoogleCloudDialogflowV2SuggestionResult
newGoogleCloudDialogflowV2SuggestionResult =
  GoogleCloudDialogflowV2SuggestionResult
    { error = Core.Nothing,
      suggestArticlesResponse = Core.Nothing,
      suggestFaqAnswersResponse = Core.Nothing,
      suggestKnowledgeAssistResponse = Core.Nothing,
      suggestSmartRepliesResponse = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2SuggestionResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2SuggestionResult"
      ( \o ->
          GoogleCloudDialogflowV2SuggestionResult
            Core.<$> (o Core..:? "error")
            Core.<*> (o Core..:? "suggestArticlesResponse")
            Core.<*> (o Core..:? "suggestFaqAnswersResponse")
            Core.<*> (o Core..:? "suggestKnowledgeAssistResponse")
            Core.<*> (o Core..:? "suggestSmartRepliesResponse")
      )

instance Core.ToJSON GoogleCloudDialogflowV2SuggestionResult where
  toJSON GoogleCloudDialogflowV2SuggestionResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("error" Core..=) Core.<$> error,
            ("suggestArticlesResponse" Core..=)
              Core.<$> suggestArticlesResponse,
            ("suggestFaqAnswersResponse" Core..=)
              Core.<$> suggestFaqAnswersResponse,
            ("suggestKnowledgeAssistResponse" Core..=)
              Core.<$> suggestKnowledgeAssistResponse,
            ("suggestSmartRepliesResponse" Core..=)
              Core.<$> suggestSmartRepliesResponse
          ]
      )

-- | Metadata for a ConversationModels.UndeployConversationModel operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2UndeployConversationModelOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata = GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
  { -- | The resource name of the conversation model. Format: @projects\/\/conversationModels\/@
    conversationModel :: (Core.Maybe Core.Text),
    -- | Timestamp when the request to undeploy conversation model was submitted. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2UndeployConversationModelOperationMetadata ::
  GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
newGoogleCloudDialogflowV2UndeployConversationModelOperationMetadata =
  GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
    { conversationModel =
        Core.Nothing,
      createTime = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
            Core.<$> (o Core..:? "conversationModel")
            Core.<*> (o Core..:? "createTime")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2UndeployConversationModelOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationModel" Core..=) Core.<$> conversationModel,
              ("createTime" Core..=) Core.<$> createTime
            ]
        )

-- | The request message for a webhook call.
--
-- /See:/ 'newGoogleCloudDialogflowV2WebhookRequest' smart constructor.
data GoogleCloudDialogflowV2WebhookRequest = GoogleCloudDialogflowV2WebhookRequest
  { -- | Optional. The contents of the original request that was passed to @[Streaming]DetectIntent@ call.
    originalDetectIntentRequest :: (Core.Maybe GoogleCloudDialogflowV2OriginalDetectIntentRequest),
    -- | The result of the conversational query or event processing. Contains the same value as @[Streaming]DetectIntentResponse.query_result@.
    queryResult :: (Core.Maybe GoogleCloudDialogflowV2QueryResult),
    -- | The unique identifier of the response. Contains the same value as @[Streaming]DetectIntentResponse.response_id@.
    responseId :: (Core.Maybe Core.Text),
    -- | The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Format: @projects\/\/agent\/sessions\/@, or @projects\/\/agent\/environments\/\/users\/\/sessions\/@.
    session :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2WebhookRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2WebhookRequest ::
  GoogleCloudDialogflowV2WebhookRequest
newGoogleCloudDialogflowV2WebhookRequest =
  GoogleCloudDialogflowV2WebhookRequest
    { originalDetectIntentRequest =
        Core.Nothing,
      queryResult = Core.Nothing,
      responseId = Core.Nothing,
      session = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2WebhookRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2WebhookRequest"
      ( \o ->
          GoogleCloudDialogflowV2WebhookRequest
            Core.<$> (o Core..:? "originalDetectIntentRequest")
            Core.<*> (o Core..:? "queryResult")
            Core.<*> (o Core..:? "responseId")
            Core.<*> (o Core..:? "session")
      )

instance Core.ToJSON GoogleCloudDialogflowV2WebhookRequest where
  toJSON GoogleCloudDialogflowV2WebhookRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("originalDetectIntentRequest" Core..=)
              Core.<$> originalDetectIntentRequest,
            ("queryResult" Core..=) Core.<$> queryResult,
            ("responseId" Core..=) Core.<$> responseId,
            ("session" Core..=) Core.<$> session
          ]
      )

-- | The response message for a webhook call. This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use @\"\"@ for empty strings - Use @{}@ or @null@ for empty objects - Use @[]@ or @null@ for empty arrays For more information, see the <https://developers.google.com/protocol-buffers/docs/proto3#json Protocol Buffers Language Guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2WebhookResponse' smart constructor.
data GoogleCloudDialogflowV2WebhookResponse = GoogleCloudDialogflowV2WebhookResponse
  { -- | Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the @fulfillment_text@, @fulfillment_messages@, and @payload@ fields.
    followupEventInput :: (Core.Maybe GoogleCloudDialogflowV2EventInput),
    -- | Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.
    fulfillmentMessages :: (Core.Maybe [GoogleCloudDialogflowV2IntentMessage]),
    -- | Optional. The text response message intended for the end-user. It is recommended to use @fulfillment_messages.text.text[0]@ instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.
    fulfillmentText :: (Core.Maybe Core.Text),
    -- | Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.
    outputContexts :: (Core.Maybe [GoogleCloudDialogflowV2Context]),
    -- | Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the <https://cloud.google.com/dialogflow/docs/integrations/aog Google Assistant integration> for rich response messages. See the format definition at <https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json Google Assistant Dialogflow webhook format>
    payload :: (Core.Maybe GoogleCloudDialogflowV2WebhookResponse_Payload),
    -- | Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using @detectIntent@, @streamingDetectIntent@ or SessionEntityType management methods.
    sessionEntityTypes :: (Core.Maybe [GoogleCloudDialogflowV2SessionEntityType]),
    -- | Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.
    source :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2WebhookResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2WebhookResponse ::
  GoogleCloudDialogflowV2WebhookResponse
newGoogleCloudDialogflowV2WebhookResponse =
  GoogleCloudDialogflowV2WebhookResponse
    { followupEventInput =
        Core.Nothing,
      fulfillmentMessages = Core.Nothing,
      fulfillmentText = Core.Nothing,
      outputContexts = Core.Nothing,
      payload = Core.Nothing,
      sessionEntityTypes = Core.Nothing,
      source = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2WebhookResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2WebhookResponse"
      ( \o ->
          GoogleCloudDialogflowV2WebhookResponse
            Core.<$> (o Core..:? "followupEventInput")
            Core.<*> (o Core..:? "fulfillmentMessages")
            Core.<*> (o Core..:? "fulfillmentText")
            Core.<*> (o Core..:? "outputContexts")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "sessionEntityTypes")
            Core.<*> (o Core..:? "source")
      )

instance Core.ToJSON GoogleCloudDialogflowV2WebhookResponse where
  toJSON GoogleCloudDialogflowV2WebhookResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("followupEventInput" Core..=) Core.<$> followupEventInput,
            ("fulfillmentMessages" Core..=) Core.<$> fulfillmentMessages,
            ("fulfillmentText" Core..=) Core.<$> fulfillmentText,
            ("outputContexts" Core..=) Core.<$> outputContexts,
            ("payload" Core..=) Core.<$> payload,
            ("sessionEntityTypes" Core..=) Core.<$> sessionEntityTypes,
            ("source" Core..=) Core.<$> source
          ]
      )

-- | Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the <https://cloud.google.com/dialogflow/docs/integrations/aog Google Assistant integration> for rich response messages. See the format definition at <https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json Google Assistant Dialogflow webhook format>
--
-- /See:/ 'newGoogleCloudDialogflowV2WebhookResponse_Payload' smart constructor.
newtype GoogleCloudDialogflowV2WebhookResponse_Payload = GoogleCloudDialogflowV2WebhookResponse_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2WebhookResponse_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2WebhookResponse_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2WebhookResponse_Payload
newGoogleCloudDialogflowV2WebhookResponse_Payload additional =
  GoogleCloudDialogflowV2WebhookResponse_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2WebhookResponse_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2WebhookResponse_Payload"
      ( \o ->
          GoogleCloudDialogflowV2WebhookResponse_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2WebhookResponse_Payload where
  toJSON GoogleCloudDialogflowV2WebhookResponse_Payload {..} =
    Core.toJSON additional

-- | Represents a part of a message possibly annotated with an entity. The part can be an entity or purely a part of the message between two entities or message start\/end.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1AnnotatedMessagePart' smart constructor.
data GoogleCloudDialogflowV2beta1AnnotatedMessagePart = GoogleCloudDialogflowV2beta1AnnotatedMessagePart
  { -- | Optional. The <https://cloud.google.com/dialogflow/docs/reference/system-entities Dialogflow system entity type> of this message part. If this is empty, Dialogflow could not annotate the phrase part with a system entity.
    entityType :: (Core.Maybe Core.Text),
    -- | Optional. The <https://cloud.google.com/dialogflow/docs/reference/system-entities Dialogflow system entity formatted value> of this message part. For example for a system entity of type @\@sys.unit-currency@, this may contain: { \"amount\": 5, \"currency\": \"USD\" }
    formattedValue :: (Core.Maybe Core.Value),
    -- | Required. A part of a message possibly annotated with an entity.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1AnnotatedMessagePart' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1AnnotatedMessagePart ::
  GoogleCloudDialogflowV2beta1AnnotatedMessagePart
newGoogleCloudDialogflowV2beta1AnnotatedMessagePart =
  GoogleCloudDialogflowV2beta1AnnotatedMessagePart
    { entityType =
        Core.Nothing,
      formattedValue = Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1AnnotatedMessagePart
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1AnnotatedMessagePart"
      ( \o ->
          GoogleCloudDialogflowV2beta1AnnotatedMessagePart
            Core.<$> (o Core..:? "entityType")
            Core.<*> (o Core..:? "formattedValue")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1AnnotatedMessagePart
  where
  toJSON GoogleCloudDialogflowV2beta1AnnotatedMessagePart {..} =
    Core.object
      ( Core.catMaybes
          [ ("entityType" Core..=) Core.<$> entityType,
            ("formattedValue" Core..=) Core.<$> formattedValue,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Represents article answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ArticleAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1ArticleAnswer = GoogleCloudDialogflowV2beta1ArticleAnswer
  { -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | A map that contains metadata about the answer and the document from which it originates.
    metadata :: (Core.Maybe GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata),
    -- | Output only. Article snippets.
    snippets :: (Core.Maybe [Core.Text]),
    -- | The article title.
    title :: (Core.Maybe Core.Text),
    -- | The article URI.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ArticleAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ArticleAnswer ::
  GoogleCloudDialogflowV2beta1ArticleAnswer
newGoogleCloudDialogflowV2beta1ArticleAnswer =
  GoogleCloudDialogflowV2beta1ArticleAnswer
    { answerRecord =
        Core.Nothing,
      metadata = Core.Nothing,
      snippets = Core.Nothing,
      title = Core.Nothing,
      uri = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1ArticleAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ArticleAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1ArticleAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "metadata")
            Core.<*> (o Core..:? "snippets")
            Core.<*> (o Core..:? "title")
            Core.<*> (o Core..:? "uri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1ArticleAnswer where
  toJSON GoogleCloudDialogflowV2beta1ArticleAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("metadata" Core..=) Core.<$> metadata,
            ("snippets" Core..=) Core.<$> snippets,
            ("title" Core..=) Core.<$> title,
            ("uri" Core..=) Core.<$> uri
          ]
      )

-- | A map that contains metadata about the answer and the document from which it originates.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ArticleAnswer_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata = GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ArticleAnswer_Metadata ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
newGoogleCloudDialogflowV2beta1ArticleAnswer_Metadata additional =
  GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata
  where
  toJSON GoogleCloudDialogflowV2beta1ArticleAnswer_Metadata {..} =
    Core.toJSON additional

-- | The response message for EntityTypes.BatchUpdateEntityTypes.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse' smart constructor.
newtype GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse = GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
  { -- | The collection of updated or created entity types.
    entityTypes :: (Core.Maybe [GoogleCloudDialogflowV2beta1EntityType])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse ::
  GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
newGoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse =
  GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
    { entityTypes =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
            Core.<$> (o Core..:? "entityTypes")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse
  where
  toJSON
    GoogleCloudDialogflowV2beta1BatchUpdateEntityTypesResponse {..} =
      Core.object
        (Core.catMaybes [("entityTypes" Core..=) Core.<$> entityTypes])

-- | The response message for Intents.BatchUpdateIntents.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse' smart constructor.
newtype GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse = GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
  { -- | The collection of updated or created intents.
    intents :: (Core.Maybe [GoogleCloudDialogflowV2beta1Intent])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse ::
  GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
newGoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse =
  GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
    { intents =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
            Core.<$> (o Core..:? "intents")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse
  where
  toJSON GoogleCloudDialogflowV2beta1BatchUpdateIntentsResponse {..} =
    Core.object
      (Core.catMaybes [("intents" Core..=) Core.<$> intents])

-- | Metadata for a ConversationProfile.ClearSuggestionFeatureConfig operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata = GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
  { -- | The resource name of the conversation profile. Format: @projects\/\/locations\/\/conversationProfiles\/@
    conversationProfile :: (Core.Maybe Core.Text),
    -- | Timestamp whe the request was created. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Required. The participant role to remove the suggestion feature config. Only HUMAN/AGENT or END/USER can be used.
    participantRole ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata_ParticipantRole
      ),
    -- | Required. The type of the suggestion feature to remove.
    suggestionFeatureType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata_SuggestionFeatureType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata ::
  GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
newGoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata =
  GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
    { conversationProfile =
        Core.Nothing,
      createTime =
        Core.Nothing,
      participantRole =
        Core.Nothing,
      suggestionFeatureType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
            Core.<$> (o Core..:? "conversationProfile")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "participantRole")
            Core.<*> (o Core..:? "suggestionFeatureType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2beta1ClearSuggestionFeatureConfigOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationProfile" Core..=) Core.<$> conversationProfile,
              ("createTime" Core..=) Core.<$> createTime,
              ("participantRole" Core..=) Core.<$> participantRole,
              ("suggestionFeatureType" Core..=) Core.<$> suggestionFeatureType
            ]
        )

-- | Dialogflow contexts are similar to natural language context. If a person says to you \"they are orange\", you need context in order to understand what \"they\" is referring to. Similarly, for Dialogflow to handle an end-user expression like that, it needs to be provided with context in order to correctly match an intent. Using contexts, you can control the flow of a conversation. You can configure contexts for an intent by setting input and output contexts, which are identified by string names. When an intent is matched, any configured output contexts for that intent become active. While any contexts are active, Dialogflow is more likely to match intents that are configured with input contexts that correspond to the currently active contexts. For more information about context, see the <https://cloud.google.com/dialogflow/docs/contexts-overview Contexts guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1Context' smart constructor.
data GoogleCloudDialogflowV2beta1Context = GoogleCloudDialogflowV2beta1Context
  { -- | Optional. The number of conversational query requests after which the context expires. The default is @0@. If set to @0@, the context expires immediately. Contexts expire automatically after 20 minutes if there are no matching queries.
    lifespanCount :: (Core.Maybe Core.Int32),
    -- | Required. The unique identifier of the context. Supported formats: - @projects\/\/agent\/sessions\/\/contexts\/@, - @projects\/\/locations\/\/agent\/sessions\/\/contexts\/@, - @projects\/\/agent\/environments\/\/users\/\/sessions\/\/contexts\/@, - @projects\/\/locations\/\/agent\/environments\/\/users\/\/sessions\/\/contexts\/@, The @Context ID@ is always converted to lowercase, may only contain characters in @a-zA-Z0-9_-%@ and may be at most 250 bytes long. If @Environment ID@ is not specified, we assume default \'draft\' environment. If @User ID@ is not specified, we assume default \'-\' user. The following context names are reserved for internal use by Dialogflow. You should not use these contexts or create contexts with these names: * @__system_counters__@ * @*_id_dialog_context@ * @*_dialog_params_size@
    name :: (Core.Maybe Core.Text),
    -- | Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowV2beta1Context_Parameters)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1Context' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1Context ::
  GoogleCloudDialogflowV2beta1Context
newGoogleCloudDialogflowV2beta1Context =
  GoogleCloudDialogflowV2beta1Context
    { lifespanCount = Core.Nothing,
      name = Core.Nothing,
      parameters = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1Context where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1Context"
      ( \o ->
          GoogleCloudDialogflowV2beta1Context
            Core.<$> (o Core..:? "lifespanCount")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "parameters")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1Context where
  toJSON GoogleCloudDialogflowV2beta1Context {..} =
    Core.object
      ( Core.catMaybes
          [ ("lifespanCount" Core..=) Core.<$> lifespanCount,
            ("name" Core..=) Core.<$> name,
            ("parameters" Core..=) Core.<$> parameters
          ]
      )

-- | Optional. The collection of parameters associated with this context. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1Context_Parameters' smart constructor.
newtype GoogleCloudDialogflowV2beta1Context_Parameters = GoogleCloudDialogflowV2beta1Context_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1Context_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1Context_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1Context_Parameters
newGoogleCloudDialogflowV2beta1Context_Parameters additional =
  GoogleCloudDialogflowV2beta1Context_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1Context_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1Context_Parameters"
      ( \o ->
          GoogleCloudDialogflowV2beta1Context_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1Context_Parameters where
  toJSON GoogleCloudDialogflowV2beta1Context_Parameters {..} =
    Core.toJSON additional

-- | Represents a notification sent to Pub\/Sub subscribers for conversation lifecycle events.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ConversationEvent' smart constructor.
data GoogleCloudDialogflowV2beta1ConversationEvent = GoogleCloudDialogflowV2beta1ConversationEvent
  { -- | Required. The unique identifier of the conversation this notification refers to. Format: @projects\/\/conversations\/@.
    conversation :: (Core.Maybe Core.Text),
    -- | Optional. More detailed information about an error. Only set for type UNRECOVERABLE/ERROR/IN/PHONE/CALL.
    errorStatus :: (Core.Maybe GoogleRpcStatus),
    -- | Payload of NEW_MESSAGE event.
    newMessagePayload' :: (Core.Maybe GoogleCloudDialogflowV2beta1Message),
    -- | Payload of NEW/RECOGNITION/RESULT event.
    newRecognitionResultPayload' :: (Core.Maybe GoogleCloudDialogflowV2beta1StreamingRecognitionResult),
    -- | Required. The type of the event that this notification refers to.
    type' :: (Core.Maybe GoogleCloudDialogflowV2beta1ConversationEvent_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ConversationEvent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ConversationEvent ::
  GoogleCloudDialogflowV2beta1ConversationEvent
newGoogleCloudDialogflowV2beta1ConversationEvent =
  GoogleCloudDialogflowV2beta1ConversationEvent
    { conversation =
        Core.Nothing,
      errorStatus = Core.Nothing,
      newMessagePayload' = Core.Nothing,
      newRecognitionResultPayload' = Core.Nothing,
      type' = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ConversationEvent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ConversationEvent"
      ( \o ->
          GoogleCloudDialogflowV2beta1ConversationEvent
            Core.<$> (o Core..:? "conversation")
            Core.<*> (o Core..:? "errorStatus")
            Core.<*> (o Core..:? "newMessagePayload")
            Core.<*> (o Core..:? "newRecognitionResultPayload")
            Core.<*> (o Core..:? "type")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1ConversationEvent where
  toJSON GoogleCloudDialogflowV2beta1ConversationEvent {..} =
    Core.object
      ( Core.catMaybes
          [ ("conversation" Core..=) Core.<$> conversation,
            ("errorStatus" Core..=) Core.<$> errorStatus,
            ("newMessagePayload" Core..=) Core.<$> newMessagePayload',
            ("newRecognitionResultPayload" Core..=)
              Core.<$> newRecognitionResultPayload',
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Represents a Dialogflow assist answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1DialogflowAssistAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1DialogflowAssistAnswer = GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
  { -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | An intent suggestion generated from conversation.
    intentSuggestion :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentSuggestion),
    -- | Result from v2 agent.
    queryResult :: (Core.Maybe GoogleCloudDialogflowV2beta1QueryResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1DialogflowAssistAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1DialogflowAssistAnswer ::
  GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
newGoogleCloudDialogflowV2beta1DialogflowAssistAnswer =
  GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
    { answerRecord =
        Core.Nothing,
      intentSuggestion = Core.Nothing,
      queryResult = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1DialogflowAssistAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "intentSuggestion")
            Core.<*> (o Core..:? "queryResult")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1DialogflowAssistAnswer
  where
  toJSON GoogleCloudDialogflowV2beta1DialogflowAssistAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("intentSuggestion" Core..=) Core.<$> intentSuggestion,
            ("queryResult" Core..=) Core.<$> queryResult
          ]
      )

-- | A customer-managed encryption key specification that can be applied to all created resources (e.g. Conversation).
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1EncryptionSpec' smart constructor.
data GoogleCloudDialogflowV2beta1EncryptionSpec = GoogleCloudDialogflowV2beta1EncryptionSpec
  { -- | Required. The name of customer-managed encryption key that is used to secure a resource and its sub-resources. If empty, the resource is secured by the default Google encryption key. Only the key in the same location as this resource is allowed to be used for encryption. Format: @projects\/{project}\/locations\/{location}\/keyRings\/{keyRing}\/cryptoKeys\/{key}@
    kmsKey :: (Core.Maybe Core.Text),
    -- | Immutable. The resource name of the encryption key specification resource. Format: projects\/{project}\/locations\/{location}\/encryptionSpec
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1EncryptionSpec' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1EncryptionSpec ::
  GoogleCloudDialogflowV2beta1EncryptionSpec
newGoogleCloudDialogflowV2beta1EncryptionSpec =
  GoogleCloudDialogflowV2beta1EncryptionSpec
    { kmsKey = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1EncryptionSpec where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1EncryptionSpec"
      ( \o ->
          GoogleCloudDialogflowV2beta1EncryptionSpec
            Core.<$> (o Core..:? "kmsKey")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1EncryptionSpec where
  toJSON GoogleCloudDialogflowV2beta1EncryptionSpec {..} =
    Core.object
      ( Core.catMaybes
          [ ("kmsKey" Core..=) Core.<$> kmsKey,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Each intent parameter has a type, called the entity type, which dictates exactly how data from an end-user expression is extracted. Dialogflow provides predefined system entities that can match many common types of data. For example, there are system entities for matching dates, times, colors, email addresses, and so on. You can also create your own custom entities for matching custom data. For example, you could define a vegetable entity that can match the types of vegetables available for purchase with a grocery store agent. For more information, see the <https://cloud.google.com/dialogflow/docs/entities-overview Entity guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1EntityType' smart constructor.
data GoogleCloudDialogflowV2beta1EntityType = GoogleCloudDialogflowV2beta1EntityType
  { -- | Optional. Indicates whether the entity type can be automatically expanded.
    autoExpansionMode ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1EntityType_AutoExpansionMode
      ),
    -- | Required. The name of the entity type.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. Enables fuzzy entity extraction during classification.
    enableFuzzyExtraction :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of entity entries associated with the entity type.
    entities :: (Core.Maybe [GoogleCloudDialogflowV2beta1EntityTypeEntity]),
    -- | Required. Indicates the kind of entity type.
    kind :: (Core.Maybe GoogleCloudDialogflowV2beta1EntityType_Kind),
    -- | The unique identifier of the entity type. Required for EntityTypes.UpdateEntityType and EntityTypes.BatchUpdateEntityTypes methods. Supported formats: - @projects\/\/agent\/entityTypes\/@ - @projects\/\/locations\/\/agent\/entityTypes\/@
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1EntityType' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1EntityType ::
  GoogleCloudDialogflowV2beta1EntityType
newGoogleCloudDialogflowV2beta1EntityType =
  GoogleCloudDialogflowV2beta1EntityType
    { autoExpansionMode =
        Core.Nothing,
      displayName = Core.Nothing,
      enableFuzzyExtraction = Core.Nothing,
      entities = Core.Nothing,
      kind = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1EntityType where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1EntityType"
      ( \o ->
          GoogleCloudDialogflowV2beta1EntityType
            Core.<$> (o Core..:? "autoExpansionMode")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "enableFuzzyExtraction")
            Core.<*> (o Core..:? "entities")
            Core.<*> (o Core..:? "kind")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1EntityType where
  toJSON GoogleCloudDialogflowV2beta1EntityType {..} =
    Core.object
      ( Core.catMaybes
          [ ("autoExpansionMode" Core..=) Core.<$> autoExpansionMode,
            ("displayName" Core..=) Core.<$> displayName,
            ("enableFuzzyExtraction" Core..=) Core.<$> enableFuzzyExtraction,
            ("entities" Core..=) Core.<$> entities,
            ("kind" Core..=) Core.<$> kind,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | An __entity entry__ for an associated entity type.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1EntityTypeEntity' smart constructor.
data GoogleCloudDialogflowV2beta1EntityTypeEntity = GoogleCloudDialogflowV2beta1EntityTypeEntity
  { -- | Required. A collection of value synonyms. For example, if the entity type is /vegetable/, and @value@ is /scallions/, a synonym could be /green onions/. For @KIND_LIST@ entity types: * This collection must contain exactly one synonym equal to @value@.
    synonyms :: (Core.Maybe [Core.Text]),
    -- | Required. The primary value associated with this entity entry. For example, if the entity type is /vegetable/, the value could be /scallions/. For @KIND_MAP@ entity types: * A reference value to be used in place of synonyms. For @KIND_LIST@ entity types: * A string that can contain references to other entity types (with or without aliases).
    value :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1EntityTypeEntity' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1EntityTypeEntity ::
  GoogleCloudDialogflowV2beta1EntityTypeEntity
newGoogleCloudDialogflowV2beta1EntityTypeEntity =
  GoogleCloudDialogflowV2beta1EntityTypeEntity
    { synonyms =
        Core.Nothing,
      value = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1EntityTypeEntity where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1EntityTypeEntity"
      ( \o ->
          GoogleCloudDialogflowV2beta1EntityTypeEntity
            Core.<$> (o Core..:? "synonyms")
            Core.<*> (o Core..:? "value")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1EntityTypeEntity where
  toJSON GoogleCloudDialogflowV2beta1EntityTypeEntity {..} =
    Core.object
      ( Core.catMaybes
          [ ("synonyms" Core..=) Core.<$> synonyms,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | Events allow for matching intents by event name instead of the natural language input. For instance, input \`@can trigger a personalized welcome response. The parameter@name@may be used by the agent in the response:@\"Hello #welcome_event.name! What can I do for you today?\"\`.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1EventInput' smart constructor.
data GoogleCloudDialogflowV2beta1EventInput = GoogleCloudDialogflowV2beta1EventInput
  { -- | Required. The language of this query. See <https://cloud.google.com/dialogflow/docs/reference/language Language Support> for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language. This field is ignored when used in the context of a WebhookResponse.followup/event/input field, because the language was already defined in the originating detect intent request.
    languageCode :: (Core.Maybe Core.Text),
    -- | Required. The unique identifier of the event.
    name :: (Core.Maybe Core.Text),
    -- | The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowV2beta1EventInput_Parameters)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1EventInput' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1EventInput ::
  GoogleCloudDialogflowV2beta1EventInput
newGoogleCloudDialogflowV2beta1EventInput =
  GoogleCloudDialogflowV2beta1EventInput
    { languageCode =
        Core.Nothing,
      name = Core.Nothing,
      parameters = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1EventInput where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1EventInput"
      ( \o ->
          GoogleCloudDialogflowV2beta1EventInput
            Core.<$> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "parameters")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1EventInput where
  toJSON GoogleCloudDialogflowV2beta1EventInput {..} =
    Core.object
      ( Core.catMaybes
          [ ("languageCode" Core..=) Core.<$> languageCode,
            ("name" Core..=) Core.<$> name,
            ("parameters" Core..=) Core.<$> parameters
          ]
      )

-- | The collection of parameters associated with the event. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1EventInput_Parameters' smart constructor.
newtype GoogleCloudDialogflowV2beta1EventInput_Parameters = GoogleCloudDialogflowV2beta1EventInput_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1EventInput_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1EventInput_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1EventInput_Parameters
newGoogleCloudDialogflowV2beta1EventInput_Parameters additional =
  GoogleCloudDialogflowV2beta1EventInput_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1EventInput_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1EventInput_Parameters"
      ( \o ->
          GoogleCloudDialogflowV2beta1EventInput_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1EventInput_Parameters
  where
  toJSON GoogleCloudDialogflowV2beta1EventInput_Parameters {..} =
    Core.toJSON additional

-- | The response message for Agents.ExportAgent.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ExportAgentResponse' smart constructor.
data GoogleCloudDialogflowV2beta1ExportAgentResponse = GoogleCloudDialogflowV2beta1ExportAgentResponse
  { -- | Zip compressed raw byte content for agent.
    agentContent :: (Core.Maybe Core.Base64),
    -- | The URI to a file containing the exported agent. This field is populated only if @agent_uri@ is specified in @ExportAgentRequest@.
    agentUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ExportAgentResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ExportAgentResponse ::
  GoogleCloudDialogflowV2beta1ExportAgentResponse
newGoogleCloudDialogflowV2beta1ExportAgentResponse =
  GoogleCloudDialogflowV2beta1ExportAgentResponse
    { agentContent =
        Core.Nothing,
      agentUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ExportAgentResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ExportAgentResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1ExportAgentResponse
            Core.<$> (o Core..:? "agentContent")
            Core.<*> (o Core..:? "agentUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ExportAgentResponse
  where
  toJSON GoogleCloudDialogflowV2beta1ExportAgentResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentContent" Core..=) Core.<$> agentContent,
            ("agentUri" Core..=) Core.<$> agentUri
          ]
      )

-- | Metadata related to the Export Data Operations (e.g. ExportDocument).
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ExportOperationMetadata' smart constructor.
newtype GoogleCloudDialogflowV2beta1ExportOperationMetadata = GoogleCloudDialogflowV2beta1ExportOperationMetadata
  { -- | Cloud Storage file path of the exported data.
    exportedGcsDestination :: (Core.Maybe GoogleCloudDialogflowV2beta1GcsDestination)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ExportOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ExportOperationMetadata ::
  GoogleCloudDialogflowV2beta1ExportOperationMetadata
newGoogleCloudDialogflowV2beta1ExportOperationMetadata =
  GoogleCloudDialogflowV2beta1ExportOperationMetadata
    { exportedGcsDestination =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ExportOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ExportOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1ExportOperationMetadata
            Core.<$> (o Core..:? "exportedGcsDestination")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ExportOperationMetadata
  where
  toJSON GoogleCloudDialogflowV2beta1ExportOperationMetadata {..} =
    Core.object
      ( Core.catMaybes
          [ ("exportedGcsDestination" Core..=)
              Core.<$> exportedGcsDestination
          ]
      )

-- | Represents answer from \"frequently asked questions\".
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1FaqAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1FaqAnswer = GoogleCloudDialogflowV2beta1FaqAnswer
  { -- | The piece of text from the @source@ knowledge base document.
    answer :: (Core.Maybe Core.Text),
    -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | The system\'s confidence score that this Knowledge answer is a good match for this conversational query, range from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | A map that contains metadata about the answer and the document from which it originates.
    metadata :: (Core.Maybe GoogleCloudDialogflowV2beta1FaqAnswer_Metadata),
    -- | The corresponding FAQ question.
    question :: (Core.Maybe Core.Text),
    -- | Indicates which Knowledge Document this answer was extracted from. Format: @projects\/\/locations\/\/agent\/knowledgeBases\/\/documents\/@.
    source :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1FaqAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1FaqAnswer ::
  GoogleCloudDialogflowV2beta1FaqAnswer
newGoogleCloudDialogflowV2beta1FaqAnswer =
  GoogleCloudDialogflowV2beta1FaqAnswer
    { answer = Core.Nothing,
      answerRecord = Core.Nothing,
      confidence = Core.Nothing,
      metadata = Core.Nothing,
      question = Core.Nothing,
      source = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1FaqAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1FaqAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1FaqAnswer
            Core.<$> (o Core..:? "answer")
            Core.<*> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "confidence")
            Core.<*> (o Core..:? "metadata")
            Core.<*> (o Core..:? "question")
            Core.<*> (o Core..:? "source")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1FaqAnswer where
  toJSON GoogleCloudDialogflowV2beta1FaqAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answer" Core..=) Core.<$> answer,
            ("answerRecord" Core..=) Core.<$> answerRecord,
            ("confidence" Core..=) Core.<$> confidence,
            ("metadata" Core..=) Core.<$> metadata,
            ("question" Core..=) Core.<$> question,
            ("source" Core..=) Core.<$> source
          ]
      )

-- | A map that contains metadata about the answer and the document from which it originates.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1FaqAnswer_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2beta1FaqAnswer_Metadata = GoogleCloudDialogflowV2beta1FaqAnswer_Metadata
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1FaqAnswer_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1FaqAnswer_Metadata ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudDialogflowV2beta1FaqAnswer_Metadata
newGoogleCloudDialogflowV2beta1FaqAnswer_Metadata additional =
  GoogleCloudDialogflowV2beta1FaqAnswer_Metadata
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1FaqAnswer_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1FaqAnswer_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1FaqAnswer_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1FaqAnswer_Metadata where
  toJSON GoogleCloudDialogflowV2beta1FaqAnswer_Metadata {..} =
    Core.toJSON additional

-- | Google Cloud Storage location for the output.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1GcsDestination' smart constructor.
newtype GoogleCloudDialogflowV2beta1GcsDestination = GoogleCloudDialogflowV2beta1GcsDestination
  { -- | Required. The Google Cloud Storage URIs for the output. A URI is of the form: @gs:\/\/bucket\/object-prefix-or-name@ Whether a prefix or name is used depends on the use case. The requesting user must have \"write-permission\" to the bucket.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1GcsDestination' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1GcsDestination ::
  GoogleCloudDialogflowV2beta1GcsDestination
newGoogleCloudDialogflowV2beta1GcsDestination =
  GoogleCloudDialogflowV2beta1GcsDestination {uri = Core.Nothing}

instance Core.FromJSON GoogleCloudDialogflowV2beta1GcsDestination where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1GcsDestination"
      ( \o ->
          GoogleCloudDialogflowV2beta1GcsDestination
            Core.<$> (o Core..:? "uri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1GcsDestination where
  toJSON GoogleCloudDialogflowV2beta1GcsDestination {..} =
    Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Output only. Represents a notification sent to Pub\/Sub subscribers for agent assistant events in a specific conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1HumanAgentAssistantEvent' smart constructor.
data GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent = GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
  { -- | The conversation this notification refers to. Format: @projects\/\/conversations\/@.
    conversation :: (Core.Maybe Core.Text),
    -- | The participant that the suggestion is compiled for. And This field is used to call Participants.ListSuggestions API. Format: @projects\/\/conversations\/\/participants\/@. It will not be set in legacy workflow. HumanAgentAssistantConfig.name for more information.
    participant :: (Core.Maybe Core.Text),
    -- | The suggestion results payload that this notification refers to. It will only be set when HumanAgentAssistantConfig.SuggestionConfig.group/suggestion/responses sets to true.
    suggestionResults :: (Core.Maybe [GoogleCloudDialogflowV2beta1SuggestionResult])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1HumanAgentAssistantEvent ::
  GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
newGoogleCloudDialogflowV2beta1HumanAgentAssistantEvent =
  GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
    { conversation =
        Core.Nothing,
      participant = Core.Nothing,
      suggestionResults = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent"
      ( \o ->
          GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
            Core.<$> (o Core..:? "conversation")
            Core.<*> (o Core..:? "participant")
            Core.<*> (o Core..:? "suggestionResults")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent
  where
  toJSON GoogleCloudDialogflowV2beta1HumanAgentAssistantEvent {..} =
    Core.object
      ( Core.catMaybes
          [ ("conversation" Core..=) Core.<$> conversation,
            ("participant" Core..=) Core.<$> participant,
            ("suggestionResults" Core..=) Core.<$> suggestionResults
          ]
      )

-- | Response message for Documents.ImportDocuments.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ImportDocumentsResponse' smart constructor.
newtype GoogleCloudDialogflowV2beta1ImportDocumentsResponse = GoogleCloudDialogflowV2beta1ImportDocumentsResponse
  { -- | Includes details about skipped documents or any other warnings.
    warnings :: (Core.Maybe [GoogleRpcStatus])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ImportDocumentsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ImportDocumentsResponse ::
  GoogleCloudDialogflowV2beta1ImportDocumentsResponse
newGoogleCloudDialogflowV2beta1ImportDocumentsResponse =
  GoogleCloudDialogflowV2beta1ImportDocumentsResponse
    { warnings =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ImportDocumentsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ImportDocumentsResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1ImportDocumentsResponse
            Core.<$> (o Core..:? "warnings")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ImportDocumentsResponse
  where
  toJSON GoogleCloudDialogflowV2beta1ImportDocumentsResponse {..} =
    Core.object
      (Core.catMaybes [("warnings" Core..=) Core.<$> warnings])

-- | Metadata for initializing a location-level encryption specification.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata' smart constructor.
newtype GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata = GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
  { -- | Output only. The original request for initialization.
    request' ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata ::
  GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata =
  GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
    { request' =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
            Core.<$> (o Core..:? "request")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata
  where
  toJSON
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecMetadata {..} =
      Core.object
        (Core.catMaybes [("request" Core..=) Core.<$> request'])

-- | The request to initialize a location-level encryption specification.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest' smart constructor.
newtype GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest = GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
  { -- | Required. The encryption spec used for CMEK encryption. It is required that the kms key is in the same region as the endpoint. The same key will be used for all provisioned resources, if encryption is available. If the kms/key/name is left empty, no encryption will be enforced.
    encryptionSpec :: (Core.Maybe GoogleCloudDialogflowV2beta1EncryptionSpec)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest ::
  GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
newGoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest =
  GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
    { encryptionSpec =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest"
      ( \o ->
          GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
            Core.<$> (o Core..:? "encryptionSpec")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest
  where
  toJSON
    GoogleCloudDialogflowV2beta1InitializeEncryptionSpecRequest {..} =
      Core.object
        ( Core.catMaybes
            [("encryptionSpec" Core..=) Core.<$> encryptionSpec]
        )

-- | An intent categorizes an end-user\'s intention for one conversation turn. For each agent, you define many intents, where your combined intents can handle a complete conversation. When an end-user writes or says something, referred to as an end-user expression or end-user input, Dialogflow matches the end-user input to the best intent in your agent. Matching an intent is also known as intent classification. For more information, see the <https://cloud.google.com/dialogflow/docs/intents-overview intent guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1Intent' smart constructor.
data GoogleCloudDialogflowV2beta1Intent = GoogleCloudDialogflowV2beta1Intent
  { -- | Optional. The name of the action associated with the intent. Note: The action name must not contain whitespaces.
    action :: (Core.Maybe Core.Text),
    -- | Optional. The list of platforms for which the first responses will be copied from the messages in PLATFORM_UNSPECIFIED (i.e. default platform).
    defaultResponsePlatforms ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1Intent_DefaultResponsePlatformsItem]
      ),
    -- | Required. The name of this intent.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.
    endInteraction :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of event names that trigger the intent. If the collection of input contexts is not empty, all of the contexts must be present in the active user session for an event to trigger this intent. Event names are limited to 150 characters.
    events :: (Core.Maybe [Core.Text]),
    -- | Output only. Information about all followup intents that have this intent as a direct or indirect parent. We populate this field only in the output.
    followupIntentInfo :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo]),
    -- | Optional. The list of context names required for this intent to be triggered. Formats: - @projects\/\/agent\/sessions\/-\/contexts\/@ - @projects\/\/locations\/\/agent\/sessions\/-\/contexts\/@
    inputContextNames :: (Core.Maybe [Core.Text]),
    -- | Optional. Indicates whether this is a fallback intent.
    isFallback :: (Core.Maybe Core.Bool),
    -- | Optional. Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.
    liveAgentHandoff :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of rich messages corresponding to the @Response@ field in the Dialogflow console.
    messages :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentMessage]),
    -- | Optional. Indicates whether Machine Learning is disabled for the intent. Note: If @ml_disabled@ setting is set to true, then this intent is not taken into account during inference in @ML ONLY@ match mode. Also, auto-markup in the UI is turned off.
    mlDisabled :: (Core.Maybe Core.Bool),
    -- | Optional. Indicates whether Machine Learning is enabled for the intent. Note: If @ml_enabled@ setting is set to false, then this intent is not taken into account during inference in @ML ONLY@ match mode. Also, auto-markup in the UI is turned off. DEPRECATED! Please use @ml_disabled@ field instead. NOTE: If both @ml_enabled@ and @ml_disabled@ are either not set or false, then the default value is determined as follows: - Before April 15th, 2018 the default is: ml/enabled = false \/ ml/disabled = true. - After April 15th, 2018 the default is: ml/enabled = true \/ ml/disabled = false.
    mlEnabled :: (Core.Maybe Core.Bool),
    -- | Optional. The unique identifier of this intent. Required for Intents.UpdateIntent and Intents.BatchUpdateIntents methods. Supported formats: - @projects\/\/agent\/intents\/@ - @projects\/\/locations\/\/agent\/intents\/@
    name :: (Core.Maybe Core.Text),
    -- | Optional. The collection of contexts that are activated when the intent is matched. Context messages in this collection should not set the parameters field. Setting the @lifespan_count@ to 0 will reset the context when the intent is matched. Format: @projects\/\/agent\/sessions\/-\/contexts\/@.
    outputContexts :: (Core.Maybe [GoogleCloudDialogflowV2beta1Context]),
    -- | Optional. The collection of parameters associated with the intent.
    parameters :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentParameter]),
    -- | Optional. The unique identifier of the parent intent in the chain of followup intents. You can set this field when creating an intent, for example with CreateIntent or BatchUpdateIntents, in order to make this intent a followup intent. It identifies the parent followup intent. Format: @projects\/\/agent\/intents\/@.
    parentFollowupIntentName :: (Core.Maybe Core.Text),
    -- | Optional. The priority of this intent. Higher numbers represent higher priorities. - If the supplied value is unspecified or 0, the service translates the value to 500,000, which corresponds to the @Normal@ priority in the console. - If the supplied value is negative, the intent is ignored in runtime detect intent requests.
    priority :: (Core.Maybe Core.Int32),
    -- | Optional. Indicates whether to delete all contexts in the current session when this intent is matched.
    resetContexts :: (Core.Maybe Core.Bool),
    -- | Output only. The unique identifier of the root intent in the chain of followup intents. It identifies the correct followup intents chain for this intent. Format: @projects\/\/agent\/intents\/@.
    rootFollowupIntentName :: (Core.Maybe Core.Text),
    -- | Optional. The collection of examples that the agent is trained on.
    trainingPhrases :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentTrainingPhrase]),
    -- | Optional. Indicates whether webhooks are enabled for the intent.
    webhookState :: (Core.Maybe GoogleCloudDialogflowV2beta1Intent_WebhookState)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1Intent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1Intent ::
  GoogleCloudDialogflowV2beta1Intent
newGoogleCloudDialogflowV2beta1Intent =
  GoogleCloudDialogflowV2beta1Intent
    { action = Core.Nothing,
      defaultResponsePlatforms = Core.Nothing,
      displayName = Core.Nothing,
      endInteraction = Core.Nothing,
      events = Core.Nothing,
      followupIntentInfo = Core.Nothing,
      inputContextNames = Core.Nothing,
      isFallback = Core.Nothing,
      liveAgentHandoff = Core.Nothing,
      messages = Core.Nothing,
      mlDisabled = Core.Nothing,
      mlEnabled = Core.Nothing,
      name = Core.Nothing,
      outputContexts = Core.Nothing,
      parameters = Core.Nothing,
      parentFollowupIntentName = Core.Nothing,
      priority = Core.Nothing,
      resetContexts = Core.Nothing,
      rootFollowupIntentName = Core.Nothing,
      trainingPhrases = Core.Nothing,
      webhookState = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1Intent where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1Intent"
      ( \o ->
          GoogleCloudDialogflowV2beta1Intent
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "defaultResponsePlatforms")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "endInteraction")
            Core.<*> (o Core..:? "events")
            Core.<*> (o Core..:? "followupIntentInfo")
            Core.<*> (o Core..:? "inputContextNames")
            Core.<*> (o Core..:? "isFallback")
            Core.<*> (o Core..:? "liveAgentHandoff")
            Core.<*> (o Core..:? "messages")
            Core.<*> (o Core..:? "mlDisabled")
            Core.<*> (o Core..:? "mlEnabled")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "outputContexts")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "parentFollowupIntentName")
            Core.<*> (o Core..:? "priority")
            Core.<*> (o Core..:? "resetContexts")
            Core.<*> (o Core..:? "rootFollowupIntentName")
            Core.<*> (o Core..:? "trainingPhrases")
            Core.<*> (o Core..:? "webhookState")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1Intent where
  toJSON GoogleCloudDialogflowV2beta1Intent {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("defaultResponsePlatforms" Core..=)
              Core.<$> defaultResponsePlatforms,
            ("displayName" Core..=) Core.<$> displayName,
            ("endInteraction" Core..=) Core.<$> endInteraction,
            ("events" Core..=) Core.<$> events,
            ("followupIntentInfo" Core..=) Core.<$> followupIntentInfo,
            ("inputContextNames" Core..=) Core.<$> inputContextNames,
            ("isFallback" Core..=) Core.<$> isFallback,
            ("liveAgentHandoff" Core..=) Core.<$> liveAgentHandoff,
            ("messages" Core..=) Core.<$> messages,
            ("mlDisabled" Core..=) Core.<$> mlDisabled,
            ("mlEnabled" Core..=) Core.<$> mlEnabled,
            ("name" Core..=) Core.<$> name,
            ("outputContexts" Core..=) Core.<$> outputContexts,
            ("parameters" Core..=) Core.<$> parameters,
            ("parentFollowupIntentName" Core..=)
              Core.<$> parentFollowupIntentName,
            ("priority" Core..=) Core.<$> priority,
            ("resetContexts" Core..=) Core.<$> resetContexts,
            ("rootFollowupIntentName" Core..=) Core.<$> rootFollowupIntentName,
            ("trainingPhrases" Core..=) Core.<$> trainingPhrases,
            ("webhookState" Core..=) Core.<$> webhookState
          ]
      )

-- | Represents a single followup intent in the chain.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo' smart constructor.
data GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo = GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
  { -- | The unique identifier of the followup intent. Format: @projects\/\/agent\/intents\/@.
    followupIntentName :: (Core.Maybe Core.Text),
    -- | The unique identifier of the followup intent\'s parent. Format: @projects\/\/agent\/intents\/@.
    parentFollowupIntentName :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo ::
  GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
newGoogleCloudDialogflowV2beta1IntentFollowupIntentInfo =
  GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
    { followupIntentName =
        Core.Nothing,
      parentFollowupIntentName = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
            Core.<$> (o Core..:? "followupIntentName")
            Core.<*> (o Core..:? "parentFollowupIntentName")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo
  where
  toJSON GoogleCloudDialogflowV2beta1IntentFollowupIntentInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("followupIntentName" Core..=) Core.<$> followupIntentName,
            ("parentFollowupIntentName" Core..=)
              Core.<$> parentFollowupIntentName
          ]
      )

-- | Corresponds to the @Response@ field in the Dialogflow console.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessage' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessage = GoogleCloudDialogflowV2beta1IntentMessage
  { -- | Displays a basic card for Actions on Google.
    basicCard :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageBasicCard),
    -- | Browse carousel card for Actions on Google.
    browseCarouselCard ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
      ),
    -- | Displays a card.
    card :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageCard),
    -- | Displays a carousel card for Actions on Google.
    carouselSelect ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
      ),
    -- | Displays an image.
    image :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Displays a link out suggestion chip for Actions on Google.
    linkOutSuggestion ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
      ),
    -- | Displays a list card for Actions on Google.
    listSelect :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageListSelect),
    -- | The media content card for Actions on Google.
    mediaContent :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageMediaContent),
    -- | A custom platform-specific response.
    payload :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessage_Payload),
    -- | Optional. The platform that this message is intended for.
    platform :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessage_Platform),
    -- | Displays quick replies.
    quickReplies :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageQuickReplies),
    -- | Rich Business Messaging (RBM) carousel rich card response.
    rbmCarouselRichCard ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
      ),
    -- | Standalone Rich Business Messaging (RBM) rich card response.
    rbmStandaloneRichCard ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
      ),
    -- | Rich Business Messaging (RBM) text response. RBM allows businesses to send enriched and branded versions of SMS. See https:\/\/jibe.google.com\/business-messaging.
    rbmText :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageRbmText),
    -- | Returns a voice or text-only response for Actions on Google.
    simpleResponses ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
      ),
    -- | Displays suggestion chips for Actions on Google.
    suggestions :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageSuggestions),
    -- | Table card for Actions on Google.
    tableCard :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageTableCard),
    -- | Plays audio from a file in Telephony Gateway.
    telephonyPlayAudio ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
      ),
    -- | Synthesizes speech in Telephony Gateway.
    telephonySynthesizeSpeech ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
      ),
    -- | Transfers the call in Telephony Gateway.
    telephonyTransferCall ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
      ),
    -- | Returns a text response.
    text :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageText)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessage' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessage ::
  GoogleCloudDialogflowV2beta1IntentMessage
newGoogleCloudDialogflowV2beta1IntentMessage =
  GoogleCloudDialogflowV2beta1IntentMessage
    { basicCard =
        Core.Nothing,
      browseCarouselCard = Core.Nothing,
      card = Core.Nothing,
      carouselSelect = Core.Nothing,
      image = Core.Nothing,
      linkOutSuggestion = Core.Nothing,
      listSelect = Core.Nothing,
      mediaContent = Core.Nothing,
      payload = Core.Nothing,
      platform = Core.Nothing,
      quickReplies = Core.Nothing,
      rbmCarouselRichCard = Core.Nothing,
      rbmStandaloneRichCard = Core.Nothing,
      rbmText = Core.Nothing,
      simpleResponses = Core.Nothing,
      suggestions = Core.Nothing,
      tableCard = Core.Nothing,
      telephonyPlayAudio = Core.Nothing,
      telephonySynthesizeSpeech = Core.Nothing,
      telephonyTransferCall = Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1IntentMessage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessage"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessage
            Core.<$> (o Core..:? "basicCard")
            Core.<*> (o Core..:? "browseCarouselCard")
            Core.<*> (o Core..:? "card")
            Core.<*> (o Core..:? "carouselSelect")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "linkOutSuggestion")
            Core.<*> (o Core..:? "listSelect")
            Core.<*> (o Core..:? "mediaContent")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "platform")
            Core.<*> (o Core..:? "quickReplies")
            Core.<*> (o Core..:? "rbmCarouselRichCard")
            Core.<*> (o Core..:? "rbmStandaloneRichCard")
            Core.<*> (o Core..:? "rbmText")
            Core.<*> (o Core..:? "simpleResponses")
            Core.<*> (o Core..:? "suggestions")
            Core.<*> (o Core..:? "tableCard")
            Core.<*> (o Core..:? "telephonyPlayAudio")
            Core.<*> (o Core..:? "telephonySynthesizeSpeech")
            Core.<*> (o Core..:? "telephonyTransferCall")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1IntentMessage where
  toJSON GoogleCloudDialogflowV2beta1IntentMessage {..} =
    Core.object
      ( Core.catMaybes
          [ ("basicCard" Core..=) Core.<$> basicCard,
            ("browseCarouselCard" Core..=) Core.<$> browseCarouselCard,
            ("card" Core..=) Core.<$> card,
            ("carouselSelect" Core..=) Core.<$> carouselSelect,
            ("image" Core..=) Core.<$> image,
            ("linkOutSuggestion" Core..=) Core.<$> linkOutSuggestion,
            ("listSelect" Core..=) Core.<$> listSelect,
            ("mediaContent" Core..=) Core.<$> mediaContent,
            ("payload" Core..=) Core.<$> payload,
            ("platform" Core..=) Core.<$> platform,
            ("quickReplies" Core..=) Core.<$> quickReplies,
            ("rbmCarouselRichCard" Core..=) Core.<$> rbmCarouselRichCard,
            ("rbmStandaloneRichCard" Core..=) Core.<$> rbmStandaloneRichCard,
            ("rbmText" Core..=) Core.<$> rbmText,
            ("simpleResponses" Core..=) Core.<$> simpleResponses,
            ("suggestions" Core..=) Core.<$> suggestions,
            ("tableCard" Core..=) Core.<$> tableCard,
            ("telephonyPlayAudio" Core..=) Core.<$> telephonyPlayAudio,
            ("telephonySynthesizeSpeech" Core..=)
              Core.<$> telephonySynthesizeSpeech,
            ("telephonyTransferCall" Core..=) Core.<$> telephonyTransferCall,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | A custom platform-specific response.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessage_Payload' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessage_Payload = GoogleCloudDialogflowV2beta1IntentMessage_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessage_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessage_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1IntentMessage_Payload
newGoogleCloudDialogflowV2beta1IntentMessage_Payload additional =
  GoogleCloudDialogflowV2beta1IntentMessage_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessage_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessage_Payload"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessage_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessage_Payload
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessage_Payload {..} =
    Core.toJSON additional

-- | The basic card message. Useful for displaying information.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageBasicCard' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageBasicCard = GoogleCloudDialogflowV2beta1IntentMessageBasicCard
  { -- | Optional. The collection of card buttons.
    buttons ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton]
      ),
    -- | Required, unless image is present. The body text of the card.
    formattedText :: (Core.Maybe Core.Text),
    -- | Optional. The image for the card.
    image :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Optional. The subtitle of the card.
    subtitle :: (Core.Maybe Core.Text),
    -- | Optional. The title of the card.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageBasicCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageBasicCard ::
  GoogleCloudDialogflowV2beta1IntentMessageBasicCard
newGoogleCloudDialogflowV2beta1IntentMessageBasicCard =
  GoogleCloudDialogflowV2beta1IntentMessageBasicCard
    { buttons =
        Core.Nothing,
      formattedText = Core.Nothing,
      image = Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageBasicCard"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageBasicCard
            Core.<$> (o Core..:? "buttons")
            Core.<*> (o Core..:? "formattedText")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCard
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageBasicCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("buttons" Core..=) Core.<$> buttons,
            ("formattedText" Core..=) Core.<$> formattedText,
            ("image" Core..=) Core.<$> image,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | The button object that appears at the bottom of a card.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton = GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
  { -- | Required. Action to take when a user taps on the button.
    openUriAction ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
      ),
    -- | Required. The title of the button.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton ::
  GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButton =
  GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
    { openUriAction =
        Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
            Core.<$> (o Core..:? "openUriAction")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton {..} =
    Core.object
      ( Core.catMaybes
          [ ("openUriAction" Core..=) Core.<$> openUriAction,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Opens the given URI.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction = GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
  { -- | Required. The HTTP or HTTPS scheme URI.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction ::
  GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
newGoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction =
  GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
    { uri =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
            Core.<$> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageBasicCardButtonOpenUriAction {..} =
      Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Browse Carousel Card for Actions on Google. https:\/\/developers.google.com\/actions\/assistant\/responses#browsing_carousel
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard = GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
  { -- | Optional. Settings for displaying the image. Applies to every image in items.
    imageDisplayOptions ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard_ImageDisplayOptions
      ),
    -- | Required. List of items in the Browse Carousel Card. Minimum of two items, maximum of ten.
    items ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard ::
  GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard =
  GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
    { imageDisplayOptions =
        Core.Nothing,
      items = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
            Core.<$> (o Core..:? "imageDisplayOptions")
            Core.<*> (o Core..:? "items")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCard {..} =
      Core.object
        ( Core.catMaybes
            [ ("imageDisplayOptions" Core..=) Core.<$> imageDisplayOptions,
              ("items" Core..=) Core.<$> items
            ]
        )

-- | Browsing carousel tile
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem = GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
  { -- | Optional. Description of the carousel item. Maximum of four lines of text.
    description :: (Core.Maybe Core.Text),
    -- | Optional. Text that appears at the bottom of the Browse Carousel Card. Maximum of one line of text.
    footer :: (Core.Maybe Core.Text),
    -- | Optional. Hero image for the carousel item.
    image :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Required. Action to present to the user.
    openUriAction ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
      ),
    -- | Required. Title of the carousel item. Maximum of two lines of text.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem ::
  GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem =
  GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
    { description =
        Core.Nothing,
      footer =
        Core.Nothing,
      image =
        Core.Nothing,
      openUriAction =
        Core.Nothing,
      title =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "footer")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "openUriAction")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItem {..} =
      Core.object
        ( Core.catMaybes
            [ ("description" Core..=) Core.<$> description,
              ("footer" Core..=) Core.<$> footer,
              ("image" Core..=) Core.<$> image,
              ("openUriAction" Core..=) Core.<$> openUriAction,
              ("title" Core..=) Core.<$> title
            ]
        )

-- | Actions on Google action to open a given url.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction = GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
  { -- | Required. URL
    url :: (Core.Maybe Core.Text),
    -- | Optional. Specifies the type of viewer that is used when opening the URL. Defaults to opening via web browser.
    urlTypeHint ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction_UrlTypeHint
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction ::
  GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
newGoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction =
  GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
    { url =
        Core.Nothing,
      urlTypeHint =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
            Core.<$> (o Core..:? "url")
            Core.<*> (o Core..:? "urlTypeHint")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageBrowseCarouselCardBrowseCarouselCardItemOpenUrlAction {..} =
      Core.object
        ( Core.catMaybes
            [ ("url" Core..=) Core.<$> url,
              ("urlTypeHint" Core..=) Core.<$> urlTypeHint
            ]
        )

-- | The card response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageCard' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageCard = GoogleCloudDialogflowV2beta1IntentMessageCard
  { -- | Optional. The collection of card buttons.
    buttons :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentMessageCardButton]),
    -- | Optional. The public URI to an image file for the card.
    imageUri :: (Core.Maybe Core.Text),
    -- | Optional. The subtitle of the card.
    subtitle :: (Core.Maybe Core.Text),
    -- | Optional. The title of the card.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageCard ::
  GoogleCloudDialogflowV2beta1IntentMessageCard
newGoogleCloudDialogflowV2beta1IntentMessageCard =
  GoogleCloudDialogflowV2beta1IntentMessageCard
    { buttons =
        Core.Nothing,
      imageUri = Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageCard"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageCard
            Core.<$> (o Core..:? "buttons")
            Core.<*> (o Core..:? "imageUri")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1IntentMessageCard where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("buttons" Core..=) Core.<$> buttons,
            ("imageUri" Core..=) Core.<$> imageUri,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Optional. Contains information about a button.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageCardButton' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageCardButton = GoogleCloudDialogflowV2beta1IntentMessageCardButton
  { -- | Optional. The text to send back to the Dialogflow API or a URI to open.
    postback :: (Core.Maybe Core.Text),
    -- | Optional. The text to show on the button.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageCardButton' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageCardButton ::
  GoogleCloudDialogflowV2beta1IntentMessageCardButton
newGoogleCloudDialogflowV2beta1IntentMessageCardButton =
  GoogleCloudDialogflowV2beta1IntentMessageCardButton
    { postback =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageCardButton
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageCardButton"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageCardButton
            Core.<$> (o Core..:? "postback")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageCardButton
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageCardButton {..} =
    Core.object
      ( Core.catMaybes
          [ ("postback" Core..=) Core.<$> postback,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | The card for presenting a carousel of options to select from.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect = GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
  { -- | Required. Carousel items.
    items ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect ::
  GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelect =
  GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
    { items =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
            Core.<$> (o Core..:? "items")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageCarouselSelect {..} =
    Core.object (Core.catMaybes [("items" Core..=) Core.<$> items])

-- | An item in the carousel.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem = GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
  { -- | Optional. The body text of the card.
    description :: (Core.Maybe Core.Text),
    -- | Optional. The image to display.
    image :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Required. Additional info about the option item.
    info ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
      ),
    -- | Required. Title of the carousel item.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem ::
  GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
newGoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem =
  GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
    { description =
        Core.Nothing,
      image = Core.Nothing,
      info = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "info")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageCarouselSelectItem {..} =
      Core.object
        ( Core.catMaybes
            [ ("description" Core..=) Core.<$> description,
              ("image" Core..=) Core.<$> image,
              ("info" Core..=) Core.<$> info,
              ("title" Core..=) Core.<$> title
            ]
        )

-- | Column properties for TableCard.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageColumnProperties' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageColumnProperties = GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
  { -- | Required. Column heading.
    header :: (Core.Maybe Core.Text),
    -- | Optional. Defines text alignment for all cells in this column.
    horizontalAlignment ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageColumnProperties_HorizontalAlignment
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageColumnProperties' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageColumnProperties ::
  GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
newGoogleCloudDialogflowV2beta1IntentMessageColumnProperties =
  GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
    { header =
        Core.Nothing,
      horizontalAlignment = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageColumnProperties"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
            Core.<$> (o Core..:? "header")
            Core.<*> (o Core..:? "horizontalAlignment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageColumnProperties
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageColumnProperties {..} =
      Core.object
        ( Core.catMaybes
            [ ("header" Core..=) Core.<$> header,
              ("horizontalAlignment" Core..=) Core.<$> horizontalAlignment
            ]
        )

-- | The image response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageImage' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageImage = GoogleCloudDialogflowV2beta1IntentMessageImage
  { -- | A text description of the image to be used for accessibility, e.g., screen readers. Required if image_uri is set for CarouselSelect.
    accessibilityText :: (Core.Maybe Core.Text),
    -- | Optional. The public URI to an image file.
    imageUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageImage' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageImage ::
  GoogleCloudDialogflowV2beta1IntentMessageImage
newGoogleCloudDialogflowV2beta1IntentMessageImage =
  GoogleCloudDialogflowV2beta1IntentMessageImage
    { accessibilityText =
        Core.Nothing,
      imageUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageImage
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageImage"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageImage
            Core.<$> (o Core..:? "accessibilityText")
            Core.<*> (o Core..:? "imageUri")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1IntentMessageImage where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageImage {..} =
    Core.object
      ( Core.catMaybes
          [ ("accessibilityText" Core..=) Core.<$> accessibilityText,
            ("imageUri" Core..=) Core.<$> imageUri
          ]
      )

-- | The suggestion chip message that allows the user to jump out to the app or website associated with this agent.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion = GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
  { -- | Required. The name of the app or site this chip is linking to.
    destinationName :: (Core.Maybe Core.Text),
    -- | Required. The URI of the app or site to open when the user taps the suggestion chip.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion ::
  GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
newGoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion =
  GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
    { destinationName =
        Core.Nothing,
      uri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
            Core.<$> (o Core..:? "destinationName")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageLinkOutSuggestion {..} =
      Core.object
        ( Core.catMaybes
            [ ("destinationName" Core..=) Core.<$> destinationName,
              ("uri" Core..=) Core.<$> uri
            ]
        )

-- | The card for presenting a list of options to select from.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageListSelect' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageListSelect = GoogleCloudDialogflowV2beta1IntentMessageListSelect
  { -- | Required. List items.
    items ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageListSelectItem]
      ),
    -- | Optional. Subtitle of the list.
    subtitle :: (Core.Maybe Core.Text),
    -- | Optional. The overall title of the list.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageListSelect' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageListSelect ::
  GoogleCloudDialogflowV2beta1IntentMessageListSelect
newGoogleCloudDialogflowV2beta1IntentMessageListSelect =
  GoogleCloudDialogflowV2beta1IntentMessageListSelect
    { items =
        Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageListSelect
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageListSelect"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageListSelect
            Core.<$> (o Core..:? "items")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageListSelect
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageListSelect {..} =
    Core.object
      ( Core.catMaybes
          [ ("items" Core..=) Core.<$> items,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | An item in the list.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageListSelectItem' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageListSelectItem = GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
  { -- | Optional. The main text describing the item.
    description :: (Core.Maybe Core.Text),
    -- | Optional. The image to display.
    image :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Required. Additional information about this option.
    info ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
      ),
    -- | Required. The title of the list item.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageListSelectItem' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageListSelectItem ::
  GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
newGoogleCloudDialogflowV2beta1IntentMessageListSelectItem =
  GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
    { description =
        Core.Nothing,
      image = Core.Nothing,
      info = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageListSelectItem"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "info")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageListSelectItem
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageListSelectItem {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("image" Core..=) Core.<$> image,
            ("info" Core..=) Core.<$> info,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | The media content card for Actions on Google.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageMediaContent' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageMediaContent = GoogleCloudDialogflowV2beta1IntentMessageMediaContent
  { -- | Required. List of media objects.
    mediaObjects ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject]
      ),
    -- | Optional. What type of media is the content (ie \"audio\").
    mediaType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageMediaContent_MediaType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageMediaContent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageMediaContent ::
  GoogleCloudDialogflowV2beta1IntentMessageMediaContent
newGoogleCloudDialogflowV2beta1IntentMessageMediaContent =
  GoogleCloudDialogflowV2beta1IntentMessageMediaContent
    { mediaObjects =
        Core.Nothing,
      mediaType = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageMediaContent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageMediaContent"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageMediaContent
            Core.<$> (o Core..:? "mediaObjects")
            Core.<*> (o Core..:? "mediaType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageMediaContent
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageMediaContent {..} =
    Core.object
      ( Core.catMaybes
          [ ("mediaObjects" Core..=) Core.<$> mediaObjects,
            ("mediaType" Core..=) Core.<$> mediaType
          ]
      )

-- | Response media object for media content card.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject = GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
  { -- | Required. Url where the media is stored.
    contentUrl :: (Core.Maybe Core.Text),
    -- | Optional. Description of media card.
    description :: (Core.Maybe Core.Text),
    -- | Optional. Icon to display above media content.
    icon :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Optional. Image to display above media content.
    largeImage :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Required. Name of media card.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject ::
  GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
newGoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject =
  GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
    { contentUrl =
        Core.Nothing,
      description =
        Core.Nothing,
      icon = Core.Nothing,
      largeImage =
        Core.Nothing,
      name = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
            Core.<$> (o Core..:? "contentUrl")
            Core.<*> (o Core..:? "description")
            Core.<*> (o Core..:? "icon")
            Core.<*> (o Core..:? "largeImage")
            Core.<*> (o Core..:? "name")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageMediaContentResponseMediaObject {..} =
      Core.object
        ( Core.catMaybes
            [ ("contentUrl" Core..=) Core.<$> contentUrl,
              ("description" Core..=) Core.<$> description,
              ("icon" Core..=) Core.<$> icon,
              ("largeImage" Core..=) Core.<$> largeImage,
              ("name" Core..=) Core.<$> name
            ]
        )

-- | The quick replies response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageQuickReplies' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageQuickReplies = GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
  { -- | Optional. The collection of quick replies.
    quickReplies :: (Core.Maybe [Core.Text]),
    -- | Optional. The title of the collection of quick replies.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageQuickReplies' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageQuickReplies ::
  GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
newGoogleCloudDialogflowV2beta1IntentMessageQuickReplies =
  GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
    { quickReplies =
        Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageQuickReplies"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
            Core.<$> (o Core..:? "quickReplies")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageQuickReplies
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageQuickReplies {..} =
    Core.object
      ( Core.catMaybes
          [ ("quickReplies" Core..=) Core.<$> quickReplies,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Rich Business Messaging (RBM) Card content
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContent' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent = GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
  { -- | Optional. Description of the card (at most 2000 bytes). At least one of the title, description or media must be set.
    description :: (Core.Maybe Core.Text),
    -- | Optional. However at least one of the title, description or media must be set. Media (image, GIF or a video) to include in the card.
    media ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
      ),
    -- | Optional. List of suggestions to include in the card.
    suggestions ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion]
      ),
    -- | Optional. Title of the card (at most 200 bytes). At least one of the title, description or media must be set.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContent ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContent =
  GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
    { description =
        Core.Nothing,
      media = Core.Nothing,
      suggestions = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "media")
            Core.<*> (o Core..:? "suggestions")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("media" Core..=) Core.<$> media,
            ("suggestions" Core..=) Core.<$> suggestions,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Rich Business Messaging (RBM) Media displayed in Cards The following media-types are currently supported: Image Types * image\/jpeg * image\/jpg\' * image\/gif * image\/png Video Types * video\/h263 * video\/m4v * video\/mp4 * video\/mpeg * video\/mpeg4 * video\/webm
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia = GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
  { -- | Required. Publicly reachable URI of the file. The RBM platform determines the MIME type of the file from the content-type field in the HTTP headers when the platform fetches the file. The content-type field must be present and accurate in the HTTP response from the URL.
    fileUri :: (Core.Maybe Core.Text),
    -- | Required for cards with vertical orientation. The height of the media within a rich card with a vertical layout. For a standalone card with horizontal layout, height is not customizable, and this field is ignored.
    height ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia_Height
      ),
    -- | Optional. Publicly reachable URI of the thumbnail.If you don\'t provide a thumbnail URI, the RBM platform displays a blank placeholder thumbnail until the user\'s device downloads the file. Depending on the user\'s setting, the file may not download automatically and may require the user to tap a download button.
    thumbnailUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
newGoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia =
  GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
    { fileUri =
        Core.Nothing,
      height = Core.Nothing,
      thumbnailUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
            Core.<$> (o Core..:? "fileUri")
            Core.<*> (o Core..:? "height")
            Core.<*> (o Core..:? "thumbnailUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCardContentRbmMedia {..} =
      Core.object
        ( Core.catMaybes
            [ ("fileUri" Core..=) Core.<$> fileUri,
              ("height" Core..=) Core.<$> height,
              ("thumbnailUri" Core..=) Core.<$> thumbnailUri
            ]
        )

-- | Carousel Rich Business Messaging (RBM) rich card. Rich cards allow you to respond to users with more vivid content, e.g. with media and suggestions. If you want to show a single card with more control over the layout, please use RbmStandaloneCard instead.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard = GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
  { -- | Required. The cards in the carousel. A carousel must have at least 2 cards and at most 10.
    cardContents ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent]
      ),
    -- | Required. The width of the cards in the carousel.
    cardWidth ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard_CardWidth
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
newGoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard =
  GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
    { cardContents =
        Core.Nothing,
      cardWidth = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
            Core.<$> (o Core..:? "cardContents")
            Core.<*> (o Core..:? "cardWidth")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageRbmCarouselCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("cardContents" Core..=) Core.<$> cardContents,
            ("cardWidth" Core..=) Core.<$> cardWidth
          ]
      )

-- | Standalone Rich Business Messaging (RBM) rich card. Rich cards allow you to respond to users with more vivid content, e.g. with media and suggestions. You can group multiple rich cards into one using RbmCarouselCard but carousel cards will give you less control over the card layout.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard = GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
  { -- | Required. Card content.
    cardContent ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmCardContent
      ),
    -- | Required. Orientation of the card.
    cardOrientation ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard_CardOrientation
      ),
    -- | Required if orientation is horizontal. Image preview alignment for standalone cards with horizontal layout.
    thumbnailImageAlignment ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard_ThumbnailImageAlignment
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
newGoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard =
  GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
    { cardContent =
        Core.Nothing,
      cardOrientation = Core.Nothing,
      thumbnailImageAlignment =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
            Core.<$> (o Core..:? "cardContent")
            Core.<*> (o Core..:? "cardOrientation")
            Core.<*> (o Core..:? "thumbnailImageAlignment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmStandaloneCard {..} =
      Core.object
        ( Core.catMaybes
            [ ("cardContent" Core..=) Core.<$> cardContent,
              ("cardOrientation" Core..=) Core.<$> cardOrientation,
              ("thumbnailImageAlignment" Core..=)
                Core.<$> thumbnailImageAlignment
            ]
        )

-- | Rich Business Messaging (RBM) suggested client-side action that the user can choose from the card.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction = GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
  { -- | Suggested client side action: Dial a phone number
    dial ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
      ),
    -- | Suggested client side action: Open a URI on device
    openUrl ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
      ),
    -- | Opaque payload that the Dialogflow receives in a user event when the user taps the suggested action. This data will be also forwarded to webhook to allow performing custom business logic.
    postbackData :: (Core.Maybe Core.Text),
    -- | Suggested client side action: Share user location
    shareLocation ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
      ),
    -- | Text to display alongside the action.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction =
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
    { dial =
        Core.Nothing,
      openUrl = Core.Nothing,
      postbackData = Core.Nothing,
      shareLocation = Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
            Core.<$> (o Core..:? "dial")
            Core.<*> (o Core..:? "openUrl")
            Core.<*> (o Core..:? "postbackData")
            Core.<*> (o Core..:? "shareLocation")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction {..} =
      Core.object
        ( Core.catMaybes
            [ ("dial" Core..=) Core.<$> dial,
              ("openUrl" Core..=) Core.<$> openUrl,
              ("postbackData" Core..=) Core.<$> postbackData,
              ("shareLocation" Core..=) Core.<$> shareLocation,
              ("text" Core..=) Core.<$> text
            ]
        )

-- | Opens the user\'s default dialer app with the specified phone number but does not dial automatically.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial = GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
  { -- | Required. The phone number to fill in the default dialer app. This field should be in <https://en.wikipedia.org/wiki/E.164 E.164> format. An example of a correctly formatted phone number: +15556767888.
    phoneNumber :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial =
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
    { phoneNumber =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
            Core.<$> (o Core..:? "phoneNumber")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionDial {..} =
      Core.object
        (Core.catMaybes [("phoneNumber" Core..=) Core.<$> phoneNumber])

-- | Opens the user\'s default web browser app to the specified uri If the user has an app installed that is registered as the default handler for the URL, then this app will be opened instead, and its icon will be used in the suggested action UI.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri = GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
  { -- | Required. The uri to open on the user device
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri =
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
    { uri =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
            Core.<$> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionOpenUri {..} =
      Core.object (Core.catMaybes [("uri" Core..=) Core.<$> uri])

-- | Opens the device\'s location chooser so the user can pick a location to send back to the agent.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation = GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation =
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation"
      ( \o ->
          Core.pure
            GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedActionRbmSuggestedActionShareLocation
  where
  toJSON = Core.const Core.emptyObject

-- | Rich Business Messaging (RBM) suggested reply that the user can click instead of typing in their own response.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply = GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
  { -- | Opaque payload that the Dialogflow receives in a user event when the user taps the suggested reply. This data will be also forwarded to webhook to allow performing custom business logic.
    postbackData :: (Core.Maybe Core.Text),
    -- | Suggested reply text.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply =
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
    { postbackData =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
            Core.<$> (o Core..:? "postbackData")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply {..} =
      Core.object
        ( Core.catMaybes
            [ ("postbackData" Core..=) Core.<$> postbackData,
              ("text" Core..=) Core.<$> text
            ]
        )

-- | Rich Business Messaging (RBM) suggestion. Suggestions allow user to easily select\/click a predefined response or perform an action (like opening a web uri).
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion = GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
  { -- | Predefined client side actions that user can choose
    action ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedAction
      ),
    -- | Predefined replies for user to select instead of typing
    reply ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestedReply
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
newGoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion =
  GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
    { action =
        Core.Nothing,
      reply = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "reply")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("reply" Core..=) Core.<$> reply
          ]
      )

-- | Rich Business Messaging (RBM) text response with suggestions.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageRbmText' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageRbmText = GoogleCloudDialogflowV2beta1IntentMessageRbmText
  { -- | Optional. One or more suggestions to show to the user.
    rbmSuggestion ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageRbmSuggestion]
      ),
    -- | Required. Text sent and displayed to the user.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageRbmText' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageRbmText ::
  GoogleCloudDialogflowV2beta1IntentMessageRbmText
newGoogleCloudDialogflowV2beta1IntentMessageRbmText =
  GoogleCloudDialogflowV2beta1IntentMessageRbmText
    { rbmSuggestion =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmText
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageRbmText"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageRbmText
            Core.<$> (o Core..:? "rbmSuggestion")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageRbmText
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageRbmText {..} =
    Core.object
      ( Core.catMaybes
          [ ("rbmSuggestion" Core..=) Core.<$> rbmSuggestion,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Additional info about the select item for when it is triggered in a dialog.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo = GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
  { -- | Required. A unique key that will be sent back to the agent if this response is given.
    key :: (Core.Maybe Core.Text),
    -- | Optional. A list of synonyms that can also be used to trigger this item in dialog.
    synonyms :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo ::
  GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
newGoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo =
  GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
    { key =
        Core.Nothing,
      synonyms = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
            Core.<$> (o Core..:? "key")
            Core.<*> (o Core..:? "synonyms")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageSelectItemInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("key" Core..=) Core.<$> key,
            ("synonyms" Core..=) Core.<$> synonyms
          ]
      )

-- | The simple response message containing speech or text.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse = GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
  { -- | Optional. The text to display.
    displayText :: (Core.Maybe Core.Text),
    -- | One of text/to/speech or ssml must be provided. Structured spoken response to the user in the SSML format. Mutually exclusive with text/to/speech.
    ssml :: (Core.Maybe Core.Text),
    -- | One of text/to/speech or ssml must be provided. The plain text of the speech output. Mutually exclusive with ssml.
    textToSpeech :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse ::
  GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponse =
  GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
    { displayText =
        Core.Nothing,
      ssml = Core.Nothing,
      textToSpeech = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
            Core.<$> (o Core..:? "displayText")
            Core.<*> (o Core..:? "ssml")
            Core.<*> (o Core..:? "textToSpeech")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayText" Core..=) Core.<$> displayText,
            ("ssml" Core..=) Core.<$> ssml,
            ("textToSpeech" Core..=) Core.<$> textToSpeech
          ]
      )

-- | The collection of simple response candidates. This message in @QueryResult.fulfillment_messages@ and @WebhookResponse.fulfillment_messages@ should contain only one @SimpleResponse@.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses = GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
  { -- | Required. The list of simple responses.
    simpleResponses ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageSimpleResponse]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses ::
  GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
newGoogleCloudDialogflowV2beta1IntentMessageSimpleResponses =
  GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
    { simpleResponses =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
            Core.<$> (o Core..:? "simpleResponses")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageSimpleResponses {..} =
    Core.object
      ( Core.catMaybes
          [("simpleResponses" Core..=) Core.<$> simpleResponses]
      )

-- | The suggestion chip message that the user can tap to quickly post a reply to the conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageSuggestion' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageSuggestion = GoogleCloudDialogflowV2beta1IntentMessageSuggestion
  { -- | Required. The text shown the in the suggestion chip.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageSuggestion' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageSuggestion ::
  GoogleCloudDialogflowV2beta1IntentMessageSuggestion
newGoogleCloudDialogflowV2beta1IntentMessageSuggestion =
  GoogleCloudDialogflowV2beta1IntentMessageSuggestion
    { title =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageSuggestion
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageSuggestion"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageSuggestion
            Core.<$> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageSuggestion
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageSuggestion {..} =
    Core.object (Core.catMaybes [("title" Core..=) Core.<$> title])

-- | The collection of suggestions.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageSuggestions' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageSuggestions = GoogleCloudDialogflowV2beta1IntentMessageSuggestions
  { -- | Required. The list of suggested replies.
    suggestions :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentMessageSuggestion])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageSuggestions' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageSuggestions ::
  GoogleCloudDialogflowV2beta1IntentMessageSuggestions
newGoogleCloudDialogflowV2beta1IntentMessageSuggestions =
  GoogleCloudDialogflowV2beta1IntentMessageSuggestions
    { suggestions =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageSuggestions
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageSuggestions"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageSuggestions
            Core.<$> (o Core..:? "suggestions")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageSuggestions
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageSuggestions {..} =
    Core.object
      (Core.catMaybes [("suggestions" Core..=) Core.<$> suggestions])

-- | Table card for Actions on Google.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageTableCard' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageTableCard = GoogleCloudDialogflowV2beta1IntentMessageTableCard
  { -- | Optional. List of buttons for the card.
    buttons ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageBasicCardButton]
      ),
    -- | Optional. Display properties for the columns in this table.
    columnProperties ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageColumnProperties]
      ),
    -- | Optional. Image which should be displayed on the card.
    image :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentMessageImage),
    -- | Optional. Rows in this table of data.
    rows ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageTableCardRow]
      ),
    -- | Optional. Subtitle to the title.
    subtitle :: (Core.Maybe Core.Text),
    -- | Required. Title of the card.
    title :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageTableCard' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageTableCard ::
  GoogleCloudDialogflowV2beta1IntentMessageTableCard
newGoogleCloudDialogflowV2beta1IntentMessageTableCard =
  GoogleCloudDialogflowV2beta1IntentMessageTableCard
    { buttons =
        Core.Nothing,
      columnProperties = Core.Nothing,
      image = Core.Nothing,
      rows = Core.Nothing,
      subtitle = Core.Nothing,
      title = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageTableCard
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageTableCard"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageTableCard
            Core.<$> (o Core..:? "buttons")
            Core.<*> (o Core..:? "columnProperties")
            Core.<*> (o Core..:? "image")
            Core.<*> (o Core..:? "rows")
            Core.<*> (o Core..:? "subtitle")
            Core.<*> (o Core..:? "title")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageTableCard
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageTableCard {..} =
    Core.object
      ( Core.catMaybes
          [ ("buttons" Core..=) Core.<$> buttons,
            ("columnProperties" Core..=) Core.<$> columnProperties,
            ("image" Core..=) Core.<$> image,
            ("rows" Core..=) Core.<$> rows,
            ("subtitle" Core..=) Core.<$> subtitle,
            ("title" Core..=) Core.<$> title
          ]
      )

-- | Cell of TableCardRow.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageTableCardCell' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageTableCardCell = GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
  { -- | Required. Text in this cell.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageTableCardCell' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageTableCardCell ::
  GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
newGoogleCloudDialogflowV2beta1IntentMessageTableCardCell =
  GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
    { text =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageTableCardCell"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
            Core.<$> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageTableCardCell
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageTableCardCell {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Row of TableCard.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageTableCardRow' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageTableCardRow = GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
  { -- | Optional. List of cells that make up this row.
    cells ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1IntentMessageTableCardCell]
      ),
    -- | Optional. Whether to add a visual divider after this row.
    dividerAfter :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageTableCardRow' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageTableCardRow ::
  GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
newGoogleCloudDialogflowV2beta1IntentMessageTableCardRow =
  GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
    { cells =
        Core.Nothing,
      dividerAfter = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageTableCardRow"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
            Core.<$> (o Core..:? "cells")
            Core.<*> (o Core..:? "dividerAfter")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageTableCardRow
  where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageTableCardRow {..} =
    Core.object
      ( Core.catMaybes
          [ ("cells" Core..=) Core.<$> cells,
            ("dividerAfter" Core..=) Core.<$> dividerAfter
          ]
      )

-- | Plays audio from a file in Telephony Gateway.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio = GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
  { -- | Required. URI to a Google Cloud Storage object containing the audio to play, e.g., \"gs:\/\/bucket\/object\". The object must contain a single channel (mono) of linear PCM audio (2 bytes \/ sample) at 8kHz. This object must be readable by the @service-\@gcp-sa-dialogflow.iam.gserviceaccount.com@ service account where is the number of the Telephony Gateway project (usually the same as the Dialogflow agent project). If the Google Cloud Storage bucket is in the Telephony Gateway project, this permission is added by default when enabling the Dialogflow V2 API. For audio from other sources, consider using the @TelephonySynthesizeSpeech@ message with SSML.
    audioUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio ::
  GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
newGoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio =
  GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
    { audioUri =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
            Core.<$> (o Core..:? "audioUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyPlayAudio {..} =
      Core.object
        (Core.catMaybes [("audioUri" Core..=) Core.<$> audioUri])

-- | Synthesizes speech and plays back the synthesized audio to the caller in Telephony Gateway. Telephony Gateway takes the synthesizer settings from @DetectIntentResponse.output_audio_config@ which can either be set at request-level or can come from the agent-level synthesizer config.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech' smart constructor.
data GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech = GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
  { -- | The SSML to be synthesized. For more information, see <https://developers.google.com/actions/reference/ssml SSML>.
    ssml :: (Core.Maybe Core.Text),
    -- | The raw text to be synthesized.
    text :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech ::
  GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
newGoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech =
  GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
    { ssml =
        Core.Nothing,
      text = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
            Core.<$> (o Core..:? "ssml")
            Core.<*> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonySynthesizeSpeech {..} =
      Core.object
        ( Core.catMaybes
            [("ssml" Core..=) Core.<$> ssml, ("text" Core..=) Core.<$> text]
        )

-- | Transfers the call in Telephony Gateway.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall = GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
  { -- | Required. The phone number to transfer the call to in <https://en.wikipedia.org/wiki/E.164 E.164 format>. We currently only allow transferring to US numbers (+1xxxyyyzzzz).
    phoneNumber :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall ::
  GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
newGoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall =
  GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
    { phoneNumber =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
            Core.<$> (o Core..:? "phoneNumber")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall
  where
  toJSON
    GoogleCloudDialogflowV2beta1IntentMessageTelephonyTransferCall {..} =
      Core.object
        (Core.catMaybes [("phoneNumber" Core..=) Core.<$> phoneNumber])

-- | The text response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentMessageText' smart constructor.
newtype GoogleCloudDialogflowV2beta1IntentMessageText = GoogleCloudDialogflowV2beta1IntentMessageText
  { -- | Optional. The collection of the agent\'s responses.
    text :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentMessageText' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentMessageText ::
  GoogleCloudDialogflowV2beta1IntentMessageText
newGoogleCloudDialogflowV2beta1IntentMessageText =
  GoogleCloudDialogflowV2beta1IntentMessageText
    { text =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentMessageText
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentMessageText"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentMessageText
            Core.<$> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1IntentMessageText where
  toJSON GoogleCloudDialogflowV2beta1IntentMessageText {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | Represents intent parameters.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentParameter' smart constructor.
data GoogleCloudDialogflowV2beta1IntentParameter = GoogleCloudDialogflowV2beta1IntentParameter
  { -- | Optional. The default value to use when the @value@ yields an empty result. Default values can be extracted from contexts by using the following syntax: @#context_name.parameter_name@.
    defaultValue :: (Core.Maybe Core.Text),
    -- | Required. The name of the parameter.
    displayName :: (Core.Maybe Core.Text),
    -- | Optional. The name of the entity type, prefixed with @\@@, that describes values of the parameter. If the parameter is required, this must be provided.
    entityTypeDisplayName :: (Core.Maybe Core.Text),
    -- | Optional. Indicates whether the parameter represents a list of values.
    isList :: (Core.Maybe Core.Bool),
    -- | Optional. Indicates whether the parameter is required. That is, whether the intent cannot be completed without collecting the parameter value.
    mandatory :: (Core.Maybe Core.Bool),
    -- | The unique identifier of this parameter.
    name :: (Core.Maybe Core.Text),
    -- | Optional. The collection of prompts that the agent can present to the user in order to collect a value for the parameter.
    prompts :: (Core.Maybe [Core.Text]),
    -- | Optional. The definition of the parameter value. It can be: - a constant string, - a parameter value defined as @$parameter_name@, - an original parameter value defined as @$parameter_name.original@, - a parameter value from some context defined as @#context_name.parameter_name@.
    value :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentParameter' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentParameter ::
  GoogleCloudDialogflowV2beta1IntentParameter
newGoogleCloudDialogflowV2beta1IntentParameter =
  GoogleCloudDialogflowV2beta1IntentParameter
    { defaultValue =
        Core.Nothing,
      displayName = Core.Nothing,
      entityTypeDisplayName = Core.Nothing,
      isList = Core.Nothing,
      mandatory = Core.Nothing,
      name = Core.Nothing,
      prompts = Core.Nothing,
      value = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1IntentParameter where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentParameter"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentParameter
            Core.<$> (o Core..:? "defaultValue")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "entityTypeDisplayName")
            Core.<*> (o Core..:? "isList")
            Core.<*> (o Core..:? "mandatory")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "prompts")
            Core.<*> (o Core..:? "value")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1IntentParameter where
  toJSON GoogleCloudDialogflowV2beta1IntentParameter {..} =
    Core.object
      ( Core.catMaybes
          [ ("defaultValue" Core..=) Core.<$> defaultValue,
            ("displayName" Core..=) Core.<$> displayName,
            ("entityTypeDisplayName" Core..=) Core.<$> entityTypeDisplayName,
            ("isList" Core..=) Core.<$> isList,
            ("mandatory" Core..=) Core.<$> mandatory,
            ("name" Core..=) Core.<$> name,
            ("prompts" Core..=) Core.<$> prompts,
            ("value" Core..=) Core.<$> value
          ]
      )

-- | Represents an intent suggestion.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentSuggestion' smart constructor.
data GoogleCloudDialogflowV2beta1IntentSuggestion = GoogleCloudDialogflowV2beta1IntentSuggestion
  { -- | Human readable description for better understanding an intent like its scope, content, result etc. Maximum character limit: 140 characters.
    description :: (Core.Maybe Core.Text),
    -- | The display name of the intent.
    displayName :: (Core.Maybe Core.Text),
    -- | The unique identifier of this intent. Format: @projects\/\/locations\/\/agent\/intents\/@.
    intentV2 :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentSuggestion' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentSuggestion ::
  GoogleCloudDialogflowV2beta1IntentSuggestion
newGoogleCloudDialogflowV2beta1IntentSuggestion =
  GoogleCloudDialogflowV2beta1IntentSuggestion
    { description =
        Core.Nothing,
      displayName = Core.Nothing,
      intentV2 = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1IntentSuggestion where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentSuggestion"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentSuggestion
            Core.<$> (o Core..:? "description")
            Core.<*> (o Core..:? "displayName")
            Core.<*> (o Core..:? "intentV2")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1IntentSuggestion where
  toJSON GoogleCloudDialogflowV2beta1IntentSuggestion {..} =
    Core.object
      ( Core.catMaybes
          [ ("description" Core..=) Core.<$> description,
            ("displayName" Core..=) Core.<$> displayName,
            ("intentV2" Core..=) Core.<$> intentV2
          ]
      )

-- | Represents an example that the agent is trained on.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentTrainingPhrase' smart constructor.
data GoogleCloudDialogflowV2beta1IntentTrainingPhrase = GoogleCloudDialogflowV2beta1IntentTrainingPhrase
  { -- | Output only. The unique identifier of this training phrase.
    name :: (Core.Maybe Core.Text),
    -- | Required. The ordered list of training phrase parts. The parts are concatenated in order to form the training phrase. Note: The API does not automatically annotate training phrases like the Dialogflow Console does. Note: Do not forget to include whitespace at part boundaries, so the training phrase is well formatted when the parts are concatenated. If the training phrase does not need to be annotated with parameters, you just need a single part with only the Part.text field set. If you want to annotate the training phrase, you must create multiple parts, where the fields of each part are populated in one of two ways: - @Part.text@ is set to a part of the phrase that has no parameters. - @Part.text@ is set to a part of the phrase that you want to annotate, and the @entity_type@, @alias@, and @user_defined@ fields are all set.
    parts :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart]),
    -- | Optional. Indicates how many times this example was added to the intent. Each time a developer adds an existing sample by editing an intent or training, this counter is increased.
    timesAddedCount :: (Core.Maybe Core.Int32),
    -- | Required. The type of the training phrase.
    type' :: (Core.Maybe GoogleCloudDialogflowV2beta1IntentTrainingPhrase_Type)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentTrainingPhrase' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentTrainingPhrase ::
  GoogleCloudDialogflowV2beta1IntentTrainingPhrase
newGoogleCloudDialogflowV2beta1IntentTrainingPhrase =
  GoogleCloudDialogflowV2beta1IntentTrainingPhrase
    { name =
        Core.Nothing,
      parts = Core.Nothing,
      timesAddedCount = Core.Nothing,
      type' = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentTrainingPhrase
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentTrainingPhrase"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentTrainingPhrase
            Core.<$> (o Core..:? "name")
            Core.<*> (o Core..:? "parts")
            Core.<*> (o Core..:? "timesAddedCount")
            Core.<*> (o Core..:? "type")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentTrainingPhrase
  where
  toJSON GoogleCloudDialogflowV2beta1IntentTrainingPhrase {..} =
    Core.object
      ( Core.catMaybes
          [ ("name" Core..=) Core.<$> name,
            ("parts" Core..=) Core.<$> parts,
            ("timesAddedCount" Core..=) Core.<$> timesAddedCount,
            ("type" Core..=) Core.<$> type'
          ]
      )

-- | Represents a part of a training phrase.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart' smart constructor.
data GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart = GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
  { -- | Optional. The parameter name for the value extracted from the annotated part of the example. This field is required for annotated parts of the training phrase.
    alias :: (Core.Maybe Core.Text),
    -- | Optional. The entity type name prefixed with @\@@. This field is required for annotated parts of the training phrase.
    entityType :: (Core.Maybe Core.Text),
    -- | Required. The text for this part.
    text :: (Core.Maybe Core.Text),
    -- | Optional. Indicates whether the text was manually annotated. This field is set to true when the Dialogflow Console is used to manually annotate the part. When creating an annotated part with the API, you must set this to true.
    userDefined :: (Core.Maybe Core.Bool)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart ::
  GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
newGoogleCloudDialogflowV2beta1IntentTrainingPhrasePart =
  GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
    { alias =
        Core.Nothing,
      entityType = Core.Nothing,
      text = Core.Nothing,
      userDefined = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart"
      ( \o ->
          GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
            Core.<$> (o Core..:? "alias")
            Core.<*> (o Core..:? "entityType")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "userDefined")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart
  where
  toJSON GoogleCloudDialogflowV2beta1IntentTrainingPhrasePart {..} =
    Core.object
      ( Core.catMaybes
          [ ("alias" Core..=) Core.<$> alias,
            ("entityType" Core..=) Core.<$> entityType,
            ("text" Core..=) Core.<$> text,
            ("userDefined" Core..=) Core.<$> userDefined
          ]
      )

-- | Represents the result of querying a Knowledge base.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAnswers' smart constructor.
newtype GoogleCloudDialogflowV2beta1KnowledgeAnswers = GoogleCloudDialogflowV2beta1KnowledgeAnswers
  { -- | A list of answers from Knowledge Connector.
    answers :: (Core.Maybe [GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAnswers' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAnswers ::
  GoogleCloudDialogflowV2beta1KnowledgeAnswers
newGoogleCloudDialogflowV2beta1KnowledgeAnswers =
  GoogleCloudDialogflowV2beta1KnowledgeAnswers
    { answers =
        Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1KnowledgeAnswers where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAnswers"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAnswers
            Core.<$> (o Core..:? "answers")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1KnowledgeAnswers where
  toJSON GoogleCloudDialogflowV2beta1KnowledgeAnswers {..} =
    Core.object
      (Core.catMaybes [("answers" Core..=) Core.<$> answers])

-- | An answer from Knowledge Connector.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer = GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
  { -- | The piece of text from the @source@ knowledge base document that answers this conversational query.
    answer :: (Core.Maybe Core.Text),
    -- | The corresponding FAQ question if the answer was extracted from a FAQ Document, empty otherwise.
    faqQuestion :: (Core.Maybe Core.Text),
    -- | The system\'s confidence score that this Knowledge answer is a good match for this conversational query. The range is from 0.0 (completely uncertain) to 1.0 (completely certain). Note: The confidence score is likely to vary somewhat (possibly even for identical requests), as the underlying model is under constant improvement. It may be deprecated in the future. We recommend using @match_confidence_level@ which should be generally more stable.
    matchConfidence :: (Core.Maybe Core.Double),
    -- | The system\'s confidence level that this knowledge answer is a good match for this conversational query. NOTE: The confidence level for a given \`\` pair may change without notice, as it depends on models that are constantly being improved. However, it will change less frequently than the confidence score below, and should be preferred for referencing the quality of an answer.
    matchConfidenceLevel ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer_MatchConfidenceLevel
      ),
    -- | Indicates which Knowledge Document this answer was extracted from. Format: @projects\/\/knowledgeBases\/\/documents\/@.
    source :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer ::
  GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
newGoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer =
  GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
    { answer =
        Core.Nothing,
      faqQuestion = Core.Nothing,
      matchConfidence = Core.Nothing,
      matchConfidenceLevel = Core.Nothing,
      source = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
            Core.<$> (o Core..:? "answer")
            Core.<*> (o Core..:? "faqQuestion")
            Core.<*> (o Core..:? "matchConfidence")
            Core.<*> (o Core..:? "matchConfidenceLevel")
            Core.<*> (o Core..:? "source")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer
  where
  toJSON GoogleCloudDialogflowV2beta1KnowledgeAnswersAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answer" Core..=) Core.<$> answer,
            ("faqQuestion" Core..=) Core.<$> faqQuestion,
            ("matchConfidence" Core..=) Core.<$> matchConfidence,
            ("matchConfidenceLevel" Core..=) Core.<$> matchConfidenceLevel,
            ("source" Core..=) Core.<$> source
          ]
      )

-- | Represents a Knowledge Assist answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
  { -- | The name of the answer record. Format: @projects\/\/locations\/\/answer Records\/@.
    answerRecord :: (Core.Maybe Core.Text),
    -- | The query suggested based on the context. Suggestion is made only if it is different from the previous suggestion.
    suggestedQuery ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
      ),
    -- | The answer generated for the suggested query. Whether or not an answer is generated depends on how confident we are about the generated query.
    suggestedQueryAnswer ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswer ::
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswer =
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
    { answerRecord =
        Core.Nothing,
      suggestedQuery = Core.Nothing,
      suggestedQueryAnswer = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "suggestedQuery")
            Core.<*> (o Core..:? "suggestedQueryAnswer")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer
  where
  toJSON GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("suggestedQuery" Core..=) Core.<$> suggestedQuery,
            ("suggestedQueryAnswer" Core..=) Core.<$> suggestedQueryAnswer
          ]
      )

-- | Represents an answer from Knowledge. Currently supports FAQ and Generative answers.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
  { -- | The piece of text from the @source@ that answers this suggested query.
    answerText :: (Core.Maybe Core.Text),
    -- | Populated if the prediction came from FAQ.
    faqSource ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
      ),
    -- | Populated if the prediction was Generative.
    generativeSource ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer ::
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer =
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
    { answerText =
        Core.Nothing,
      faqSource = Core.Nothing,
      generativeSource =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
            Core.<$> (o Core..:? "answerText")
            Core.<*> (o Core..:? "faqSource")
            Core.<*> (o Core..:? "generativeSource")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer
  where
  toJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswer {..} =
      Core.object
        ( Core.catMaybes
            [ ("answerText" Core..=) Core.<$> answerText,
              ("faqSource" Core..=) Core.<$> faqSource,
              ("generativeSource" Core..=) Core.<$> generativeSource
            ]
        )

-- | Details about source of FAQ answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource' smart constructor.
newtype GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
  { -- | The corresponding FAQ question.
    question :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource ::
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource =
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
    { question =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
            Core.<$> (o Core..:? "question")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource
  where
  toJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerFaqSource {..} =
      Core.object
        (Core.catMaybes [("question" Core..=) Core.<$> question])

-- | Details about source of Generative answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource' smart constructor.
newtype GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
  { -- | All snippets used for this Generative Prediction, with their source URI and data.
    snippets ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource ::
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource =
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
    { snippets =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
            Core.<$> (o Core..:? "snippets")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource
  where
  toJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSource {..} =
      Core.object
        (Core.catMaybes [("snippets" Core..=) Core.<$> snippets])

-- | Snippet Source for a Generative Prediction.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet' smart constructor.
data GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
  { -- | Metadata of the document.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
      ),
    -- | Text taken from that URI.
    text :: (Core.Maybe Core.Text),
    -- | Title of the document.
    title :: (Core.Maybe Core.Text),
    -- | URI the data is sourced from.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet ::
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet =
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
    { metadata =
        Core.Nothing,
      text =
        Core.Nothing,
      title =
        Core.Nothing,
      uri =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
            Core.<$> (o Core..:? "metadata")
            Core.<*> (o Core..:? "text")
            Core.<*> (o Core..:? "title")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet
  where
  toJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet {..} =
      Core.object
        ( Core.catMaybes
            [ ("metadata" Core..=) Core.<$> metadata,
              ("text" Core..=) Core.<$> text,
              ("title" Core..=) Core.<$> title,
              ("uri" Core..=) Core.<$> uri
            ]
        )

-- | Metadata of the document.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  additional =
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata
  where
  toJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerKnowledgeAnswerGenerativeSourceSnippet_Metadata {..} =
      Core.toJSON additional

-- | Represents a suggested query.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery' smart constructor.
newtype GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery = GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
  { -- | Suggested query text.
    queryText :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery ::
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
newGoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery =
  GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
    { queryText =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
            Core.<$> (o Core..:? "queryText")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery
  where
  toJSON
    GoogleCloudDialogflowV2beta1KnowledgeAssistAnswerSuggestedQuery {..} =
      Core.object
        (Core.catMaybes [("queryText" Core..=) Core.<$> queryText])

-- | Metadata in google::longrunning::Operation for Knowledge operations.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1KnowledgeOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata = GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
  { -- | Metadata for the Export Data Operation such as the destination of export.
    exportOperationMetadata :: (Core.Maybe GoogleCloudDialogflowV2beta1ExportOperationMetadata),
    -- | The name of the knowledge base interacted with during the operation.
    knowledgeBase :: (Core.Maybe Core.Text),
    -- | Required. Output only. The current state of this operation.
    state ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata_State
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1KnowledgeOperationMetadata ::
  GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
newGoogleCloudDialogflowV2beta1KnowledgeOperationMetadata =
  GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
    { exportOperationMetadata =
        Core.Nothing,
      knowledgeBase = Core.Nothing,
      state = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
            Core.<$> (o Core..:? "exportOperationMetadata")
            Core.<*> (o Core..:? "knowledgeBase")
            Core.<*> (o Core..:? "state")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata
  where
  toJSON GoogleCloudDialogflowV2beta1KnowledgeOperationMetadata {..} =
    Core.object
      ( Core.catMaybes
          [ ("exportOperationMetadata" Core..=)
              Core.<$> exportOperationMetadata,
            ("knowledgeBase" Core..=) Core.<$> knowledgeBase,
            ("state" Core..=) Core.<$> state
          ]
      )

-- | Represents a message posted into a conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1Message' smart constructor.
data GoogleCloudDialogflowV2beta1Message = GoogleCloudDialogflowV2beta1Message
  { -- | Required. The message content.
    content :: (Core.Maybe Core.Text),
    -- | Output only. The time when the message was created in Contact Center AI.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Optional. The message language. This should be a <https://www.rfc-editor.org/rfc/bcp/bcp47.txt BCP-47> language tag. Example: \"en-US\".
    languageCode :: (Core.Maybe Core.Text),
    -- | Output only. The annotation for the message.
    messageAnnotation :: (Core.Maybe GoogleCloudDialogflowV2beta1MessageAnnotation),
    -- | Optional. The unique identifier of the message. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    name :: (Core.Maybe Core.Text),
    -- | Output only. The participant that sends this message.
    participant :: (Core.Maybe Core.Text),
    -- | Output only. The role of the participant.
    participantRole :: (Core.Maybe GoogleCloudDialogflowV2beta1Message_ParticipantRole),
    -- | Optional. Automated agent responses.
    responseMessages :: (Core.Maybe [GoogleCloudDialogflowV2beta1ResponseMessage]),
    -- | Optional. The time when the message was sent. For voice messages, this is the time when an utterance started.
    sendTime :: (Core.Maybe Core.DateTime),
    -- | Output only. The sentiment analysis result for the message.
    sentimentAnalysis :: (Core.Maybe GoogleCloudDialogflowV2beta1SentimentAnalysisResult)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1Message' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1Message ::
  GoogleCloudDialogflowV2beta1Message
newGoogleCloudDialogflowV2beta1Message =
  GoogleCloudDialogflowV2beta1Message
    { content = Core.Nothing,
      createTime = Core.Nothing,
      languageCode = Core.Nothing,
      messageAnnotation = Core.Nothing,
      name = Core.Nothing,
      participant = Core.Nothing,
      participantRole = Core.Nothing,
      responseMessages = Core.Nothing,
      sendTime = Core.Nothing,
      sentimentAnalysis = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1Message where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1Message"
      ( \o ->
          GoogleCloudDialogflowV2beta1Message
            Core.<$> (o Core..:? "content")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "messageAnnotation")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "participant")
            Core.<*> (o Core..:? "participantRole")
            Core.<*> (o Core..:? "responseMessages")
            Core.<*> (o Core..:? "sendTime")
            Core.<*> (o Core..:? "sentimentAnalysis")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1Message where
  toJSON GoogleCloudDialogflowV2beta1Message {..} =
    Core.object
      ( Core.catMaybes
          [ ("content" Core..=) Core.<$> content,
            ("createTime" Core..=) Core.<$> createTime,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("messageAnnotation" Core..=) Core.<$> messageAnnotation,
            ("name" Core..=) Core.<$> name,
            ("participant" Core..=) Core.<$> participant,
            ("participantRole" Core..=) Core.<$> participantRole,
            ("responseMessages" Core..=) Core.<$> responseMessages,
            ("sendTime" Core..=) Core.<$> sendTime,
            ("sentimentAnalysis" Core..=) Core.<$> sentimentAnalysis
          ]
      )

-- | Represents the result of annotation for the message.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1MessageAnnotation' smart constructor.
data GoogleCloudDialogflowV2beta1MessageAnnotation = GoogleCloudDialogflowV2beta1MessageAnnotation
  { -- | Required. Indicates whether the text message contains entities.
    containEntities :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of annotated message parts ordered by their position in the message. You can recover the annotated message by concatenating [AnnotatedMessagePart.text].
    parts :: (Core.Maybe [GoogleCloudDialogflowV2beta1AnnotatedMessagePart])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1MessageAnnotation' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1MessageAnnotation ::
  GoogleCloudDialogflowV2beta1MessageAnnotation
newGoogleCloudDialogflowV2beta1MessageAnnotation =
  GoogleCloudDialogflowV2beta1MessageAnnotation
    { containEntities =
        Core.Nothing,
      parts = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1MessageAnnotation
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1MessageAnnotation"
      ( \o ->
          GoogleCloudDialogflowV2beta1MessageAnnotation
            Core.<$> (o Core..:? "containEntities")
            Core.<*> (o Core..:? "parts")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1MessageAnnotation where
  toJSON GoogleCloudDialogflowV2beta1MessageAnnotation {..} =
    Core.object
      ( Core.catMaybes
          [ ("containEntities" Core..=) Core.<$> containEntities,
            ("parts" Core..=) Core.<$> parts
          ]
      )

-- | Represents the contents of the original request that was passed to the @[Streaming]DetectIntent@ call.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest' smart constructor.
data GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest = GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
  { -- | Optional. This field is set to the value of the @QueryParameters.payload@ field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: { \"telephony\": { \"caller_id\": \"+18558363987\" } } Note: The caller ID field (@caller_id@) will be redacted for Trial Edition agents and populated with the caller ID in <https://en.wikipedia.org/wiki/E.164 E.164 format> for Essentials Edition agents.
    payload ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
      ),
    -- | The source of this request, e.g., @google@, @facebook@, @slack@. It is set by Dialogflow-owned servers.
    source :: (Core.Maybe Core.Text),
    -- | Optional. The version of the protocol used for this request. This field is AoG-specific.
    version :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest ::
  GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest =
  GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
    { payload =
        Core.Nothing,
      source = Core.Nothing,
      version = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest"
      ( \o ->
          GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
            Core.<$> (o Core..:? "payload")
            Core.<*> (o Core..:? "source")
            Core.<*> (o Core..:? "version")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
  where
  toJSON GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("payload" Core..=) Core.<$> payload,
            ("source" Core..=) Core.<$> source,
            ("version" Core..=) Core.<$> version
          ]
      )

-- | Optional. This field is set to the value of the @QueryParameters.payload@ field passed in the request. Some integrations that query a Dialogflow agent may provide additional information in the payload. In particular, for the Dialogflow Phone Gateway integration, this field has the form: { \"telephony\": { \"caller_id\": \"+18558363987\" } } Note: The caller ID field (@caller_id@) will be redacted for Trial Edition agents and populated with the caller ID in <https://en.wikipedia.org/wiki/E.164 E.164 format> for Essentials Edition agents.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload' smart constructor.
newtype GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload = GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
newGoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
  additional =
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload"
      ( \o ->
          GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload
  where
  toJSON
    GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest_Payload {..} =
      Core.toJSON additional

-- | Represents the result of conversational query or event processing.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1QueryResult' smart constructor.
data GoogleCloudDialogflowV2beta1QueryResult = GoogleCloudDialogflowV2beta1QueryResult
  { -- | The action name from the matched intent.
    action :: (Core.Maybe Core.Text),
    -- | This field is set to: - @false@ if the matched intent has required parameters and not all of the required parameter values have been collected. - @true@ if all required parameter values have been collected, or if the matched intent doesn\'t contain any required parameters.
    allRequiredParamsPresent :: (Core.Maybe Core.Bool),
    -- | Indicates whether the conversational query triggers a cancellation for slot filling. For more information, see the <https://cloud.google.com/dialogflow/es/docs/intents-actions-parameters#cancel cancel slot filling documentation>.
    cancelsSlotFilling :: (Core.Maybe Core.Bool),
    -- | Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain: - webhook call latency - webhook errors
    diagnosticInfo :: (Core.Maybe GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo),
    -- | The collection of rich messages to present to the user.
    fulfillmentMessages :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentMessage]),
    -- | The text to be pronounced to the user or shown on the screen. Note: This is a legacy field, @fulfillment_messages@ should be preferred.
    fulfillmentText :: (Core.Maybe Core.Text),
    -- | The intent that matched the conversational query. Some, not all fields are filled in this message, including but not limited to: @name@, @display_name@, @end_interaction@ and @is_fallback@.
    intent :: (Core.Maybe GoogleCloudDialogflowV2beta1Intent),
    -- | The intent detection confidence. Values range from 0.0 (completely uncertain) to 1.0 (completely certain). This value is for informational purpose only and is only used to help match the best intent within the classification threshold. This value may change for the same end-user expression at any time due to a model retraining or change in implementation. If there are @multiple knowledge_answers@ messages, this value is set to the greatest @knowledgeAnswers.match_confidence@ value in the list.
    intentDetectionConfidence :: (Core.Maybe Core.Double),
    -- | The result from Knowledge Connector (if any), ordered by decreasing @KnowledgeAnswers.match_confidence@.
    knowledgeAnswers :: (Core.Maybe GoogleCloudDialogflowV2beta1KnowledgeAnswers),
    -- | The language that was triggered during intent detection. See <https://cloud.google.com/dialogflow/docs/reference/language Language Support> for a list of the currently supported language codes.
    languageCode :: (Core.Maybe Core.Text),
    -- | The collection of output contexts. If applicable, @output_contexts.parameters@ contains entries with name @.original@ containing the original parameter values before the query.
    outputContexts :: (Core.Maybe [GoogleCloudDialogflowV2beta1Context]),
    -- | The collection of extracted parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
    parameters :: (Core.Maybe GoogleCloudDialogflowV2beta1QueryResult_Parameters),
    -- | The original conversational query text: - If natural language text was provided as input, @query_text@ contains a copy of the input. - If natural language speech audio was provided as input, @query_text@ contains the speech recognition result. If speech recognizer produced multiple alternatives, a particular one is picked. - If automatic spell correction is enabled, @query_text@ will contain the corrected user input.
    queryText :: (Core.Maybe Core.Text),
    -- | The sentiment analysis result, which depends on the @sentiment_analysis_request_config@ specified in the request.
    sentimentAnalysisResult :: (Core.Maybe GoogleCloudDialogflowV2beta1SentimentAnalysisResult),
    -- | The Speech recognition confidence between 0.0 and 1.0. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be accurate or set. In particular this field isn\'t set for StreamingDetectIntent since the streaming endpoint has separate confidence estimates per portion of the audio in StreamingRecognitionResult.
    speechRecognitionConfidence :: (Core.Maybe Core.Double),
    -- | If the query was fulfilled by a webhook call, this field is set to the value of the @payload@ field returned in the webhook response.
    webhookPayload :: (Core.Maybe GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload),
    -- | If the query was fulfilled by a webhook call, this field is set to the value of the @source@ field returned in the webhook response.
    webhookSource :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1QueryResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1QueryResult ::
  GoogleCloudDialogflowV2beta1QueryResult
newGoogleCloudDialogflowV2beta1QueryResult =
  GoogleCloudDialogflowV2beta1QueryResult
    { action = Core.Nothing,
      allRequiredParamsPresent = Core.Nothing,
      cancelsSlotFilling = Core.Nothing,
      diagnosticInfo = Core.Nothing,
      fulfillmentMessages = Core.Nothing,
      fulfillmentText = Core.Nothing,
      intent = Core.Nothing,
      intentDetectionConfidence = Core.Nothing,
      knowledgeAnswers = Core.Nothing,
      languageCode = Core.Nothing,
      outputContexts = Core.Nothing,
      parameters = Core.Nothing,
      queryText = Core.Nothing,
      sentimentAnalysisResult = Core.Nothing,
      speechRecognitionConfidence = Core.Nothing,
      webhookPayload = Core.Nothing,
      webhookSource = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1QueryResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1QueryResult"
      ( \o ->
          GoogleCloudDialogflowV2beta1QueryResult
            Core.<$> (o Core..:? "action")
            Core.<*> (o Core..:? "allRequiredParamsPresent")
            Core.<*> (o Core..:? "cancelsSlotFilling")
            Core.<*> (o Core..:? "diagnosticInfo")
            Core.<*> (o Core..:? "fulfillmentMessages")
            Core.<*> (o Core..:? "fulfillmentText")
            Core.<*> (o Core..:? "intent")
            Core.<*> (o Core..:? "intentDetectionConfidence")
            Core.<*> (o Core..:? "knowledgeAnswers")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "outputContexts")
            Core.<*> (o Core..:? "parameters")
            Core.<*> (o Core..:? "queryText")
            Core.<*> (o Core..:? "sentimentAnalysisResult")
            Core.<*> (o Core..:? "speechRecognitionConfidence")
            Core.<*> (o Core..:? "webhookPayload")
            Core.<*> (o Core..:? "webhookSource")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1QueryResult where
  toJSON GoogleCloudDialogflowV2beta1QueryResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("action" Core..=) Core.<$> action,
            ("allRequiredParamsPresent" Core..=)
              Core.<$> allRequiredParamsPresent,
            ("cancelsSlotFilling" Core..=) Core.<$> cancelsSlotFilling,
            ("diagnosticInfo" Core..=) Core.<$> diagnosticInfo,
            ("fulfillmentMessages" Core..=) Core.<$> fulfillmentMessages,
            ("fulfillmentText" Core..=) Core.<$> fulfillmentText,
            ("intent" Core..=) Core.<$> intent,
            ("intentDetectionConfidence" Core..=)
              Core.<$> intentDetectionConfidence,
            ("knowledgeAnswers" Core..=) Core.<$> knowledgeAnswers,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("outputContexts" Core..=) Core.<$> outputContexts,
            ("parameters" Core..=) Core.<$> parameters,
            ("queryText" Core..=) Core.<$> queryText,
            ("sentimentAnalysisResult" Core..=)
              Core.<$> sentimentAnalysisResult,
            ("speechRecognitionConfidence" Core..=)
              Core.<$> speechRecognitionConfidence,
            ("webhookPayload" Core..=) Core.<$> webhookPayload,
            ("webhookSource" Core..=) Core.<$> webhookSource
          ]
      )

-- | Free-form diagnostic information for the associated detect intent request. The fields of this data can change without notice, so you should not write code that depends on its structure. The data may contain: - webhook call latency - webhook errors
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo' smart constructor.
newtype GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo = GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
newGoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
  additional =
    GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo"
      ( \o ->
          GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo
  where
  toJSON GoogleCloudDialogflowV2beta1QueryResult_DiagnosticInfo {..} =
    Core.toJSON additional

-- | The collection of extracted parameters. Depending on your protocol or client library language, this is a map, associative array, symbol table, dictionary, or JSON object composed of a collection of (MapKey, MapValue) pairs: * MapKey type: string * MapKey value: parameter name * MapValue type: If parameter\'s entity type is a composite entity then use map, otherwise, depending on the parameter value type, it could be one of string, number, boolean, null, list or map. * MapValue value: If parameter\'s entity type is a composite entity then use map from composite entity property names to property values, otherwise, use parameter value.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1QueryResult_Parameters' smart constructor.
newtype GoogleCloudDialogflowV2beta1QueryResult_Parameters = GoogleCloudDialogflowV2beta1QueryResult_Parameters
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1QueryResult_Parameters' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1QueryResult_Parameters ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1QueryResult_Parameters
newGoogleCloudDialogflowV2beta1QueryResult_Parameters additional =
  GoogleCloudDialogflowV2beta1QueryResult_Parameters
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1QueryResult_Parameters
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1QueryResult_Parameters"
      ( \o ->
          GoogleCloudDialogflowV2beta1QueryResult_Parameters
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1QueryResult_Parameters
  where
  toJSON GoogleCloudDialogflowV2beta1QueryResult_Parameters {..} =
    Core.toJSON additional

-- | If the query was fulfilled by a webhook call, this field is set to the value of the @payload@ field returned in the webhook response.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1QueryResult_WebhookPayload' smart constructor.
newtype GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload = GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1QueryResult_WebhookPayload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
newGoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
  additional =
    GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload"
      ( \o ->
          GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload
  where
  toJSON GoogleCloudDialogflowV2beta1QueryResult_WebhookPayload {..} =
    Core.toJSON additional

-- | Response messages from an automated agent.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessage' smart constructor.
data GoogleCloudDialogflowV2beta1ResponseMessage = GoogleCloudDialogflowV2beta1ResponseMessage
  { -- | A signal that indicates the interaction with the Dialogflow agent has ended.
    endInteraction ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
      ),
    -- | Hands off conversation to a live agent.
    liveAgentHandoff ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
      ),
    -- | An audio response message composed of both the synthesized Dialogflow agent responses and the audios hosted in places known to the client.
    mixedAudio :: (Core.Maybe GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio),
    -- | Returns a response containing a custom, platform-specific payload.
    payload :: (Core.Maybe GoogleCloudDialogflowV2beta1ResponseMessage_Payload),
    -- | A signal that the client should transfer the phone call connected to this agent to a third-party endpoint.
    telephonyTransferCall ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
      ),
    -- | Returns a text response.
    text :: (Core.Maybe GoogleCloudDialogflowV2beta1ResponseMessageText)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessage' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessage ::
  GoogleCloudDialogflowV2beta1ResponseMessage
newGoogleCloudDialogflowV2beta1ResponseMessage =
  GoogleCloudDialogflowV2beta1ResponseMessage
    { endInteraction =
        Core.Nothing,
      liveAgentHandoff = Core.Nothing,
      mixedAudio = Core.Nothing,
      payload = Core.Nothing,
      telephonyTransferCall = Core.Nothing,
      text = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1ResponseMessage where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessage"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessage
            Core.<$> (o Core..:? "endInteraction")
            Core.<*> (o Core..:? "liveAgentHandoff")
            Core.<*> (o Core..:? "mixedAudio")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "telephonyTransferCall")
            Core.<*> (o Core..:? "text")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1ResponseMessage where
  toJSON GoogleCloudDialogflowV2beta1ResponseMessage {..} =
    Core.object
      ( Core.catMaybes
          [ ("endInteraction" Core..=) Core.<$> endInteraction,
            ("liveAgentHandoff" Core..=) Core.<$> liveAgentHandoff,
            ("mixedAudio" Core..=) Core.<$> mixedAudio,
            ("payload" Core..=) Core.<$> payload,
            ("telephonyTransferCall" Core..=) Core.<$> telephonyTransferCall,
            ("text" Core..=) Core.<$> text
          ]
      )

-- | Returns a response containing a custom, platform-specific payload.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessage_Payload' smart constructor.
newtype GoogleCloudDialogflowV2beta1ResponseMessage_Payload = GoogleCloudDialogflowV2beta1ResponseMessage_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessage_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessage_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1ResponseMessage_Payload
newGoogleCloudDialogflowV2beta1ResponseMessage_Payload additional =
  GoogleCloudDialogflowV2beta1ResponseMessage_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessage_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessage_Payload"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessage_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessage_Payload
  where
  toJSON GoogleCloudDialogflowV2beta1ResponseMessage_Payload {..} =
    Core.toJSON additional

-- | Indicates that interaction with the Dialogflow agent has ended.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageEndInteraction' smart constructor.
data GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction = GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageEndInteraction ::
  GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
newGoogleCloudDialogflowV2beta1ResponseMessageEndInteraction =
  GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction"
      ( \o ->
          Core.pure
            GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageEndInteraction
  where
  toJSON = Core.const Core.emptyObject

-- | Indicates that the conversation should be handed off to a human agent. Dialogflow only uses this to determine which conversations were handed off to a human agent for measurement purposes. What else to do with this signal is up to you and your handoff procedures. You may set this, for example: * In the entry fulfillment of a Dialogflow CX Page if entering the page indicates something went extremely wrong in the conversation. * In a webhook response when you determine that the customer issue can only be handled by a human.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff' smart constructor.
newtype GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff = GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
  { -- | Custom metadata for your handoff procedure. Dialogflow doesn\'t impose any structure on this.
    metadata ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff ::
  GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff =
  GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
    { metadata =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
            Core.<$> (o Core..:? "metadata")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff
  where
  toJSON
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff {..} =
      Core.object
        (Core.catMaybes [("metadata" Core..=) Core.<$> metadata])

-- | Custom metadata for your handoff procedure. Dialogflow doesn\'t impose any structure on this.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata' smart constructor.
newtype GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata = GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap
    Core.Text
    Core.Value ->
  GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
newGoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
  additional =
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
      { additional =
          additional
      }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata
  where
  toJSON
    GoogleCloudDialogflowV2beta1ResponseMessageLiveAgentHandoff_Metadata {..} =
      Core.toJSON additional

-- | Represents an audio message that is composed of both segments synthesized from the Dialogflow agent prompts and ones hosted externally at the specified URIs.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudio' smart constructor.
newtype GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio = GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
  { -- | Segments this audio response is composed of.
    segments ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudio ::
  GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudio =
  GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
    { segments =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
            Core.<$> (o Core..:? "segments")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio
  where
  toJSON GoogleCloudDialogflowV2beta1ResponseMessageMixedAudio {..} =
    Core.object
      (Core.catMaybes [("segments" Core..=) Core.<$> segments])

-- | Represents one segment of audio.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment' smart constructor.
data GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment = GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
  { -- | Whether the playback of this segment can be interrupted by the end user\'s speech and the client should then start the next Dialogflow request.
    allowPlaybackInterruption :: (Core.Maybe Core.Bool),
    -- | Raw audio synthesized from the Dialogflow agent\'s response using the output config specified in the request.
    audio :: (Core.Maybe Core.Base64),
    -- | Client-specific URI that points to an audio clip accessible to the client.
    uri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment ::
  GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
newGoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment =
  GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
    { allowPlaybackInterruption =
        Core.Nothing,
      audio = Core.Nothing,
      uri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
            Core.<$> (o Core..:? "allowPlaybackInterruption")
            Core.<*> (o Core..:? "audio")
            Core.<*> (o Core..:? "uri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment
  where
  toJSON
    GoogleCloudDialogflowV2beta1ResponseMessageMixedAudioSegment {..} =
      Core.object
        ( Core.catMaybes
            [ ("allowPlaybackInterruption" Core..=)
                Core.<$> allowPlaybackInterruption,
              ("audio" Core..=) Core.<$> audio,
              ("uri" Core..=) Core.<$> uri
            ]
        )

-- | Represents the signal that telles the client to transfer the phone call connected to the agent to a third-party endpoint.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall' smart constructor.
data GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall = GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
  { -- | Transfer the call to a phone number in <https://en.wikipedia.org/wiki/E.164 E.164 format>.
    phoneNumber :: (Core.Maybe Core.Text),
    -- | Transfer the call to a SIP endpoint.
    sipUri :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall ::
  GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
newGoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall =
  GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
    { phoneNumber =
        Core.Nothing,
      sipUri = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
            Core.<$> (o Core..:? "phoneNumber")
            Core.<*> (o Core..:? "sipUri")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall
  where
  toJSON
    GoogleCloudDialogflowV2beta1ResponseMessageTelephonyTransferCall {..} =
      Core.object
        ( Core.catMaybes
            [ ("phoneNumber" Core..=) Core.<$> phoneNumber,
              ("sipUri" Core..=) Core.<$> sipUri
            ]
        )

-- | The text response message.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1ResponseMessageText' smart constructor.
newtype GoogleCloudDialogflowV2beta1ResponseMessageText = GoogleCloudDialogflowV2beta1ResponseMessageText
  { -- | A collection of text response variants. If multiple variants are defined, only one text response variant is returned at runtime.
    text :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1ResponseMessageText' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1ResponseMessageText ::
  GoogleCloudDialogflowV2beta1ResponseMessageText
newGoogleCloudDialogflowV2beta1ResponseMessageText =
  GoogleCloudDialogflowV2beta1ResponseMessageText
    { text =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1ResponseMessageText
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1ResponseMessageText"
      ( \o ->
          GoogleCloudDialogflowV2beta1ResponseMessageText
            Core.<$> (o Core..:? "text")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1ResponseMessageText
  where
  toJSON GoogleCloudDialogflowV2beta1ResponseMessageText {..} =
    Core.object (Core.catMaybes [("text" Core..=) Core.<$> text])

-- | The sentiment, such as positive\/negative feeling or association, for a unit of analysis, such as the query text. See: https:\/\/cloud.google.com\/natural-language\/docs\/basics#interpreting/sentiment/analysis_values for how to interpret the result.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1Sentiment' smart constructor.
data GoogleCloudDialogflowV2beta1Sentiment = GoogleCloudDialogflowV2beta1Sentiment
  { -- | A non-negative number in the [0, +inf) range, which represents the absolute magnitude of sentiment, regardless of score (positive or negative).
    magnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score between -1.0 (negative sentiment) and 1.0 (positive sentiment).
    score :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1Sentiment' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1Sentiment ::
  GoogleCloudDialogflowV2beta1Sentiment
newGoogleCloudDialogflowV2beta1Sentiment =
  GoogleCloudDialogflowV2beta1Sentiment
    { magnitude = Core.Nothing,
      score = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1Sentiment where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1Sentiment"
      ( \o ->
          GoogleCloudDialogflowV2beta1Sentiment
            Core.<$> (o Core..:? "magnitude")
            Core.<*> (o Core..:? "score")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1Sentiment where
  toJSON GoogleCloudDialogflowV2beta1Sentiment {..} =
    Core.object
      ( Core.catMaybes
          [ ("magnitude" Core..=) Core.<$> magnitude,
            ("score" Core..=) Core.<$> score
          ]
      )

-- | The result of sentiment analysis. Sentiment analysis inspects user input and identifies the prevailing subjective opinion, especially to determine a user\'s attitude as positive, negative, or neutral. For Participants.DetectIntent, it needs to be configured in DetectIntentRequest.query/params. For Participants.StreamingDetectIntent, it needs to be configured in StreamingDetectIntentRequest.query/params. And for Participants.AnalyzeContent and Participants.StreamingAnalyzeContent, it needs to be configured in ConversationProfile.human/agent/assistant_config
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SentimentAnalysisResult' smart constructor.
newtype GoogleCloudDialogflowV2beta1SentimentAnalysisResult = GoogleCloudDialogflowV2beta1SentimentAnalysisResult
  { -- | The sentiment analysis result for @query_text@.
    queryTextSentiment :: (Core.Maybe GoogleCloudDialogflowV2beta1Sentiment)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SentimentAnalysisResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SentimentAnalysisResult ::
  GoogleCloudDialogflowV2beta1SentimentAnalysisResult
newGoogleCloudDialogflowV2beta1SentimentAnalysisResult =
  GoogleCloudDialogflowV2beta1SentimentAnalysisResult
    { queryTextSentiment =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SentimentAnalysisResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SentimentAnalysisResult"
      ( \o ->
          GoogleCloudDialogflowV2beta1SentimentAnalysisResult
            Core.<$> (o Core..:? "queryTextSentiment")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SentimentAnalysisResult
  where
  toJSON GoogleCloudDialogflowV2beta1SentimentAnalysisResult {..} =
    Core.object
      ( Core.catMaybes
          [("queryTextSentiment" Core..=) Core.<$> queryTextSentiment]
      )

-- | A session represents a conversation between a Dialogflow agent and an end-user. You can create special entities, called session entities, during a session. Session entities can extend or replace custom entity types and only exist during the session that they were created for. All session data, including session entities, is stored by Dialogflow for 20 minutes. For more information, see the <https://cloud.google.com/dialogflow/docs/entities-session session entity guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SessionEntityType' smart constructor.
data GoogleCloudDialogflowV2beta1SessionEntityType = GoogleCloudDialogflowV2beta1SessionEntityType
  { -- | Required. The collection of entities associated with this session entity type.
    entities :: (Core.Maybe [GoogleCloudDialogflowV2beta1EntityTypeEntity]),
    -- | Required. Indicates whether the additional data should override or supplement the custom entity type definition.
    entityOverrideMode ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SessionEntityType_EntityOverrideMode
      ),
    -- | Required. The unique identifier of this session entity type. Supported formats: - @projects\/\/agent\/sessions\/\/entityTypes\/@ - @projects\/\/locations\/\/agent\/sessions\/\/entityTypes\/@ - @projects\/\/agent\/environments\/\/users\/\/sessions\/\/entityTypes\/@ - @projects\/\/locations\/\/agent\/environments\/ \/users\/\/sessions\/\/entityTypes\/@ If @Location ID@ is not specified we assume default \'us\' location. If @Environment ID@ is not specified, we assume default \'draft\' environment. If @User ID@ is not specified, we assume default \'-\' user. \`\` must be the display name of an existing entity type in the same agent that will be overridden or supplemented.
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SessionEntityType' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SessionEntityType ::
  GoogleCloudDialogflowV2beta1SessionEntityType
newGoogleCloudDialogflowV2beta1SessionEntityType =
  GoogleCloudDialogflowV2beta1SessionEntityType
    { entities =
        Core.Nothing,
      entityOverrideMode = Core.Nothing,
      name = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SessionEntityType
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SessionEntityType"
      ( \o ->
          GoogleCloudDialogflowV2beta1SessionEntityType
            Core.<$> (o Core..:? "entities")
            Core.<*> (o Core..:? "entityOverrideMode")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1SessionEntityType where
  toJSON GoogleCloudDialogflowV2beta1SessionEntityType {..} =
    Core.object
      ( Core.catMaybes
          [ ("entities" Core..=) Core.<$> entities,
            ("entityOverrideMode" Core..=) Core.<$> entityOverrideMode,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Metadata for a ConversationProfile.SetSuggestionFeatureConfig operation.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata' smart constructor.
data GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata = GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
  { -- | The resource name of the conversation profile. Format: @projects\/\/locations\/\/conversationProfiles\/@
    conversationProfile :: (Core.Maybe Core.Text),
    -- | Timestamp whe the request was created. The time is measured on server side.
    createTime :: (Core.Maybe Core.DateTime),
    -- | Required. The participant role to add or update the suggestion feature config. Only HUMAN/AGENT or END/USER can be used.
    participantRole ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata_ParticipantRole
      ),
    -- | Required. The type of the suggestion feature to add or update.
    suggestionFeatureType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata_SuggestionFeatureType
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata ::
  GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
newGoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata =
  GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
    { conversationProfile =
        Core.Nothing,
      createTime =
        Core.Nothing,
      participantRole =
        Core.Nothing,
      suggestionFeatureType =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata"
      ( \o ->
          GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
            Core.<$> (o Core..:? "conversationProfile")
            Core.<*> (o Core..:? "createTime")
            Core.<*> (o Core..:? "participantRole")
            Core.<*> (o Core..:? "suggestionFeatureType")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata
  where
  toJSON
    GoogleCloudDialogflowV2beta1SetSuggestionFeatureConfigOperationMetadata {..} =
      Core.object
        ( Core.catMaybes
            [ ("conversationProfile" Core..=) Core.<$> conversationProfile,
              ("createTime" Core..=) Core.<$> createTime,
              ("participantRole" Core..=) Core.<$> participantRole,
              ("suggestionFeatureType" Core..=) Core.<$> suggestionFeatureType
            ]
        )

-- | Represents a smart reply answer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SmartReplyAnswer' smart constructor.
data GoogleCloudDialogflowV2beta1SmartReplyAnswer = GoogleCloudDialogflowV2beta1SmartReplyAnswer
  { -- | The name of answer record, in the format of \"projects\/\/locations\/\/answerRecords\/\"
    answerRecord :: (Core.Maybe Core.Text),
    -- | Smart reply confidence. The system\'s confidence score that this reply is a good match for this conversation, as a value from 0.0 (completely uncertain) to 1.0 (completely certain).
    confidence :: (Core.Maybe Core.Double),
    -- | The content of the reply.
    reply :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SmartReplyAnswer' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SmartReplyAnswer ::
  GoogleCloudDialogflowV2beta1SmartReplyAnswer
newGoogleCloudDialogflowV2beta1SmartReplyAnswer =
  GoogleCloudDialogflowV2beta1SmartReplyAnswer
    { answerRecord =
        Core.Nothing,
      confidence = Core.Nothing,
      reply = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1SmartReplyAnswer where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SmartReplyAnswer"
      ( \o ->
          GoogleCloudDialogflowV2beta1SmartReplyAnswer
            Core.<$> (o Core..:? "answerRecord")
            Core.<*> (o Core..:? "confidence")
            Core.<*> (o Core..:? "reply")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1SmartReplyAnswer where
  toJSON GoogleCloudDialogflowV2beta1SmartReplyAnswer {..} =
    Core.object
      ( Core.catMaybes
          [ ("answerRecord" Core..=) Core.<$> answerRecord,
            ("confidence" Core..=) Core.<$> confidence,
            ("reply" Core..=) Core.<$> reply
          ]
      )

-- | Information for a word recognized by the speech recognizer.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SpeechWordInfo' smart constructor.
data GoogleCloudDialogflowV2beta1SpeechWordInfo = GoogleCloudDialogflowV2beta1SpeechWordInfo
  { -- | The Speech confidence between 0.0 and 1.0 for this word. A higher number indicates an estimated greater likelihood that the recognized word is correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is not guaranteed to be fully stable over time for the same audio input. Users should also not rely on it to always be provided.
    confidence :: (Core.Maybe Core.Double),
    -- | Time offset relative to the beginning of the audio that corresponds to the end of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.
    endOffset :: (Core.Maybe Core.Duration),
    -- | Time offset relative to the beginning of the audio that corresponds to the start of the spoken word. This is an experimental feature and the accuracy of the time offset can vary.
    startOffset :: (Core.Maybe Core.Duration),
    -- | The word this info is for.
    word :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SpeechWordInfo' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SpeechWordInfo ::
  GoogleCloudDialogflowV2beta1SpeechWordInfo
newGoogleCloudDialogflowV2beta1SpeechWordInfo =
  GoogleCloudDialogflowV2beta1SpeechWordInfo
    { confidence =
        Core.Nothing,
      endOffset = Core.Nothing,
      startOffset = Core.Nothing,
      word = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1SpeechWordInfo where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SpeechWordInfo"
      ( \o ->
          GoogleCloudDialogflowV2beta1SpeechWordInfo
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "endOffset")
            Core.<*> (o Core..:? "startOffset")
            Core.<*> (o Core..:? "word")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1SpeechWordInfo where
  toJSON GoogleCloudDialogflowV2beta1SpeechWordInfo {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("endOffset" Core..=) Core.<$> endOffset,
            ("startOffset" Core..=) Core.<$> startOffset,
            ("word" Core..=) Core.<$> word
          ]
      )

-- | Contains a speech recognition result corresponding to a portion of the audio that is currently being processed or an indication that this is the end of the single requested utterance. While end-user audio is being processed, Dialogflow sends a series of results. Each result may contain a @transcript@ value. A transcript represents a portion of the utterance. While the recognizer is processing audio, transcript values may be interim values or finalized values. Once a transcript is finalized, the @is_final@ value is set to true and processing continues for the next transcript. If @StreamingDetectIntentRequest.query_input.audio_config.single_utterance@ was true, and the recognizer has completed processing audio, the @message_type@ value is set to
-- @END_OF_SINGLE_UTTERANCE and the following (last) result contains the last finalized transcript. The complete end-user utterance is determined by concatenating the finalized transcript values received for the series of results. In the following example, single utterance is enabled. In the case where single utterance is not enabled, result 7 would not occur. \`\`\` Num | transcript | message_type | is_final --- | ----------------------- | ----------------------- | -------- 1 | \"tube\" | TRANSCRIPT | false 2 | \"to be a\" | TRANSCRIPT | false 3 | \"to be\" | TRANSCRIPT | false 4 | \"to be or not to be\" | TRANSCRIPT | true 5 | \"that\'s\" | TRANSCRIPT | false 6 | \"that is | TRANSCRIPT | false 7 | unset | END_OF_SINGLE_UTTERANCE | unset 8 | \" that is the question\" | TRANSCRIPT | true \`\`\` Concatenating the finalized transcripts with@is_final\` set to true, the complete utterance becomes \"to be or not to be that is the question\".
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1StreamingRecognitionResult' smart constructor.
data GoogleCloudDialogflowV2beta1StreamingRecognitionResult = GoogleCloudDialogflowV2beta1StreamingRecognitionResult
  { -- | The Speech confidence between 0.0 and 1.0 for the current portion of audio. A higher number indicates an estimated greater likelihood that the recognized words are correct. The default of 0.0 is a sentinel value indicating that confidence was not set. This field is typically only provided if @is_final@ is true and you should not rely on it being accurate or even set.
    confidence :: (Core.Maybe Core.Double),
    -- | DTMF digits. Populated if and only if @message_type@ = @DTMF_DIGITS@.
    dtmfDigits :: (Core.Maybe GoogleCloudDialogflowV2beta1TelephonyDtmfEvents),
    -- | If @false@, the @StreamingRecognitionResult@ represents an interim result that may change. If @true@, the recognizer will not return any further hypotheses about this piece of the audio. May only be populated for @message_type@ = @TRANSCRIPT@.
    isFinal :: (Core.Maybe Core.Bool),
    -- | Detected language code for the transcript.
    languageCode :: (Core.Maybe Core.Text),
    -- | Type of the result message.
    messageType ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1StreamingRecognitionResult_MessageType
      ),
    -- | Time offset of the end of this Speech recognition result relative to the beginning of the audio. Only populated for @message_type@ = @TRANSCRIPT@.
    speechEndOffset :: (Core.Maybe Core.Duration),
    -- | Word-specific information for the words recognized by Speech in transcript. Populated if and only if @message_type@ = @TRANSCRIPT@ and [InputAudioConfig.enable/word/info] is set.
    speechWordInfo :: (Core.Maybe [GoogleCloudDialogflowV2beta1SpeechWordInfo]),
    -- | An estimate of the likelihood that the speech recognizer will not change its guess about this interim recognition result: * If the value is unspecified or 0.0, Dialogflow didn\'t compute the stability. In particular, Dialogflow will only provide stability for @TRANSCRIPT@ results with @is_final = false@. * Otherwise, the value is in (0.0, 1.0] where 0.0 means completely unstable and 1.0 means completely stable.
    stability :: (Core.Maybe Core.Double),
    -- | Transcript text representing the words that the user spoke. Populated if and only if @message_type@ = @TRANSCRIPT@.
    transcript :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1StreamingRecognitionResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1StreamingRecognitionResult ::
  GoogleCloudDialogflowV2beta1StreamingRecognitionResult
newGoogleCloudDialogflowV2beta1StreamingRecognitionResult =
  GoogleCloudDialogflowV2beta1StreamingRecognitionResult
    { confidence =
        Core.Nothing,
      dtmfDigits = Core.Nothing,
      isFinal = Core.Nothing,
      languageCode = Core.Nothing,
      messageType = Core.Nothing,
      speechEndOffset = Core.Nothing,
      speechWordInfo = Core.Nothing,
      stability = Core.Nothing,
      transcript = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1StreamingRecognitionResult
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1StreamingRecognitionResult"
      ( \o ->
          GoogleCloudDialogflowV2beta1StreamingRecognitionResult
            Core.<$> (o Core..:? "confidence")
            Core.<*> (o Core..:? "dtmfDigits")
            Core.<*> (o Core..:? "isFinal")
            Core.<*> (o Core..:? "languageCode")
            Core.<*> (o Core..:? "messageType")
            Core.<*> (o Core..:? "speechEndOffset")
            Core.<*> (o Core..:? "speechWordInfo")
            Core.<*> (o Core..:? "stability")
            Core.<*> (o Core..:? "transcript")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1StreamingRecognitionResult
  where
  toJSON GoogleCloudDialogflowV2beta1StreamingRecognitionResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("confidence" Core..=) Core.<$> confidence,
            ("dtmfDigits" Core..=) Core.<$> dtmfDigits,
            ("isFinal" Core..=) Core.<$> isFinal,
            ("languageCode" Core..=) Core.<$> languageCode,
            ("messageType" Core..=) Core.<$> messageType,
            ("speechEndOffset" Core..=) Core.<$> speechEndOffset,
            ("speechWordInfo" Core..=) Core.<$> speechWordInfo,
            ("stability" Core..=) Core.<$> stability,
            ("transcript" Core..=) Core.<$> transcript
          ]
      )

-- | The response message for Participants.SuggestArticles.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SuggestArticlesResponse' smart constructor.
data GoogleCloudDialogflowV2beta1SuggestArticlesResponse = GoogleCloudDialogflowV2beta1SuggestArticlesResponse
  { -- | Output only. Articles ordered by score in descending order.
    articleAnswers :: (Core.Maybe [GoogleCloudDialogflowV2beta1ArticleAnswer]),
    -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestArticlesResponse.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SuggestArticlesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SuggestArticlesResponse ::
  GoogleCloudDialogflowV2beta1SuggestArticlesResponse
newGoogleCloudDialogflowV2beta1SuggestArticlesResponse =
  GoogleCloudDialogflowV2beta1SuggestArticlesResponse
    { articleAnswers =
        Core.Nothing,
      contextSize = Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SuggestArticlesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SuggestArticlesResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1SuggestArticlesResponse
            Core.<$> (o Core..:? "articleAnswers")
            Core.<*> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "latestMessage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SuggestArticlesResponse
  where
  toJSON GoogleCloudDialogflowV2beta1SuggestArticlesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("articleAnswers" Core..=) Core.<$> articleAnswers,
            ("contextSize" Core..=) Core.<$> contextSize,
            ("latestMessage" Core..=) Core.<$> latestMessage
          ]
      )

-- | The response message for Participants.SuggestDialogflowAssists.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse' smart constructor.
data GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse = GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestDialogflowAssistsRequest.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | Output only. Multiple reply options provided by Dialogflow assist service. The order is based on the rank of the model prediction.
    dialogflowAssistAnswers :: (Core.Maybe [GoogleCloudDialogflowV2beta1DialogflowAssistAnswer]),
    -- | The name of the latest conversation message used to suggest answer. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse ::
  GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
newGoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse =
  GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
    { contextSize =
        Core.Nothing,
      dialogflowAssistAnswers =
        Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "dialogflowAssistAnswers")
            Core.<*> (o Core..:? "latestMessage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
  where
  toJSON
    GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("contextSize" Core..=) Core.<$> contextSize,
              ("dialogflowAssistAnswers" Core..=)
                Core.<$> dialogflowAssistAnswers,
              ("latestMessage" Core..=) Core.<$> latestMessage
            ]
        )

-- | The request message for Participants.SuggestFaqAnswers.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse' smart constructor.
data GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse = GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestFaqAnswersRequest.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | Output only. Answers extracted from FAQ documents.
    faqAnswers :: (Core.Maybe [GoogleCloudDialogflowV2beta1FaqAnswer]),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse ::
  GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
newGoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse =
  GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
    { contextSize =
        Core.Nothing,
      faqAnswers = Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "faqAnswers")
            Core.<*> (o Core..:? "latestMessage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse
  where
  toJSON GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("contextSize" Core..=) Core.<$> contextSize,
            ("faqAnswers" Core..=) Core.<$> faqAnswers,
            ("latestMessage" Core..=) Core.<$> latestMessage
          ]
      )

-- | The response message for Participants.SuggestKnowledgeAssist.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse' smart constructor.
data GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse = GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestKnowledgeAssistRequest.context/size field in the request if there are fewer messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | Output only. Knowledge Assist suggestion.
    knowledgeAssistAnswer :: (Core.Maybe GoogleCloudDialogflowV2beta1KnowledgeAssistAnswer),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse ::
  GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
newGoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse =
  GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
    { contextSize =
        Core.Nothing,
      knowledgeAssistAnswer = Core.Nothing,
      latestMessage = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "knowledgeAssistAnswer")
            Core.<*> (o Core..:? "latestMessage")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
  where
  toJSON
    GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse {..} =
      Core.object
        ( Core.catMaybes
            [ ("contextSize" Core..=) Core.<$> contextSize,
              ("knowledgeAssistAnswer" Core..=) Core.<$> knowledgeAssistAnswer,
              ("latestMessage" Core..=) Core.<$> latestMessage
            ]
        )

-- | The response message for Participants.SuggestSmartReplies.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse' smart constructor.
data GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse = GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
  { -- | Number of messages prior to and including latest/message to compile the suggestion. It may be smaller than the SuggestSmartRepliesRequest.context/size field in the request if there aren\'t that many messages in the conversation.
    contextSize :: (Core.Maybe Core.Int32),
    -- | The name of the latest conversation message used to compile suggestion for. Format: @projects\/\/locations\/\/conversations\/\/messages\/@.
    latestMessage :: (Core.Maybe Core.Text),
    -- | Output only. Multiple reply options provided by smart reply service. The order is based on the rank of the model prediction. The maximum number of the returned replies is set in SmartReplyConfig.
    smartReplyAnswers :: (Core.Maybe [GoogleCloudDialogflowV2beta1SmartReplyAnswer])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse ::
  GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
newGoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse =
  GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
    { contextSize =
        Core.Nothing,
      latestMessage = Core.Nothing,
      smartReplyAnswers = Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
            Core.<$> (o Core..:? "contextSize")
            Core.<*> (o Core..:? "latestMessage")
            Core.<*> (o Core..:? "smartReplyAnswers")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
  where
  toJSON GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("contextSize" Core..=) Core.<$> contextSize,
            ("latestMessage" Core..=) Core.<$> latestMessage,
            ("smartReplyAnswers" Core..=) Core.<$> smartReplyAnswers
          ]
      )

-- | One response of different type of suggestion response which is used in the response of Participants.AnalyzeContent and Participants.AnalyzeContent, as well as HumanAgentAssistantEvent.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1SuggestionResult' smart constructor.
data GoogleCloudDialogflowV2beta1SuggestionResult = GoogleCloudDialogflowV2beta1SuggestionResult
  { -- | Error status if the request failed.
    error :: (Core.Maybe GoogleRpcStatus),
    -- | SuggestArticlesResponse if request is for ARTICLE_SUGGESTION.
    suggestArticlesResponse :: (Core.Maybe GoogleCloudDialogflowV2beta1SuggestArticlesResponse),
    -- | SuggestDialogflowAssistsResponse if request is for DIALOGFLOW_ASSIST.
    suggestDialogflowAssistsResponse ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
      ),
    -- | SuggestDialogflowAssistsResponse if request is for ENTITY_EXTRACTION.
    suggestEntityExtractionResponse ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SuggestDialogflowAssistsResponse
      ),
    -- | SuggestFaqAnswersResponse if request is for FAQ_ANSWER.
    suggestFaqAnswersResponse :: (Core.Maybe GoogleCloudDialogflowV2beta1SuggestFaqAnswersResponse),
    -- | SuggestKnowledgeAssistResponse if request is for KNOWLEDGE_ASSIST.
    suggestKnowledgeAssistResponse ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SuggestKnowledgeAssistResponse
      ),
    -- | SuggestSmartRepliesResponse if request is for SMART_REPLY.
    suggestSmartRepliesResponse ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1SuggestSmartRepliesResponse
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1SuggestionResult' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1SuggestionResult ::
  GoogleCloudDialogflowV2beta1SuggestionResult
newGoogleCloudDialogflowV2beta1SuggestionResult =
  GoogleCloudDialogflowV2beta1SuggestionResult
    { error =
        Core.Nothing,
      suggestArticlesResponse = Core.Nothing,
      suggestDialogflowAssistsResponse = Core.Nothing,
      suggestEntityExtractionResponse = Core.Nothing,
      suggestFaqAnswersResponse = Core.Nothing,
      suggestKnowledgeAssistResponse = Core.Nothing,
      suggestSmartRepliesResponse = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1SuggestionResult where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1SuggestionResult"
      ( \o ->
          GoogleCloudDialogflowV2beta1SuggestionResult
            Core.<$> (o Core..:? "error")
            Core.<*> (o Core..:? "suggestArticlesResponse")
            Core.<*> (o Core..:? "suggestDialogflowAssistsResponse")
            Core.<*> (o Core..:? "suggestEntityExtractionResponse")
            Core.<*> (o Core..:? "suggestFaqAnswersResponse")
            Core.<*> (o Core..:? "suggestKnowledgeAssistResponse")
            Core.<*> (o Core..:? "suggestSmartRepliesResponse")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1SuggestionResult where
  toJSON GoogleCloudDialogflowV2beta1SuggestionResult {..} =
    Core.object
      ( Core.catMaybes
          [ ("error" Core..=) Core.<$> error,
            ("suggestArticlesResponse" Core..=)
              Core.<$> suggestArticlesResponse,
            ("suggestDialogflowAssistsResponse" Core..=)
              Core.<$> suggestDialogflowAssistsResponse,
            ("suggestEntityExtractionResponse" Core..=)
              Core.<$> suggestEntityExtractionResponse,
            ("suggestFaqAnswersResponse" Core..=)
              Core.<$> suggestFaqAnswersResponse,
            ("suggestKnowledgeAssistResponse" Core..=)
              Core.<$> suggestKnowledgeAssistResponse,
            ("suggestSmartRepliesResponse" Core..=)
              Core.<$> suggestSmartRepliesResponse
          ]
      )

-- | A wrapper of repeated TelephonyDtmf digits.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1TelephonyDtmfEvents' smart constructor.
newtype GoogleCloudDialogflowV2beta1TelephonyDtmfEvents = GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
  { -- | A sequence of TelephonyDtmf digits.
    dtmfEvents ::
      ( Core.Maybe
          [GoogleCloudDialogflowV2beta1TelephonyDtmfEvents_DtmfEventsItem]
      )
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1TelephonyDtmfEvents' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1TelephonyDtmfEvents ::
  GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
newGoogleCloudDialogflowV2beta1TelephonyDtmfEvents =
  GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
    { dtmfEvents =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1TelephonyDtmfEvents"
      ( \o ->
          GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
            Core.<$> (o Core..:? "dtmfEvents")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1TelephonyDtmfEvents
  where
  toJSON GoogleCloudDialogflowV2beta1TelephonyDtmfEvents {..} =
    Core.object
      (Core.catMaybes [("dtmfEvents" Core..=) Core.<$> dtmfEvents])

-- | The request message for a webhook call.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1WebhookRequest' smart constructor.
data GoogleCloudDialogflowV2beta1WebhookRequest = GoogleCloudDialogflowV2beta1WebhookRequest
  { -- | Alternative query results from KnowledgeService.
    alternativeQueryResults :: (Core.Maybe [GoogleCloudDialogflowV2beta1QueryResult]),
    -- | Optional. The contents of the original request that was passed to @[Streaming]DetectIntent@ call.
    originalDetectIntentRequest ::
      ( Core.Maybe
          GoogleCloudDialogflowV2beta1OriginalDetectIntentRequest
      ),
    -- | The result of the conversational query or event processing. Contains the same value as @[Streaming]DetectIntentResponse.query_result@.
    queryResult :: (Core.Maybe GoogleCloudDialogflowV2beta1QueryResult),
    -- | The unique identifier of the response. Contains the same value as @[Streaming]DetectIntentResponse.response_id@.
    responseId :: (Core.Maybe Core.Text),
    -- | The unique identifier of detectIntent request session. Can be used to identify end-user inside webhook implementation. Supported formats: - @projects\/\/agent\/sessions\/, -@projects\/\/locations\/\/agent\/sessions\/@, -@projects\/\/agent\/environments\/\/users\/\/sessions\/@, -@projects\/\/locations\/\/agent\/environments\/\/users\/\/sessions\/\`,
    session :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1WebhookRequest' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1WebhookRequest ::
  GoogleCloudDialogflowV2beta1WebhookRequest
newGoogleCloudDialogflowV2beta1WebhookRequest =
  GoogleCloudDialogflowV2beta1WebhookRequest
    { alternativeQueryResults =
        Core.Nothing,
      originalDetectIntentRequest = Core.Nothing,
      queryResult = Core.Nothing,
      responseId = Core.Nothing,
      session = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1WebhookRequest where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1WebhookRequest"
      ( \o ->
          GoogleCloudDialogflowV2beta1WebhookRequest
            Core.<$> (o Core..:? "alternativeQueryResults")
            Core.<*> (o Core..:? "originalDetectIntentRequest")
            Core.<*> (o Core..:? "queryResult")
            Core.<*> (o Core..:? "responseId")
            Core.<*> (o Core..:? "session")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1WebhookRequest where
  toJSON GoogleCloudDialogflowV2beta1WebhookRequest {..} =
    Core.object
      ( Core.catMaybes
          [ ("alternativeQueryResults" Core..=)
              Core.<$> alternativeQueryResults,
            ("originalDetectIntentRequest" Core..=)
              Core.<$> originalDetectIntentRequest,
            ("queryResult" Core..=) Core.<$> queryResult,
            ("responseId" Core..=) Core.<$> responseId,
            ("session" Core..=) Core.<$> session
          ]
      )

-- | The response message for a webhook call. This response is validated by the Dialogflow server. If validation fails, an error will be returned in the QueryResult.diagnostic_info field. Setting JSON fields to an empty value with the wrong type is a common error. To avoid this error: - Use @\"\"@ for empty strings - Use @{}@ or @null@ for empty objects - Use @[]@ or @null@ for empty arrays For more information, see the <https://developers.google.com/protocol-buffers/docs/proto3#json Protocol Buffers Language Guide>.
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1WebhookResponse' smart constructor.
data GoogleCloudDialogflowV2beta1WebhookResponse = GoogleCloudDialogflowV2beta1WebhookResponse
  { -- | Optional. Indicates that this intent ends an interaction. Some integrations (e.g., Actions on Google or Dialogflow phone gateway) use this information to close interaction with an end user. Default is false.
    endInteraction :: (Core.Maybe Core.Bool),
    -- | Optional. Invokes the supplied events. When this field is set, Dialogflow ignores the @fulfillment_text@, @fulfillment_messages@, and @payload@ fields.
    followupEventInput :: (Core.Maybe GoogleCloudDialogflowV2beta1EventInput),
    -- | Optional. The rich response messages intended for the end-user. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_messages sent to the integration or API caller.
    fulfillmentMessages :: (Core.Maybe [GoogleCloudDialogflowV2beta1IntentMessage]),
    -- | Optional. The text response message intended for the end-user. It is recommended to use @fulfillment_messages.text.text[0]@ instead. When provided, Dialogflow uses this field to populate QueryResult.fulfillment_text sent to the integration or API caller.
    fulfillmentText :: (Core.Maybe Core.Text),
    -- | Indicates that a live agent should be brought in to handle the interaction with the user. In most cases, when you set this flag to true, you would also want to set end_interaction to true as well. Default is false.
    liveAgentHandoff :: (Core.Maybe Core.Bool),
    -- | Optional. The collection of output contexts that will overwrite currently active contexts for the session and reset their lifespans. When provided, Dialogflow uses this field to populate QueryResult.output_contexts sent to the integration or API caller.
    outputContexts :: (Core.Maybe [GoogleCloudDialogflowV2beta1Context]),
    -- | Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the <https://cloud.google.com/dialogflow/docs/integrations/aog Google Assistant integration> for rich response messages. See the format definition at <https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json Google Assistant Dialogflow webhook format>
    payload :: (Core.Maybe GoogleCloudDialogflowV2beta1WebhookResponse_Payload),
    -- | Optional. Additional session entity types to replace or extend developer entity types with. The entity synonyms apply to all languages and persist for the session. Setting this data from a webhook overwrites the session entity types that have been set using @detectIntent@, @streamingDetectIntent@ or SessionEntityType management methods.
    sessionEntityTypes :: (Core.Maybe [GoogleCloudDialogflowV2beta1SessionEntityType]),
    -- | Optional. A custom field used to identify the webhook source. Arbitrary strings are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_source sent to the integration or API caller.
    source :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1WebhookResponse' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1WebhookResponse ::
  GoogleCloudDialogflowV2beta1WebhookResponse
newGoogleCloudDialogflowV2beta1WebhookResponse =
  GoogleCloudDialogflowV2beta1WebhookResponse
    { endInteraction =
        Core.Nothing,
      followupEventInput = Core.Nothing,
      fulfillmentMessages = Core.Nothing,
      fulfillmentText = Core.Nothing,
      liveAgentHandoff = Core.Nothing,
      outputContexts = Core.Nothing,
      payload = Core.Nothing,
      sessionEntityTypes = Core.Nothing,
      source = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV2beta1WebhookResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1WebhookResponse"
      ( \o ->
          GoogleCloudDialogflowV2beta1WebhookResponse
            Core.<$> (o Core..:? "endInteraction")
            Core.<*> (o Core..:? "followupEventInput")
            Core.<*> (o Core..:? "fulfillmentMessages")
            Core.<*> (o Core..:? "fulfillmentText")
            Core.<*> (o Core..:? "liveAgentHandoff")
            Core.<*> (o Core..:? "outputContexts")
            Core.<*> (o Core..:? "payload")
            Core.<*> (o Core..:? "sessionEntityTypes")
            Core.<*> (o Core..:? "source")
      )

instance Core.ToJSON GoogleCloudDialogflowV2beta1WebhookResponse where
  toJSON GoogleCloudDialogflowV2beta1WebhookResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("endInteraction" Core..=) Core.<$> endInteraction,
            ("followupEventInput" Core..=) Core.<$> followupEventInput,
            ("fulfillmentMessages" Core..=) Core.<$> fulfillmentMessages,
            ("fulfillmentText" Core..=) Core.<$> fulfillmentText,
            ("liveAgentHandoff" Core..=) Core.<$> liveAgentHandoff,
            ("outputContexts" Core..=) Core.<$> outputContexts,
            ("payload" Core..=) Core.<$> payload,
            ("sessionEntityTypes" Core..=) Core.<$> sessionEntityTypes,
            ("source" Core..=) Core.<$> source
          ]
      )

-- | Optional. This field can be used to pass custom data from your webhook to the integration or API caller. Arbitrary JSON objects are supported. When provided, Dialogflow uses this field to populate QueryResult.webhook_payload sent to the integration or API caller. This field is also used by the <https://cloud.google.com/dialogflow/docs/integrations/aog Google Assistant integration> for rich response messages. See the format definition at <https://developers.google.com/assistant/actions/build/json/dialogflow-webhook-json Google Assistant Dialogflow webhook format>
--
-- /See:/ 'newGoogleCloudDialogflowV2beta1WebhookResponse_Payload' smart constructor.
newtype GoogleCloudDialogflowV2beta1WebhookResponse_Payload = GoogleCloudDialogflowV2beta1WebhookResponse_Payload
  { -- | Properties of the object.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV2beta1WebhookResponse_Payload' with the minimum fields required to make a request.
newGoogleCloudDialogflowV2beta1WebhookResponse_Payload ::
  -- |  Properties of the object. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudDialogflowV2beta1WebhookResponse_Payload
newGoogleCloudDialogflowV2beta1WebhookResponse_Payload additional =
  GoogleCloudDialogflowV2beta1WebhookResponse_Payload
    { additional =
        additional
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV2beta1WebhookResponse_Payload
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV2beta1WebhookResponse_Payload"
      ( \o ->
          GoogleCloudDialogflowV2beta1WebhookResponse_Payload
            Core.<$> (Core.parseJSONObject o)
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV2beta1WebhookResponse_Payload
  where
  toJSON GoogleCloudDialogflowV2beta1WebhookResponse_Payload {..} =
    Core.toJSON additional

-- | This message is used to hold all the Conversation Signals data, which will be converted to JSON and exported to BigQuery.
--
-- /See:/ 'newGoogleCloudDialogflowV3alpha1ConversationSignals' smart constructor.
newtype GoogleCloudDialogflowV3alpha1ConversationSignals = GoogleCloudDialogflowV3alpha1ConversationSignals
  { -- | Required. Turn signals for the current turn.
    turnSignals :: (Core.Maybe GoogleCloudDialogflowV3alpha1TurnSignals)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV3alpha1ConversationSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowV3alpha1ConversationSignals ::
  GoogleCloudDialogflowV3alpha1ConversationSignals
newGoogleCloudDialogflowV3alpha1ConversationSignals =
  GoogleCloudDialogflowV3alpha1ConversationSignals
    { turnSignals =
        Core.Nothing
    }

instance
  Core.FromJSON
    GoogleCloudDialogflowV3alpha1ConversationSignals
  where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV3alpha1ConversationSignals"
      ( \o ->
          GoogleCloudDialogflowV3alpha1ConversationSignals
            Core.<$> (o Core..:? "turnSignals")
      )

instance
  Core.ToJSON
    GoogleCloudDialogflowV3alpha1ConversationSignals
  where
  toJSON GoogleCloudDialogflowV3alpha1ConversationSignals {..} =
    Core.object
      (Core.catMaybes [("turnSignals" Core..=) Core.<$> turnSignals])

-- | Collection of all signals that were extracted for a single turn of the conversation.
--
-- /See:/ 'newGoogleCloudDialogflowV3alpha1TurnSignals' smart constructor.
data GoogleCloudDialogflowV3alpha1TurnSignals = GoogleCloudDialogflowV3alpha1TurnSignals
  { -- | Whether agent responded with LiveAgentHandoff fulfillment.
    agentEscalated :: (Core.Maybe Core.Bool),
    -- | Whether user was using DTMF input.
    dtmfUsed :: (Core.Maybe Core.Bool),
    -- | Failure reasons of the turn.
    failureReasons ::
      ( Core.Maybe
          [GoogleCloudDialogflowV3alpha1TurnSignals_FailureReasonsItem]
      ),
    -- | Whether NLU predicted NO_MATCH.
    noMatch :: (Core.Maybe Core.Bool),
    -- | Whether user provided no input.
    noUserInput :: (Core.Maybe Core.Bool),
    -- | Whether turn resulted in End Session page.
    reachedEndPage :: (Core.Maybe Core.Bool),
    -- | Sentiment magnitude of the user utterance if <https://cloud.google.com/dialogflow/cx/docs/concept/sentiment sentiment> was enabled.
    sentimentMagnitude :: (Core.Maybe Core.Double),
    -- | Sentiment score of the user utterance if <https://cloud.google.com/dialogflow/cx/docs/concept/sentiment sentiment> was enabled.
    sentimentScore :: (Core.Maybe Core.Double),
    -- | Whether agent has triggered the event corresponding to user abandoning the conversation.
    triggeredAbandonmentEvent :: (Core.Maybe Core.Bool),
    -- | Whether user was specifically asking for a live agent.
    userEscalated :: (Core.Maybe Core.Bool),
    -- | Human-readable statuses of the webhooks triggered during this turn.
    webhookStatuses :: (Core.Maybe [Core.Text])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudDialogflowV3alpha1TurnSignals' with the minimum fields required to make a request.
newGoogleCloudDialogflowV3alpha1TurnSignals ::
  GoogleCloudDialogflowV3alpha1TurnSignals
newGoogleCloudDialogflowV3alpha1TurnSignals =
  GoogleCloudDialogflowV3alpha1TurnSignals
    { agentEscalated =
        Core.Nothing,
      dtmfUsed = Core.Nothing,
      failureReasons = Core.Nothing,
      noMatch = Core.Nothing,
      noUserInput = Core.Nothing,
      reachedEndPage = Core.Nothing,
      sentimentMagnitude = Core.Nothing,
      sentimentScore = Core.Nothing,
      triggeredAbandonmentEvent = Core.Nothing,
      userEscalated = Core.Nothing,
      webhookStatuses = Core.Nothing
    }

instance Core.FromJSON GoogleCloudDialogflowV3alpha1TurnSignals where
  parseJSON =
    Core.withObject
      "GoogleCloudDialogflowV3alpha1TurnSignals"
      ( \o ->
          GoogleCloudDialogflowV3alpha1TurnSignals
            Core.<$> (o Core..:? "agentEscalated")
            Core.<*> (o Core..:? "dtmfUsed")
            Core.<*> (o Core..:? "failureReasons")
            Core.<*> (o Core..:? "noMatch")
            Core.<*> (o Core..:? "noUserInput")
            Core.<*> (o Core..:? "reachedEndPage")
            Core.<*> (o Core..:? "sentimentMagnitude")
            Core.<*> (o Core..:? "sentimentScore")
            Core.<*> (o Core..:? "triggeredAbandonmentEvent")
            Core.<*> (o Core..:? "userEscalated")
            Core.<*> (o Core..:? "webhookStatuses")
      )

instance Core.ToJSON GoogleCloudDialogflowV3alpha1TurnSignals where
  toJSON GoogleCloudDialogflowV3alpha1TurnSignals {..} =
    Core.object
      ( Core.catMaybes
          [ ("agentEscalated" Core..=) Core.<$> agentEscalated,
            ("dtmfUsed" Core..=) Core.<$> dtmfUsed,
            ("failureReasons" Core..=) Core.<$> failureReasons,
            ("noMatch" Core..=) Core.<$> noMatch,
            ("noUserInput" Core..=) Core.<$> noUserInput,
            ("reachedEndPage" Core..=) Core.<$> reachedEndPage,
            ("sentimentMagnitude" Core..=) Core.<$> sentimentMagnitude,
            ("sentimentScore" Core..=) Core.<$> sentimentScore,
            ("triggeredAbandonmentEvent" Core..=)
              Core.<$> triggeredAbandonmentEvent,
            ("userEscalated" Core..=) Core.<$> userEscalated,
            ("webhookStatuses" Core..=) Core.<$> webhookStatuses
          ]
      )

-- | The response message for Locations.ListLocations.
--
-- /See:/ 'newGoogleCloudLocationListLocationsResponse' smart constructor.
data GoogleCloudLocationListLocationsResponse = GoogleCloudLocationListLocationsResponse
  { -- | A list of locations that matches the specified filter in the request.
    locations :: (Core.Maybe [GoogleCloudLocationLocation]),
    -- | The standard List next-page token.
    nextPageToken :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudLocationListLocationsResponse' with the minimum fields required to make a request.
newGoogleCloudLocationListLocationsResponse ::
  GoogleCloudLocationListLocationsResponse
newGoogleCloudLocationListLocationsResponse =
  GoogleCloudLocationListLocationsResponse
    { locations =
        Core.Nothing,
      nextPageToken = Core.Nothing
    }

instance Core.FromJSON GoogleCloudLocationListLocationsResponse where
  parseJSON =
    Core.withObject
      "GoogleCloudLocationListLocationsResponse"
      ( \o ->
          GoogleCloudLocationListLocationsResponse
            Core.<$> (o Core..:? "locations")
            Core.<*> (o Core..:? "nextPageToken")
      )

instance Core.ToJSON GoogleCloudLocationListLocationsResponse where
  toJSON GoogleCloudLocationListLocationsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("locations" Core..=) Core.<$> locations,
            ("nextPageToken" Core..=) Core.<$> nextPageToken
          ]
      )

-- | A resource that represents a Google Cloud location.
--
-- /See:/ 'newGoogleCloudLocationLocation' smart constructor.
data GoogleCloudLocationLocation = GoogleCloudLocationLocation
  { -- | The friendly name for this location, typically a nearby city name. For example, \"Tokyo\".
    displayName :: (Core.Maybe Core.Text),
    -- | Cross-service attributes for the location. For example {\"cloud.googleapis.com\/region\": \"us-east1\"}
    labels :: (Core.Maybe GoogleCloudLocationLocation_Labels),
    -- | The canonical id for this location. For example: @\"us-east1\"@.
    locationId :: (Core.Maybe Core.Text),
    -- | Service-specific metadata. For example the available capacity at the given location.
    metadata :: (Core.Maybe GoogleCloudLocationLocation_Metadata),
    -- | Resource name for the location, which may vary between implementations. For example: @\"projects\/example-project\/locations\/us-east1\"@
    name :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudLocationLocation' with the minimum fields required to make a request.
newGoogleCloudLocationLocation ::
  GoogleCloudLocationLocation
newGoogleCloudLocationLocation =
  GoogleCloudLocationLocation
    { displayName = Core.Nothing,
      labels = Core.Nothing,
      locationId = Core.Nothing,
      metadata = Core.Nothing,
      name = Core.Nothing
    }

instance Core.FromJSON GoogleCloudLocationLocation where
  parseJSON =
    Core.withObject
      "GoogleCloudLocationLocation"
      ( \o ->
          GoogleCloudLocationLocation
            Core.<$> (o Core..:? "displayName")
            Core.<*> (o Core..:? "labels")
            Core.<*> (o Core..:? "locationId")
            Core.<*> (o Core..:? "metadata")
            Core.<*> (o Core..:? "name")
      )

instance Core.ToJSON GoogleCloudLocationLocation where
  toJSON GoogleCloudLocationLocation {..} =
    Core.object
      ( Core.catMaybes
          [ ("displayName" Core..=) Core.<$> displayName,
            ("labels" Core..=) Core.<$> labels,
            ("locationId" Core..=) Core.<$> locationId,
            ("metadata" Core..=) Core.<$> metadata,
            ("name" Core..=) Core.<$> name
          ]
      )

-- | Cross-service attributes for the location. For example {\"cloud.googleapis.com\/region\": \"us-east1\"}
--
-- /See:/ 'newGoogleCloudLocationLocation_Labels' smart constructor.
newtype GoogleCloudLocationLocation_Labels = GoogleCloudLocationLocation_Labels
  { additional :: (Core.HashMap Core.Text Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudLocationLocation_Labels' with the minimum fields required to make a request.
newGoogleCloudLocationLocation_Labels ::
  -- |  See 'additional'.
  Core.HashMap Core.Text Core.Text ->
  GoogleCloudLocationLocation_Labels
newGoogleCloudLocationLocation_Labels additional =
  GoogleCloudLocationLocation_Labels {additional = additional}

instance Core.FromJSON GoogleCloudLocationLocation_Labels where
  parseJSON =
    Core.withObject
      "GoogleCloudLocationLocation_Labels"
      ( \o ->
          GoogleCloudLocationLocation_Labels
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudLocationLocation_Labels where
  toJSON GoogleCloudLocationLocation_Labels {..} =
    Core.toJSON additional

-- | Service-specific metadata. For example the available capacity at the given location.
--
-- /See:/ 'newGoogleCloudLocationLocation_Metadata' smart constructor.
newtype GoogleCloudLocationLocation_Metadata = GoogleCloudLocationLocation_Metadata
  { -- | Properties of the object. Contains field \@type with type URL.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleCloudLocationLocation_Metadata' with the minimum fields required to make a request.
newGoogleCloudLocationLocation_Metadata ::
  -- |  Properties of the object. Contains field \@type with type URL. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleCloudLocationLocation_Metadata
newGoogleCloudLocationLocation_Metadata additional =
  GoogleCloudLocationLocation_Metadata {additional = additional}

instance Core.FromJSON GoogleCloudLocationLocation_Metadata where
  parseJSON =
    Core.withObject
      "GoogleCloudLocationLocation_Metadata"
      ( \o ->
          GoogleCloudLocationLocation_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleCloudLocationLocation_Metadata where
  toJSON GoogleCloudLocationLocation_Metadata {..} =
    Core.toJSON additional

-- | The response message for Operations.ListOperations.
--
-- /See:/ 'newGoogleLongrunningListOperationsResponse' smart constructor.
data GoogleLongrunningListOperationsResponse = GoogleLongrunningListOperationsResponse
  { -- | The standard List next-page token.
    nextPageToken :: (Core.Maybe Core.Text),
    -- | A list of operations that matches the specified filter in the request.
    operations :: (Core.Maybe [GoogleLongrunningOperation])
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleLongrunningListOperationsResponse' with the minimum fields required to make a request.
newGoogleLongrunningListOperationsResponse ::
  GoogleLongrunningListOperationsResponse
newGoogleLongrunningListOperationsResponse =
  GoogleLongrunningListOperationsResponse
    { nextPageToken =
        Core.Nothing,
      operations = Core.Nothing
    }

instance Core.FromJSON GoogleLongrunningListOperationsResponse where
  parseJSON =
    Core.withObject
      "GoogleLongrunningListOperationsResponse"
      ( \o ->
          GoogleLongrunningListOperationsResponse
            Core.<$> (o Core..:? "nextPageToken")
            Core.<*> (o Core..:? "operations")
      )

instance Core.ToJSON GoogleLongrunningListOperationsResponse where
  toJSON GoogleLongrunningListOperationsResponse {..} =
    Core.object
      ( Core.catMaybes
          [ ("nextPageToken" Core..=) Core.<$> nextPageToken,
            ("operations" Core..=) Core.<$> operations
          ]
      )

-- | This resource represents a long-running operation that is the result of a network API call.
--
-- /See:/ 'newGoogleLongrunningOperation' smart constructor.
data GoogleLongrunningOperation = GoogleLongrunningOperation
  { -- | If the value is @false@, it means the operation is still in progress. If @true@, the operation is completed, and either @error@ or @response@ is available.
    done :: (Core.Maybe Core.Bool),
    -- | The error result of the operation in case of failure or cancellation.
    error :: (Core.Maybe GoogleRpcStatus),
    -- | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
    metadata :: (Core.Maybe GoogleLongrunningOperation_Metadata),
    -- | The server-assigned name, which is only unique within the same service that originally returns it. If you use the default HTTP mapping, the @name@ should be a resource name ending with @operations\/{unique_id}@.
    name :: (Core.Maybe Core.Text),
    -- | The normal, successful response of the operation. If the original method returns no data on success, such as @Delete@, the response is @google.protobuf.Empty@. If the original method is standard @Get@\/@Create@\/@Update@, the response should be the resource. For other methods, the response should have the type @XxxResponse@, where @Xxx@ is the original method name. For example, if the original method name is @TakeSnapshot()@, the inferred response type is @TakeSnapshotResponse@.
    response :: (Core.Maybe GoogleLongrunningOperation_Response)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleLongrunningOperation' with the minimum fields required to make a request.
newGoogleLongrunningOperation ::
  GoogleLongrunningOperation
newGoogleLongrunningOperation =
  GoogleLongrunningOperation
    { done = Core.Nothing,
      error = Core.Nothing,
      metadata = Core.Nothing,
      name = Core.Nothing,
      response = Core.Nothing
    }

instance Core.FromJSON GoogleLongrunningOperation where
  parseJSON =
    Core.withObject
      "GoogleLongrunningOperation"
      ( \o ->
          GoogleLongrunningOperation
            Core.<$> (o Core..:? "done")
            Core.<*> (o Core..:? "error")
            Core.<*> (o Core..:? "metadata")
            Core.<*> (o Core..:? "name")
            Core.<*> (o Core..:? "response")
      )

instance Core.ToJSON GoogleLongrunningOperation where
  toJSON GoogleLongrunningOperation {..} =
    Core.object
      ( Core.catMaybes
          [ ("done" Core..=) Core.<$> done,
            ("error" Core..=) Core.<$> error,
            ("metadata" Core..=) Core.<$> metadata,
            ("name" Core..=) Core.<$> name,
            ("response" Core..=) Core.<$> response
          ]
      )

-- | Service-specific metadata associated with the operation. It typically contains progress information and common metadata such as create time. Some services might not provide such metadata. Any method that returns a long-running operation should document the metadata type, if any.
--
-- /See:/ 'newGoogleLongrunningOperation_Metadata' smart constructor.
newtype GoogleLongrunningOperation_Metadata = GoogleLongrunningOperation_Metadata
  { -- | Properties of the object. Contains field \@type with type URL.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleLongrunningOperation_Metadata' with the minimum fields required to make a request.
newGoogleLongrunningOperation_Metadata ::
  -- |  Properties of the object. Contains field \@type with type URL. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleLongrunningOperation_Metadata
newGoogleLongrunningOperation_Metadata additional =
  GoogleLongrunningOperation_Metadata {additional = additional}

instance Core.FromJSON GoogleLongrunningOperation_Metadata where
  parseJSON =
    Core.withObject
      "GoogleLongrunningOperation_Metadata"
      ( \o ->
          GoogleLongrunningOperation_Metadata
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleLongrunningOperation_Metadata where
  toJSON GoogleLongrunningOperation_Metadata {..} =
    Core.toJSON additional

-- | The normal, successful response of the operation. If the original method returns no data on success, such as @Delete@, the response is @google.protobuf.Empty@. If the original method is standard @Get@\/@Create@\/@Update@, the response should be the resource. For other methods, the response should have the type @XxxResponse@, where @Xxx@ is the original method name. For example, if the original method name is @TakeSnapshot()@, the inferred response type is @TakeSnapshotResponse@.
--
-- /See:/ 'newGoogleLongrunningOperation_Response' smart constructor.
newtype GoogleLongrunningOperation_Response = GoogleLongrunningOperation_Response
  { -- | Properties of the object. Contains field \@type with type URL.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleLongrunningOperation_Response' with the minimum fields required to make a request.
newGoogleLongrunningOperation_Response ::
  -- |  Properties of the object. Contains field \@type with type URL. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleLongrunningOperation_Response
newGoogleLongrunningOperation_Response additional =
  GoogleLongrunningOperation_Response {additional = additional}

instance Core.FromJSON GoogleLongrunningOperation_Response where
  parseJSON =
    Core.withObject
      "GoogleLongrunningOperation_Response"
      ( \o ->
          GoogleLongrunningOperation_Response
            Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleLongrunningOperation_Response where
  toJSON GoogleLongrunningOperation_Response {..} =
    Core.toJSON additional

-- | A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); }
--
-- /See:/ 'newGoogleProtobufEmpty' smart constructor.
data GoogleProtobufEmpty = GoogleProtobufEmpty
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleProtobufEmpty' with the minimum fields required to make a request.
newGoogleProtobufEmpty ::
  GoogleProtobufEmpty
newGoogleProtobufEmpty = GoogleProtobufEmpty

instance Core.FromJSON GoogleProtobufEmpty where
  parseJSON =
    Core.withObject
      "GoogleProtobufEmpty"
      (\o -> Core.pure GoogleProtobufEmpty)

instance Core.ToJSON GoogleProtobufEmpty where
  toJSON = Core.const Core.emptyObject

-- | The @Status@ type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by <https://github.com/grpc gRPC>. Each @Status@ message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the <https://cloud.google.com/apis/design/errors API Design Guide>.
--
-- /See:/ 'newGoogleRpcStatus' smart constructor.
data GoogleRpcStatus = GoogleRpcStatus
  { -- | The status code, which should be an enum value of google.rpc.Code.
    code :: (Core.Maybe Core.Int32),
    -- | A list of messages that carry the error details. There is a common set of message types for APIs to use.
    details :: (Core.Maybe [GoogleRpcStatus_DetailsItem]),
    -- | A developer-facing error message, which should be in English. Any user-facing error message should be localized and sent in the google.rpc.Status.details field, or localized by the client.
    message :: (Core.Maybe Core.Text)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleRpcStatus' with the minimum fields required to make a request.
newGoogleRpcStatus ::
  GoogleRpcStatus
newGoogleRpcStatus =
  GoogleRpcStatus
    { code = Core.Nothing,
      details = Core.Nothing,
      message = Core.Nothing
    }

instance Core.FromJSON GoogleRpcStatus where
  parseJSON =
    Core.withObject
      "GoogleRpcStatus"
      ( \o ->
          GoogleRpcStatus
            Core.<$> (o Core..:? "code")
            Core.<*> (o Core..:? "details")
            Core.<*> (o Core..:? "message")
      )

instance Core.ToJSON GoogleRpcStatus where
  toJSON GoogleRpcStatus {..} =
    Core.object
      ( Core.catMaybes
          [ ("code" Core..=) Core.<$> code,
            ("details" Core..=) Core.<$> details,
            ("message" Core..=) Core.<$> message
          ]
      )

--
-- /See:/ 'newGoogleRpcStatus_DetailsItem' smart constructor.
newtype GoogleRpcStatus_DetailsItem = GoogleRpcStatus_DetailsItem
  { -- | Properties of the object. Contains field \@type with type URL.
    additional :: (Core.HashMap Core.Text Core.Value)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleRpcStatus_DetailsItem' with the minimum fields required to make a request.
newGoogleRpcStatus_DetailsItem ::
  -- |  Properties of the object. Contains field \@type with type URL. See 'additional'.
  Core.HashMap Core.Text Core.Value ->
  GoogleRpcStatus_DetailsItem
newGoogleRpcStatus_DetailsItem additional =
  GoogleRpcStatus_DetailsItem {additional = additional}

instance Core.FromJSON GoogleRpcStatus_DetailsItem where
  parseJSON =
    Core.withObject
      "GoogleRpcStatus_DetailsItem"
      ( \o ->
          GoogleRpcStatus_DetailsItem Core.<$> (Core.parseJSONObject o)
      )

instance Core.ToJSON GoogleRpcStatus_DetailsItem where
  toJSON GoogleRpcStatus_DetailsItem {..} = Core.toJSON additional

-- | An object that represents a latitude\/longitude pair. This is expressed as a pair of doubles to represent degrees latitude and degrees longitude. Unless specified otherwise, this object must conform to the WGS84 standard. Values must be within normalized ranges.
--
-- /See:/ 'newGoogleTypeLatLng' smart constructor.
data GoogleTypeLatLng = GoogleTypeLatLng
  { -- | The latitude in degrees. It must be in the range [-90.0, +90.0].
    latitude :: (Core.Maybe Core.Double),
    -- | The longitude in degrees. It must be in the range [-180.0, +180.0].
    longitude :: (Core.Maybe Core.Double)
  }
  deriving (Core.Eq, Core.Show, Core.Generic)

-- | Creates a value of 'GoogleTypeLatLng' with the minimum fields required to make a request.
newGoogleTypeLatLng ::
  GoogleTypeLatLng
newGoogleTypeLatLng =
  GoogleTypeLatLng
    { latitude = Core.Nothing,
      longitude = Core.Nothing
    }

instance Core.FromJSON GoogleTypeLatLng where
  parseJSON =
    Core.withObject
      "GoogleTypeLatLng"
      ( \o ->
          GoogleTypeLatLng
            Core.<$> (o Core..:? "latitude")
            Core.<*> (o Core..:? "longitude")
      )

instance Core.ToJSON GoogleTypeLatLng where
  toJSON GoogleTypeLatLng {..} =
    Core.object
      ( Core.catMaybes
          [ ("latitude" Core..=) Core.<$> latitude,
            ("longitude" Core..=) Core.<$> longitude
          ]
      )