{-# 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.Accounts.Update
(
AccountsUpdateResource
, accountsUpdate
, AccountsUpdate
, auuProFileId
, auuPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountsUpdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accounts" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Account :> Put '[JSON] Account
data AccountsUpdate = AccountsUpdate'
{ _auuProFileId :: !(Textual Int64)
, _auuPayload :: !Account
} deriving (Eq,Show,Data,Typeable,Generic)
accountsUpdate
:: Int64
-> Account
-> AccountsUpdate
accountsUpdate pAuuProFileId_ pAuuPayload_ =
AccountsUpdate'
{ _auuProFileId = _Coerce # pAuuProFileId_
, _auuPayload = pAuuPayload_
}
auuProFileId :: Lens' AccountsUpdate Int64
auuProFileId
= lens _auuProFileId (\ s a -> s{_auuProFileId = a})
. _Coerce
auuPayload :: Lens' AccountsUpdate Account
auuPayload
= lens _auuPayload (\ s a -> s{_auuPayload = a})
instance GoogleRequest AccountsUpdate where
type Rs AccountsUpdate = Account
type Scopes AccountsUpdate =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountsUpdate'{..}
= go _auuProFileId (Just AltJSON) _auuPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy AccountsUpdateResource)
mempty