{-# 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.Patch
(
AccountUserProFilesPatchResource
, accountUserProFilesPatch
, AccountUserProFilesPatch
, aupfpProFileId
, aupfpPayload
, aupfpId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountUserProFilesPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accountUserProfiles" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AccountUserProFile :>
Patch '[JSON] AccountUserProFile
data AccountUserProFilesPatch = AccountUserProFilesPatch'
{ _aupfpProFileId :: !(Textual Int64)
, _aupfpPayload :: !AccountUserProFile
, _aupfpId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountUserProFilesPatch
:: Int64
-> AccountUserProFile
-> Int64
-> AccountUserProFilesPatch
accountUserProFilesPatch pAupfpProFileId_ pAupfpPayload_ pAupfpId_ =
AccountUserProFilesPatch'
{ _aupfpProFileId = _Coerce # pAupfpProFileId_
, _aupfpPayload = pAupfpPayload_
, _aupfpId = _Coerce # pAupfpId_
}
aupfpProFileId :: Lens' AccountUserProFilesPatch Int64
aupfpProFileId
= lens _aupfpProFileId
(\ s a -> s{_aupfpProFileId = a})
. _Coerce
aupfpPayload :: Lens' AccountUserProFilesPatch AccountUserProFile
aupfpPayload
= lens _aupfpPayload (\ s a -> s{_aupfpPayload = a})
aupfpId :: Lens' AccountUserProFilesPatch Int64
aupfpId
= lens _aupfpId (\ s a -> s{_aupfpId = a}) . _Coerce
instance GoogleRequest AccountUserProFilesPatch where
type Rs AccountUserProFilesPatch = AccountUserProFile
type Scopes AccountUserProFilesPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountUserProFilesPatch'{..}
= go _aupfpProFileId (Just _aupfpId) (Just AltJSON)
_aupfpPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy AccountUserProFilesPatchResource)
mempty