{-# 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.AdClients.GetAdCode
(
AccountsAdClientsGetAdCodeResource
, accountsAdClientsGetAdCode
, AccountsAdClientsGetAdCode
, aacgacAdClientId
, aacgacAccountId
) where
import Network.Google.AdSense.Types
import Network.Google.Prelude
type AccountsAdClientsGetAdCodeResource =
"adsense" :>
"v1.4" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
"adcode" :>
QueryParam "alt" AltJSON :> Get '[JSON] AdCode
data AccountsAdClientsGetAdCode = AccountsAdClientsGetAdCode'
{ _aacgacAdClientId :: !Text
, _aacgacAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsAdClientsGetAdCode
:: Text
-> Text
-> AccountsAdClientsGetAdCode
accountsAdClientsGetAdCode pAacgacAdClientId_ pAacgacAccountId_ =
AccountsAdClientsGetAdCode'
{ _aacgacAdClientId = pAacgacAdClientId_
, _aacgacAccountId = pAacgacAccountId_
}
aacgacAdClientId :: Lens' AccountsAdClientsGetAdCode Text
aacgacAdClientId
= lens _aacgacAdClientId
(\ s a -> s{_aacgacAdClientId = a})
aacgacAccountId :: Lens' AccountsAdClientsGetAdCode Text
aacgacAccountId
= lens _aacgacAccountId
(\ s a -> s{_aacgacAccountId = a})
instance GoogleRequest AccountsAdClientsGetAdCode
where
type Rs AccountsAdClientsGetAdCode = AdCode
type Scopes AccountsAdClientsGetAdCode =
'["https://www.googleapis.com/auth/adsense",
"https://www.googleapis.com/auth/adsense.readonly"]
requestClient AccountsAdClientsGetAdCode'{..}
= go _aacgacAccountId _aacgacAdClientId
(Just AltJSON)
adSenseService
where go
= buildClient
(Proxy :: Proxy AccountsAdClientsGetAdCodeResource)
mempty