{-# 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.Get
(
CommentsGetResource
, commentsGet
, CommentsGet
, cgFileId
, cgCommentId
, cgIncludeDeleted
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type CommentsGetResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"comments" :>
Capture "commentId" Text :>
QueryParam "includeDeleted" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] Comment
data CommentsGet = CommentsGet'
{ _cgFileId :: !Text
, _cgCommentId :: !Text
, _cgIncludeDeleted :: !Bool
} deriving (Eq,Show,Data,Typeable,Generic)
commentsGet
:: Text
-> Text
-> CommentsGet
commentsGet pCgFileId_ pCgCommentId_ =
CommentsGet'
{ _cgFileId = pCgFileId_
, _cgCommentId = pCgCommentId_
, _cgIncludeDeleted = False
}
cgFileId :: Lens' CommentsGet Text
cgFileId = lens _cgFileId (\ s a -> s{_cgFileId = a})
cgCommentId :: Lens' CommentsGet Text
cgCommentId
= lens _cgCommentId (\ s a -> s{_cgCommentId = a})
cgIncludeDeleted :: Lens' CommentsGet Bool
cgIncludeDeleted
= lens _cgIncludeDeleted
(\ s a -> s{_cgIncludeDeleted = a})
instance GoogleRequest CommentsGet where
type Rs CommentsGet = Comment
type Scopes CommentsGet =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file",
"https://www.googleapis.com/auth/drive.readonly"]
requestClient CommentsGet'{..}
= go _cgFileId _cgCommentId (Just _cgIncludeDeleted)
(Just AltJSON)
driveService
where go
= buildClient (Proxy :: Proxy CommentsGetResource)
mempty