{-# 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.Blogger.Comments.MarkAsSpam
(
CommentsMarkAsSpamResource
, commentsMarkAsSpam
, CommentsMarkAsSpam
, cmasBlogId
, cmasPostId
, cmasCommentId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type CommentsMarkAsSpamResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
Capture "postId" Text :>
"comments" :>
Capture "commentId" Text :>
"spam" :>
QueryParam "alt" AltJSON :> Post '[JSON] Comment
data CommentsMarkAsSpam = CommentsMarkAsSpam'
{ _cmasBlogId :: !Text
, _cmasPostId :: !Text
, _cmasCommentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
commentsMarkAsSpam
:: Text
-> Text
-> Text
-> CommentsMarkAsSpam
commentsMarkAsSpam pCmasBlogId_ pCmasPostId_ pCmasCommentId_ =
CommentsMarkAsSpam'
{ _cmasBlogId = pCmasBlogId_
, _cmasPostId = pCmasPostId_
, _cmasCommentId = pCmasCommentId_
}
cmasBlogId :: Lens' CommentsMarkAsSpam Text
cmasBlogId
= lens _cmasBlogId (\ s a -> s{_cmasBlogId = a})
cmasPostId :: Lens' CommentsMarkAsSpam Text
cmasPostId
= lens _cmasPostId (\ s a -> s{_cmasPostId = a})
cmasCommentId :: Lens' CommentsMarkAsSpam Text
cmasCommentId
= lens _cmasCommentId
(\ s a -> s{_cmasCommentId = a})
instance GoogleRequest CommentsMarkAsSpam where
type Rs CommentsMarkAsSpam = Comment
type Scopes CommentsMarkAsSpam =
'["https://www.googleapis.com/auth/blogger"]
requestClient CommentsMarkAsSpam'{..}
= go _cmasBlogId _cmasPostId _cmasCommentId
(Just AltJSON)
bloggerService
where go
= buildClient
(Proxy :: Proxy CommentsMarkAsSpamResource)
mempty