{-# 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.DFAReporting.TargetingTemplates.Get
(
TargetingTemplatesGetResource
, targetingTemplatesGet
, TargetingTemplatesGet
, ttgProFileId
, ttgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type TargetingTemplatesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"targetingTemplates" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] TargetingTemplate
data TargetingTemplatesGet = TargetingTemplatesGet'
{ _ttgProFileId :: !(Textual Int64)
, _ttgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
targetingTemplatesGet
:: Int64
-> Int64
-> TargetingTemplatesGet
targetingTemplatesGet pTtgProFileId_ pTtgId_ =
TargetingTemplatesGet'
{ _ttgProFileId = _Coerce # pTtgProFileId_
, _ttgId = _Coerce # pTtgId_
}
ttgProFileId :: Lens' TargetingTemplatesGet Int64
ttgProFileId
= lens _ttgProFileId (\ s a -> s{_ttgProFileId = a})
. _Coerce
ttgId :: Lens' TargetingTemplatesGet Int64
ttgId
= lens _ttgId (\ s a -> s{_ttgId = a}) . _Coerce
instance GoogleRequest TargetingTemplatesGet where
type Rs TargetingTemplatesGet = TargetingTemplate
type Scopes TargetingTemplatesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient TargetingTemplatesGet'{..}
= go _ttgProFileId _ttgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy TargetingTemplatesGetResource)
mempty