{-# 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.ProFiles.Patch
(
ManagementProFilesPatchResource
, managementProFilesPatch
, ManagementProFilesPatch
, mpfpWebPropertyId
, mpfpProFileId
, mpfpPayload
, mpfpAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFilesPatchResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProFile :> Patch '[JSON] ProFile
data ManagementProFilesPatch = ManagementProFilesPatch'
{ _mpfpWebPropertyId :: !Text
, _mpfpProFileId :: !Text
, _mpfpPayload :: !ProFile
, _mpfpAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementProFilesPatch
:: Text
-> Text
-> ProFile
-> Text
-> ManagementProFilesPatch
managementProFilesPatch pMpfpWebPropertyId_ pMpfpProFileId_ pMpfpPayload_ pMpfpAccountId_ =
ManagementProFilesPatch'
{ _mpfpWebPropertyId = pMpfpWebPropertyId_
, _mpfpProFileId = pMpfpProFileId_
, _mpfpPayload = pMpfpPayload_
, _mpfpAccountId = pMpfpAccountId_
}
mpfpWebPropertyId :: Lens' ManagementProFilesPatch Text
mpfpWebPropertyId
= lens _mpfpWebPropertyId
(\ s a -> s{_mpfpWebPropertyId = a})
mpfpProFileId :: Lens' ManagementProFilesPatch Text
mpfpProFileId
= lens _mpfpProFileId
(\ s a -> s{_mpfpProFileId = a})
mpfpPayload :: Lens' ManagementProFilesPatch ProFile
mpfpPayload
= lens _mpfpPayload (\ s a -> s{_mpfpPayload = a})
mpfpAccountId :: Lens' ManagementProFilesPatch Text
mpfpAccountId
= lens _mpfpAccountId
(\ s a -> s{_mpfpAccountId = a})
instance GoogleRequest ManagementProFilesPatch where
type Rs ManagementProFilesPatch = ProFile
type Scopes ManagementProFilesPatch =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementProFilesPatch'{..}
= go _mpfpAccountId _mpfpWebPropertyId _mpfpProFileId
(Just AltJSON)
_mpfpPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementProFilesPatchResource)
mempty