{-# 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.MyLibrary.Annotations.Summary
(
MyLibraryAnnotationsSummaryResource
, myLibraryAnnotationsSummary
, MyLibraryAnnotationsSummary
, mlasLayerIds
, mlasVolumeId
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryAnnotationsSummaryResource =
"books" :>
"v1" :>
"mylibrary" :>
"annotations" :>
"summary" :>
QueryParams "layerIds" Text :>
QueryParam "volumeId" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] AnnotationsSummary
data MyLibraryAnnotationsSummary = MyLibraryAnnotationsSummary'
{ _mlasLayerIds :: ![Text]
, _mlasVolumeId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryAnnotationsSummary
:: [Text]
-> Text
-> MyLibraryAnnotationsSummary
myLibraryAnnotationsSummary pMlasLayerIds_ pMlasVolumeId_ =
MyLibraryAnnotationsSummary'
{ _mlasLayerIds = _Coerce # pMlasLayerIds_
, _mlasVolumeId = pMlasVolumeId_
}
mlasLayerIds :: Lens' MyLibraryAnnotationsSummary [Text]
mlasLayerIds
= lens _mlasLayerIds (\ s a -> s{_mlasLayerIds = a})
. _Coerce
mlasVolumeId :: Lens' MyLibraryAnnotationsSummary Text
mlasVolumeId
= lens _mlasVolumeId (\ s a -> s{_mlasVolumeId = a})
instance GoogleRequest MyLibraryAnnotationsSummary
where
type Rs MyLibraryAnnotationsSummary =
AnnotationsSummary
type Scopes MyLibraryAnnotationsSummary =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryAnnotationsSummary'{..}
= go _mlasLayerIds (Just _mlasVolumeId)
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy MyLibraryAnnotationsSummaryResource)
mempty