{-# 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.Get
(
UserRolePermissionsGetResource
, userRolePermissionsGet
, UserRolePermissionsGet
, uProFileId
, uId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserRolePermissionsGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"userRolePermissions" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] UserRolePermission
data UserRolePermissionsGet = UserRolePermissionsGet'
{ _uProFileId :: !(Textual Int64)
, _uId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
userRolePermissionsGet
:: Int64
-> Int64
-> UserRolePermissionsGet
userRolePermissionsGet pUProFileId_ pUId_ =
UserRolePermissionsGet'
{ _uProFileId = _Coerce # pUProFileId_
, _uId = _Coerce # pUId_
}
uProFileId :: Lens' UserRolePermissionsGet Int64
uProFileId
= lens _uProFileId (\ s a -> s{_uProFileId = a}) .
_Coerce
uId :: Lens' UserRolePermissionsGet Int64
uId = lens _uId (\ s a -> s{_uId = a}) . _Coerce
instance GoogleRequest UserRolePermissionsGet where
type Rs UserRolePermissionsGet = UserRolePermission
type Scopes UserRolePermissionsGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserRolePermissionsGet'{..}
= go _uProFileId _uId (Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy UserRolePermissionsGetResource)
mempty