{-# 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.Experiments.Update
(
ManagementExperimentsUpdateResource
, managementExperimentsUpdate
, ManagementExperimentsUpdate
, meuWebPropertyId
, meuProFileId
, meuPayload
, meuAccountId
, meuExperimentId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementExperimentsUpdateResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"experiments" :>
Capture "experimentId" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Experiment :>
Put '[JSON] Experiment
data ManagementExperimentsUpdate = ManagementExperimentsUpdate'
{ _meuWebPropertyId :: !Text
, _meuProFileId :: !Text
, _meuPayload :: !Experiment
, _meuAccountId :: !Text
, _meuExperimentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementExperimentsUpdate
:: Text
-> Text
-> Experiment
-> Text
-> Text
-> ManagementExperimentsUpdate
managementExperimentsUpdate pMeuWebPropertyId_ pMeuProFileId_ pMeuPayload_ pMeuAccountId_ pMeuExperimentId_ =
ManagementExperimentsUpdate'
{ _meuWebPropertyId = pMeuWebPropertyId_
, _meuProFileId = pMeuProFileId_
, _meuPayload = pMeuPayload_
, _meuAccountId = pMeuAccountId_
, _meuExperimentId = pMeuExperimentId_
}
meuWebPropertyId :: Lens' ManagementExperimentsUpdate Text
meuWebPropertyId
= lens _meuWebPropertyId
(\ s a -> s{_meuWebPropertyId = a})
meuProFileId :: Lens' ManagementExperimentsUpdate Text
meuProFileId
= lens _meuProFileId (\ s a -> s{_meuProFileId = a})
meuPayload :: Lens' ManagementExperimentsUpdate Experiment
meuPayload
= lens _meuPayload (\ s a -> s{_meuPayload = a})
meuAccountId :: Lens' ManagementExperimentsUpdate Text
meuAccountId
= lens _meuAccountId (\ s a -> s{_meuAccountId = a})
meuExperimentId :: Lens' ManagementExperimentsUpdate Text
meuExperimentId
= lens _meuExperimentId
(\ s a -> s{_meuExperimentId = a})
instance GoogleRequest ManagementExperimentsUpdate
where
type Rs ManagementExperimentsUpdate = Experiment
type Scopes ManagementExperimentsUpdate =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementExperimentsUpdate'{..}
= go _meuAccountId _meuWebPropertyId _meuProFileId
_meuExperimentId
(Just AltJSON)
_meuPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementExperimentsUpdateResource)
mempty