{-# 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.Get
(
VolumesGetResource
, volumesGet
, VolumesGet
, vgCountry
, vgIncludeNonComicsSeries
, vgPartner
, vgVolumeId
, vgSource
, vgProjection
, vgUserLibraryConsistentRead
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type VolumesGetResource =
"books" :>
"v1" :>
"volumes" :>
Capture "volumeId" Text :>
QueryParam "country" Text :>
QueryParam "includeNonComicsSeries" Bool :>
QueryParam "partner" Text :>
QueryParam "source" Text :>
QueryParam "projection" VolumesGetProjection :>
QueryParam "user_library_consistent_read" Bool :>
QueryParam "alt" AltJSON :> Get '[JSON] Volume
data VolumesGet = VolumesGet'
{ _vgCountry :: !(Maybe Text)
, _vgIncludeNonComicsSeries :: !(Maybe Bool)
, _vgPartner :: !(Maybe Text)
, _vgVolumeId :: !Text
, _vgSource :: !(Maybe Text)
, _vgProjection :: !(Maybe VolumesGetProjection)
, _vgUserLibraryConsistentRead :: !(Maybe Bool)
} deriving (Eq,Show,Data,Typeable,Generic)
volumesGet
:: Text
-> VolumesGet
volumesGet pVgVolumeId_ =
VolumesGet'
{ _vgCountry = Nothing
, _vgIncludeNonComicsSeries = Nothing
, _vgPartner = Nothing
, _vgVolumeId = pVgVolumeId_
, _vgSource = Nothing
, _vgProjection = Nothing
, _vgUserLibraryConsistentRead = Nothing
}
vgCountry :: Lens' VolumesGet (Maybe Text)
vgCountry
= lens _vgCountry (\ s a -> s{_vgCountry = a})
vgIncludeNonComicsSeries :: Lens' VolumesGet (Maybe Bool)
vgIncludeNonComicsSeries
= lens _vgIncludeNonComicsSeries
(\ s a -> s{_vgIncludeNonComicsSeries = a})
vgPartner :: Lens' VolumesGet (Maybe Text)
vgPartner
= lens _vgPartner (\ s a -> s{_vgPartner = a})
vgVolumeId :: Lens' VolumesGet Text
vgVolumeId
= lens _vgVolumeId (\ s a -> s{_vgVolumeId = a})
vgSource :: Lens' VolumesGet (Maybe Text)
vgSource = lens _vgSource (\ s a -> s{_vgSource = a})
vgProjection :: Lens' VolumesGet (Maybe VolumesGetProjection)
vgProjection
= lens _vgProjection (\ s a -> s{_vgProjection = a})
vgUserLibraryConsistentRead :: Lens' VolumesGet (Maybe Bool)
vgUserLibraryConsistentRead
= lens _vgUserLibraryConsistentRead
(\ s a -> s{_vgUserLibraryConsistentRead = a})
instance GoogleRequest VolumesGet where
type Rs VolumesGet = Volume
type Scopes VolumesGet =
'["https://www.googleapis.com/auth/books"]
requestClient VolumesGet'{..}
= go _vgVolumeId _vgCountry _vgIncludeNonComicsSeries
_vgPartner
_vgSource
_vgProjection
_vgUserLibraryConsistentRead
(Just AltJSON)
booksService
where go
= buildClient (Proxy :: Proxy VolumesGetResource)
mempty