{-# 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.Update
(
ManagementCustomDimensionsUpdateResource
, managementCustomDimensionsUpdate
, ManagementCustomDimensionsUpdate
, mcduWebPropertyId
, mcduIgnoreCustomDataSourceLinks
, mcduPayload
, mcduAccountId
, mcduCustomDimensionId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementCustomDimensionsUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"customDimensions" :>
Capture "customDimensionId" Text :>
QueryParam "ignoreCustomDataSourceLinks" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CustomDimension :>
Put '[JSON] CustomDimension
data ManagementCustomDimensionsUpdate = ManagementCustomDimensionsUpdate'
{ _mcduWebPropertyId :: !Text
, _mcduIgnoreCustomDataSourceLinks :: !Bool
, _mcduPayload :: !CustomDimension
, _mcduAccountId :: !Text
, _mcduCustomDimensionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementCustomDimensionsUpdate
:: Text
-> CustomDimension
-> Text
-> Text
-> ManagementCustomDimensionsUpdate
managementCustomDimensionsUpdate pMcduWebPropertyId_ pMcduPayload_ pMcduAccountId_ pMcduCustomDimensionId_ =
ManagementCustomDimensionsUpdate'
{ _mcduWebPropertyId = pMcduWebPropertyId_
, _mcduIgnoreCustomDataSourceLinks = False
, _mcduPayload = pMcduPayload_
, _mcduAccountId = pMcduAccountId_
, _mcduCustomDimensionId = pMcduCustomDimensionId_
}
mcduWebPropertyId :: Lens' ManagementCustomDimensionsUpdate Text
mcduWebPropertyId
= lens _mcduWebPropertyId
(\ s a -> s{_mcduWebPropertyId = a})
mcduIgnoreCustomDataSourceLinks :: Lens' ManagementCustomDimensionsUpdate Bool
mcduIgnoreCustomDataSourceLinks
= lens _mcduIgnoreCustomDataSourceLinks
(\ s a -> s{_mcduIgnoreCustomDataSourceLinks = a})
mcduPayload :: Lens' ManagementCustomDimensionsUpdate CustomDimension
mcduPayload
= lens _mcduPayload (\ s a -> s{_mcduPayload = a})
mcduAccountId :: Lens' ManagementCustomDimensionsUpdate Text
mcduAccountId
= lens _mcduAccountId
(\ s a -> s{_mcduAccountId = a})
mcduCustomDimensionId :: Lens' ManagementCustomDimensionsUpdate Text
mcduCustomDimensionId
= lens _mcduCustomDimensionId
(\ s a -> s{_mcduCustomDimensionId = a})
instance GoogleRequest
ManagementCustomDimensionsUpdate where
type Rs ManagementCustomDimensionsUpdate =
CustomDimension
type Scopes ManagementCustomDimensionsUpdate =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementCustomDimensionsUpdate'{..}
= go _mcduAccountId _mcduWebPropertyId
_mcduCustomDimensionId
(Just _mcduIgnoreCustomDataSourceLinks)
(Just AltJSON)
_mcduPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementCustomDimensionsUpdateResource)
mempty