{-# 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.Revisions.List
(
RevisionsListResource
, revisionsList
, RevisionsList
, rllPageToken
, rllFileId
, rllPageSize
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type RevisionsListResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"revisions" :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] RevisionList
data RevisionsList = RevisionsList'
{ _rllPageToken :: !(Maybe Text)
, _rllFileId :: !Text
, _rllPageSize :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
revisionsList
:: Text
-> RevisionsList
revisionsList pRllFileId_ =
RevisionsList'
{ _rllPageToken = Nothing
, _rllFileId = pRllFileId_
, _rllPageSize = 200
}
rllPageToken :: Lens' RevisionsList (Maybe Text)
rllPageToken
= lens _rllPageToken (\ s a -> s{_rllPageToken = a})
rllFileId :: Lens' RevisionsList Text
rllFileId
= lens _rllFileId (\ s a -> s{_rllFileId = a})
rllPageSize :: Lens' RevisionsList Int32
rllPageSize
= lens _rllPageSize (\ s a -> s{_rllPageSize = a}) .
_Coerce
instance GoogleRequest RevisionsList where
type Rs RevisionsList = RevisionList
type Scopes RevisionsList =
'["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 RevisionsList'{..}
= go _rllFileId _rllPageToken (Just _rllPageSize)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy RevisionsListResource)
mempty