{-# 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.Import
(
ProjectsAgentImportResource
, projectsAgentImport
, ProjectsAgentImport
, paiParent
, paiXgafv
, paiUploadProtocol
, paiAccessToken
, paiUploadType
, paiPayload
, paiCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentImportResource =
"v2" :>
Capture "parent" Text :>
"agent:import" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudDialogflowV2ImportAgentRequest
:> Post '[JSON] GoogleLongrunningOperation
data ProjectsAgentImport = ProjectsAgentImport'
{ _paiParent :: !Text
, _paiXgafv :: !(Maybe Xgafv)
, _paiUploadProtocol :: !(Maybe Text)
, _paiAccessToken :: !(Maybe Text)
, _paiUploadType :: !(Maybe Text)
, _paiPayload :: !GoogleCloudDialogflowV2ImportAgentRequest
, _paiCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentImport
:: Text
-> GoogleCloudDialogflowV2ImportAgentRequest
-> ProjectsAgentImport
projectsAgentImport pPaiParent_ pPaiPayload_ =
ProjectsAgentImport'
{ _paiParent = pPaiParent_
, _paiXgafv = Nothing
, _paiUploadProtocol = Nothing
, _paiAccessToken = Nothing
, _paiUploadType = Nothing
, _paiPayload = pPaiPayload_
, _paiCallback = Nothing
}
paiParent :: Lens' ProjectsAgentImport Text
paiParent
= lens _paiParent (\ s a -> s{_paiParent = a})
paiXgafv :: Lens' ProjectsAgentImport (Maybe Xgafv)
paiXgafv = lens _paiXgafv (\ s a -> s{_paiXgafv = a})
paiUploadProtocol :: Lens' ProjectsAgentImport (Maybe Text)
paiUploadProtocol
= lens _paiUploadProtocol
(\ s a -> s{_paiUploadProtocol = a})
paiAccessToken :: Lens' ProjectsAgentImport (Maybe Text)
paiAccessToken
= lens _paiAccessToken
(\ s a -> s{_paiAccessToken = a})
paiUploadType :: Lens' ProjectsAgentImport (Maybe Text)
paiUploadType
= lens _paiUploadType
(\ s a -> s{_paiUploadType = a})
paiPayload :: Lens' ProjectsAgentImport GoogleCloudDialogflowV2ImportAgentRequest
paiPayload
= lens _paiPayload (\ s a -> s{_paiPayload = a})
paiCallback :: Lens' ProjectsAgentImport (Maybe Text)
paiCallback
= lens _paiCallback (\ s a -> s{_paiCallback = a})
instance GoogleRequest ProjectsAgentImport where
type Rs ProjectsAgentImport =
GoogleLongrunningOperation
type Scopes ProjectsAgentImport =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentImport'{..}
= go _paiParent _paiXgafv _paiUploadProtocol
_paiAccessToken
_paiUploadType
_paiCallback
(Just AltJSON)
_paiPayload
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsAgentImportResource)
mempty