{-# 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.Goals.List
(
ManagementGoalsListResource
, managementGoalsList
, ManagementGoalsList
, mglWebPropertyId
, mglProFileId
, mglAccountId
, mglStartIndex
, mglMaxResults
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementGoalsListResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"goals" :>
QueryParam "start-index" (Textual Int32) :>
QueryParam "max-results" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Goals
data ManagementGoalsList = ManagementGoalsList'
{ _mglWebPropertyId :: !Text
, _mglProFileId :: !Text
, _mglAccountId :: !Text
, _mglStartIndex :: !(Maybe (Textual Int32))
, _mglMaxResults :: !(Maybe (Textual Int32))
} deriving (Eq,Show,Data,Typeable,Generic)
managementGoalsList
:: Text
-> Text
-> Text
-> ManagementGoalsList
managementGoalsList pMglWebPropertyId_ pMglProFileId_ pMglAccountId_ =
ManagementGoalsList'
{ _mglWebPropertyId = pMglWebPropertyId_
, _mglProFileId = pMglProFileId_
, _mglAccountId = pMglAccountId_
, _mglStartIndex = Nothing
, _mglMaxResults = Nothing
}
mglWebPropertyId :: Lens' ManagementGoalsList Text
mglWebPropertyId
= lens _mglWebPropertyId
(\ s a -> s{_mglWebPropertyId = a})
mglProFileId :: Lens' ManagementGoalsList Text
mglProFileId
= lens _mglProFileId (\ s a -> s{_mglProFileId = a})
mglAccountId :: Lens' ManagementGoalsList Text
mglAccountId
= lens _mglAccountId (\ s a -> s{_mglAccountId = a})
mglStartIndex :: Lens' ManagementGoalsList (Maybe Int32)
mglStartIndex
= lens _mglStartIndex
(\ s a -> s{_mglStartIndex = a})
. mapping _Coerce
mglMaxResults :: Lens' ManagementGoalsList (Maybe Int32)
mglMaxResults
= lens _mglMaxResults
(\ s a -> s{_mglMaxResults = a})
. mapping _Coerce
instance GoogleRequest ManagementGoalsList where
type Rs ManagementGoalsList = Goals
type Scopes ManagementGoalsList =
'["https://www.googleapis.com/auth/analytics",
"https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementGoalsList'{..}
= go _mglAccountId _mglWebPropertyId _mglProFileId
_mglStartIndex
_mglMaxResults
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementGoalsListResource)
mempty