{-# 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.Get
(
NotificationsGetResource
, notificationsGet
, NotificationsGet
, ngCustomer
, ngNotificationId
) where
import Network.Google.Directory.Types
import Network.Google.Prelude
type NotificationsGetResource =
"admin" :>
"directory" :>
"v1" :>
"customer" :>
Capture "customer" Text :>
"notifications" :>
Capture "notificationId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Notification
data NotificationsGet = NotificationsGet'
{ _ngCustomer :: !Text
, _ngNotificationId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
notificationsGet
:: Text
-> Text
-> NotificationsGet
notificationsGet pNgCustomer_ pNgNotificationId_ =
NotificationsGet'
{ _ngCustomer = pNgCustomer_
, _ngNotificationId = pNgNotificationId_
}
ngCustomer :: Lens' NotificationsGet Text
ngCustomer
= lens _ngCustomer (\ s a -> s{_ngCustomer = a})
ngNotificationId :: Lens' NotificationsGet Text
ngNotificationId
= lens _ngNotificationId
(\ s a -> s{_ngNotificationId = a})
instance GoogleRequest NotificationsGet where
type Rs NotificationsGet = Notification
type Scopes NotificationsGet =
'["https://www.googleapis.com/auth/admin.directory.notifications"]
requestClient NotificationsGet'{..}
= go _ngCustomer _ngNotificationId (Just AltJSON)
directoryService
where go
= buildClient
(Proxy :: Proxy NotificationsGetResource)
mempty