{-# 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.Update
(
UserRolesUpdateResource
, userRolesUpdate
, UserRolesUpdate
, uruProFileId
, uruPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserRolesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"userRoles" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserRole :> Put '[JSON] UserRole
data UserRolesUpdate = UserRolesUpdate'
{ _uruProFileId :: !(Textual Int64)
, _uruPayload :: !UserRole
} deriving (Eq,Show,Data,Typeable,Generic)
userRolesUpdate
:: Int64
-> UserRole
-> UserRolesUpdate
userRolesUpdate pUruProFileId_ pUruPayload_ =
UserRolesUpdate'
{ _uruProFileId = _Coerce # pUruProFileId_
, _uruPayload = pUruPayload_
}
uruProFileId :: Lens' UserRolesUpdate Int64
uruProFileId
= lens _uruProFileId (\ s a -> s{_uruProFileId = a})
. _Coerce
uruPayload :: Lens' UserRolesUpdate UserRole
uruPayload
= lens _uruPayload (\ s a -> s{_uruPayload = a})
instance GoogleRequest UserRolesUpdate where
type Rs UserRolesUpdate = UserRole
type Scopes UserRolesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserRolesUpdate'{..}
= go _uruProFileId (Just AltJSON) _uruPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy UserRolesUpdateResource)
mempty