{-# 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.Get
(
FoldersGetResource
, foldersGet
, FoldersGet
, fgXgafv
, fgUploadProtocol
, fgAccessToken
, fgUploadType
, fgName
, fgCallback
) where
import Network.Google.Prelude
import Network.Google.ResourceManager.Types
type FoldersGetResource =
"v2" :>
Capture "name" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Folder
data FoldersGet = FoldersGet'
{ _fgXgafv :: !(Maybe Xgafv)
, _fgUploadProtocol :: !(Maybe Text)
, _fgAccessToken :: !(Maybe Text)
, _fgUploadType :: !(Maybe Text)
, _fgName :: !Text
, _fgCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
foldersGet
:: Text
-> FoldersGet
foldersGet pFgName_ =
FoldersGet'
{ _fgXgafv = Nothing
, _fgUploadProtocol = Nothing
, _fgAccessToken = Nothing
, _fgUploadType = Nothing
, _fgName = pFgName_
, _fgCallback = Nothing
}
fgXgafv :: Lens' FoldersGet (Maybe Xgafv)
fgXgafv = lens _fgXgafv (\ s a -> s{_fgXgafv = a})
fgUploadProtocol :: Lens' FoldersGet (Maybe Text)
fgUploadProtocol
= lens _fgUploadProtocol
(\ s a -> s{_fgUploadProtocol = a})
fgAccessToken :: Lens' FoldersGet (Maybe Text)
fgAccessToken
= lens _fgAccessToken
(\ s a -> s{_fgAccessToken = a})
fgUploadType :: Lens' FoldersGet (Maybe Text)
fgUploadType
= lens _fgUploadType (\ s a -> s{_fgUploadType = a})
fgName :: Lens' FoldersGet Text
fgName = lens _fgName (\ s a -> s{_fgName = a})
fgCallback :: Lens' FoldersGet (Maybe Text)
fgCallback
= lens _fgCallback (\ s a -> s{_fgCallback = a})
instance GoogleRequest FoldersGet where
type Rs FoldersGet = Folder
type Scopes FoldersGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only"]
requestClient FoldersGet'{..}
= go _fgName _fgXgafv _fgUploadProtocol
_fgAccessToken
_fgUploadType
_fgCallback
(Just AltJSON)
resourceManagerService
where go
= buildClient (Proxy :: Proxy FoldersGetResource)
mempty