{-# 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.LibraryAgent.Shelves.Books.Borrow
(
ShelvesBooksBorrowResource
, shelvesBooksBorrow
, ShelvesBooksBorrow
, sbbXgafv
, sbbUploadProtocol
, sbbAccessToken
, sbbUploadType
, sbbName
, sbbCallback
) where
import Network.Google.LibraryAgent.Types
import Network.Google.Prelude
type ShelvesBooksBorrowResource =
"v1" :>
CaptureMode "name" "borrow" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
Post '[JSON] GoogleExampleLibraryagentV1Book
data ShelvesBooksBorrow = ShelvesBooksBorrow'
{ _sbbXgafv :: !(Maybe Xgafv)
, _sbbUploadProtocol :: !(Maybe Text)
, _sbbAccessToken :: !(Maybe Text)
, _sbbUploadType :: !(Maybe Text)
, _sbbName :: !Text
, _sbbCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
shelvesBooksBorrow
:: Text
-> ShelvesBooksBorrow
shelvesBooksBorrow pSbbName_ =
ShelvesBooksBorrow'
{ _sbbXgafv = Nothing
, _sbbUploadProtocol = Nothing
, _sbbAccessToken = Nothing
, _sbbUploadType = Nothing
, _sbbName = pSbbName_
, _sbbCallback = Nothing
}
sbbXgafv :: Lens' ShelvesBooksBorrow (Maybe Xgafv)
sbbXgafv = lens _sbbXgafv (\ s a -> s{_sbbXgafv = a})
sbbUploadProtocol :: Lens' ShelvesBooksBorrow (Maybe Text)
sbbUploadProtocol
= lens _sbbUploadProtocol
(\ s a -> s{_sbbUploadProtocol = a})
sbbAccessToken :: Lens' ShelvesBooksBorrow (Maybe Text)
sbbAccessToken
= lens _sbbAccessToken
(\ s a -> s{_sbbAccessToken = a})
sbbUploadType :: Lens' ShelvesBooksBorrow (Maybe Text)
sbbUploadType
= lens _sbbUploadType
(\ s a -> s{_sbbUploadType = a})
sbbName :: Lens' ShelvesBooksBorrow Text
sbbName = lens _sbbName (\ s a -> s{_sbbName = a})
sbbCallback :: Lens' ShelvesBooksBorrow (Maybe Text)
sbbCallback
= lens _sbbCallback (\ s a -> s{_sbbCallback = a})
instance GoogleRequest ShelvesBooksBorrow where
type Rs ShelvesBooksBorrow =
GoogleExampleLibraryagentV1Book
type Scopes ShelvesBooksBorrow =
'["https://www.googleapis.com/auth/cloud-platform"]
requestClient ShelvesBooksBorrow'{..}
= go _sbbName _sbbXgafv _sbbUploadProtocol
_sbbAccessToken
_sbbUploadType
_sbbCallback
(Just AltJSON)
libraryAgentService
where go
= buildClient
(Proxy :: Proxy ShelvesBooksBorrowResource)
mempty