{-# 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.List
(
ManagementExperimentsListResource
, managementExperimentsList
, ManagementExperimentsList
, melWebPropertyId
, melProFileId
, melAccountId
, melStartIndex
, melMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementExperimentsListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"experiments" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Experiments
data ManagementExperimentsList = ManagementExperimentsList'
{ _melWebPropertyId :: !Text
, _melProFileId :: !Text
, _melAccountId :: !Text
, _melStartIndex :: !(Maybe (Textual Int32))
, _melMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementExperimentsList
:: Text
-> Text
-> Text
-> ManagementExperimentsList
managementExperimentsList pMelWebPropertyId_ pMelProFileId_ pMelAccountId_ =
ManagementExperimentsList'
{ _melWebPropertyId = pMelWebPropertyId_
, _melProFileId = pMelProFileId_
, _melAccountId = pMelAccountId_
, _melStartIndex = Nothing
, _melMaxResults = Nothing
}
melWebPropertyId :: Lens' ManagementExperimentsList Text
melWebPropertyId
= lens _melWebPropertyId
(\ s a -> s{_melWebPropertyId = a})
melProFileId :: Lens' ManagementExperimentsList Text
melProFileId
= lens _melProFileId (\ s a -> s{_melProFileId = a})
melAccountId :: Lens' ManagementExperimentsList Text
melAccountId
= lens _melAccountId (\ s a -> s{_melAccountId = a})
melStartIndex :: Lens' ManagementExperimentsList (Maybe Int32)
melStartIndex
= lens _melStartIndex
(\ s a -> s{_melStartIndex = a})
. mapping _Coerce
melMaxResults :: Lens' ManagementExperimentsList (Maybe Int32)
melMaxResults
= lens _melMaxResults
(\ s a -> s{_melMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementExperimentsList
where
type Rs ManagementExperimentsList = Experiments
type Scopes ManagementExperimentsList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementExperimentsList'{..}
= go _melAccountId _melWebPropertyId _melProFileId
_melStartIndex
_melMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementExperimentsListResource)
mempty