{-# 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.Patch
(
AccountsPatchResource
, accountsPatch
, AccountsPatch
, appProFileId
, appPayload
, appId
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type AccountsPatchResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"accounts" :>
QueryParam "id" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Account :> Patch '[JSON] Account
data AccountsPatch = AccountsPatch'
{ _appProFileId :: !(Textual Int64)
, _appPayload :: !Account
, _appId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
accountsPatch
:: Int64
-> Account
-> Int64
-> AccountsPatch
accountsPatch pAppProFileId_ pAppPayload_ pAppId_ =
AccountsPatch'
{ _appProFileId = _Coerce # pAppProFileId_
, _appPayload = pAppPayload_
, _appId = _Coerce # pAppId_
}
appProFileId :: Lens' AccountsPatch Int64
appProFileId
= lens _appProFileId (\ s a -> s{_appProFileId = a})
. _Coerce
appPayload :: Lens' AccountsPatch Account
appPayload
= lens _appPayload (\ s a -> s{_appPayload = a})
appId :: Lens' AccountsPatch Int64
appId
= lens _appId (\ s a -> s{_appId = a}) . _Coerce
instance GoogleRequest AccountsPatch where
type Rs AccountsPatch = Account
type Scopes AccountsPatch =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient AccountsPatch'{..}
= go _appProFileId (Just _appId) (Just AltJSON)
_appPayload
dFAReportingService
where go
= buildClient (Proxy :: Proxy AccountsPatchResource)
mempty