{-# 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.Get
(
ManagementCustomMetricsGetResource
, managementCustomMetricsGet
, ManagementCustomMetricsGet
, mcmgCustomMetricId
, mcmgWebPropertyId
, mcmgAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementCustomMetricsGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"customMetrics" :>
Capture "customMetricId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] CustomMetric
data ManagementCustomMetricsGet = ManagementCustomMetricsGet'
{ _mcmgCustomMetricId :: !Text
, _mcmgWebPropertyId :: !Text
, _mcmgAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementCustomMetricsGet
:: Text
-> Text
-> Text
-> ManagementCustomMetricsGet
managementCustomMetricsGet pMcmgCustomMetricId_ pMcmgWebPropertyId_ pMcmgAccountId_ =
ManagementCustomMetricsGet'
{ _mcmgCustomMetricId = pMcmgCustomMetricId_
, _mcmgWebPropertyId = pMcmgWebPropertyId_
, _mcmgAccountId = pMcmgAccountId_
}
mcmgCustomMetricId :: Lens' ManagementCustomMetricsGet Text
mcmgCustomMetricId
= lens _mcmgCustomMetricId
(\ s a -> s{_mcmgCustomMetricId = a})
mcmgWebPropertyId :: Lens' ManagementCustomMetricsGet Text
mcmgWebPropertyId
= lens _mcmgWebPropertyId
(\ s a -> s{_mcmgWebPropertyId = a})
mcmgAccountId :: Lens' ManagementCustomMetricsGet Text
mcmgAccountId
= lens _mcmgAccountId
(\ s a -> s{_mcmgAccountId = a})
instance GoogleRequest ManagementCustomMetricsGet
where
type Rs ManagementCustomMetricsGet = CustomMetric
type Scopes ManagementCustomMetricsGet =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementCustomMetricsGet'{..}
= go _mcmgAccountId _mcmgWebPropertyId
_mcmgCustomMetricId
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementCustomMetricsGetResource)
mempty