{-# 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.AlertCenter.Alerts.Get
(
AlertsGetResource
, alertsGet
, AlertsGet
, agXgafv
, agUploadProtocol
, agAccessToken
, agAlertId
, agUploadType
, agCustomerId
, agCallback
) where
import Network.Google.AlertCenter.Types
import Network.Google.Prelude
type AlertsGetResource =
"v1beta1" :>
"alerts" :>
Capture "alertId" Text :>
QueryParam "$.xgafv" Xgafv :>
QueryParam "upload_protocol" Text :>
QueryParam "access_token" Text :>
QueryParam "uploadType" Text :>
QueryParam "customerId" Text :>
QueryParam "callback" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Alert
data AlertsGet = AlertsGet'
{ _agXgafv :: !(Maybe Xgafv)
, _agUploadProtocol :: !(Maybe Text)
, _agAccessToken :: !(Maybe Text)
, _agAlertId :: !Text
, _agUploadType :: !(Maybe Text)
, _agCustomerId :: !(Maybe Text)
, _agCallback :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
alertsGet
:: Text
-> AlertsGet
alertsGet pAgAlertId_ =
AlertsGet'
{ _agXgafv = Nothing
, _agUploadProtocol = Nothing
, _agAccessToken = Nothing
, _agAlertId = pAgAlertId_
, _agUploadType = Nothing
, _agCustomerId = Nothing
, _agCallback = Nothing
}
agXgafv :: Lens' AlertsGet (Maybe Xgafv)
agXgafv = lens _agXgafv (\ s a -> s{_agXgafv = a})
agUploadProtocol :: Lens' AlertsGet (Maybe Text)
agUploadProtocol
= lens _agUploadProtocol
(\ s a -> s{_agUploadProtocol = a})
agAccessToken :: Lens' AlertsGet (Maybe Text)
agAccessToken
= lens _agAccessToken
(\ s a -> s{_agAccessToken = a})
agAlertId :: Lens' AlertsGet Text
agAlertId
= lens _agAlertId (\ s a -> s{_agAlertId = a})
agUploadType :: Lens' AlertsGet (Maybe Text)
agUploadType
= lens _agUploadType (\ s a -> s{_agUploadType = a})
agCustomerId :: Lens' AlertsGet (Maybe Text)
agCustomerId
= lens _agCustomerId (\ s a -> s{_agCustomerId = a})
agCallback :: Lens' AlertsGet (Maybe Text)
agCallback
= lens _agCallback (\ s a -> s{_agCallback = a})
instance GoogleRequest AlertsGet where
type Rs AlertsGet = Alert
type Scopes AlertsGet =
'["https://www.googleapis.com/auth/apps.alerts"]
requestClient AlertsGet'{..}
= go _agAlertId _agXgafv _agUploadProtocol
_agAccessToken
_agUploadType
_agCustomerId
_agCallback
(Just AltJSON)
alertCenterService
where go
= buildClient (Proxy :: Proxy AlertsGetResource)
mempty