{-# 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.Goals.Update
(
ManagementGoalsUpdateResource
, managementGoalsUpdate
, ManagementGoalsUpdate
, mguWebPropertyId
, mguGoalId
, mguProFileId
, mguPayload
, mguAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementGoalsUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"goals" :>
Capture "goalId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Goal :> Put '[JSON] Goal
data ManagementGoalsUpdate = ManagementGoalsUpdate'
{ _mguWebPropertyId :: !Text
, _mguGoalId :: !Text
, _mguProFileId :: !Text
, _mguPayload :: !Goal
, _mguAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementGoalsUpdate
:: Text
-> Text
-> Text
-> Goal
-> Text
-> ManagementGoalsUpdate
managementGoalsUpdate pMguWebPropertyId_ pMguGoalId_ pMguProFileId_ pMguPayload_ pMguAccountId_ =
ManagementGoalsUpdate'
{ _mguWebPropertyId = pMguWebPropertyId_
, _mguGoalId = pMguGoalId_
, _mguProFileId = pMguProFileId_
, _mguPayload = pMguPayload_
, _mguAccountId = pMguAccountId_
}
mguWebPropertyId :: Lens' ManagementGoalsUpdate Text
mguWebPropertyId
= lens _mguWebPropertyId
(\ s a -> s{_mguWebPropertyId = a})
mguGoalId :: Lens' ManagementGoalsUpdate Text
mguGoalId
= lens _mguGoalId (\ s a -> s{_mguGoalId = a})
mguProFileId :: Lens' ManagementGoalsUpdate Text
mguProFileId
= lens _mguProFileId (\ s a -> s{_mguProFileId = a})
mguPayload :: Lens' ManagementGoalsUpdate Goal
mguPayload
= lens _mguPayload (\ s a -> s{_mguPayload = a})
mguAccountId :: Lens' ManagementGoalsUpdate Text
mguAccountId
= lens _mguAccountId (\ s a -> s{_mguAccountId = a})
instance GoogleRequest ManagementGoalsUpdate where
type Rs ManagementGoalsUpdate = Goal
type Scopes ManagementGoalsUpdate =
'["https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementGoalsUpdate'{..}
= go _mguAccountId _mguWebPropertyId _mguProFileId
_mguGoalId
(Just AltJSON)
_mguPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementGoalsUpdateResource)
mempty