{-# 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.Volumes.List
(
VolumesListResource
, volumesList
, VolumesList
, vlOrderBy
, vlMaxAllowedMaturityRating
, vlLibraryRestrict
, vlPartner
, vlQ
, vlDownload
, vlSource
, vlProjection
, vlFilter
, vlLangRestrict
, vlStartIndex
, vlMaxResults
, vlShowPreOrders
, vlPrintType
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type VolumesListResource =
"books" :>
"v1" :>
"volumes" :>
QueryParam "q" Text :>
QueryParam "orderBy" VolumesListOrderBy :>
QueryParam "maxAllowedMaturityRating"
VolumesListMaxAllowedMaturityRating
:>
QueryParam "libraryRestrict"
VolumesListLibraryRestrict
:>
QueryParam "partner" Text :>
QueryParam "download" VolumesListDownload :>
QueryParam "source" Text :>
QueryParam "projection" VolumesListProjection :>
QueryParam "filter" VolumesListFilter :>
QueryParam "langRestrict" Text :>
QueryParam "startIndex" (Textual Word32) :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "showPreorders" Bool :>
QueryParam "printType" VolumesListPrintType
:>
QueryParam "alt" AltJSON :>
Get '[JSON] Volumes
data VolumesList = VolumesList'
{ _vlOrderBy :: !(Maybe VolumesListOrderBy)
, _vlMaxAllowedMaturityRating :: !(Maybe VolumesListMaxAllowedMaturityRating)
, _vlLibraryRestrict :: !(Maybe VolumesListLibraryRestrict)
, _vlPartner :: !(Maybe Text)
, _vlQ :: !Text
, _vlDownload :: !(Maybe VolumesListDownload)
, _vlSource :: !(Maybe Text)
, _vlProjection :: !(Maybe VolumesListProjection)
, _vlFilter :: !(Maybe VolumesListFilter)
, _vlLangRestrict :: !(Maybe Text)
, _vlStartIndex :: !(Maybe (Textual Word32))
, _vlMaxResults :: !(Maybe (Textual Word32))
, _vlShowPreOrders :: !(Maybe Bool)
, _vlPrintType :: !(Maybe VolumesListPrintType)
} deriving (Eq,Show,Data,Typeable,Generic)
volumesList
:: Text
-> VolumesList
volumesList pVlQ_ =
VolumesList'
{ _vlOrderBy = Nothing
, _vlMaxAllowedMaturityRating = Nothing
, _vlLibraryRestrict = Nothing
, _vlPartner = Nothing
, _vlQ = pVlQ_
, _vlDownload = Nothing
, _vlSource = Nothing
, _vlProjection = Nothing
, _vlFilter = Nothing
, _vlLangRestrict = Nothing
, _vlStartIndex = Nothing
, _vlMaxResults = Nothing
, _vlShowPreOrders = Nothing
, _vlPrintType = Nothing
}
vlOrderBy :: Lens' VolumesList (Maybe VolumesListOrderBy)
vlOrderBy
= lens _vlOrderBy (\ s a -> s{_vlOrderBy = a})
vlMaxAllowedMaturityRating :: Lens' VolumesList (Maybe VolumesListMaxAllowedMaturityRating)
vlMaxAllowedMaturityRating
= lens _vlMaxAllowedMaturityRating
(\ s a -> s{_vlMaxAllowedMaturityRating = a})
vlLibraryRestrict :: Lens' VolumesList (Maybe VolumesListLibraryRestrict)
vlLibraryRestrict
= lens _vlLibraryRestrict
(\ s a -> s{_vlLibraryRestrict = a})
vlPartner :: Lens' VolumesList (Maybe Text)
vlPartner
= lens _vlPartner (\ s a -> s{_vlPartner = a})
vlQ :: Lens' VolumesList Text
vlQ = lens _vlQ (\ s a -> s{_vlQ = a})
vlDownload :: Lens' VolumesList (Maybe VolumesListDownload)
vlDownload
= lens _vlDownload (\ s a -> s{_vlDownload = a})
vlSource :: Lens' VolumesList (Maybe Text)
vlSource = lens _vlSource (\ s a -> s{_vlSource = a})
vlProjection :: Lens' VolumesList (Maybe VolumesListProjection)
vlProjection
= lens _vlProjection (\ s a -> s{_vlProjection = a})
vlFilter :: Lens' VolumesList (Maybe VolumesListFilter)
vlFilter = lens _vlFilter (\ s a -> s{_vlFilter = a})
vlLangRestrict :: Lens' VolumesList (Maybe Text)
vlLangRestrict
= lens _vlLangRestrict
(\ s a -> s{_vlLangRestrict = a})
vlStartIndex :: Lens' VolumesList (Maybe Word32)
vlStartIndex
= lens _vlStartIndex (\ s a -> s{_vlStartIndex = a})
. mapping _Coerce
vlMaxResults :: Lens' VolumesList (Maybe Word32)
vlMaxResults
= lens _vlMaxResults (\ s a -> s{_vlMaxResults = a})
. mapping _Coerce
vlShowPreOrders :: Lens' VolumesList (Maybe Bool)
vlShowPreOrders
= lens _vlShowPreOrders
(\ s a -> s{_vlShowPreOrders = a})
vlPrintType :: Lens' VolumesList (Maybe VolumesListPrintType)
vlPrintType
= lens _vlPrintType (\ s a -> s{_vlPrintType = a})
instance GoogleRequest VolumesList where
type Rs VolumesList = Volumes
type Scopes VolumesList =
'["https://www.googleapis.com/auth/books"]
requestClient VolumesList'{..}
= go (Just _vlQ) _vlOrderBy
_vlMaxAllowedMaturityRating
_vlLibraryRestrict
_vlPartner
_vlDownload
_vlSource
_vlProjection
_vlFilter
_vlLangRestrict
_vlStartIndex
_vlMaxResults
_vlShowPreOrders
_vlPrintType
(Just AltJSON)
booksService
where go
= buildClient (Proxy :: Proxy VolumesListResource)
mempty