{-# 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.Drive.Teamdrives.Get
(
TeamdrivesGetResource
, teamdrivesGet
, TeamdrivesGet
, tgTeamDriveId
, tgUseDomainAdminAccess
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type TeamdrivesGetResource =
"drive" :>
"v3" :>
"teamdrives" :>
Capture "teamDriveId" Text :>
QueryParam "useDomainAdminAccess" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] TeamDrive
data TeamdrivesGet = TeamdrivesGet'
{ _tgTeamDriveId :: !Text
, _tgUseDomainAdminAccess :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
teamdrivesGet
:: Text
-> TeamdrivesGet
teamdrivesGet pTgTeamDriveId_ =
TeamdrivesGet'
{ _tgTeamDriveId = pTgTeamDriveId_
, _tgUseDomainAdminAccess = False
}
tgTeamDriveId :: Lens' TeamdrivesGet Text
tgTeamDriveId
= lens _tgTeamDriveId
(\ s a -> s{_tgTeamDriveId = a})
tgUseDomainAdminAccess :: Lens' TeamdrivesGet Bool
tgUseDomainAdminAccess
= lens _tgUseDomainAdminAccess
(\ s a -> s{_tgUseDomainAdminAccess = a})
instance GoogleRequest TeamdrivesGet where
type Rs TeamdrivesGet = TeamDrive
type Scopes TeamdrivesGet =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.readonly"]
requestClient TeamdrivesGet'{..}
= go _tgTeamDriveId (Just _tgUseDomainAdminAccess)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy TeamdrivesGetResource)
mempty