{-# 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.Get
(
ManagementGoalsGetResource
, managementGoalsGet
, ManagementGoalsGet
, mggWebPropertyId
, mggGoalId
, mggProFileId
, mggAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementGoalsGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
"goals" :>
Capture "goalId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Goal
data ManagementGoalsGet = ManagementGoalsGet'
{ _mggWebPropertyId :: !Text
, _mggGoalId :: !Text
, _mggProFileId :: !Text
, _mggAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementGoalsGet
:: Text
-> Text
-> Text
-> Text
-> ManagementGoalsGet
managementGoalsGet pMggWebPropertyId_ pMggGoalId_ pMggProFileId_ pMggAccountId_ =
ManagementGoalsGet'
{ _mggWebPropertyId = pMggWebPropertyId_
, _mggGoalId = pMggGoalId_
, _mggProFileId = pMggProFileId_
, _mggAccountId = pMggAccountId_
}
mggWebPropertyId :: Lens' ManagementGoalsGet Text
mggWebPropertyId
= lens _mggWebPropertyId
(\ s a -> s{_mggWebPropertyId = a})
mggGoalId :: Lens' ManagementGoalsGet Text
mggGoalId
= lens _mggGoalId (\ s a -> s{_mggGoalId = a})
mggProFileId :: Lens' ManagementGoalsGet Text
mggProFileId
= lens _mggProFileId (\ s a -> s{_mggProFileId = a})
mggAccountId :: Lens' ManagementGoalsGet Text
mggAccountId
= lens _mggAccountId (\ s a -> s{_mggAccountId = a})
instance GoogleRequest ManagementGoalsGet where
type Rs ManagementGoalsGet = Goal
type Scopes ManagementGoalsGet =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementGoalsGet'{..}
= go _mggAccountId _mggWebPropertyId _mggProFileId
_mggGoalId
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementGoalsGetResource)
mempty