{-# 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.AlertCenter.UpdateSettings
(
UpdateSettingsResource
, updateSettings
, UpdateSettings
, usXgafv
, usUploadProtocol
, usAccessToken
, usUploadType
, usPayload
, usCustomerId
, usCallback
) where
import Network.Google.AlertCenter.Types
import Network.Google.Prelude
type UpdateSettingsResource =
"v1beta1" :>
"settings" :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "customerId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Settings :> Patch '[JSON] Settings
data UpdateSettings = UpdateSettings'
{ _usXgafv :: !(Maybe Xgafv)
, _usUploadProtocol :: !(Maybe Text)
, _usAccessToken :: !(Maybe Text)
, _usUploadType :: !(Maybe Text)
, _usPayload :: !Settings
, _usCustomerId :: !(Maybe Text)
, _usCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
updateSettings
:: Settings
-> UpdateSettings
updateSettings pUsPayload_ =
UpdateSettings'
{ _usXgafv = Nothing
, _usUploadProtocol = Nothing
, _usAccessToken = Nothing
, _usUploadType = Nothing
, _usPayload = pUsPayload_
, _usCustomerId = Nothing
, _usCallback = Nothing
}
usXgafv :: Lens' UpdateSettings (Maybe Xgafv)
usXgafv = lens _usXgafv (\ s a -> s{_usXgafv = a})
usUploadProtocol :: Lens' UpdateSettings (Maybe Text)
usUploadProtocol
= lens _usUploadProtocol
(\ s a -> s{_usUploadProtocol = a})
usAccessToken :: Lens' UpdateSettings (Maybe Text)
usAccessToken
= lens _usAccessToken
(\ s a -> s{_usAccessToken = a})
usUploadType :: Lens' UpdateSettings (Maybe Text)
usUploadType
= lens _usUploadType (\ s a -> s{_usUploadType = a})
usPayload :: Lens' UpdateSettings Settings
usPayload
= lens _usPayload (\ s a -> s{_usPayload = a})
usCustomerId :: Lens' UpdateSettings (Maybe Text)
usCustomerId
= lens _usCustomerId (\ s a -> s{_usCustomerId = a})
usCallback :: Lens' UpdateSettings (Maybe Text)
usCallback
= lens _usCallback (\ s a -> s{_usCallback = a})
instance GoogleRequest UpdateSettings where
type Rs UpdateSettings = Settings
type Scopes UpdateSettings =
'["https://www.googleapis.com/auth/apps.alerts"]
requestClient UpdateSettings'{..}
= go _usXgafv _usUploadProtocol _usAccessToken
_usUploadType
_usCustomerId
_usCallback
(Just AltJSON)
_usPayload
alertCenterService
where go
= buildClient (Proxy :: Proxy UpdateSettingsResource)
mempty