{-# 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.CustomMetrics.List
(
ManagementCustomMetricsListResource
, managementCustomMetricsList
, ManagementCustomMetricsList
, mcmlWebPropertyId
, mcmlAccountId
, mcmlStartIndex
, mcmlMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementCustomMetricsListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"customMetrics" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] CustomMetrics
data ManagementCustomMetricsList = ManagementCustomMetricsList'
{ _mcmlWebPropertyId :: !Text
, _mcmlAccountId :: !Text
, _mcmlStartIndex :: !(Maybe (Textual Int32))
, _mcmlMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementCustomMetricsList
:: Text
-> Text
-> ManagementCustomMetricsList
managementCustomMetricsList pMcmlWebPropertyId_ pMcmlAccountId_ =
ManagementCustomMetricsList'
{ _mcmlWebPropertyId = pMcmlWebPropertyId_
, _mcmlAccountId = pMcmlAccountId_
, _mcmlStartIndex = Nothing
, _mcmlMaxResults = Nothing
}
mcmlWebPropertyId :: Lens' ManagementCustomMetricsList Text
mcmlWebPropertyId
= lens _mcmlWebPropertyId
(\ s a -> s{_mcmlWebPropertyId = a})
mcmlAccountId :: Lens' ManagementCustomMetricsList Text
mcmlAccountId
= lens _mcmlAccountId
(\ s a -> s{_mcmlAccountId = a})
mcmlStartIndex :: Lens' ManagementCustomMetricsList (Maybe Int32)
mcmlStartIndex
= lens _mcmlStartIndex
(\ s a -> s{_mcmlStartIndex = a})
. mapping _Coerce
mcmlMaxResults :: Lens' ManagementCustomMetricsList (Maybe Int32)
mcmlMaxResults
= lens _mcmlMaxResults
(\ s a -> s{_mcmlMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementCustomMetricsList
where
type Rs ManagementCustomMetricsList = CustomMetrics
type Scopes ManagementCustomMetricsList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementCustomMetricsList'{..}
= go _mcmlAccountId _mcmlWebPropertyId
_mcmlStartIndex
_mcmlMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementCustomMetricsListResource)
mempty