{-# 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.AdExchangeBuyer.PretargetingConfig.Get
(
PretargetingConfigGetResource
, pretargetingConfigGet
, PretargetingConfigGet
, pcgAccountId
, pcgConfigId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type PretargetingConfigGetResource =
"adexchangebuyer" :>
"v1.4" :>
"pretargetingconfigs" :>
Capture "accountId" (Textual Int64) :>
Capture "configId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] PretargetingConfig
data PretargetingConfigGet = PretargetingConfigGet'
{ _pcgAccountId :: !(Textual Int64)
, _pcgConfigId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
pretargetingConfigGet
:: Int64
-> Int64
-> PretargetingConfigGet
pretargetingConfigGet pPcgAccountId_ pPcgConfigId_ =
PretargetingConfigGet'
{ _pcgAccountId = _Coerce # pPcgAccountId_
, _pcgConfigId = _Coerce # pPcgConfigId_
}
pcgAccountId :: Lens' PretargetingConfigGet Int64
pcgAccountId
= lens _pcgAccountId (\ s a -> s{_pcgAccountId = a})
. _Coerce
pcgConfigId :: Lens' PretargetingConfigGet Int64
pcgConfigId
= lens _pcgConfigId (\ s a -> s{_pcgConfigId = a}) .
_Coerce
instance GoogleRequest PretargetingConfigGet where
type Rs PretargetingConfigGet = PretargetingConfig
type Scopes PretargetingConfigGet =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient PretargetingConfigGet'{..}
= go _pcgAccountId _pcgConfigId (Just AltJSON)
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy PretargetingConfigGetResource)
mempty