{-# 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.Patch
(
UserRolesPatchResource
, userRolesPatch
, UserRolesPatch
, urpProFileId
, urpPayload
, urpId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type UserRolesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"userRoles" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] UserRole :> Patch '[JSON] UserRole
data UserRolesPatch = UserRolesPatch'
{ _urpProFileId :: !(Textual Int64)
, _urpPayload :: !UserRole
, _urpId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
userRolesPatch
:: Int64
-> UserRole
-> Int64
-> UserRolesPatch
userRolesPatch pUrpProFileId_ pUrpPayload_ pUrpId_ =
UserRolesPatch'
{ _urpProFileId = _Coerce # pUrpProFileId_
, _urpPayload = pUrpPayload_
, _urpId = _Coerce # pUrpId_
}
urpProFileId :: Lens' UserRolesPatch Int64
urpProFileId
= lens _urpProFileId (\ s a -> s{_urpProFileId = a})
. _Coerce
urpPayload :: Lens' UserRolesPatch UserRole
urpPayload
= lens _urpPayload (\ s a -> s{_urpPayload = a})
urpId :: Lens' UserRolesPatch Int64
urpId
= lens _urpId (\ s a -> s{_urpId = a}) . _Coerce
instance GoogleRequest UserRolesPatch where
type Rs UserRolesPatch = UserRole
type Scopes UserRolesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient UserRolesPatch'{..}
= go _urpProFileId (Just _urpId) (Just AltJSON)
_urpPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy UserRolesPatchResource)
mempty