{-# 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.Accounts.AdUnits.Get
(
AccountsAdUnitsGetResource
, accountsAdUnitsGet
, AccountsAdUnitsGet
, aaugAdUnitId
, aaugAdClientId
, aaugAccountId
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsAdUnitsGetResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
Capture "adUnitId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] AdUnit
data AccountsAdUnitsGet = AccountsAdUnitsGet'
{ _aaugAdUnitId :: !Text
, _aaugAdClientId :: !Text
, _aaugAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdUnitsGet
:: Text
-> Text
-> Text
-> AccountsAdUnitsGet
accountsAdUnitsGet pAaugAdUnitId_ pAaugAdClientId_ pAaugAccountId_ =
AccountsAdUnitsGet'
{ _aaugAdUnitId = pAaugAdUnitId_
, _aaugAdClientId = pAaugAdClientId_
, _aaugAccountId = pAaugAccountId_
}
aaugAdUnitId :: Lens' AccountsAdUnitsGet Text
aaugAdUnitId
= lens _aaugAdUnitId (\ s a -> s{_aaugAdUnitId = a})
aaugAdClientId :: Lens' AccountsAdUnitsGet Text
aaugAdClientId
= lens _aaugAdClientId
(\ s a -> s{_aaugAdClientId = a})
aaugAccountId :: Lens' AccountsAdUnitsGet Text
aaugAccountId
= lens _aaugAccountId
(\ s a -> s{_aaugAccountId = a})
instance GoogleRequest AccountsAdUnitsGet where
type Rs AccountsAdUnitsGet = AdUnit
type Scopes AccountsAdUnitsGet =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsAdUnitsGet'{..}
= go _aaugAccountId _aaugAdClientId _aaugAdUnitId
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsAdUnitsGetResource)
mempty