{-# 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.AccountPermissionGroups.Get
(
AccountPermissionGroupsGetResource
, accountPermissionGroupsGet
, AccountPermissionGroupsGet
, apggProFileId
, apggId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountPermissionGroupsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accountPermissionGroups" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] AccountPermissionGroup
data AccountPermissionGroupsGet = AccountPermissionGroupsGet'
{ _apggProFileId :: !(Textual Int64)
, _apggId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountPermissionGroupsGet
:: Int64
-> Int64
-> AccountPermissionGroupsGet
accountPermissionGroupsGet pApggProFileId_ pApggId_ =
AccountPermissionGroupsGet'
{ _apggProFileId = _Coerce # pApggProFileId_
, _apggId = _Coerce # pApggId_
}
apggProFileId :: Lens' AccountPermissionGroupsGet Int64
apggProFileId
= lens _apggProFileId
(\ s a -> s{_apggProFileId = a})
. _Coerce
apggId :: Lens' AccountPermissionGroupsGet Int64
apggId
= lens _apggId (\ s a -> s{_apggId = a}) . _Coerce
instance GoogleRequest AccountPermissionGroupsGet
where
type Rs AccountPermissionGroupsGet =
AccountPermissionGroup
type Scopes AccountPermissionGroupsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountPermissionGroupsGet'{..}
= go _apggProFileId _apggId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AccountPermissionGroupsGetResource)
mempty