{-# 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.Pages.List
(
PagesListResource
, pagesList
, PagesList
, plStatus
, plBlogId
, plFetchBodies
, plView
, plPageToken
, plMaxResults
) where
import Network.Google.Blogger.Types
import Network.Google.Prelude
type PagesListResource =
"blogger" :>
"v3" :>
"blogs" :>
Capture "blogId" Text :>
"pages" :>
QueryParams "status" PagesListStatus :>
QueryParam "fetchBodies" Bool :>
QueryParam "view" PagesListView :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] PageList
data PagesList = PagesList'
{ _plStatus :: !(Maybe [PagesListStatus])
, _plBlogId :: !Text
, _plFetchBodies :: !(Maybe Bool)
, _plView :: !(Maybe PagesListView)
, _plPageToken :: !(Maybe Text)
, _plMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
pagesList
:: Text
-> PagesList
pagesList pPlBlogId_ =
PagesList'
{ _plStatus = Nothing
, _plBlogId = pPlBlogId_
, _plFetchBodies = Nothing
, _plView = Nothing
, _plPageToken = Nothing
, _plMaxResults = Nothing
}
plStatus :: Lens' PagesList [PagesListStatus]
plStatus
= lens _plStatus (\ s a -> s{_plStatus = a}) .
_Default
. _Coerce
plBlogId :: Lens' PagesList Text
plBlogId = lens _plBlogId (\ s a -> s{_plBlogId = a})
plFetchBodies :: Lens' PagesList (Maybe Bool)
plFetchBodies
= lens _plFetchBodies
(\ s a -> s{_plFetchBodies = a})
plView :: Lens' PagesList (Maybe PagesListView)
plView = lens _plView (\ s a -> s{_plView = a})
plPageToken :: Lens' PagesList (Maybe Text)
plPageToken
= lens _plPageToken (\ s a -> s{_plPageToken = a})
plMaxResults :: Lens' PagesList (Maybe Word32)
plMaxResults
= lens _plMaxResults (\ s a -> s{_plMaxResults = a})
. mapping _Coerce
instance GoogleRequest PagesList where
type Rs PagesList = PageList
type Scopes PagesList =
'["https://www.googleapis.com/auth/blogger",
"https://www.googleapis.com/auth/blogger.readonly"]
requestClient PagesList'{..}
= go _plBlogId (_plStatus ^. _Default) _plFetchBodies
_plView
_plPageToken
_plMaxResults
(Just AltJSON)
bloggerService
where go
= buildClient (Proxy :: Proxy PagesListResource)
mempty