{-# 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.Create
(
RepliesCreateResource
, repliesCreate
, RepliesCreate
, rcPayload
, rcFileId
, rcCommentId
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type RepliesCreateResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"comments" :>
Capture "commentId" Text :>
"replies" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Reply :> Post '[JSON] Reply
data RepliesCreate = RepliesCreate'
{ _rcPayload :: !Reply
, _rcFileId :: !Text
, _rcCommentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
repliesCreate
:: Reply
-> Text
-> Text
-> RepliesCreate
repliesCreate pRcPayload_ pRcFileId_ pRcCommentId_ =
RepliesCreate'
{ _rcPayload = pRcPayload_
, _rcFileId = pRcFileId_
, _rcCommentId = pRcCommentId_
}
rcPayload :: Lens' RepliesCreate Reply
rcPayload
= lens _rcPayload (\ s a -> s{_rcPayload = a})
rcFileId :: Lens' RepliesCreate Text
rcFileId = lens _rcFileId (\ s a -> s{_rcFileId = a})
rcCommentId :: Lens' RepliesCreate Text
rcCommentId
= lens _rcCommentId (\ s a -> s{_rcCommentId = a})
instance GoogleRequest RepliesCreate where
type Rs RepliesCreate = Reply
type Scopes RepliesCreate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.file"]
requestClient RepliesCreate'{..}
= go _rcFileId _rcCommentId (Just AltJSON) _rcPayload
driveService
where go
= buildClient (Proxy :: Proxy RepliesCreateResource)
mempty