{-# 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.Files.Delete
(
FilesDeleteResource
, filesDelete
, FilesDelete
, fdFileId
, fdSupportsTeamDrives
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type FilesDeleteResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
QueryParam "supportsTeamDrives" Bool :>
QueryParam "alt" AltJSON :> Delete '[JSON] ()
data FilesDelete = FilesDelete'
{ _fdFileId :: !Text
, _fdSupportsTeamDrives :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
filesDelete
:: Text
-> FilesDelete
filesDelete pFdFileId_ =
FilesDelete'
{ _fdFileId = pFdFileId_
, _fdSupportsTeamDrives = False
}
fdFileId :: Lens' FilesDelete Text
fdFileId = lens _fdFileId (\ s a -> s{_fdFileId = a})
fdSupportsTeamDrives :: Lens' FilesDelete Bool
fdSupportsTeamDrives
= lens _fdSupportsTeamDrives
(\ s a -> s{_fdSupportsTeamDrives = a})
instance GoogleRequest FilesDelete where
type Rs FilesDelete = ()
type Scopes FilesDelete =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"]
requestClient FilesDelete'{..}
= go _fdFileId (Just _fdSupportsTeamDrives)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy FilesDeleteResource)
mempty