{-# 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.Update
(
CommentsUpdateResource
, commentsUpdate
, CommentsUpdate
, cuPayload
, cuFileId
, cuCommentId
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type CommentsUpdateResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"comments" :>
Capture "commentId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Comment :> Patch '[JSON] Comment
data CommentsUpdate = CommentsUpdate'
{ _cuPayload :: !Comment
, _cuFileId :: !Text
, _cuCommentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
commentsUpdate
:: Comment
-> Text
-> Text
-> CommentsUpdate
commentsUpdate pCuPayload_ pCuFileId_ pCuCommentId_ =
CommentsUpdate'
{ _cuPayload = pCuPayload_
, _cuFileId = pCuFileId_
, _cuCommentId = pCuCommentId_
}
cuPayload :: Lens' CommentsUpdate Comment
cuPayload
= lens _cuPayload (\ s a -> s{_cuPayload = a})
cuFileId :: Lens' CommentsUpdate Text
cuFileId = lens _cuFileId (\ s a -> s{_cuFileId = a})
cuCommentId :: Lens' CommentsUpdate Text
cuCommentId
= lens _cuCommentId (\ s a -> s{_cuCommentId = a})
instance GoogleRequest CommentsUpdate where
type Rs CommentsUpdate = Comment
type Scopes CommentsUpdate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"]
requestClient CommentsUpdate'{..}
= go _cuFileId _cuCommentId (Just AltJSON) _cuPayload
driveService
where go
= buildClient (Proxy :: Proxy CommentsUpdateResource)
mempty