{-# 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.Conversions.Batchupdate
(
ConversionsBatchupdateResource
, conversionsBatchupdate
, ConversionsBatchupdate
, conProFileId
, conPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ConversionsBatchupdateResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"conversions" :>
"batchupdate" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ConversionsBatchUpdateRequest :>
Post '[JSON] ConversionsBatchUpdateResponse
data ConversionsBatchupdate = ConversionsBatchupdate'
{ _conProFileId :: !(Textual Int64)
, _conPayload :: !ConversionsBatchUpdateRequest
} deriving (Eq,Show,Data,Typeable,Generic)
conversionsBatchupdate
:: Int64
-> ConversionsBatchUpdateRequest
-> ConversionsBatchupdate
conversionsBatchupdate pConProFileId_ pConPayload_ =
ConversionsBatchupdate'
{ _conProFileId = _Coerce # pConProFileId_
, _conPayload = pConPayload_
}
conProFileId :: Lens' ConversionsBatchupdate Int64
conProFileId
= lens _conProFileId (\ s a -> s{_conProFileId = a})
. _Coerce
conPayload :: Lens' ConversionsBatchupdate ConversionsBatchUpdateRequest
conPayload
= lens _conPayload (\ s a -> s{_conPayload = a})
instance GoogleRequest ConversionsBatchupdate where
type Rs ConversionsBatchupdate =
ConversionsBatchUpdateResponse
type Scopes ConversionsBatchupdate =
'["https://www.googleapis.com/auth/ddmconversions"]
requestClient ConversionsBatchupdate'{..}
= go _conProFileId (Just AltJSON) _conPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ConversionsBatchupdateResource)
mempty