{-# 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.CustomDataSources.List
(
ManagementCustomDataSourcesListResource
, managementCustomDataSourcesList
, ManagementCustomDataSourcesList
, mcdslWebPropertyId
, mcdslAccountId
, mcdslStartIndex
, mcdslMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementCustomDataSourcesListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"customDataSources" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomDataSources
data ManagementCustomDataSourcesList = ManagementCustomDataSourcesList'
{ _mcdslWebPropertyId :: !Text
, _mcdslAccountId :: !Text
, _mcdslStartIndex :: !(Maybe (Textual Int32))
, _mcdslMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementCustomDataSourcesList
:: Text
-> Text
-> ManagementCustomDataSourcesList
managementCustomDataSourcesList pMcdslWebPropertyId_ pMcdslAccountId_ =
ManagementCustomDataSourcesList'
{ _mcdslWebPropertyId = pMcdslWebPropertyId_
, _mcdslAccountId = pMcdslAccountId_
, _mcdslStartIndex = Nothing
, _mcdslMaxResults = Nothing
}
mcdslWebPropertyId :: Lens' ManagementCustomDataSourcesList Text
mcdslWebPropertyId
= lens _mcdslWebPropertyId
(\ s a -> s{_mcdslWebPropertyId = a})
mcdslAccountId :: Lens' ManagementCustomDataSourcesList Text
mcdslAccountId
= lens _mcdslAccountId
(\ s a -> s{_mcdslAccountId = a})
mcdslStartIndex :: Lens' ManagementCustomDataSourcesList (Maybe Int32)
mcdslStartIndex
= lens _mcdslStartIndex
(\ s a -> s{_mcdslStartIndex = a})
. mapping _Coerce
mcdslMaxResults :: Lens' ManagementCustomDataSourcesList (Maybe Int32)
mcdslMaxResults
= lens _mcdslMaxResults
(\ s a -> s{_mcdslMaxResults = a})
. mapping _Coerce
instance GoogleRequest
ManagementCustomDataSourcesList where
type Rs ManagementCustomDataSourcesList =
CustomDataSources
type Scopes ManagementCustomDataSourcesList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementCustomDataSourcesList'{..}
= go _mcdslAccountId _mcdslWebPropertyId
_mcdslStartIndex
_mcdslMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementCustomDataSourcesListResource)
mempty