{-# 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.Ads.Get
(
AdsGetResource
, adsGet
, AdsGet
, adsProFileId
, adsId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AdsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"ads" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Ad
data AdsGet = AdsGet'
{ _adsProFileId :: !(Textual Int64)
, _adsId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
adsGet
:: Int64
-> Int64
-> AdsGet
adsGet pAdsProFileId_ pAdsId_ =
AdsGet'
{ _adsProFileId = _Coerce # pAdsProFileId_
, _adsId = _Coerce # pAdsId_
}
adsProFileId :: Lens' AdsGet Int64
adsProFileId
= lens _adsProFileId (\ s a -> s{_adsProFileId = a})
. _Coerce
adsId :: Lens' AdsGet Int64
adsId
= lens _adsId (\ s a -> s{_adsId = a}) . _Coerce
instance GoogleRequest AdsGet where
type Rs AdsGet = Ad
type Scopes AdsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AdsGet'{..}
= go _adsProFileId _adsId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy AdsGetResource) mempty