{-# 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.Export
(
ProjectsAgentExportResource
, projectsAgentExport
, ProjectsAgentExport
, paeParent
, paeXgafv
, paeUploadProtocol
, paeAccessToken
, paeUploadType
, paePayload
, paeCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentExportResource =
"v2" :>
Capture "parent" Text :>
"agent:export" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudDialogflowV2ExportAgentRequest
:> Post '[JSON] GoogleLongrunningOperation
data ProjectsAgentExport = ProjectsAgentExport'
{ _paeParent :: !Text
, _paeXgafv :: !(Maybe Xgafv)
, _paeUploadProtocol :: !(Maybe Text)
, _paeAccessToken :: !(Maybe Text)
, _paeUploadType :: !(Maybe Text)
, _paePayload :: !GoogleCloudDialogflowV2ExportAgentRequest
, _paeCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentExport
:: Text
-> GoogleCloudDialogflowV2ExportAgentRequest
-> ProjectsAgentExport
projectsAgentExport pPaeParent_ pPaePayload_ =
ProjectsAgentExport'
{ _paeParent = pPaeParent_
, _paeXgafv = Nothing
, _paeUploadProtocol = Nothing
, _paeAccessToken = Nothing
, _paeUploadType = Nothing
, _paePayload = pPaePayload_
, _paeCallback = Nothing
}
paeParent :: Lens' ProjectsAgentExport Text
paeParent
= lens _paeParent (\ s a -> s{_paeParent = a})
paeXgafv :: Lens' ProjectsAgentExport (Maybe Xgafv)
paeXgafv = lens _paeXgafv (\ s a -> s{_paeXgafv = a})
paeUploadProtocol :: Lens' ProjectsAgentExport (Maybe Text)
paeUploadProtocol
= lens _paeUploadProtocol
(\ s a -> s{_paeUploadProtocol = a})
paeAccessToken :: Lens' ProjectsAgentExport (Maybe Text)
paeAccessToken
= lens _paeAccessToken
(\ s a -> s{_paeAccessToken = a})
paeUploadType :: Lens' ProjectsAgentExport (Maybe Text)
paeUploadType
= lens _paeUploadType
(\ s a -> s{_paeUploadType = a})
paePayload :: Lens' ProjectsAgentExport GoogleCloudDialogflowV2ExportAgentRequest
paePayload
= lens _paePayload (\ s a -> s{_paePayload = a})
paeCallback :: Lens' ProjectsAgentExport (Maybe Text)
paeCallback
= lens _paeCallback (\ s a -> s{_paeCallback = a})
instance GoogleRequest ProjectsAgentExport where
type Rs ProjectsAgentExport =
GoogleLongrunningOperation
type Scopes ProjectsAgentExport =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentExport'{..}
= go _paeParent _paeXgafv _paeUploadProtocol
_paeAccessToken
_paeUploadType
_paeCallback
(Just AltJSON)
_paePayload
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsAgentExportResource)
mempty