{-# 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.Revisions.Update
(
RevisionsUpdateResource
, revisionsUpdate
, RevisionsUpdate
, revPayload
, revFileId
, revRevisionId
) where
import Network.Google.Drive.Types
import Network.Google.Prelude
type RevisionsUpdateResource =
"drive" :>
"v3" :>
"files" :>
Capture "fileId" Text :>
"revisions" :>
Capture "revisionId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Revision :> Patch '[JSON] Revision
data RevisionsUpdate = RevisionsUpdate'
{ _revPayload :: !Revision
, _revFileId :: !Text
, _revRevisionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
revisionsUpdate
:: Revision
-> Text
-> Text
-> RevisionsUpdate
revisionsUpdate pRevPayload_ pRevFileId_ pRevRevisionId_ =
RevisionsUpdate'
{ _revPayload = pRevPayload_
, _revFileId = pRevFileId_
, _revRevisionId = pRevRevisionId_
}
revPayload :: Lens' RevisionsUpdate Revision
revPayload
= lens _revPayload (\ s a -> s{_revPayload = a})
revFileId :: Lens' RevisionsUpdate Text
revFileId
= lens _revFileId (\ s a -> s{_revFileId = a})
revRevisionId :: Lens' RevisionsUpdate Text
revRevisionId
= lens _revRevisionId
(\ s a -> s{_revRevisionId = a})
instance GoogleRequest RevisionsUpdate where
type Rs RevisionsUpdate = Revision
type Scopes RevisionsUpdate =
'["https://www.googleapis.com/auth/drive",
"https://www.googleapis.com/auth/drive.appdata",
"https://www.googleapis.com/auth/drive.file"]
requestClient RevisionsUpdate'{..}
= go _revFileId _revRevisionId (Just AltJSON)
_revPayload
driveService
where go
= buildClient
(Proxy :: Proxy RevisionsUpdateResource)
mempty