{-# 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.Bookshelves.AddVolume
(
MyLibraryBookshelvesAddVolumeResource
, myLibraryBookshelvesAddVolume
, MyLibraryBookshelvesAddVolume
, mlbavReason
, mlbavShelf
, mlbavVolumeId
, mlbavSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryBookshelvesAddVolumeResource =
"books" :>
"v1" :>
"mylibrary" :>
"bookshelves" :>
Capture "shelf" Text :>
"addVolume" :>
QueryParam "volumeId" Text :>
QueryParam "reason"
MyLibraryBookshelvesAddVolumeReason
:>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data MyLibraryBookshelvesAddVolume = MyLibraryBookshelvesAddVolume'
{ _mlbavReason :: !(Maybe MyLibraryBookshelvesAddVolumeReason)
, _mlbavShelf :: !Text
, _mlbavVolumeId :: !Text
, _mlbavSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryBookshelvesAddVolume
:: Text
-> Text
-> MyLibraryBookshelvesAddVolume
myLibraryBookshelvesAddVolume pMlbavShelf_ pMlbavVolumeId_ =
MyLibraryBookshelvesAddVolume'
{ _mlbavReason = Nothing
, _mlbavShelf = pMlbavShelf_
, _mlbavVolumeId = pMlbavVolumeId_
, _mlbavSource = Nothing
}
mlbavReason :: Lens' MyLibraryBookshelvesAddVolume (Maybe MyLibraryBookshelvesAddVolumeReason)
mlbavReason
= lens _mlbavReason (\ s a -> s{_mlbavReason = a})
mlbavShelf :: Lens' MyLibraryBookshelvesAddVolume Text
mlbavShelf
= lens _mlbavShelf (\ s a -> s{_mlbavShelf = a})
mlbavVolumeId :: Lens' MyLibraryBookshelvesAddVolume Text
mlbavVolumeId
= lens _mlbavVolumeId
(\ s a -> s{_mlbavVolumeId = a})
mlbavSource :: Lens' MyLibraryBookshelvesAddVolume (Maybe Text)
mlbavSource
= lens _mlbavSource (\ s a -> s{_mlbavSource = a})
instance GoogleRequest MyLibraryBookshelvesAddVolume
where
type Rs MyLibraryBookshelvesAddVolume = ()
type Scopes MyLibraryBookshelvesAddVolume =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryBookshelvesAddVolume'{..}
= go _mlbavShelf (Just _mlbavVolumeId) _mlbavReason
_mlbavSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy ::
Proxy MyLibraryBookshelvesAddVolumeResource)
mempty