{-# 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 -- Copyright : (c) 2015-2016 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Updates a reply with patch semantics. -- -- /See:/ for @drive.replies.update@. module Network.Google.Resource.Drive.Replies.Update ( -- * REST Resource RepliesUpdateResource -- * Creating a Request , repliesUpdate , RepliesUpdate -- * Request Lenses , ruPayload , ruReplyId , ruFileId , ruCommentId ) where import Network.Google.Drive.Types import Network.Google.Prelude -- | A resource alias for @drive.replies.update@ method which the -- 'RepliesUpdate' request conforms to. 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 -- | Updates a reply with patch semantics. -- -- /See:/ 'repliesUpdate' smart constructor. data RepliesUpdate = RepliesUpdate' { _ruPayload :: !Reply , _ruReplyId :: !Text , _ruFileId :: !Text , _ruCommentId :: !Text } deriving (Eq,Show,Data,Typeable,Generic) -- | Creates a value of 'RepliesUpdate' with the minimum fields required to make a request. -- -- Use one of the following lenses to modify other fields as desired: -- -- * 'ruPayload' -- -- * 'ruReplyId' -- -- * 'ruFileId' -- -- * 'ruCommentId' repliesUpdate :: Reply -- ^ 'ruPayload' -> Text -- ^ 'ruReplyId' -> Text -- ^ 'ruFileId' -> Text -- ^ 'ruCommentId' -> RepliesUpdate repliesUpdate pRuPayload_ pRuReplyId_ pRuFileId_ pRuCommentId_ = RepliesUpdate' { _ruPayload = pRuPayload_ , _ruReplyId = pRuReplyId_ , _ruFileId = pRuFileId_ , _ruCommentId = pRuCommentId_ } -- | Multipart request metadata. ruPayload :: Lens' RepliesUpdate Reply ruPayload = lens _ruPayload (\ s a -> s{_ruPayload = a}) -- | The ID of the reply. ruReplyId :: Lens' RepliesUpdate Text ruReplyId = lens _ruReplyId (\ s a -> s{_ruReplyId = a}) -- | The ID of the file. ruFileId :: Lens' RepliesUpdate Text ruFileId = lens _ruFileId (\ s a -> s{_ruFileId = a}) -- | The ID of the comment. 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