{-# 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.CloudResourceManager.Folders.Undelete
(
FoldersUndeleteResource
, foldersUndelete
, FoldersUndelete
, fuXgafv
, fuUploadProtocol
, fuAccessToken
, fuUploadType
, fuPayload
, fuName
, fuCallback
) where
import Network.Google.Prelude
import Network.Google.ResourceManager.Types
type FoldersUndeleteResource =
"v2" :>
CaptureMode "name" "undelete" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UndeleteFolderRequest :>
Post '[JSON] Folder
data FoldersUndelete = FoldersUndelete'
{ _fuXgafv :: !(Maybe Xgafv)
, _fuUploadProtocol :: !(Maybe Text)
, _fuAccessToken :: !(Maybe Text)
, _fuUploadType :: !(Maybe Text)
, _fuPayload :: !UndeleteFolderRequest
, _fuName :: !Text
, _fuCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersUndelete
:: UndeleteFolderRequest
-> Text
-> FoldersUndelete
foldersUndelete pFuPayload_ pFuName_ =
FoldersUndelete'
{ _fuXgafv = Nothing
, _fuUploadProtocol = Nothing
, _fuAccessToken = Nothing
, _fuUploadType = Nothing
, _fuPayload = pFuPayload_
, _fuName = pFuName_
, _fuCallback = Nothing
}
fuXgafv :: Lens' FoldersUndelete (Maybe Xgafv)
fuXgafv = lens _fuXgafv (\ s a -> s{_fuXgafv = a})
fuUploadProtocol :: Lens' FoldersUndelete (Maybe Text)
fuUploadProtocol
= lens _fuUploadProtocol
(\ s a -> s{_fuUploadProtocol = a})
fuAccessToken :: Lens' FoldersUndelete (Maybe Text)
fuAccessToken
= lens _fuAccessToken
(\ s a -> s{_fuAccessToken = a})
fuUploadType :: Lens' FoldersUndelete (Maybe Text)
fuUploadType
= lens _fuUploadType (\ s a -> s{_fuUploadType = a})
fuPayload :: Lens' FoldersUndelete UndeleteFolderRequest
fuPayload
= lens _fuPayload (\ s a -> s{_fuPayload = a})
fuName :: Lens' FoldersUndelete Text
fuName = lens _fuName (\ s a -> s{_fuName = a})
fuCallback :: Lens' FoldersUndelete (Maybe Text)
fuCallback
= lens _fuCallback (\ s a -> s{_fuCallback = a})
instance GoogleRequest FoldersUndelete where
type Rs FoldersUndelete = Folder
type Scopes FoldersUndelete =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient FoldersUndelete'{..}
= go _fuName _fuXgafv _fuUploadProtocol
_fuAccessToken
_fuUploadType
_fuCallback
(Just AltJSON)
_fuPayload
resourceManagerService
where go
= buildClient
(Proxy :: Proxy FoldersUndeleteResource)
mempty