{-# 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.AccountPermissions.Get
(
AccountPermissionsGetResource
, accountPermissionsGet
, AccountPermissionsGet
, apgProFileId
, apgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountPermissionsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accountPermissions" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AccountPermission
data AccountPermissionsGet = AccountPermissionsGet'
{ _apgProFileId :: !(Textual Int64)
, _apgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermissionsGet
:: Int64
-> Int64
-> AccountPermissionsGet
accountPermissionsGet pApgProFileId_ pApgId_ =
AccountPermissionsGet'
{ _apgProFileId = _Coerce # pApgProFileId_
, _apgId = _Coerce # pApgId_
}
apgProFileId :: Lens' AccountPermissionsGet Int64
apgProFileId
= lens _apgProFileId (\ s a -> s{_apgProFileId = a})
. _Coerce
apgId :: Lens' AccountPermissionsGet Int64
apgId
= lens _apgId (\ s a -> s{_apgId = a}) . _Coerce
instance GoogleRequest AccountPermissionsGet where
type Rs AccountPermissionsGet = AccountPermission
type Scopes AccountPermissionsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountPermissionsGet'{..}
= go _apgProFileId _apgId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AccountPermissionsGetResource)
mempty