{-# 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.Storage.Notifications.Get
(
NotificationsGetResource
, notificationsGet
, NotificationsGet
, ngNotification
, ngBucket
, ngUserProject
) where
import Network.Google.Prelude
import Network.Google.Storage.Types
type NotificationsGetResource =
"storage" :>
"v1" :>
"b" :>
Capture "bucket" Text :>
"notificationConfigs" :>
Capture "notification" Text :>
QueryParam "userProject" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Notification
data NotificationsGet = NotificationsGet'
{ _ngNotification :: !Text
, _ngBucket :: !Text
, _ngUserProject :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
notificationsGet
:: Text
-> Text
-> NotificationsGet
notificationsGet pNgNotification_ pNgBucket_ =
NotificationsGet'
{ _ngNotification = pNgNotification_
, _ngBucket = pNgBucket_
, _ngUserProject = Nothing
}
ngNotification :: Lens' NotificationsGet Text
ngNotification
= lens _ngNotification
(\ s a -> s{_ngNotification = a})
ngBucket :: Lens' NotificationsGet Text
ngBucket = lens _ngBucket (\ s a -> s{_ngBucket = a})
ngUserProject :: Lens' NotificationsGet (Maybe Text)
ngUserProject
= lens _ngUserProject
(\ s a -> s{_ngUserProject = a})
instance GoogleRequest NotificationsGet where
type Rs NotificationsGet = Notification
type Scopes NotificationsGet =
'["https://www.googleapis.com/auth/cloud-platform",
"https://www.googleapis.com/auth/cloud-platform.read-only",
"https://www.googleapis.com/auth/devstorage.full_control",
"https://www.googleapis.com/auth/devstorage.read_only",
"https://www.googleapis.com/auth/devstorage.read_write"]
requestClient NotificationsGet'{..}
= go _ngBucket _ngNotification _ngUserProject
(Just AltJSON)
storageService
where go
= buildClient
(Proxy :: Proxy NotificationsGetResource)
mempty