{-# 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.AccountUserProFiles.Update
(
AccountUserProFilesUpdateResource
, accountUserProFilesUpdate
, AccountUserProFilesUpdate
, aupfuProFileId
, aupfuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountUserProFilesUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accountUserProfiles" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountUserProFile :>
Put '[JSON] AccountUserProFile
data AccountUserProFilesUpdate = AccountUserProFilesUpdate'
{ _aupfuProFileId :: !(Textual Int64)
, _aupfuPayload :: !AccountUserProFile
} deriving (Eq,Show,Data,Typeable,Generic)
accountUserProFilesUpdate
:: Int64
-> AccountUserProFile
-> AccountUserProFilesUpdate
accountUserProFilesUpdate pAupfuProFileId_ pAupfuPayload_ =
AccountUserProFilesUpdate'
{ _aupfuProFileId = _Coerce # pAupfuProFileId_
, _aupfuPayload = pAupfuPayload_
}
aupfuProFileId :: Lens' AccountUserProFilesUpdate Int64
aupfuProFileId
= lens _aupfuProFileId
(\ s a -> s{_aupfuProFileId = a})
. _Coerce
aupfuPayload :: Lens' AccountUserProFilesUpdate AccountUserProFile
aupfuPayload
= lens _aupfuPayload (\ s a -> s{_aupfuPayload = a})
instance GoogleRequest AccountUserProFilesUpdate
where
type Rs AccountUserProFilesUpdate =
AccountUserProFile
type Scopes AccountUserProFilesUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountUserProFilesUpdate'{..}
= go _aupfuProFileId (Just AltJSON) _aupfuPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AccountUserProFilesUpdateResource)
mempty