{-# 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.Analytics.Management.ProFiles.List
(
ManagementProFilesListResource
, managementProFilesList
, ManagementProFilesList
, mpflWebPropertyId
, mpflAccountId
, mpflStartIndex
, mpflMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFilesListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] ProFiles
data ManagementProFilesList = ManagementProFilesList'
{ _mpflWebPropertyId :: !Text
, _mpflAccountId :: !Text
, _mpflStartIndex :: !(Maybe (Textual Int32))
, _mpflMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementProFilesList
:: Text
-> Text
-> ManagementProFilesList
managementProFilesList pMpflWebPropertyId_ pMpflAccountId_ =
ManagementProFilesList'
{ _mpflWebPropertyId = pMpflWebPropertyId_
, _mpflAccountId = pMpflAccountId_
, _mpflStartIndex = Nothing
, _mpflMaxResults = Nothing
}
mpflWebPropertyId :: Lens' ManagementProFilesList Text
mpflWebPropertyId
= lens _mpflWebPropertyId
(\ s a -> s{_mpflWebPropertyId = a})
mpflAccountId :: Lens' ManagementProFilesList Text
mpflAccountId
= lens _mpflAccountId
(\ s a -> s{_mpflAccountId = a})
mpflStartIndex :: Lens' ManagementProFilesList (Maybe Int32)
mpflStartIndex
= lens _mpflStartIndex
(\ s a -> s{_mpflStartIndex = a})
. mapping _Coerce
mpflMaxResults :: Lens' ManagementProFilesList (Maybe Int32)
mpflMaxResults
= lens _mpflMaxResults
(\ s a -> s{_mpflMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementProFilesList where
type Rs ManagementProFilesList = ProFiles
type Scopes ManagementProFilesList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementProFilesList'{..}
= go _mpflAccountId _mpflWebPropertyId
_mpflStartIndex
_mpflMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementProFilesListResource)
mempty