{-# 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.AppsActivity.Activities.List
(
ActivitiesListResource
, activitiesList
, ActivitiesList
, alDriveFileId
, alDriveAncestorId
, alGroupingStrategy
, alUserId
, alSource
, alPageToken
, alPageSize
) where
import Network.Google.AppsActivity.Types
import Network.Google.Prelude
type ActivitiesListResource =
"appsactivity" :>
"v1" :>
"activities" :>
QueryParam "drive.fileId" Text :>
QueryParam "drive.ancestorId" Text :>
QueryParam "groupingStrategy"
ActivitiesListGroupingStrategy
:>
QueryParam "userId" Text :>
QueryParam "source" Text :>
QueryParam "pageToken" Text :>
QueryParam "pageSize" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ListActivitiesResponse
data ActivitiesList = ActivitiesList'
{ _alDriveFileId :: !(Maybe Text)
, _alDriveAncestorId :: !(Maybe Text)
, _alGroupingStrategy :: !ActivitiesListGroupingStrategy
, _alUserId :: !Text
, _alSource :: !(Maybe Text)
, _alPageToken :: !(Maybe Text)
, _alPageSize :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
activitiesList
:: ActivitiesList
activitiesList =
ActivitiesList'
{ _alDriveFileId = Nothing
, _alDriveAncestorId = Nothing
, _alGroupingStrategy = DriveUi
, _alUserId = "me"
, _alSource = Nothing
, _alPageToken = Nothing
, _alPageSize = 50
}
alDriveFileId :: Lens' ActivitiesList (Maybe Text)
alDriveFileId
= lens _alDriveFileId
(\ s a -> s{_alDriveFileId = a})
alDriveAncestorId :: Lens' ActivitiesList (Maybe Text)
alDriveAncestorId
= lens _alDriveAncestorId
(\ s a -> s{_alDriveAncestorId = a})
alGroupingStrategy :: Lens' ActivitiesList ActivitiesListGroupingStrategy
alGroupingStrategy
= lens _alGroupingStrategy
(\ s a -> s{_alGroupingStrategy = a})
alUserId :: Lens' ActivitiesList Text
alUserId = lens _alUserId (\ s a -> s{_alUserId = a})
alSource :: Lens' ActivitiesList (Maybe Text)
alSource = lens _alSource (\ s a -> s{_alSource = a})
alPageToken :: Lens' ActivitiesList (Maybe Text)
alPageToken
= lens _alPageToken (\ s a -> s{_alPageToken = a})
alPageSize :: Lens' ActivitiesList Int32
alPageSize
= lens _alPageSize (\ s a -> s{_alPageSize = a}) .
_Coerce
instance GoogleRequest ActivitiesList where
type Rs ActivitiesList = ListActivitiesResponse
type Scopes ActivitiesList =
'["https://www.googleapis.com/auth/activity"]
requestClient ActivitiesList'{..}
= go _alDriveFileId _alDriveAncestorId
(Just _alGroupingStrategy)
(Just _alUserId)
_alSource
_alPageToken
(Just _alPageSize)
(Just AltJSON)
appsActivityService
where go
= buildClient (Proxy :: Proxy ActivitiesListResource)
mempty