module Network.Google.Resource.Analytics.Management.Experiments.Insert
(
ManagementExperimentsInsertResource
, managementExperimentsInsert
, ManagementExperimentsInsert
, meiWebPropertyId
, meiProFileId
, meiPayload
, meiAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementExperimentsInsertResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"experiments" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Experiment :> Post '[JSON] Experiment
data ManagementExperimentsInsert = ManagementExperimentsInsert'
{ _meiWebPropertyId :: !Text
, _meiProFileId :: !Text
, _meiPayload :: !Experiment
, _meiAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementExperimentsInsert
:: Text
-> Text
-> Experiment
-> Text
-> ManagementExperimentsInsert
managementExperimentsInsert pMeiWebPropertyId_ pMeiProFileId_ pMeiPayload_ pMeiAccountId_ =
ManagementExperimentsInsert'
{ _meiWebPropertyId = pMeiWebPropertyId_
, _meiProFileId = pMeiProFileId_
, _meiPayload = pMeiPayload_
, _meiAccountId = pMeiAccountId_
}
meiWebPropertyId :: Lens' ManagementExperimentsInsert Text
meiWebPropertyId
= lens _meiWebPropertyId
(\ s a -> s{_meiWebPropertyId = a})
meiProFileId :: Lens' ManagementExperimentsInsert Text
meiProFileId
= lens _meiProFileId (\ s a -> s{_meiProFileId = a})
meiPayload :: Lens' ManagementExperimentsInsert Experiment
meiPayload
= lens _meiPayload (\ s a -> s{_meiPayload = a})
meiAccountId :: Lens' ManagementExperimentsInsert Text
meiAccountId
= lens _meiAccountId (\ s a -> s{_meiAccountId = a})
instance GoogleRequest ManagementExperimentsInsert
where
type Rs ManagementExperimentsInsert = Experiment
type Scopes ManagementExperimentsInsert =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit"]
requestClient ManagementExperimentsInsert'{..}
= go _meiAccountId _meiWebPropertyId _meiProFileId
(Just AltJSON)
_meiPayload
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementExperimentsInsertResource)
mempty