module Network.Google.Resource.Drive.Changes.List
(
ChangesListResource
, changesList
, ChangesList
, clRestrictToMyDrive
, clSpaces
, clPageToken
, clPageSize
, clIncludeRemoved
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type ChangesListResource =
"drive" :>
"v3" :>
"changes" :>
QueryParam "pageToken" Text :>
QueryParam "restrictToMyDrive" Bool :>
QueryParam "spaces" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "includeRemoved" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] ChangeList
data ChangesList = ChangesList'
{ _clRestrictToMyDrive :: !Bool
, _clSpaces :: !Text
, _clPageToken :: !Text
, _clPageSize :: !(Textual Int32)
, _clIncludeRemoved :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
changesList
:: Text
-> ChangesList
changesList pClPageToken_ =
ChangesList'
{ _clRestrictToMyDrive = False
, _clSpaces = "drive"
, _clPageToken = pClPageToken_
, _clPageSize = 100
, _clIncludeRemoved = True
}
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})
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 _clRestrictToMyDrive)
(Just _clSpaces)
(Just _clPageSize)
(Just _clIncludeRemoved)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy ChangesListResource)
mempty