{-# 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.Batchinsert
(
ConversionsBatchinsertResource
, conversionsBatchinsert
, ConversionsBatchinsert
, cbProFileId
, cbPayload
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type ConversionsBatchinsertResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"conversions" :>
"batchinsert" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ConversionsBatchInsertRequest :>
Post '[JSON] ConversionsBatchInsertResponse
data ConversionsBatchinsert = ConversionsBatchinsert'
{ _cbProFileId :: !(Textual Int64)
, _cbPayload :: !ConversionsBatchInsertRequest
} deriving (Eq,Show,Data,Typeable,Generic)
conversionsBatchinsert
:: Int64
-> ConversionsBatchInsertRequest
-> ConversionsBatchinsert
conversionsBatchinsert pCbProFileId_ pCbPayload_ =
ConversionsBatchinsert'
{ _cbProFileId = _Coerce # pCbProFileId_
, _cbPayload = pCbPayload_
}
cbProFileId :: Lens' ConversionsBatchinsert Int64
cbProFileId
= lens _cbProFileId (\ s a -> s{_cbProFileId = a}) .
_Coerce
cbPayload :: Lens' ConversionsBatchinsert ConversionsBatchInsertRequest
cbPayload
= lens _cbPayload (\ s a -> s{_cbPayload = a})
instance GoogleRequest ConversionsBatchinsert where
type Rs ConversionsBatchinsert =
ConversionsBatchInsertResponse
type Scopes ConversionsBatchinsert =
'["https://www.googleapis.com/auth/ddmconversions"]
requestClient ConversionsBatchinsert'{..}
= go _cbProFileId (Just AltJSON) _cbPayload
dFAReportingService
where go
= buildClient
(Proxy :: Proxy ConversionsBatchinsertResource)
mempty