{-# 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.Replies.Update
(
RepliesUpdateResource
, repliesUpdate
, RepliesUpdate
, ruPayload
, ruReplyId
, ruFileId
, ruCommentId
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type RepliesUpdateResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"comments" :>
Capture "commentId" Text :>
"replies" :>
Capture "replyId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Reply :> Patch '[JSON] Reply
data RepliesUpdate = RepliesUpdate'
{ _ruPayload :: !Reply
, _ruReplyId :: !Text
, _ruFileId :: !Text
, _ruCommentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
repliesUpdate
:: Reply
-> Text
-> Text
-> Text
-> RepliesUpdate
repliesUpdate pRuPayload_ pRuReplyId_ pRuFileId_ pRuCommentId_ =
RepliesUpdate'
{ _ruPayload = pRuPayload_
, _ruReplyId = pRuReplyId_
, _ruFileId = pRuFileId_
, _ruCommentId = pRuCommentId_
}
ruPayload :: Lens' RepliesUpdate Reply
ruPayload
= lens _ruPayload (\ s a -> s{_ruPayload = a})
ruReplyId :: Lens' RepliesUpdate Text
ruReplyId
= lens _ruReplyId (\ s a -> s{_ruReplyId = a})
ruFileId :: Lens' RepliesUpdate Text
ruFileId = lens _ruFileId (\ s a -> s{_ruFileId = a})
ruCommentId :: Lens' RepliesUpdate Text
ruCommentId
= lens _ruCommentId (\ s a -> s{_ruCommentId = a})
instance GoogleRequest RepliesUpdate where
type Rs RepliesUpdate = Reply
type Scopes RepliesUpdate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"]
requestClient RepliesUpdate'{..}
= go _ruFileId _ruCommentId _ruReplyId (Just AltJSON)
_ruPayload
driveService
where go
= buildClient (Proxy :: Proxy RepliesUpdateResource)
mempty