{-# 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.DoubleClickSearch.Conversion.Insert
(
ConversionInsertResource
, conversionInsert
, ConversionInsert
, ciPayload
) where
import Network.Google.DoubleClickSearch.Types
import Network.Google.Prelude
type ConversionInsertResource =
"doubleclicksearch" :>
"v2" :>
"conversion" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ConversionList :>
Post '[JSON] ConversionList
newtype ConversionInsert = ConversionInsert'
{ _ciPayload :: ConversionList
} deriving (Eq,Show,Data,Typeable,Generic)
conversionInsert
:: ConversionList
-> ConversionInsert
conversionInsert pCiPayload_ =
ConversionInsert'
{ _ciPayload = pCiPayload_
}
ciPayload :: Lens' ConversionInsert ConversionList
ciPayload
= lens _ciPayload (\ s a -> s{_ciPayload = a})
instance GoogleRequest ConversionInsert where
type Rs ConversionInsert = ConversionList
type Scopes ConversionInsert =
'["https://www.googleapis.com/auth/doubleclicksearch"]
requestClient ConversionInsert'{..}
= go (Just AltJSON) _ciPayload
doubleClickSearchService
where go
= buildClient
(Proxy :: Proxy ConversionInsertResource)
mempty