{-# 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.List
(
FilesListResource
, filesList
, FilesList
, flCorpora
, flOrderBy
, flIncludeTeamDriveItems
, flQ
, flTeamDriveId
, flSpaces
, flCorpus
, flPageToken
, flPageSize
, flSupportsTeamDrives
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type FilesListResource =
"drive" :>
"v3" :>
"files" :>
QueryParam "corpora" Text :>
QueryParam "orderBy" Text :>
QueryParam "includeTeamDriveItems" Bool :>
QueryParam "q" Text :>
QueryParam "teamDriveId" Text :>
QueryParam "spaces" Text :>
QueryParam "corpus" FilesListCorpus :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "supportsTeamDrives" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] FileList
data FilesList = FilesList'
{ _flCorpora :: !(Maybe Text)
, _flOrderBy :: !(Maybe Text)
, _flIncludeTeamDriveItems :: !Bool
, _flQ :: !(Maybe Text)
, _flTeamDriveId :: !(Maybe Text)
, _flSpaces :: !Text
, _flCorpus :: !(Maybe FilesListCorpus)
, _flPageToken :: !(Maybe Text)
, _flPageSize :: !(Textual Int32)
, _flSupportsTeamDrives :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
filesList
:: FilesList
filesList =
FilesList'
{ _flCorpora = Nothing
, _flOrderBy = Nothing
, _flIncludeTeamDriveItems = False
, _flQ = Nothing
, _flTeamDriveId = Nothing
, _flSpaces = "drive"
, _flCorpus = Nothing
, _flPageToken = Nothing
, _flPageSize = 100
, _flSupportsTeamDrives = False
}
flCorpora :: Lens' FilesList (Maybe Text)
flCorpora
= lens _flCorpora (\ s a -> s{_flCorpora = a})
flOrderBy :: Lens' FilesList (Maybe Text)
flOrderBy
= lens _flOrderBy (\ s a -> s{_flOrderBy = a})
flIncludeTeamDriveItems :: Lens' FilesList Bool
flIncludeTeamDriveItems
= lens _flIncludeTeamDriveItems
(\ s a -> s{_flIncludeTeamDriveItems = a})
flQ :: Lens' FilesList (Maybe Text)
flQ = lens _flQ (\ s a -> s{_flQ = a})
flTeamDriveId :: Lens' FilesList (Maybe Text)
flTeamDriveId
= lens _flTeamDriveId
(\ s a -> s{_flTeamDriveId = a})
flSpaces :: Lens' FilesList Text
flSpaces = lens _flSpaces (\ s a -> s{_flSpaces = a})
flCorpus :: Lens' FilesList (Maybe FilesListCorpus)
flCorpus = lens _flCorpus (\ s a -> s{_flCorpus = a})
flPageToken :: Lens' FilesList (Maybe Text)
flPageToken
= lens _flPageToken (\ s a -> s{_flPageToken = a})
flPageSize :: Lens' FilesList Int32
flPageSize
= lens _flPageSize (\ s a -> s{_flPageSize = a}) .
_Coerce
flSupportsTeamDrives :: Lens' FilesList Bool
flSupportsTeamDrives
= lens _flSupportsTeamDrives
(\ s a -> s{_flSupportsTeamDrives = a})
instance GoogleRequest FilesList where
type Rs FilesList = FileList
type Scopes FilesList =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.metadata",
"https://www.googleapis.com/auth/drive.metadata.readonly",
"https://www.googleapis.com/auth/drive.photos.readonly",
"https://www.googleapis.com/auth/drive.readonly"]
requestClient FilesList'{..}
= go _flCorpora _flOrderBy
(Just _flIncludeTeamDriveItems)
_flQ
_flTeamDriveId
(Just _flSpaces)
_flCorpus
_flPageToken
(Just _flPageSize)
(Just _flSupportsTeamDrives)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy FilesListResource)
mempty