{-# 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.Permissions.Delete
(
PermissionsDeleteResource
, permissionsDelete
, PermissionsDelete
, pdUseDomainAdminAccess
, pdFileId
, pdSupportsTeamDrives
, pdPermissionId
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type PermissionsDeleteResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"permissions" :>
Capture "permissionId" Text :>
QueryParam "useDomainAdminAccess" Bool :>
QueryParam "supportsTeamDrives" Bool :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data PermissionsDelete = PermissionsDelete'
{ _pdUseDomainAdminAccess :: !Bool
, _pdFileId :: !Text
, _pdSupportsTeamDrives :: !Bool
, _pdPermissionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
permissionsDelete
:: Text
-> Text
-> PermissionsDelete
permissionsDelete pPdFileId_ pPdPermissionId_ =
PermissionsDelete'
{ _pdUseDomainAdminAccess = False
, _pdFileId = pPdFileId_
, _pdSupportsTeamDrives = False
, _pdPermissionId = pPdPermissionId_
}
pdUseDomainAdminAccess :: Lens' PermissionsDelete Bool
pdUseDomainAdminAccess
= lens _pdUseDomainAdminAccess
(\ s a -> s{_pdUseDomainAdminAccess = a})
pdFileId :: Lens' PermissionsDelete Text
pdFileId = lens _pdFileId (\ s a -> s{_pdFileId = a})
pdSupportsTeamDrives :: Lens' PermissionsDelete Bool
pdSupportsTeamDrives
= lens _pdSupportsTeamDrives
(\ s a -> s{_pdSupportsTeamDrives = a})
pdPermissionId :: Lens' PermissionsDelete Text
pdPermissionId
= lens _pdPermissionId
(\ s a -> s{_pdPermissionId = a})
instance GoogleRequest PermissionsDelete where
type Rs PermissionsDelete = ()
type Scopes PermissionsDelete =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"]
requestClient PermissionsDelete'{..}
= go _pdFileId _pdPermissionId
(Just _pdUseDomainAdminAccess)
(Just _pdSupportsTeamDrives)
(Just AltJSON)
driveService
where go
= buildClient
(Proxy :: Proxy PermissionsDeleteResource)
mempty