{-# 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.UserRoles.Get
(
UserRolesGetResource
, userRolesGet
, UserRolesGet
, urgProFileId
, urgId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserRolesGetResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"userRoles" :>
Capture "id" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] UserRole
data UserRolesGet = UserRolesGet'
{ _urgProFileId :: !(Textual Int64)
, _urgId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
userRolesGet
:: Int64
-> Int64
-> UserRolesGet
userRolesGet pUrgProFileId_ pUrgId_ =
UserRolesGet'
{ _urgProFileId = _Coerce # pUrgProFileId_
, _urgId = _Coerce # pUrgId_
}
urgProFileId :: Lens' UserRolesGet Int64
urgProFileId
= lens _urgProFileId (\ s a -> s{_urgProFileId = a})
. _Coerce
urgId :: Lens' UserRolesGet Int64
urgId
= lens _urgId (\ s a -> s{_urgId = a}) . _Coerce
instance GoogleRequest UserRolesGet where
type Rs UserRolesGet = UserRole
type Scopes UserRolesGet =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserRolesGet'{..}
= go _urgProFileId _urgId (Just AltJSON)
dFAReportingService
where go
= buildClient (Proxy :: Proxy UserRolesGetResource)
mempty