{-# 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.CustomDimensions.Get
(
ManagementCustomDimensionsGetResource
, managementCustomDimensionsGet
, ManagementCustomDimensionsGet
, mcdgWebPropertyId
, mcdgAccountId
, mcdgCustomDimensionId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementCustomDimensionsGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"customDimensions" :>
Capture "customDimensionId" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] CustomDimension
data ManagementCustomDimensionsGet = ManagementCustomDimensionsGet'
{ _mcdgWebPropertyId :: !Text
, _mcdgAccountId :: !Text
, _mcdgCustomDimensionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementCustomDimensionsGet
:: Text
-> Text
-> Text
-> ManagementCustomDimensionsGet
managementCustomDimensionsGet pMcdgWebPropertyId_ pMcdgAccountId_ pMcdgCustomDimensionId_ =
ManagementCustomDimensionsGet'
{ _mcdgWebPropertyId = pMcdgWebPropertyId_
, _mcdgAccountId = pMcdgAccountId_
, _mcdgCustomDimensionId = pMcdgCustomDimensionId_
}
mcdgWebPropertyId :: Lens' ManagementCustomDimensionsGet Text
mcdgWebPropertyId
= lens _mcdgWebPropertyId
(\ s a -> s{_mcdgWebPropertyId = a})
mcdgAccountId :: Lens' ManagementCustomDimensionsGet Text
mcdgAccountId
= lens _mcdgAccountId
(\ s a -> s{_mcdgAccountId = a})
mcdgCustomDimensionId :: Lens' ManagementCustomDimensionsGet Text
mcdgCustomDimensionId
= lens _mcdgCustomDimensionId
(\ s a -> s{_mcdgCustomDimensionId = a})
instance GoogleRequest ManagementCustomDimensionsGet
where
type Rs ManagementCustomDimensionsGet =
CustomDimension
type Scopes ManagementCustomDimensionsGet =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementCustomDimensionsGet'{..}
= go _mcdgAccountId _mcdgWebPropertyId
_mcdgCustomDimensionId
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementCustomDimensionsGetResource)
mempty