{-# 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.DFAReporting.MobileApps.List
(
MobileAppsListResource
, mobileAppsList
, MobileAppsList
, malDirectories
, malSearchString
, malIds
, malProFileId
, malPageToken
, malMaxResults
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type MobileAppsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"mobileApps" :>
QueryParams "directories" MobileAppsListDirectories
:>
QueryParam "searchString" Text :>
QueryParams "ids" Text :>
QueryParam "pageToken" Text :>
QueryParam "maxResults" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] MobileAppsListResponse
data MobileAppsList = MobileAppsList'
{ _malDirectories :: !(Maybe [MobileAppsListDirectories])
, _malSearchString :: !(Maybe Text)
, _malIds :: !(Maybe [Text])
, _malProFileId :: !(Textual Int64)
, _malPageToken :: !(Maybe Text)
, _malMaxResults :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
mobileAppsList
:: Int64
-> MobileAppsList
mobileAppsList pMalProFileId_ =
MobileAppsList'
{ _malDirectories = Nothing
, _malSearchString = Nothing
, _malIds = Nothing
, _malProFileId = _Coerce # pMalProFileId_
, _malPageToken = Nothing
, _malMaxResults = 1000
}
malDirectories :: Lens' MobileAppsList [MobileAppsListDirectories]
malDirectories
= lens _malDirectories
(\ s a -> s{_malDirectories = a})
. _Default
. _Coerce
malSearchString :: Lens' MobileAppsList (Maybe Text)
malSearchString
= lens _malSearchString
(\ s a -> s{_malSearchString = a})
malIds :: Lens' MobileAppsList [Text]
malIds
= lens _malIds (\ s a -> s{_malIds = a}) . _Default .
_Coerce
malProFileId :: Lens' MobileAppsList Int64
malProFileId
= lens _malProFileId (\ s a -> s{_malProFileId = a})
. _Coerce
malPageToken :: Lens' MobileAppsList (Maybe Text)
malPageToken
= lens _malPageToken (\ s a -> s{_malPageToken = a})
malMaxResults :: Lens' MobileAppsList Int32
malMaxResults
= lens _malMaxResults
(\ s a -> s{_malMaxResults = a})
. _Coerce
instance GoogleRequest MobileAppsList where
type Rs MobileAppsList = MobileAppsListResponse
type Scopes MobileAppsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient MobileAppsList'{..}
= go _malProFileId (_malDirectories ^. _Default)
_malSearchString
(_malIds ^. _Default)
_malPageToken
(Just _malMaxResults)
(Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy MobileAppsListResource)
mempty