{-# 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.Get
(
ManagementExperimentsGetResource
, managementExperimentsGet
, ManagementExperimentsGet
, megWebPropertyId
, megProFileId
, megAccountId
, megExperimentId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementExperimentsGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"experiments" :>
Capture "experimentId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Experiment
data ManagementExperimentsGet = ManagementExperimentsGet'
{ _megWebPropertyId :: !Text
, _megProFileId :: !Text
, _megAccountId :: !Text
, _megExperimentId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementExperimentsGet
:: Text
-> Text
-> Text
-> Text
-> ManagementExperimentsGet
managementExperimentsGet pMegWebPropertyId_ pMegProFileId_ pMegAccountId_ pMegExperimentId_ =
ManagementExperimentsGet'
{ _megWebPropertyId = pMegWebPropertyId_
, _megProFileId = pMegProFileId_
, _megAccountId = pMegAccountId_
, _megExperimentId = pMegExperimentId_
}
megWebPropertyId :: Lens' ManagementExperimentsGet Text
megWebPropertyId
= lens _megWebPropertyId
(\ s a -> s{_megWebPropertyId = a})
megProFileId :: Lens' ManagementExperimentsGet Text
megProFileId
= lens _megProFileId (\ s a -> s{_megProFileId = a})
megAccountId :: Lens' ManagementExperimentsGet Text
megAccountId
= lens _megAccountId (\ s a -> s{_megAccountId = a})
megExperimentId :: Lens' ManagementExperimentsGet Text
megExperimentId
= lens _megExperimentId
(\ s a -> s{_megExperimentId = a})
instance GoogleRequest ManagementExperimentsGet where
type Rs ManagementExperimentsGet = Experiment
type Scopes ManagementExperimentsGet =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementExperimentsGet'{..}
= go _megAccountId _megWebPropertyId _megProFileId
_megExperimentId
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementExperimentsGetResource)
mempty