{-# 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.AdSense.AdUnits.Get
(
AdUnitsGetResource
, adUnitsGet
, AdUnitsGet
, augAdUnitId
, augAdClientId
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AdUnitsGetResource =
"adsense" :>
"v1.4" :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
Capture "adUnitId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] AdUnit
data AdUnitsGet = AdUnitsGet'
{ _augAdUnitId :: !Text
, _augAdClientId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
adUnitsGet
:: Text
-> Text
-> AdUnitsGet
adUnitsGet pAugAdUnitId_ pAugAdClientId_ =
AdUnitsGet'
{ _augAdUnitId = pAugAdUnitId_
, _augAdClientId = pAugAdClientId_
}
augAdUnitId :: Lens' AdUnitsGet Text
augAdUnitId
= lens _augAdUnitId (\ s a -> s{_augAdUnitId = a})
augAdClientId :: Lens' AdUnitsGet Text
augAdClientId
= lens _augAdClientId
(\ s a -> s{_augAdClientId = a})
instance GoogleRequest AdUnitsGet where
type Rs AdUnitsGet = AdUnit
type Scopes AdUnitsGet =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AdUnitsGet'{..}
= go _augAdClientId _augAdUnitId (Just AltJSON)
adSenseService
where go
= buildClient (Proxy :: Proxy AdUnitsGetResource)
mempty