{-# 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.AdSenseHost.Accounts.AdClients.Get
(
AccountsAdClientsGetResource
, accountsAdClientsGet
, AccountsAdClientsGet
, aacgAdClientId
, aacgAccountId
) where
import Network.Google.AdSenseHost.Types
import Network.Google.Prelude
type AccountsAdClientsGetResource =
"adsensehost" :>
"v4.1" :>
"accounts" :>
Capture "accountId" Text :>
"adclients" :>
Capture "adClientId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] AdClient
-- | Get information about one of the ad clients in the specified
-- publisher\'s AdSense account.
--
-- /See:/ 'accountsAdClientsGet' smart constructor.
data AccountsAdClientsGet = AccountsAdClientsGet'
{ _aacgAdClientId :: !Text
, _aacgAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
-- | Creates a value of 'AccountsAdClientsGet' with the minimum fields required to make a request.
--
-- Use one of the following lenses to modify other fields as desired:
--
-- * 'aacgAdClientId'
--
-- * 'aacgAccountId'
accountsAdClientsGet
:: Text -- ^ 'aacgAdClientId'
-> Text -- ^ 'aacgAccountId'
-> AccountsAdClientsGet
accountsAdClientsGet pAacgAdClientId_ pAacgAccountId_ =
AccountsAdClientsGet'
{ _aacgAdClientId = pAacgAdClientId_
, _aacgAccountId = pAacgAccountId_
}
-- | Ad client to get.
aacgAdClientId :: Lens' AccountsAdClientsGet Text
aacgAdClientId
= lens _aacgAdClientId
(\ s a -> s{_aacgAdClientId = a})
-- | Account which contains the ad client.
aacgAccountId :: Lens' AccountsAdClientsGet Text
aacgAccountId
= lens _aacgAccountId
(\ s a -> s{_aacgAccountId = a})
instance GoogleRequest AccountsAdClientsGet where
type Rs AccountsAdClientsGet = AdClient
type Scopes AccountsAdClientsGet =
'["https://www.googleapis.com/auth/adsensehost"]
requestClient AccountsAdClientsGet'{..}
= go _aacgAccountId _aacgAdClientId (Just AltJSON)
adSenseHostService
where go
= buildClient
(Proxy :: Proxy AccountsAdClientsGetResource)
mempty