{-# 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.Patch
(
ManagementExperimentsPatchResource
, managementExperimentsPatch
, ManagementExperimentsPatch
, mepWebPropertyId
, mepProFileId
, mepPayload
, mepAccountId
, mepExperimentId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementExperimentsPatchResource =
"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 :>
Patch '[JSON] Experiment
data ManagementExperimentsPatch = ManagementExperimentsPatch'
{ _mepWebPropertyId :: !Text
, _mepProFileId :: !Text
, _mepPayload :: !Experiment
, _mepAccountId :: !Text
, _mepExperimentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementExperimentsPatch
:: Text
-> Text
-> Experiment
-> Text
-> Text
-> ManagementExperimentsPatch
managementExperimentsPatch pMepWebPropertyId_ pMepProFileId_ pMepPayload_ pMepAccountId_ pMepExperimentId_ =
ManagementExperimentsPatch'
{ _mepWebPropertyId = pMepWebPropertyId_
, _mepProFileId = pMepProFileId_
, _mepPayload = pMepPayload_
, _mepAccountId = pMepAccountId_
, _mepExperimentId = pMepExperimentId_
}
mepWebPropertyId :: Lens' ManagementExperimentsPatch Text
mepWebPropertyId
= lens _mepWebPropertyId
(\ s a -> s{_mepWebPropertyId = a})
mepProFileId :: Lens' ManagementExperimentsPatch Text
mepProFileId
= lens _mepProFileId (\ s a -> s{_mepProFileId = a})
mepPayload :: Lens' ManagementExperimentsPatch Experiment
mepPayload
= lens _mepPayload (\ s a -> s{_mepPayload = a})
mepAccountId :: Lens' ManagementExperimentsPatch Text
mepAccountId
= lens _mepAccountId (\ s a -> s{_mepAccountId = a})
mepExperimentId :: Lens' ManagementExperimentsPatch Text
mepExperimentId
= lens _mepExperimentId
(\ s a -> s{_mepExperimentId = a})
instance GoogleRequest ManagementExperimentsPatch
where
type Rs ManagementExperimentsPatch = Experiment
type Scopes ManagementExperimentsPatch =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementExperimentsPatch'{..}
= go _mepAccountId _mepWebPropertyId _mepProFileId
_mepExperimentId
(Just AltJSON)
_mepPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementExperimentsPatchResource)
mempty