{-# 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.Advertisers.Get
(
AdvertisersGetResource
, advertisersGet
, AdvertisersGet
, advProFileId
, advId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdvertisersGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"advertisers" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Advertiser
data AdvertisersGet = AdvertisersGet'
{ _advProFileId :: !(Textual Int64)
, _advId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
advertisersGet
:: Int64
-> Int64
-> AdvertisersGet
advertisersGet pAdvProFileId_ pAdvId_ =
AdvertisersGet'
{ _advProFileId = _Coerce # pAdvProFileId_
, _advId = _Coerce # pAdvId_
}
advProFileId :: Lens' AdvertisersGet Int64
advProFileId
= lens _advProFileId (\ s a -> s{_advProFileId = a})
. _Coerce
advId :: Lens' AdvertisersGet Int64
advId
= lens _advId (\ s a -> s{_advId = a}) . _Coerce
instance GoogleRequest AdvertisersGet where
type Rs AdvertisersGet = Advertiser
type Scopes AdvertisersGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdvertisersGet'{..}
= go _advProFileId _advId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy AdvertisersGetResource)
mempty