{-# LANGUAGE DataKinds #-}
{-# LANGUAGE DeriveDataTypeable #-}
{-# LANGUAGE DeriveGeneric #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE NoImplicitPrelude #-}
{-# LANGUAGE OverloadedStrings #-}
{-# LANGUAGE RecordWildCards #-}
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -fno-warn-duplicate-exports #-}
{-# OPTIONS_GHC -fno-warn-unused-binds #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
module Network.Google.Resource.DialogFlow.Projects.Agent.Sessions.DetectIntent
(
ProjectsAgentSessionsDetectIntentResource
, projectsAgentSessionsDetectIntent
, ProjectsAgentSessionsDetectIntent
, pasdiXgafv
, pasdiUploadProtocol
, pasdiAccessToken
, pasdiUploadType
, pasdiPayload
, pasdiSession
, pasdiCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentSessionsDetectIntentResource =
"v2" :>
CaptureMode "session" "detectIntent" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudDialogflowV2DetectIntentRequest
:>
Post '[JSON]
GoogleCloudDialogflowV2DetectIntentResponse
data ProjectsAgentSessionsDetectIntent = ProjectsAgentSessionsDetectIntent'
{ _pasdiXgafv :: !(Maybe Xgafv)
, _pasdiUploadProtocol :: !(Maybe Text)
, _pasdiAccessToken :: !(Maybe Text)
, _pasdiUploadType :: !(Maybe Text)
, _pasdiPayload :: !GoogleCloudDialogflowV2DetectIntentRequest
, _pasdiSession :: !Text
, _pasdiCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentSessionsDetectIntent
:: GoogleCloudDialogflowV2DetectIntentRequest
-> Text
-> ProjectsAgentSessionsDetectIntent
projectsAgentSessionsDetectIntent pPasdiPayload_ pPasdiSession_ =
ProjectsAgentSessionsDetectIntent'
{ _pasdiXgafv = Nothing
, _pasdiUploadProtocol = Nothing
, _pasdiAccessToken = Nothing
, _pasdiUploadType = Nothing
, _pasdiPayload = pPasdiPayload_
, _pasdiSession = pPasdiSession_
, _pasdiCallback = Nothing
}
pasdiXgafv :: Lens' ProjectsAgentSessionsDetectIntent (Maybe Xgafv)
pasdiXgafv
= lens _pasdiXgafv (\ s a -> s{_pasdiXgafv = a})
pasdiUploadProtocol :: Lens' ProjectsAgentSessionsDetectIntent (Maybe Text)
pasdiUploadProtocol
= lens _pasdiUploadProtocol
(\ s a -> s{_pasdiUploadProtocol = a})
pasdiAccessToken :: Lens' ProjectsAgentSessionsDetectIntent (Maybe Text)
pasdiAccessToken
= lens _pasdiAccessToken
(\ s a -> s{_pasdiAccessToken = a})
pasdiUploadType :: Lens' ProjectsAgentSessionsDetectIntent (Maybe Text)
pasdiUploadType
= lens _pasdiUploadType
(\ s a -> s{_pasdiUploadType = a})
pasdiPayload :: Lens' ProjectsAgentSessionsDetectIntent GoogleCloudDialogflowV2DetectIntentRequest
pasdiPayload
= lens _pasdiPayload (\ s a -> s{_pasdiPayload = a})
pasdiSession :: Lens' ProjectsAgentSessionsDetectIntent Text
pasdiSession
= lens _pasdiSession (\ s a -> s{_pasdiSession = a})
pasdiCallback :: Lens' ProjectsAgentSessionsDetectIntent (Maybe Text)
pasdiCallback
= lens _pasdiCallback
(\ s a -> s{_pasdiCallback = a})
instance GoogleRequest
ProjectsAgentSessionsDetectIntent where
type Rs ProjectsAgentSessionsDetectIntent =
GoogleCloudDialogflowV2DetectIntentResponse
type Scopes ProjectsAgentSessionsDetectIntent =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentSessionsDetectIntent'{..}
= go _pasdiSession _pasdiXgafv _pasdiUploadProtocol
_pasdiAccessToken
_pasdiUploadType
_pasdiCallback
(Just AltJSON)
_pasdiPayload
dialogFlowService
where go
= buildClient
(Proxy ::
Proxy ProjectsAgentSessionsDetectIntentResource)
mempty