{-# 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.AdExchangeSeller.Accounts.Get
(
AccountsGetResource
, accountsGet
, AccountsGet
, agAccountId
) where
import Network.Google.AdExchangeSeller.Types
import Network.Google.Prelude
type AccountsGetResource =
"adexchangeseller" :>
"v2.0" :>
"accounts" :>
Capture "accountId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Account
newtype AccountsGet = AccountsGet'
{ _agAccountId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsGet
:: Text
-> AccountsGet
accountsGet pAgAccountId_ =
AccountsGet'
{ _agAccountId = pAgAccountId_
}
agAccountId :: Lens' AccountsGet Text
agAccountId
= lens _agAccountId (\ s a -> s{_agAccountId = a})
instance GoogleRequest AccountsGet where
type Rs AccountsGet = Account
type Scopes AccountsGet =
'["https://www.googleapis.com/auth/adexchange.seller",
"https://www.googleapis.com/auth/adexchange.seller.readonly"]
requestClient AccountsGet'{..}
= go _agAccountId (Just AltJSON)
adExchangeSellerService
where go
= buildClient (Proxy :: Proxy AccountsGetResource)
mempty