{-# 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.Teamdrives.List
(
TeamdrivesListResource
, teamdrivesList
, TeamdrivesList
, tlQ
, tlPageToken
, tlUseDomainAdminAccess
, tlPageSize
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type TeamdrivesListResource =
"drive" :>
"v3" :>
"teamdrives" :>
QueryParam "q" Text :>
QueryParam "pageToken" Text :>
QueryParam "useDomainAdminAccess" Bool :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] TeamDriveList
data TeamdrivesList = TeamdrivesList'
{ _tlQ :: !(Maybe Text)
, _tlPageToken :: !(Maybe Text)
, _tlUseDomainAdminAccess :: !Bool
, _tlPageSize :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
teamdrivesList
:: TeamdrivesList
teamdrivesList =
TeamdrivesList'
{ _tlQ = Nothing
, _tlPageToken = Nothing
, _tlUseDomainAdminAccess = False
, _tlPageSize = 10
}
tlQ :: Lens' TeamdrivesList (Maybe Text)
tlQ = lens _tlQ (\ s a -> s{_tlQ = a})
tlPageToken :: Lens' TeamdrivesList (Maybe Text)
tlPageToken
= lens _tlPageToken (\ s a -> s{_tlPageToken = a})
tlUseDomainAdminAccess :: Lens' TeamdrivesList Bool
tlUseDomainAdminAccess
= lens _tlUseDomainAdminAccess
(\ s a -> s{_tlUseDomainAdminAccess = a})
tlPageSize :: Lens' TeamdrivesList Int32
tlPageSize
= lens _tlPageSize (\ s a -> s{_tlPageSize = a}) .
_Coerce
instance GoogleRequest TeamdrivesList where
type Rs TeamdrivesList = TeamDriveList
type Scopes TeamdrivesList =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.readonly"]
requestClient TeamdrivesList'{..}
= go _tlQ _tlPageToken (Just _tlUseDomainAdminAccess)
(Just _tlPageSize)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy TeamdrivesListResource)
mempty