{-# 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.ProFiles.Get
(
ManagementProFilesGetResource
, managementProFilesGet
, ManagementProFilesGet
, mpfgWebPropertyId
, mpfgProFileId
, mpfgAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementProFilesGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"webproperties" :>
Capture "webPropertyId" Text :>
"profiles" :>
Capture "profileId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] ProFile
data ManagementProFilesGet = ManagementProFilesGet'
{ _mpfgWebPropertyId :: !Text
, _mpfgProFileId :: !Text
, _mpfgAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementProFilesGet
:: Text
-> Text
-> Text
-> ManagementProFilesGet
managementProFilesGet pMpfgWebPropertyId_ pMpfgProFileId_ pMpfgAccountId_ =
ManagementProFilesGet'
{ _mpfgWebPropertyId = pMpfgWebPropertyId_
, _mpfgProFileId = pMpfgProFileId_
, _mpfgAccountId = pMpfgAccountId_
}
mpfgWebPropertyId :: Lens' ManagementProFilesGet Text
mpfgWebPropertyId
= lens _mpfgWebPropertyId
(\ s a -> s{_mpfgWebPropertyId = a})
mpfgProFileId :: Lens' ManagementProFilesGet Text
mpfgProFileId
= lens _mpfgProFileId
(\ s a -> s{_mpfgProFileId = a})
mpfgAccountId :: Lens' ManagementProFilesGet Text
mpfgAccountId
= lens _mpfgAccountId
(\ s a -> s{_mpfgAccountId = a})
instance GoogleRequest ManagementProFilesGet where
type Rs ManagementProFilesGet = ProFile
type Scopes ManagementProFilesGet =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementProFilesGet'{..}
= go _mpfgAccountId _mpfgWebPropertyId _mpfgProFileId
(Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementProFilesGetResource)
mempty