{-# 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.Mybooks.List
(
VolumesMybooksListResource
, volumesMybooksList
, VolumesMybooksList
, vmlProcessingState
, vmlAcquireMethod
, vmlCountry
, vmlLocale
, vmlSource
, vmlStartIndex
, vmlMaxResults
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type VolumesMybooksListResource =
"books" :>
"v1" :>
"volumes" :>
"mybooks" :>
QueryParams "processingState"
VolumesMybooksListProcessingState
:>
QueryParams "acquireMethod"
VolumesMybooksListAcquireMethod
:>
QueryParam "country" Text :>
QueryParam "locale" Text :>
QueryParam "source" Text :>
QueryParam "startIndex" (Textual Word32) :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Volumes
data VolumesMybooksList = VolumesMybooksList'
{ _vmlProcessingState :: !(Maybe [VolumesMybooksListProcessingState])
, _vmlAcquireMethod :: !(Maybe [VolumesMybooksListAcquireMethod])
, _vmlCountry :: !(Maybe Text)
, _vmlLocale :: !(Maybe Text)
, _vmlSource :: !(Maybe Text)
, _vmlStartIndex :: !(Maybe (Textual Word32))
, _vmlMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
volumesMybooksList
:: VolumesMybooksList
volumesMybooksList =
VolumesMybooksList'
{ _vmlProcessingState = Nothing
, _vmlAcquireMethod = Nothing
, _vmlCountry = Nothing
, _vmlLocale = Nothing
, _vmlSource = Nothing
, _vmlStartIndex = Nothing
, _vmlMaxResults = Nothing
}
vmlProcessingState :: Lens' VolumesMybooksList [VolumesMybooksListProcessingState]
vmlProcessingState
= lens _vmlProcessingState
(\ s a -> s{_vmlProcessingState = a})
. _Default
. _Coerce
vmlAcquireMethod :: Lens' VolumesMybooksList [VolumesMybooksListAcquireMethod]
vmlAcquireMethod
= lens _vmlAcquireMethod
(\ s a -> s{_vmlAcquireMethod = a})
. _Default
. _Coerce
vmlCountry :: Lens' VolumesMybooksList (Maybe Text)
vmlCountry
= lens _vmlCountry (\ s a -> s{_vmlCountry = a})
vmlLocale :: Lens' VolumesMybooksList (Maybe Text)
vmlLocale
= lens _vmlLocale (\ s a -> s{_vmlLocale = a})
vmlSource :: Lens' VolumesMybooksList (Maybe Text)
vmlSource
= lens _vmlSource (\ s a -> s{_vmlSource = a})
vmlStartIndex :: Lens' VolumesMybooksList (Maybe Word32)
vmlStartIndex
= lens _vmlStartIndex
(\ s a -> s{_vmlStartIndex = a})
. mapping _Coerce
vmlMaxResults :: Lens' VolumesMybooksList (Maybe Word32)
vmlMaxResults
= lens _vmlMaxResults
(\ s a -> s{_vmlMaxResults = a})
. mapping _Coerce
instance GoogleRequest VolumesMybooksList where
type Rs VolumesMybooksList = Volumes
type Scopes VolumesMybooksList =
'["https://www.googleapis.com/auth/books"]
requestClient VolumesMybooksList'{..}
= go (_vmlProcessingState ^. _Default)
(_vmlAcquireMethod ^. _Default)
_vmlCountry
_vmlLocale
_vmlSource
_vmlStartIndex
_vmlMaxResults
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy VolumesMybooksListResource)
mempty