{-# 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.Reports.Activities.Watch
(
ActivitiesWatchResource
, activitiesWatch
, ActivitiesWatch
, awStartTime
, awFilters
, awPayload
, awCustomerId
, awActorIPAddress
, awEndTime
, awApplicationName
, awPageToken
, awEventName
, awUserKey
, awMaxResults
, awOrgUnitId
) where
import Network.Google.Prelude
import Network.Google.Reports.Types
type ActivitiesWatchResource =
"admin" :>
"reports" :>
"v1" :>
"activity" :>
"users" :>
Capture "userKey" Text :>
"applications" :>
Capture "applicationName" Text :>
"watch" :>
QueryParam "startTime" Text :>
QueryParam "filters" Text :>
QueryParam "customerId" Text :>
QueryParam "actorIpAddress" Text :>
QueryParam "endTime" Text :>
QueryParam "pageToken" Text :>
QueryParam "eventName" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "orgUnitID" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Channel :>
Post '[JSON] Channel
data ActivitiesWatch = ActivitiesWatch'
{ _awStartTime :: !(Maybe Text)
, _awFilters :: !(Maybe Text)
, _awPayload :: !Channel
, _awCustomerId :: !(Maybe Text)
, _awActorIPAddress :: !(Maybe Text)
, _awEndTime :: !(Maybe Text)
, _awApplicationName :: !Text
, _awPageToken :: !(Maybe Text)
, _awEventName :: !(Maybe Text)
, _awUserKey :: !Text
, _awMaxResults :: !(Maybe (Textual Int32))
, _awOrgUnitId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
activitiesWatch
:: Channel
-> Text
-> Text
-> ActivitiesWatch
activitiesWatch pAwPayload_ pAwApplicationName_ pAwUserKey_ =
ActivitiesWatch'
{ _awStartTime = Nothing
, _awFilters = Nothing
, _awPayload = pAwPayload_
, _awCustomerId = Nothing
, _awActorIPAddress = Nothing
, _awEndTime = Nothing
, _awApplicationName = pAwApplicationName_
, _awPageToken = Nothing
, _awEventName = Nothing
, _awUserKey = pAwUserKey_
, _awMaxResults = Nothing
, _awOrgUnitId = ""
}
awStartTime :: Lens' ActivitiesWatch (Maybe Text)
awStartTime
= lens _awStartTime (\ s a -> s{_awStartTime = a})
awFilters :: Lens' ActivitiesWatch (Maybe Text)
awFilters
= lens _awFilters (\ s a -> s{_awFilters = a})
awPayload :: Lens' ActivitiesWatch Channel
awPayload
= lens _awPayload (\ s a -> s{_awPayload = a})
awCustomerId :: Lens' ActivitiesWatch (Maybe Text)
awCustomerId
= lens _awCustomerId (\ s a -> s{_awCustomerId = a})
awActorIPAddress :: Lens' ActivitiesWatch (Maybe Text)
awActorIPAddress
= lens _awActorIPAddress
(\ s a -> s{_awActorIPAddress = a})
awEndTime :: Lens' ActivitiesWatch (Maybe Text)
awEndTime
= lens _awEndTime (\ s a -> s{_awEndTime = a})
awApplicationName :: Lens' ActivitiesWatch Text
awApplicationName
= lens _awApplicationName
(\ s a -> s{_awApplicationName = a})
awPageToken :: Lens' ActivitiesWatch (Maybe Text)
awPageToken
= lens _awPageToken (\ s a -> s{_awPageToken = a})
awEventName :: Lens' ActivitiesWatch (Maybe Text)
awEventName
= lens _awEventName (\ s a -> s{_awEventName = a})
awUserKey :: Lens' ActivitiesWatch Text
awUserKey
= lens _awUserKey (\ s a -> s{_awUserKey = a})
awMaxResults :: Lens' ActivitiesWatch (Maybe Int32)
awMaxResults
= lens _awMaxResults (\ s a -> s{_awMaxResults = a})
. mapping _Coerce
awOrgUnitId :: Lens' ActivitiesWatch Text
awOrgUnitId
= lens _awOrgUnitId (\ s a -> s{_awOrgUnitId = a})
instance GoogleRequest ActivitiesWatch where
type Rs ActivitiesWatch = Channel
type Scopes ActivitiesWatch =
'["https://www.googleapis.com/auth/admin.reports.audit.readonly"]
requestClient ActivitiesWatch'{..}
= go _awUserKey _awApplicationName _awStartTime
_awFilters
_awCustomerId
_awActorIPAddress
_awEndTime
_awPageToken
_awEventName
_awMaxResults
(Just _awOrgUnitId)
(Just AltJSON)
_awPayload
reportsService
where go
= buildClient
(Proxy :: Proxy ActivitiesWatchResource)
mempty