{-# 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.Books.Notification.Get
(
NotificationGetResource
, notificationGet
, NotificationGet
, ngLocale
, ngNotificationId
, ngSource
) where
import Network.Google.Books.Types
import Network.Google.Prelude
type NotificationGetResource =
"books" :>
"v1" :>
"notification" :>
"get" :>
QueryParam "notification_id" Text :>
QueryParam "locale" Text :>
QueryParam "source" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Notification
data NotificationGet = NotificationGet'
{ _ngLocale :: !(Maybe Text)
, _ngNotificationId :: !Text
, _ngSource :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
notificationGet
:: Text
-> NotificationGet
notificationGet pNgNotificationId_ =
NotificationGet'
{ _ngLocale = Nothing
, _ngNotificationId = pNgNotificationId_
, _ngSource = Nothing
}
ngLocale :: Lens' NotificationGet (Maybe Text)
ngLocale = lens _ngLocale (\ s a -> s{_ngLocale = a})
ngNotificationId :: Lens' NotificationGet Text
ngNotificationId
= lens _ngNotificationId
(\ s a -> s{_ngNotificationId = a})
ngSource :: Lens' NotificationGet (Maybe Text)
ngSource = lens _ngSource (\ s a -> s{_ngSource = a})
instance GoogleRequest NotificationGet where
type Rs NotificationGet = Notification
type Scopes NotificationGet =
'["https://www.googleapis.com/auth/books"]
requestClient NotificationGet'{..}
= go (Just _ngNotificationId) _ngLocale _ngSource
(Just AltJSON)
booksService
where go
= buildClient
(Proxy :: Proxy NotificationGetResource)
mempty