{-# 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.AdExchangeBuyer.Accounts.Get
(
AccountsGetResource
, accountsGet
, AccountsGet
, agId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type AccountsGetResource =
"adexchangebuyer" :>
"v1.4" :>
"accounts" :>
Capture "id" (Textual Int32) :>
QueryParam "alt" AltJSON :> Get '[JSON] Account
newtype AccountsGet = AccountsGet'
{ _agId :: Textual Int32
} deriving (Eq,Show,Data,Typeable,Generic)
accountsGet
:: Int32
-> AccountsGet
accountsGet pAgId_ =
AccountsGet'
{ _agId = _Coerce # pAgId_
}
agId :: Lens' AccountsGet Int32
agId = lens _agId (\ s a -> s{_agId = a}) . _Coerce
instance GoogleRequest AccountsGet where
type Rs AccountsGet = Account
type Scopes AccountsGet =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient AccountsGet'{..}
= go _agId (Just AltJSON) adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy AccountsGetResource)
mempty