{-# 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.UserRolePermissions.List
(
UserRolePermissionsListResource
, userRolePermissionsList
, UserRolePermissionsList
, urplIds
, urplProFileId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserRolePermissionsListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"userRolePermissions" :>
QueryParams "ids" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] UserRolePermissionsListResponse
data UserRolePermissionsList = UserRolePermissionsList'
{ _urplIds :: !(Maybe [Textual Int64])
, _urplProFileId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
userRolePermissionsList
:: Int64
-> UserRolePermissionsList
userRolePermissionsList pUrplProFileId_ =
UserRolePermissionsList'
{ _urplIds = Nothing
, _urplProFileId = _Coerce # pUrplProFileId_
}
urplIds :: Lens' UserRolePermissionsList [Int64]
urplIds
= lens _urplIds (\ s a -> s{_urplIds = a}) . _Default
. _Coerce
urplProFileId :: Lens' UserRolePermissionsList Int64
urplProFileId
= lens _urplProFileId
(\ s a -> s{_urplProFileId = a})
. _Coerce
instance GoogleRequest UserRolePermissionsList where
type Rs UserRolePermissionsList =
UserRolePermissionsListResponse
type Scopes UserRolePermissionsList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserRolePermissionsList'{..}
= go _urplProFileId (_urplIds ^. _Default)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy UserRolePermissionsListResource)
mempty