{-# 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.Changes.List
(
ChangesListResource
, changesList
, ChangesList
, clIncludeTeamDriveItems
, clIncludeCorpusRemovals
, clTeamDriveId
, clRestrictToMyDrive
, clSpaces
, clPageToken
, clPageSize
, clIncludeRemoved
, clSupportsTeamDrives
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type ChangesListResource =
"drive" :>
"v3" :>
"changes" :>
QueryParam "pageToken" Text :>
QueryParam "includeTeamDriveItems" Bool :>
QueryParam "includeCorpusRemovals" Bool :>
QueryParam "teamDriveId" Text :>
QueryParam "restrictToMyDrive" Bool :>
QueryParam "spaces" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "includeRemoved" Bool :>
QueryParam "supportsTeamDrives" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] ChangeList
data ChangesList = ChangesList'
{ _clIncludeTeamDriveItems :: !Bool
, _clIncludeCorpusRemovals :: !Bool
, _clTeamDriveId :: !(Maybe Text)
, _clRestrictToMyDrive :: !Bool
, _clSpaces :: !Text
, _clPageToken :: !Text
, _clPageSize :: !(Textual Int32)
, _clIncludeRemoved :: !Bool
, _clSupportsTeamDrives :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
changesList
:: Text
-> ChangesList
changesList pClPageToken_ =
ChangesList'
{ _clIncludeTeamDriveItems = False
, _clIncludeCorpusRemovals = False
, _clTeamDriveId = Nothing
, _clRestrictToMyDrive = False
, _clSpaces = "drive"
, _clPageToken = pClPageToken_
, _clPageSize = 100
, _clIncludeRemoved = True
, _clSupportsTeamDrives = False
}
clIncludeTeamDriveItems :: Lens' ChangesList Bool
clIncludeTeamDriveItems
= lens _clIncludeTeamDriveItems
(\ s a -> s{_clIncludeTeamDriveItems = a})
clIncludeCorpusRemovals :: Lens' ChangesList Bool
clIncludeCorpusRemovals
= lens _clIncludeCorpusRemovals
(\ s a -> s{_clIncludeCorpusRemovals = a})
clTeamDriveId :: Lens' ChangesList (Maybe Text)
clTeamDriveId
= lens _clTeamDriveId
(\ s a -> s{_clTeamDriveId = a})
clRestrictToMyDrive :: Lens' ChangesList Bool
clRestrictToMyDrive
= lens _clRestrictToMyDrive
(\ s a -> s{_clRestrictToMyDrive = a})
clSpaces :: Lens' ChangesList Text
clSpaces = lens _clSpaces (\ s a -> s{_clSpaces = a})
clPageToken :: Lens' ChangesList Text
clPageToken
= lens _clPageToken (\ s a -> s{_clPageToken = a})
clPageSize :: Lens' ChangesList Int32
clPageSize
= lens _clPageSize (\ s a -> s{_clPageSize = a}) .
_Coerce
clIncludeRemoved :: Lens' ChangesList Bool
clIncludeRemoved
= lens _clIncludeRemoved
(\ s a -> s{_clIncludeRemoved = a})
clSupportsTeamDrives :: Lens' ChangesList Bool
clSupportsTeamDrives
= lens _clSupportsTeamDrives
(\ s a -> s{_clSupportsTeamDrives = a})
instance GoogleRequest ChangesList where
type Rs ChangesList = ChangeList
type Scopes ChangesList =
'["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 ChangesList'{..}
= go (Just _clPageToken)
(Just _clIncludeTeamDriveItems)
(Just _clIncludeCorpusRemovals)
_clTeamDriveId
(Just _clRestrictToMyDrive)
(Just _clSpaces)
(Just _clPageSize)
(Just _clIncludeRemoved)
(Just _clSupportsTeamDrives)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy ChangesListResource)
mempty