{-# 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.Update
(
TeamdrivesUpdateResource
, teamdrivesUpdate
, TeamdrivesUpdate
, tuPayload
, tuTeamDriveId
, tuUseDomainAdminAccess
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type TeamdrivesUpdateResource =
"drive" :>
"v3" :>
"teamdrives" :>
Capture "teamDriveId" Text :>
QueryParam "useDomainAdminAccess" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] TeamDrive :> Patch '[JSON] TeamDrive
data TeamdrivesUpdate = TeamdrivesUpdate'
{ _tuPayload :: !TeamDrive
, _tuTeamDriveId :: !Text
, _tuUseDomainAdminAccess :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
teamdrivesUpdate
:: TeamDrive
-> Text
-> TeamdrivesUpdate
teamdrivesUpdate pTuPayload_ pTuTeamDriveId_ =
TeamdrivesUpdate'
{ _tuPayload = pTuPayload_
, _tuTeamDriveId = pTuTeamDriveId_
, _tuUseDomainAdminAccess = False
}
tuPayload :: Lens' TeamdrivesUpdate TeamDrive
tuPayload
= lens _tuPayload (\ s a -> s{_tuPayload = a})
tuTeamDriveId :: Lens' TeamdrivesUpdate Text
tuTeamDriveId
= lens _tuTeamDriveId
(\ s a -> s{_tuTeamDriveId = a})
tuUseDomainAdminAccess :: Lens' TeamdrivesUpdate Bool
tuUseDomainAdminAccess
= lens _tuUseDomainAdminAccess
(\ s a -> s{_tuUseDomainAdminAccess = a})
instance GoogleRequest TeamdrivesUpdate where
type Rs TeamdrivesUpdate = TeamDrive
type Scopes TeamdrivesUpdate =
'["https://www.googleapis.com/auth/drive"]
requestClient TeamdrivesUpdate'{..}
= go _tuTeamDriveId (Just _tuUseDomainAdminAccess)
(Just AltJSON)
_tuPayload
driveService
where go
= buildClient
(Proxy :: Proxy TeamdrivesUpdateResource)
mempty