{-# 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.SubAccounts.Get
(
SubAccountsGetResource
, subAccountsGet
, SubAccountsGet
, sagProFileId
, sagId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type SubAccountsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"subaccounts" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] SubAccount
data SubAccountsGet = SubAccountsGet'
{ _sagProFileId :: !(Textual Int64)
, _sagId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
subAccountsGet
:: Int64
-> Int64
-> SubAccountsGet
subAccountsGet pSagProFileId_ pSagId_ =
SubAccountsGet'
{ _sagProFileId = _Coerce # pSagProFileId_
, _sagId = _Coerce # pSagId_
}
sagProFileId :: Lens' SubAccountsGet Int64
sagProFileId
= lens _sagProFileId (\ s a -> s{_sagProFileId = a})
. _Coerce
sagId :: Lens' SubAccountsGet Int64
sagId
= lens _sagId (\ s a -> s{_sagId = a}) . _Coerce
instance GoogleRequest SubAccountsGet where
type Rs SubAccountsGet = SubAccount
type Scopes SubAccountsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient SubAccountsGet'{..}
= go _sagProFileId _sagId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy SubAccountsGetResource)
mempty