{-# 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.List
(
ActivitiesListResource
, activitiesList
, ActivitiesList
, alStartTime
, alFilters
, alCustomerId
, alActorIPAddress
, alEndTime
, alApplicationName
, alPageToken
, alEventName
, alUserKey
, alMaxResults
, alOrgUnitId
) where
import Network.Google.Prelude
import Network.Google.Reports.Types
type ActivitiesListResource =
"admin" :>
"reports" :>
"v1" :>
"activity" :>
"users" :>
Capture "userKey" Text :>
"applications" :>
Capture "applicationName" Text :>
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 :>
Get '[JSON] Activities
data ActivitiesList = ActivitiesList'
{ _alStartTime :: !(Maybe Text)
, _alFilters :: !(Maybe Text)
, _alCustomerId :: !(Maybe Text)
, _alActorIPAddress :: !(Maybe Text)
, _alEndTime :: !(Maybe Text)
, _alApplicationName :: !Text
, _alPageToken :: !(Maybe Text)
, _alEventName :: !(Maybe Text)
, _alUserKey :: !Text
, _alMaxResults :: !(Maybe (Textual Int32))
, _alOrgUnitId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
activitiesList
:: Text
-> Text
-> ActivitiesList
activitiesList pAlApplicationName_ pAlUserKey_ =
ActivitiesList'
{ _alStartTime = Nothing
, _alFilters = Nothing
, _alCustomerId = Nothing
, _alActorIPAddress = Nothing
, _alEndTime = Nothing
, _alApplicationName = pAlApplicationName_
, _alPageToken = Nothing
, _alEventName = Nothing
, _alUserKey = pAlUserKey_
, _alMaxResults = Nothing
, _alOrgUnitId = ""
}
alStartTime :: Lens' ActivitiesList (Maybe Text)
alStartTime
= lens _alStartTime (\ s a -> s{_alStartTime = a})
alFilters :: Lens' ActivitiesList (Maybe Text)
alFilters
= lens _alFilters (\ s a -> s{_alFilters = a})
alCustomerId :: Lens' ActivitiesList (Maybe Text)
alCustomerId
= lens _alCustomerId (\ s a -> s{_alCustomerId = a})
alActorIPAddress :: Lens' ActivitiesList (Maybe Text)
alActorIPAddress
= lens _alActorIPAddress
(\ s a -> s{_alActorIPAddress = a})
alEndTime :: Lens' ActivitiesList (Maybe Text)
alEndTime
= lens _alEndTime (\ s a -> s{_alEndTime = a})
alApplicationName :: Lens' ActivitiesList Text
alApplicationName
= lens _alApplicationName
(\ s a -> s{_alApplicationName = a})
alPageToken :: Lens' ActivitiesList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a})
alEventName :: Lens' ActivitiesList (Maybe Text)
alEventName
= lens _alEventName (\ s a -> s{_alEventName = a})
alUserKey :: Lens' ActivitiesList Text
alUserKey
= lens _alUserKey (\ s a -> s{_alUserKey = a})
alMaxResults :: Lens' ActivitiesList (Maybe Int32)
alMaxResults
= lens _alMaxResults (\ s a -> s{_alMaxResults = a})
. mapping _Coerce
alOrgUnitId :: Lens' ActivitiesList Text
alOrgUnitId
= lens _alOrgUnitId (\ s a -> s{_alOrgUnitId = a})
instance GoogleRequest ActivitiesList where
type Rs ActivitiesList = Activities
type Scopes ActivitiesList =
'["https://www.googleapis.com/auth/admin.reports.audit.readonly"]
requestClient ActivitiesList'{..}
= go _alUserKey _alApplicationName _alStartTime
_alFilters
_alCustomerId
_alActorIPAddress
_alEndTime
_alPageToken
_alEventName
_alMaxResults
(Just _alOrgUnitId)
(Just AltJSON)
reportsService
where go
= buildClient (Proxy :: Proxy ActivitiesListResource)
mempty