{-# 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.Filters.Get
(
ManagementFiltersGetResource
, managementFiltersGet
, ManagementFiltersGet
, mfgFilterId
, mfgAccountId
) where
import Network.Google.Analytics.Types
import Network.Google.Prelude
type ManagementFiltersGetResource =
"analytics" :>
"v3" :>
"management" :>
"accounts" :>
Capture "accountId" Text :>
"filters" :>
Capture "filterId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Filter
data ManagementFiltersGet = ManagementFiltersGet'
{ _mfgFilterId :: !Text
, _mfgAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
managementFiltersGet
:: Text
-> Text
-> ManagementFiltersGet
managementFiltersGet pMfgFilterId_ pMfgAccountId_ =
ManagementFiltersGet'
{ _mfgFilterId = pMfgFilterId_
, _mfgAccountId = pMfgAccountId_
}
mfgFilterId :: Lens' ManagementFiltersGet Text
mfgFilterId
= lens _mfgFilterId (\ s a -> s{_mfgFilterId = a})
mfgAccountId :: Lens' ManagementFiltersGet Text
mfgAccountId
= lens _mfgAccountId (\ s a -> s{_mfgAccountId = a})
instance GoogleRequest ManagementFiltersGet where
type Rs ManagementFiltersGet = Filter
type Scopes ManagementFiltersGet =
'["https://www.googleapis.com/auth/analytics.edit",
"https://www.googleapis.com/auth/analytics.readonly"]
requestClient ManagementFiltersGet'{..}
= go _mfgAccountId _mfgFilterId (Just AltJSON)
analyticsService
where go
= buildClient
(Proxy :: Proxy ManagementFiltersGetResource)
mempty