{-# 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.Restore
(
ProjectsAgentRestoreResource
, projectsAgentRestore
, ProjectsAgentRestore
, parParent
, parXgafv
, parUploadProtocol
, parAccessToken
, parUploadType
, parPayload
, parCallback
) where
import Network.Google.DialogFlow.Types
import Network.Google.Prelude
type ProjectsAgentRestoreResource =
"v2" :>
Capture "parent" Text :>
"agent:restore" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON]
GoogleCloudDialogflowV2RestoreAgentRequest
:> Post '[JSON] GoogleLongrunningOperation
data ProjectsAgentRestore = ProjectsAgentRestore'
{ _parParent :: !Text
, _parXgafv :: !(Maybe Xgafv)
, _parUploadProtocol :: !(Maybe Text)
, _parAccessToken :: !(Maybe Text)
, _parUploadType :: !(Maybe Text)
, _parPayload :: !GoogleCloudDialogflowV2RestoreAgentRequest
, _parCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
projectsAgentRestore
:: Text
-> GoogleCloudDialogflowV2RestoreAgentRequest
-> ProjectsAgentRestore
projectsAgentRestore pParParent_ pParPayload_ =
ProjectsAgentRestore'
{ _parParent = pParParent_
, _parXgafv = Nothing
, _parUploadProtocol = Nothing
, _parAccessToken = Nothing
, _parUploadType = Nothing
, _parPayload = pParPayload_
, _parCallback = Nothing
}
parParent :: Lens' ProjectsAgentRestore Text
parParent
= lens _parParent (\ s a -> s{_parParent = a})
parXgafv :: Lens' ProjectsAgentRestore (Maybe Xgafv)
parXgafv = lens _parXgafv (\ s a -> s{_parXgafv = a})
parUploadProtocol :: Lens' ProjectsAgentRestore (Maybe Text)
parUploadProtocol
= lens _parUploadProtocol
(\ s a -> s{_parUploadProtocol = a})
parAccessToken :: Lens' ProjectsAgentRestore (Maybe Text)
parAccessToken
= lens _parAccessToken
(\ s a -> s{_parAccessToken = a})
parUploadType :: Lens' ProjectsAgentRestore (Maybe Text)
parUploadType
= lens _parUploadType
(\ s a -> s{_parUploadType = a})
parPayload :: Lens' ProjectsAgentRestore GoogleCloudDialogflowV2RestoreAgentRequest
parPayload
= lens _parPayload (\ s a -> s{_parPayload = a})
parCallback :: Lens' ProjectsAgentRestore (Maybe Text)
parCallback
= lens _parCallback (\ s a -> s{_parCallback = a})
instance GoogleRequest ProjectsAgentRestore where
type Rs ProjectsAgentRestore =
GoogleLongrunningOperation
type Scopes ProjectsAgentRestore =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/dialogflow"]
requestClient ProjectsAgentRestore'{..}
= go _parParent _parXgafv _parUploadProtocol
_parAccessToken
_parUploadType
_parCallback
(Just AltJSON)
_parPayload
dialogFlowService
where go
= buildClient
(Proxy :: Proxy ProjectsAgentRestoreResource)
mempty