{-# 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.GetAdCode
(
AccountsAdUnitsGetAdCodeResource
, accountsAdUnitsGetAdCode
, AccountsAdUnitsGetAdCode
, aaugacAdUnitId
, aaugacAdClientId
, aaugacAccountId
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsAdUnitsGetAdCodeResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adunits" :>
Capture "adUnitId" Text :>
"adcode" :>
QueryParam "alt" AltJSON :> Get '[JSON] AdCode
data AccountsAdUnitsGetAdCode = AccountsAdUnitsGetAdCode'
{ _aaugacAdUnitId :: !Text
, _aaugacAdClientId :: !Text
, _aaugacAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdUnitsGetAdCode
:: Text
-> Text
-> Text
-> AccountsAdUnitsGetAdCode
accountsAdUnitsGetAdCode pAaugacAdUnitId_ pAaugacAdClientId_ pAaugacAccountId_ =
AccountsAdUnitsGetAdCode'
{ _aaugacAdUnitId = pAaugacAdUnitId_
, _aaugacAdClientId = pAaugacAdClientId_
, _aaugacAccountId = pAaugacAccountId_
}
aaugacAdUnitId :: Lens' AccountsAdUnitsGetAdCode Text
aaugacAdUnitId
= lens _aaugacAdUnitId
(\ s a -> s{_aaugacAdUnitId = a})
aaugacAdClientId :: Lens' AccountsAdUnitsGetAdCode Text
aaugacAdClientId
= lens _aaugacAdClientId
(\ s a -> s{_aaugacAdClientId = a})
aaugacAccountId :: Lens' AccountsAdUnitsGetAdCode Text
aaugacAccountId
= lens _aaugacAccountId
(\ s a -> s{_aaugacAccountId = a})
instance GoogleRequest AccountsAdUnitsGetAdCode where
type Rs AccountsAdUnitsGetAdCode = AdCode
type Scopes AccountsAdUnitsGetAdCode =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsAdUnitsGetAdCode'{..}
= go _aaugacAccountId _aaugacAdClientId
_aaugacAdUnitId
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsAdUnitsGetAdCodeResource)
mempty