{-# 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.RemoveVolume
(
MyLibraryBookshelvesRemoveVolumeResource
, myLibraryBookshelvesRemoveVolume
, MyLibraryBookshelvesRemoveVolume
, mlbrvReason
, mlbrvShelf
, mlbrvVolumeId
, mlbrvSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryBookshelvesRemoveVolumeResource =
"books" :>
"v1" :>
"mylibrary" :>
"bookshelves" :>
Capture "shelf" Text :>
"removeVolume" :>
QueryParam "volumeId" Text :>
QueryParam "reason"
MyLibraryBookshelvesRemoveVolumeReason
:>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data MyLibraryBookshelvesRemoveVolume = MyLibraryBookshelvesRemoveVolume'
{ _mlbrvReason :: !(Maybe MyLibraryBookshelvesRemoveVolumeReason)
, _mlbrvShelf :: !Text
, _mlbrvVolumeId :: !Text
, _mlbrvSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryBookshelvesRemoveVolume
:: Text
-> Text
-> MyLibraryBookshelvesRemoveVolume
myLibraryBookshelvesRemoveVolume pMlbrvShelf_ pMlbrvVolumeId_ =
MyLibraryBookshelvesRemoveVolume'
{ _mlbrvReason = Nothing
, _mlbrvShelf = pMlbrvShelf_
, _mlbrvVolumeId = pMlbrvVolumeId_
, _mlbrvSource = Nothing
}
mlbrvReason :: Lens' MyLibraryBookshelvesRemoveVolume (Maybe MyLibraryBookshelvesRemoveVolumeReason)
mlbrvReason
= lens _mlbrvReason (\ s a -> s{_mlbrvReason = a})
mlbrvShelf :: Lens' MyLibraryBookshelvesRemoveVolume Text
mlbrvShelf
= lens _mlbrvShelf (\ s a -> s{_mlbrvShelf = a})
mlbrvVolumeId :: Lens' MyLibraryBookshelvesRemoveVolume Text
mlbrvVolumeId
= lens _mlbrvVolumeId
(\ s a -> s{_mlbrvVolumeId = a})
mlbrvSource :: Lens' MyLibraryBookshelvesRemoveVolume (Maybe Text)
mlbrvSource
= lens _mlbrvSource (\ s a -> s{_mlbrvSource = a})
instance GoogleRequest
MyLibraryBookshelvesRemoveVolume where
type Rs MyLibraryBookshelvesRemoveVolume = ()
type Scopes MyLibraryBookshelvesRemoveVolume =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryBookshelvesRemoveVolume'{..}
= go _mlbrvShelf (Just _mlbrvVolumeId) _mlbrvReason
_mlbrvSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy ::
Proxy MyLibraryBookshelvesRemoveVolumeResource)
mempty