{-# 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.MoveVolume
(
MyLibraryBookshelvesMoveVolumeResource
, myLibraryBookshelvesMoveVolume
, MyLibraryBookshelvesMoveVolume
, mlbmvShelf
, mlbmvVolumeId
, mlbmvSource
, mlbmvVolumePosition
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryBookshelvesMoveVolumeResource =
"books" :>
"v1" :>
"mylibrary" :>
"bookshelves" :>
Capture "shelf" Text :>
"moveVolume" :>
QueryParam "volumeId" Text :>
QueryParam "volumePosition" (Textual Int32) :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data MyLibraryBookshelvesMoveVolume = MyLibraryBookshelvesMoveVolume'
{ _mlbmvShelf :: !Text
, _mlbmvVolumeId :: !Text
, _mlbmvSource :: !(Maybe Text)
, _mlbmvVolumePosition :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryBookshelvesMoveVolume
:: Text
-> Text
-> Int32
-> MyLibraryBookshelvesMoveVolume
myLibraryBookshelvesMoveVolume pMlbmvShelf_ pMlbmvVolumeId_ pMlbmvVolumePosition_ =
MyLibraryBookshelvesMoveVolume'
{ _mlbmvShelf = pMlbmvShelf_
, _mlbmvVolumeId = pMlbmvVolumeId_
, _mlbmvSource = Nothing
, _mlbmvVolumePosition = _Coerce # pMlbmvVolumePosition_
}
mlbmvShelf :: Lens' MyLibraryBookshelvesMoveVolume Text
mlbmvShelf
= lens _mlbmvShelf (\ s a -> s{_mlbmvShelf = a})
mlbmvVolumeId :: Lens' MyLibraryBookshelvesMoveVolume Text
mlbmvVolumeId
= lens _mlbmvVolumeId
(\ s a -> s{_mlbmvVolumeId = a})
mlbmvSource :: Lens' MyLibraryBookshelvesMoveVolume (Maybe Text)
mlbmvSource
= lens _mlbmvSource (\ s a -> s{_mlbmvSource = a})
mlbmvVolumePosition :: Lens' MyLibraryBookshelvesMoveVolume Int32
mlbmvVolumePosition
= lens _mlbmvVolumePosition
(\ s a -> s{_mlbmvVolumePosition = a})
. _Coerce
instance GoogleRequest MyLibraryBookshelvesMoveVolume
where
type Rs MyLibraryBookshelvesMoveVolume = ()
type Scopes MyLibraryBookshelvesMoveVolume =
'["https://www.googleapis.com/auth/books"]
requestClient MyLibraryBookshelvesMoveVolume'{..}
= go _mlbmvShelf (Just _mlbmvVolumeId)
(Just _mlbmvVolumePosition)
_mlbmvSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy ::
Proxy MyLibraryBookshelvesMoveVolumeResource)
mempty