{-# 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.Posts.Revert
(
PostsRevertResource
, postsRevert
, PostsRevert
, prBlogId
, prPostId
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type PostsRevertResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"posts" :>
Capture "postId" Text :>
"revert" :>
QueryParam "alt" AltJSON :> Post '[JSON] Post'
data PostsRevert = PostsRevert'
{ _prBlogId :: !Text
, _prPostId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
postsRevert
:: Text
-> Text
-> PostsRevert
postsRevert pPrBlogId_ pPrPostId_ =
PostsRevert'
{ _prBlogId = pPrBlogId_
, _prPostId = pPrPostId_
}
prBlogId :: Lens' PostsRevert Text
prBlogId = lens _prBlogId (\ s a -> s{_prBlogId = a})
prPostId :: Lens' PostsRevert Text
prPostId = lens _prPostId (\ s a -> s{_prPostId = a})
instance GoogleRequest PostsRevert where
type Rs PostsRevert = Post'
type Scopes PostsRevert =
'["https://www.googleapis.com/auth/blogger"]
requestClient PostsRevert'{..}
= go _prBlogId _prPostId (Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy PostsRevertResource)
mempty