{-# 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.Update
(
ManagementProFilesUpdateResource
, managementProFilesUpdate
, ManagementProFilesUpdate
, mpfuWebPropertyId
, mpfuProFileId
, mpfuPayload
, mpfuAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFilesUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ProFile :> Put '[JSON] ProFile
data ManagementProFilesUpdate = ManagementProFilesUpdate'
{ _mpfuWebPropertyId :: !Text
, _mpfuProFileId :: !Text
, _mpfuPayload :: !ProFile
, _mpfuAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementProFilesUpdate
:: Text
-> Text
-> ProFile
-> Text
-> ManagementProFilesUpdate
managementProFilesUpdate pMpfuWebPropertyId_ pMpfuProFileId_ pMpfuPayload_ pMpfuAccountId_ =
ManagementProFilesUpdate'
{ _mpfuWebPropertyId = pMpfuWebPropertyId_
, _mpfuProFileId = pMpfuProFileId_
, _mpfuPayload = pMpfuPayload_
, _mpfuAccountId = pMpfuAccountId_
}
mpfuWebPropertyId :: Lens' ManagementProFilesUpdate Text
mpfuWebPropertyId
= lens _mpfuWebPropertyId
(\ s a -> s{_mpfuWebPropertyId = a})
mpfuProFileId :: Lens' ManagementProFilesUpdate Text
mpfuProFileId
= lens _mpfuProFileId
(\ s a -> s{_mpfuProFileId = a})
mpfuPayload :: Lens' ManagementProFilesUpdate ProFile
mpfuPayload
= lens _mpfuPayload (\ s a -> s{_mpfuPayload = a})
mpfuAccountId :: Lens' ManagementProFilesUpdate Text
mpfuAccountId
= lens _mpfuAccountId
(\ s a -> s{_mpfuAccountId = a})
instance GoogleRequest ManagementProFilesUpdate where
type Rs ManagementProFilesUpdate = ProFile
type Scopes ManagementProFilesUpdate =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementProFilesUpdate'{..}
= go _mpfuAccountId _mpfuWebPropertyId _mpfuProFileId
(Just AltJSON)
_mpfuPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementProFilesUpdateResource)
mempty