{-# 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.ReadingPositions.SetPosition
(
MyLibraryReadingPositionsSetPositionResource
, myLibraryReadingPositionsSetPosition
, MyLibraryReadingPositionsSetPosition
, mlrpspDeviceCookie
, mlrpspContentVersion
, mlrpspAction
, mlrpspVolumeId
, mlrpspSource
, mlrpspTimestamp
, mlrpspPosition
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyLibraryReadingPositionsSetPositionResource =
"books" :>
"v1" :>
"mylibrary" :>
"readingpositions" :>
Capture "volumeId" Text :>
"setPosition" :>
QueryParam "timestamp" Text :>
QueryParam "position" Text :>
QueryParam "deviceCookie" Text :>
QueryParam "contentVersion" Text :>
QueryParam "action"
MyLibraryReadingPositionsSetPositionAction
:>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data MyLibraryReadingPositionsSetPosition = MyLibraryReadingPositionsSetPosition'
{ _mlrpspDeviceCookie :: !(Maybe Text)
, _mlrpspContentVersion :: !(Maybe Text)
, _mlrpspAction :: !(Maybe MyLibraryReadingPositionsSetPositionAction)
, _mlrpspVolumeId :: !Text
, _mlrpspSource :: !(Maybe Text)
, _mlrpspTimestamp :: !Text
, _mlrpspPosition :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
myLibraryReadingPositionsSetPosition
:: Text
-> Text
-> Text
-> MyLibraryReadingPositionsSetPosition
myLibraryReadingPositionsSetPosition pMlrpspVolumeId_ pMlrpspTimestamp_ pMlrpspPosition_ =
MyLibraryReadingPositionsSetPosition'
{ _mlrpspDeviceCookie = Nothing
, _mlrpspContentVersion = Nothing
, _mlrpspAction = Nothing
, _mlrpspVolumeId = pMlrpspVolumeId_
, _mlrpspSource = Nothing
, _mlrpspTimestamp = pMlrpspTimestamp_
, _mlrpspPosition = pMlrpspPosition_
}
mlrpspDeviceCookie :: Lens' MyLibraryReadingPositionsSetPosition (Maybe Text)
mlrpspDeviceCookie
= lens _mlrpspDeviceCookie
(\ s a -> s{_mlrpspDeviceCookie = a})
mlrpspContentVersion :: Lens' MyLibraryReadingPositionsSetPosition (Maybe Text)
mlrpspContentVersion
= lens _mlrpspContentVersion
(\ s a -> s{_mlrpspContentVersion = a})
mlrpspAction :: Lens' MyLibraryReadingPositionsSetPosition (Maybe MyLibraryReadingPositionsSetPositionAction)
mlrpspAction
= lens _mlrpspAction (\ s a -> s{_mlrpspAction = a})
mlrpspVolumeId :: Lens' MyLibraryReadingPositionsSetPosition Text
mlrpspVolumeId
= lens _mlrpspVolumeId
(\ s a -> s{_mlrpspVolumeId = a})
mlrpspSource :: Lens' MyLibraryReadingPositionsSetPosition (Maybe Text)
mlrpspSource
= lens _mlrpspSource (\ s a -> s{_mlrpspSource = a})
mlrpspTimestamp :: Lens' MyLibraryReadingPositionsSetPosition Text
mlrpspTimestamp
= lens _mlrpspTimestamp
(\ s a -> s{_mlrpspTimestamp = a})
mlrpspPosition :: Lens' MyLibraryReadingPositionsSetPosition Text
mlrpspPosition
= lens _mlrpspPosition
(\ s a -> s{_mlrpspPosition = a})
instance GoogleRequest
MyLibraryReadingPositionsSetPosition where
type Rs MyLibraryReadingPositionsSetPosition = ()
type Scopes MyLibraryReadingPositionsSetPosition =
'["https://www.googleapis.com/auth/books"]
requestClient
MyLibraryReadingPositionsSetPosition'{..}
= go _mlrpspVolumeId (Just _mlrpspTimestamp)
(Just _mlrpspPosition)
_mlrpspDeviceCookie
_mlrpspContentVersion
_mlrpspAction
_mlrpspSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy ::
Proxy MyLibraryReadingPositionsSetPositionResource)
mempty