{-# 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.DFAReporting.Accounts.Get
(
AccountsGetResource
, accountsGet
, AccountsGet
, aggProFileId
, aggId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accounts" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Account
data AccountsGet = AccountsGet'
{ _aggProFileId :: !(Textual Int64)
, _aggId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsGet
:: Int64
-> Int64
-> AccountsGet
accountsGet pAggProFileId_ pAggId_ =
AccountsGet'
{ _aggProFileId = _Coerce # pAggProFileId_
, _aggId = _Coerce # pAggId_
}
aggProFileId :: Lens' AccountsGet Int64
aggProFileId
= lens _aggProFileId (\ s a -> s{_aggProFileId = a})
. _Coerce
aggId :: Lens' AccountsGet Int64
aggId
= lens _aggId (\ s a -> s{_aggId = a}) . _Coerce
instance GoogleRequest AccountsGet where
type Rs AccountsGet = Account
type Scopes AccountsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountsGet'{..}
= go _aggProFileId _aggId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy AccountsGetResource)
mempty