{-# 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.List
(
PermissionsListResource
, permissionsList
, PermissionsList
, plPageToken
, plUseDomainAdminAccess
, plFileId
, plPageSize
, plSupportsTeamDrives
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type PermissionsListResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"permissions" :>
QueryParam "pageToken" Text :>
QueryParam "useDomainAdminAccess" Bool :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "supportsTeamDrives" Bool :>
QueryParam "alt" AltJSON :>
Get '[JSON] PermissionList
data PermissionsList = PermissionsList'
{ _plPageToken :: !(Maybe Text)
, _plUseDomainAdminAccess :: !Bool
, _plFileId :: !Text
, _plPageSize :: !(Maybe (Textual Int32))
, _plSupportsTeamDrives :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
permissionsList
:: Text
-> PermissionsList
permissionsList pPlFileId_ =
PermissionsList'
{ _plPageToken = Nothing
, _plUseDomainAdminAccess = False
, _plFileId = pPlFileId_
, _plPageSize = Nothing
, _plSupportsTeamDrives = False
}
plPageToken :: Lens' PermissionsList (Maybe Text)
plPageToken
= lens _plPageToken (\ s a -> s{_plPageToken = a})
plUseDomainAdminAccess :: Lens' PermissionsList Bool
plUseDomainAdminAccess
= lens _plUseDomainAdminAccess
(\ s a -> s{_plUseDomainAdminAccess = a})
plFileId :: Lens' PermissionsList Text
plFileId = lens _plFileId (\ s a -> s{_plFileId = a})
plPageSize :: Lens' PermissionsList (Maybe Int32)
plPageSize
= lens _plPageSize (\ s a -> s{_plPageSize = a}) .
mapping _Coerce
plSupportsTeamDrives :: Lens' PermissionsList Bool
plSupportsTeamDrives
= lens _plSupportsTeamDrives
(\ s a -> s{_plSupportsTeamDrives = a})
instance GoogleRequest PermissionsList where
type Rs PermissionsList = PermissionList
type Scopes PermissionsList =
'["https://www.googleapis.com/auth/drive",
"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 PermissionsList'{..}
= go _plFileId _plPageToken
(Just _plUseDomainAdminAccess)
_plPageSize
(Just _plSupportsTeamDrives)
(Just AltJSON)
driveService
where go
= buildClient
(Proxy :: Proxy PermissionsListResource)
mempty