{-# 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.Comments.List
(
CommentsListResource
, commentsList
, CommentsList
, cStartModifiedTime
, cPageToken
, cFileId
, cPageSize
, cIncludeDeleted
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type CommentsListResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"comments" :>
QueryParam "startModifiedTime" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "includeDeleted" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] CommentList
data CommentsList = CommentsList'
{ _cStartModifiedTime :: !(Maybe Text)
, _cPageToken :: !(Maybe Text)
, _cFileId :: !Text
, _cPageSize :: !(Textual Int32)
, _cIncludeDeleted :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
commentsList
:: Text
-> CommentsList
commentsList pCFileId_ =
CommentsList'
{ _cStartModifiedTime = Nothing
, _cPageToken = Nothing
, _cFileId = pCFileId_
, _cPageSize = 20
, _cIncludeDeleted = False
}
cStartModifiedTime :: Lens' CommentsList (Maybe Text)
cStartModifiedTime
= lens _cStartModifiedTime
(\ s a -> s{_cStartModifiedTime = a})
cPageToken :: Lens' CommentsList (Maybe Text)
cPageToken
= lens _cPageToken (\ s a -> s{_cPageToken = a})
cFileId :: Lens' CommentsList Text
cFileId = lens _cFileId (\ s a -> s{_cFileId = a})
cPageSize :: Lens' CommentsList Int32
cPageSize
= lens _cPageSize (\ s a -> s{_cPageSize = a}) .
_Coerce
cIncludeDeleted :: Lens' CommentsList Bool
cIncludeDeleted
= lens _cIncludeDeleted
(\ s a -> s{_cIncludeDeleted = a})
instance GoogleRequest CommentsList where
type Rs CommentsList = CommentList
type Scopes CommentsList =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"]
requestClient CommentsList'{..}
= go _cFileId _cStartModifiedTime _cPageToken
(Just _cPageSize)
(Just _cIncludeDeleted)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy CommentsListResource)
mempty