{-# 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.Directory.Notifications.Update
(
NotificationsUpdateResource
, notificationsUpdate
, NotificationsUpdate
, nuPayload
, nuCustomer
, nuNotificationId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type NotificationsUpdateResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"notifications" :>
Capture "notificationId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Notification :>
Put '[JSON] Notification
data NotificationsUpdate = NotificationsUpdate'
{ _nuPayload :: !Notification
, _nuCustomer :: !Text
, _nuNotificationId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
notificationsUpdate
:: Notification
-> Text
-> Text
-> NotificationsUpdate
notificationsUpdate pNuPayload_ pNuCustomer_ pNuNotificationId_ =
NotificationsUpdate'
{ _nuPayload = pNuPayload_
, _nuCustomer = pNuCustomer_
, _nuNotificationId = pNuNotificationId_
}
nuPayload :: Lens' NotificationsUpdate Notification
nuPayload
= lens _nuPayload (\ s a -> s{_nuPayload = a})
nuCustomer :: Lens' NotificationsUpdate Text
nuCustomer
= lens _nuCustomer (\ s a -> s{_nuCustomer = a})
nuNotificationId :: Lens' NotificationsUpdate Text
nuNotificationId
= lens _nuNotificationId
(\ s a -> s{_nuNotificationId = a})
instance GoogleRequest NotificationsUpdate where
type Rs NotificationsUpdate = Notification
type Scopes NotificationsUpdate =
'["https://www.googleapis.com/auth/admin.directory.notifications"]
requestClient NotificationsUpdate'{..}
= go _nuCustomer _nuNotificationId (Just AltJSON)
_nuPayload
directoryService
where go
= buildClient
(Proxy :: Proxy NotificationsUpdateResource)
mempty