{-# 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.Intents.Create
(
ProjectsAgentIntentsCreateResource
, projectsAgentIntentsCreate
, ProjectsAgentIntentsCreate
, paicParent
, paicXgafv
, paicLanguageCode
, paicUploadProtocol
, paicAccessToken
, paicUploadType
, paicPayload
, paicIntentView
, paicCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentIntentsCreateResource =
"v2" :>
Capture "parent" Text :>
"intents" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "languageCode" Text :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "intentView" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] GoogleCloudDialogflowV2Intent :>
Post '[JSON] GoogleCloudDialogflowV2Intent
data ProjectsAgentIntentsCreate = ProjectsAgentIntentsCreate'
{ _paicParent :: !Text
, _paicXgafv :: !(Maybe Xgafv)
, _paicLanguageCode :: !(Maybe Text)
, _paicUploadProtocol :: !(Maybe Text)
, _paicAccessToken :: !(Maybe Text)
, _paicUploadType :: !(Maybe Text)
, _paicPayload :: !GoogleCloudDialogflowV2Intent
, _paicIntentView :: !(Maybe Text)
, _paicCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentIntentsCreate
:: Text
-> GoogleCloudDialogflowV2Intent
-> ProjectsAgentIntentsCreate
projectsAgentIntentsCreate pPaicParent_ pPaicPayload_ =
ProjectsAgentIntentsCreate'
{ _paicParent = pPaicParent_
, _paicXgafv = Nothing
, _paicLanguageCode = Nothing
, _paicUploadProtocol = Nothing
, _paicAccessToken = Nothing
, _paicUploadType = Nothing
, _paicPayload = pPaicPayload_
, _paicIntentView = Nothing
, _paicCallback = Nothing
}
paicParent :: Lens' ProjectsAgentIntentsCreate Text
paicParent
= lens _paicParent (\ s a -> s{_paicParent = a})
paicXgafv :: Lens' ProjectsAgentIntentsCreate (Maybe Xgafv)
paicXgafv
= lens _paicXgafv (\ s a -> s{_paicXgafv = a})
paicLanguageCode :: Lens' ProjectsAgentIntentsCreate (Maybe Text)
paicLanguageCode
= lens _paicLanguageCode
(\ s a -> s{_paicLanguageCode = a})
paicUploadProtocol :: Lens' ProjectsAgentIntentsCreate (Maybe Text)
paicUploadProtocol
= lens _paicUploadProtocol
(\ s a -> s{_paicUploadProtocol = a})
paicAccessToken :: Lens' ProjectsAgentIntentsCreate (Maybe Text)
paicAccessToken
= lens _paicAccessToken
(\ s a -> s{_paicAccessToken = a})
paicUploadType :: Lens' ProjectsAgentIntentsCreate (Maybe Text)
paicUploadType
= lens _paicUploadType
(\ s a -> s{_paicUploadType = a})
paicPayload :: Lens' ProjectsAgentIntentsCreate GoogleCloudDialogflowV2Intent
paicPayload
= lens _paicPayload (\ s a -> s{_paicPayload = a})
paicIntentView :: Lens' ProjectsAgentIntentsCreate (Maybe Text)
paicIntentView
= lens _paicIntentView
(\ s a -> s{_paicIntentView = a})
paicCallback :: Lens' ProjectsAgentIntentsCreate (Maybe Text)
paicCallback
= lens _paicCallback (\ s a -> s{_paicCallback = a})
instance GoogleRequest ProjectsAgentIntentsCreate
where
type Rs ProjectsAgentIntentsCreate =
GoogleCloudDialogflowV2Intent
type Scopes ProjectsAgentIntentsCreate =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentIntentsCreate'{..}
= go _paicParent _paicXgafv _paicLanguageCode
_paicUploadProtocol
_paicAccessToken
_paicUploadType
_paicIntentView
_paicCallback
(Just AltJSON)
_paicPayload
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsAgentIntentsCreateResource)
mempty