{-# 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.AnnotationData.Get
(
LayersAnnotationDataGetResource
, layersAnnotationDataGet
, LayersAnnotationDataGet
, ladgW
, ladgScale
, ladgLocale
, ladgContentVersion
, ladgAllowWebDefinitions
, ladgAnnotationDataId
, ladgVolumeId
, ladgSource
, ladgH
, ladgLayerId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type LayersAnnotationDataGetResource =
"books" :>
"v1" :>
"volumes" :>
Capture "volumeId" Text :>
"layers" :>
Capture "layerId" Text :>
"data" :>
Capture "annotationDataId" Text :>
QueryParam "contentVersion" Text :>
QueryParam "w" (Textual Int32) :>
QueryParam "scale" (Textual Int32) :>
QueryParam "locale" Text :>
QueryParam "allowWebDefinitions" Bool :>
QueryParam "source" Text :>
QueryParam "h" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AnnotationData
data LayersAnnotationDataGet = LayersAnnotationDataGet'
{ _ladgW :: !(Maybe (Textual Int32))
, _ladgScale :: !(Maybe (Textual Int32))
, _ladgLocale :: !(Maybe Text)
, _ladgContentVersion :: !Text
, _ladgAllowWebDefinitions :: !(Maybe Bool)
, _ladgAnnotationDataId :: !Text
, _ladgVolumeId :: !Text
, _ladgSource :: !(Maybe Text)
, _ladgH :: !(Maybe (Textual Int32))
, _ladgLayerId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
layersAnnotationDataGet
:: Text
-> Text
-> Text
-> Text
-> LayersAnnotationDataGet
layersAnnotationDataGet pLadgContentVersion_ pLadgAnnotationDataId_ pLadgVolumeId_ pLadgLayerId_ =
LayersAnnotationDataGet'
{ _ladgW = Nothing
, _ladgScale = Nothing
, _ladgLocale = Nothing
, _ladgContentVersion = pLadgContentVersion_
, _ladgAllowWebDefinitions = Nothing
, _ladgAnnotationDataId = pLadgAnnotationDataId_
, _ladgVolumeId = pLadgVolumeId_
, _ladgSource = Nothing
, _ladgH = Nothing
, _ladgLayerId = pLadgLayerId_
}
ladgW :: Lens' LayersAnnotationDataGet (Maybe Int32)
ladgW
= lens _ladgW (\ s a -> s{_ladgW = a}) .
mapping _Coerce
ladgScale :: Lens' LayersAnnotationDataGet (Maybe Int32)
ladgScale
= lens _ladgScale (\ s a -> s{_ladgScale = a}) .
mapping _Coerce
ladgLocale :: Lens' LayersAnnotationDataGet (Maybe Text)
ladgLocale
= lens _ladgLocale (\ s a -> s{_ladgLocale = a})
ladgContentVersion :: Lens' LayersAnnotationDataGet Text
ladgContentVersion
= lens _ladgContentVersion
(\ s a -> s{_ladgContentVersion = a})
ladgAllowWebDefinitions :: Lens' LayersAnnotationDataGet (Maybe Bool)
ladgAllowWebDefinitions
= lens _ladgAllowWebDefinitions
(\ s a -> s{_ladgAllowWebDefinitions = a})
ladgAnnotationDataId :: Lens' LayersAnnotationDataGet Text
ladgAnnotationDataId
= lens _ladgAnnotationDataId
(\ s a -> s{_ladgAnnotationDataId = a})
ladgVolumeId :: Lens' LayersAnnotationDataGet Text
ladgVolumeId
= lens _ladgVolumeId (\ s a -> s{_ladgVolumeId = a})
ladgSource :: Lens' LayersAnnotationDataGet (Maybe Text)
ladgSource
= lens _ladgSource (\ s a -> s{_ladgSource = a})
ladgH :: Lens' LayersAnnotationDataGet (Maybe Int32)
ladgH
= lens _ladgH (\ s a -> s{_ladgH = a}) .
mapping _Coerce
ladgLayerId :: Lens' LayersAnnotationDataGet Text
ladgLayerId
= lens _ladgLayerId (\ s a -> s{_ladgLayerId = a})
instance GoogleRequest LayersAnnotationDataGet where
type Rs LayersAnnotationDataGet = AnnotationData
type Scopes LayersAnnotationDataGet =
'["https://www.googleapis.com/auth/books"]
requestClient LayersAnnotationDataGet'{..}
= go _ladgVolumeId _ladgLayerId _ladgAnnotationDataId
(Just _ladgContentVersion)
_ladgW
_ladgScale
_ladgLocale
_ladgAllowWebDefinitions
_ladgSource
_ladgH
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy LayersAnnotationDataGetResource)
mempty