{-# 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.Patch
(
NotificationsPatchResource
, notificationsPatch
, NotificationsPatch
, npPayload
, npCustomer
, npNotificationId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type NotificationsPatchResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"notifications" :>
Capture "notificationId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Notification :>
Patch '[JSON] Notification
data NotificationsPatch = NotificationsPatch'
{ _npPayload :: !Notification
, _npCustomer :: !Text
, _npNotificationId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
notificationsPatch
:: Notification
-> Text
-> Text
-> NotificationsPatch
notificationsPatch pNpPayload_ pNpCustomer_ pNpNotificationId_ =
NotificationsPatch'
{ _npPayload = pNpPayload_
, _npCustomer = pNpCustomer_
, _npNotificationId = pNpNotificationId_
}
npPayload :: Lens' NotificationsPatch Notification
npPayload
= lens _npPayload (\ s a -> s{_npPayload = a})
npCustomer :: Lens' NotificationsPatch Text
npCustomer
= lens _npCustomer (\ s a -> s{_npCustomer = a})
npNotificationId :: Lens' NotificationsPatch Text
npNotificationId
= lens _npNotificationId
(\ s a -> s{_npNotificationId = a})
instance GoogleRequest NotificationsPatch where
type Rs NotificationsPatch = Notification
type Scopes NotificationsPatch =
'["https://www.googleapis.com/auth/admin.directory.notifications"]
requestClient NotificationsPatch'{..}
= go _npCustomer _npNotificationId (Just AltJSON)
_npPayload
directoryService
where go
= buildClient
(Proxy :: Proxy NotificationsPatchResource)
mempty