{-# 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.Patch
(
ManagementCustomDimensionsPatchResource
, managementCustomDimensionsPatch
, ManagementCustomDimensionsPatch
, mcdpWebPropertyId
, mcdpIgnoreCustomDataSourceLinks
, mcdpPayload
, mcdpAccountId
, mcdpCustomDimensionId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementCustomDimensionsPatchResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"customDimensions" :>
Capture "customDimensionId" Text :>
QueryParam "ignoreCustomDataSourceLinks" Bool :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] CustomDimension :>
Patch '[JSON] CustomDimension
data ManagementCustomDimensionsPatch = ManagementCustomDimensionsPatch'
{ _mcdpWebPropertyId :: !Text
, _mcdpIgnoreCustomDataSourceLinks :: !Bool
, _mcdpPayload :: !CustomDimension
, _mcdpAccountId :: !Text
, _mcdpCustomDimensionId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementCustomDimensionsPatch
:: Text
-> CustomDimension
-> Text
-> Text
-> ManagementCustomDimensionsPatch
managementCustomDimensionsPatch pMcdpWebPropertyId_ pMcdpPayload_ pMcdpAccountId_ pMcdpCustomDimensionId_ =
ManagementCustomDimensionsPatch'
{ _mcdpWebPropertyId = pMcdpWebPropertyId_
, _mcdpIgnoreCustomDataSourceLinks = False
, _mcdpPayload = pMcdpPayload_
, _mcdpAccountId = pMcdpAccountId_
, _mcdpCustomDimensionId = pMcdpCustomDimensionId_
}
mcdpWebPropertyId :: Lens' ManagementCustomDimensionsPatch Text
mcdpWebPropertyId
= lens _mcdpWebPropertyId
(\ s a -> s{_mcdpWebPropertyId = a})
mcdpIgnoreCustomDataSourceLinks :: Lens' ManagementCustomDimensionsPatch Bool
mcdpIgnoreCustomDataSourceLinks
= lens _mcdpIgnoreCustomDataSourceLinks
(\ s a -> s{_mcdpIgnoreCustomDataSourceLinks = a})
mcdpPayload :: Lens' ManagementCustomDimensionsPatch CustomDimension
mcdpPayload
= lens _mcdpPayload (\ s a -> s{_mcdpPayload = a})
mcdpAccountId :: Lens' ManagementCustomDimensionsPatch Text
mcdpAccountId
= lens _mcdpAccountId
(\ s a -> s{_mcdpAccountId = a})
mcdpCustomDimensionId :: Lens' ManagementCustomDimensionsPatch Text
mcdpCustomDimensionId
= lens _mcdpCustomDimensionId
(\ s a -> s{_mcdpCustomDimensionId = a})
instance GoogleRequest
ManagementCustomDimensionsPatch where
type Rs ManagementCustomDimensionsPatch =
CustomDimension
type Scopes ManagementCustomDimensionsPatch =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementCustomDimensionsPatch'{..}
= go _mcdpAccountId _mcdpWebPropertyId
_mcdpCustomDimensionId
(Just _mcdpIgnoreCustomDataSourceLinks)
(Just AltJSON)
_mcdpPayload
analyticsService
where go
= buildClient
(Proxy ::
Proxy ManagementCustomDimensionsPatchResource)
mempty