{-# 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.MyConfig.UpdateUserSettings
(
MyConfigUpdateUserSettingsResource
, myConfigUpdateUserSettings
, MyConfigUpdateUserSettings
, mcuusPayload
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type MyConfigUpdateUserSettingsResource =
"books" :>
"v1" :>
"myconfig" :>
"updateUserSettings" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserSettings :>
Post '[JSON] UserSettings
newtype MyConfigUpdateUserSettings = MyConfigUpdateUserSettings'
{ _mcuusPayload :: UserSettings
} deriving (Eq,Show,Data,Typeable,Generic)
myConfigUpdateUserSettings
:: UserSettings
-> MyConfigUpdateUserSettings
myConfigUpdateUserSettings pMcuusPayload_ =
MyConfigUpdateUserSettings'
{ _mcuusPayload = pMcuusPayload_
}
mcuusPayload :: Lens' MyConfigUpdateUserSettings UserSettings
mcuusPayload
= lens _mcuusPayload (\ s a -> s{_mcuusPayload = a})
instance GoogleRequest MyConfigUpdateUserSettings
where
type Rs MyConfigUpdateUserSettings = UserSettings
type Scopes MyConfigUpdateUserSettings =
'["https://www.googleapis.com/auth/books"]
requestClient MyConfigUpdateUserSettings'{..}
= go (Just AltJSON) _mcuusPayload booksService
where go
= buildClient
(Proxy :: Proxy MyConfigUpdateUserSettingsResource)
mempty