{-# 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.TagManager.Accounts.Update
(
AccountsUpdateResource
, accountsUpdate
, AccountsUpdate
, auPath
, auFingerprint
, auPayload
) where
import Network.Google.Prelude
import Network.Google.TagManager.Types
type AccountsUpdateResource =
"tagmanager" :>
"v2" :>
Capture "path" Text :>
QueryParam "fingerprint" Text :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Account :> Put '[JSON] Account
data AccountsUpdate = AccountsUpdate'
{ _auPath :: !Text
, _auFingerprint :: !(Maybe Text)
, _auPayload :: !Account
} deriving (Eq,Show,Data,Typeable,Generic)
accountsUpdate
:: Text
-> Account
-> AccountsUpdate
accountsUpdate pAuPath_ pAuPayload_ =
AccountsUpdate'
{ _auPath = pAuPath_
, _auFingerprint = Nothing
, _auPayload = pAuPayload_
}
auPath :: Lens' AccountsUpdate Text
auPath = lens _auPath (\ s a -> s{_auPath = a})
auFingerprint :: Lens' AccountsUpdate (Maybe Text)
auFingerprint
= lens _auFingerprint
(\ s a -> s{_auFingerprint = a})
auPayload :: Lens' AccountsUpdate Account
auPayload
= lens _auPayload (\ s a -> s{_auPayload = a})
instance GoogleRequest AccountsUpdate where
type Rs AccountsUpdate = Account
type Scopes AccountsUpdate =
'["https://www.googleapis.com/auth/tagmanager.manage.accounts"]
requestClient AccountsUpdate'{..}
= go _auPath _auFingerprint (Just AltJSON) _auPayload
tagManagerService
where go
= buildClient (Proxy :: Proxy AccountsUpdateResource)
mempty