{-# 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.Books.Layers.List
(
LayersListResource
, layersList
, LayersList
, llContentVersion
, llVolumeId
, llSource
, llPageToken
, llMaxResults
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type LayersListResource =
"books" :>
"v1" :>
"volumes" :>
Capture "volumeId" Text :>
"layersummary" :>
QueryParam "contentVersion" Text :>
QueryParam "source" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] Layersummaries
data LayersList = LayersList'
{ _llContentVersion :: !(Maybe Text)
, _llVolumeId :: !Text
, _llSource :: !(Maybe Text)
, _llPageToken :: !(Maybe Text)
, _llMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
layersList
:: Text
-> LayersList
layersList pLlVolumeId_ =
LayersList'
{ _llContentVersion = Nothing
, _llVolumeId = pLlVolumeId_
, _llSource = Nothing
, _llPageToken = Nothing
, _llMaxResults = Nothing
}
llContentVersion :: Lens' LayersList (Maybe Text)
llContentVersion
= lens _llContentVersion
(\ s a -> s{_llContentVersion = a})
llVolumeId :: Lens' LayersList Text
llVolumeId
= lens _llVolumeId (\ s a -> s{_llVolumeId = a})
llSource :: Lens' LayersList (Maybe Text)
llSource = lens _llSource (\ s a -> s{_llSource = a})
llPageToken :: Lens' LayersList (Maybe Text)
llPageToken
= lens _llPageToken (\ s a -> s{_llPageToken = a})
llMaxResults :: Lens' LayersList (Maybe Word32)
llMaxResults
= lens _llMaxResults (\ s a -> s{_llMaxResults = a})
. mapping _Coerce
instance GoogleRequest LayersList where
type Rs LayersList = Layersummaries
type Scopes LayersList =
'["https://www.googleapis.com/auth/books"]
requestClient LayersList'{..}
= go _llVolumeId _llContentVersion _llSource
_llPageToken
_llMaxResults
(Just AltJSON)
booksService
where go
= buildClient (Proxy :: Proxy LayersListResource)
mempty