{-# 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.Patch
(
ConversionPatchResource
, conversionPatch
, ConversionPatch
, cpEngineAccountId
, cpAgencyId
, cpAdvertiserId
, cpEndDate
, cpPayload
, cpStartDate
, cpStartRow
, cpRowCount
) where
import Network.Google.DoubleClickSearch.Types
import Network.Google.Prelude
type ConversionPatchResource =
"doubleclicksearch" :>
"v2" :>
"conversion" :>
QueryParam "advertiserId" (Textual Int64) :>
QueryParam "agencyId" (Textual Int64) :>
QueryParam "endDate" (Textual Int32) :>
QueryParam "engineAccountId" (Textual Int64) :>
QueryParam "rowCount" (Textual Int32) :>
QueryParam "startDate" (Textual Int32) :>
QueryParam "startRow" (Textual Word32) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] ConversionList :>
Patch '[JSON] ConversionList
data ConversionPatch = ConversionPatch'
{ _cpEngineAccountId :: !(Textual Int64)
, _cpAgencyId :: !(Textual Int64)
, _cpAdvertiserId :: !(Textual Int64)
, _cpEndDate :: !(Textual Int32)
, _cpPayload :: !ConversionList
, _cpStartDate :: !(Textual Int32)
, _cpStartRow :: !(Textual Word32)
, _cpRowCount :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
conversionPatch
:: Int64
-> Int64
-> Int64
-> Int32
-> ConversionList
-> Int32
-> Word32
-> Int32
-> ConversionPatch
conversionPatch pCpEngineAccountId_ pCpAgencyId_ pCpAdvertiserId_ pCpEndDate_ pCpPayload_ pCpStartDate_ pCpStartRow_ pCpRowCount_ =
ConversionPatch'
{ _cpEngineAccountId = _Coerce # pCpEngineAccountId_
, _cpAgencyId = _Coerce # pCpAgencyId_
, _cpAdvertiserId = _Coerce # pCpAdvertiserId_
, _cpEndDate = _Coerce # pCpEndDate_
, _cpPayload = pCpPayload_
, _cpStartDate = _Coerce # pCpStartDate_
, _cpStartRow = _Coerce # pCpStartRow_
, _cpRowCount = _Coerce # pCpRowCount_
}
cpEngineAccountId :: Lens' ConversionPatch Int64
cpEngineAccountId
= lens _cpEngineAccountId
(\ s a -> s{_cpEngineAccountId = a})
. _Coerce
cpAgencyId :: Lens' ConversionPatch Int64
cpAgencyId
= lens _cpAgencyId (\ s a -> s{_cpAgencyId = a}) .
_Coerce
cpAdvertiserId :: Lens' ConversionPatch Int64
cpAdvertiserId
= lens _cpAdvertiserId
(\ s a -> s{_cpAdvertiserId = a})
. _Coerce
cpEndDate :: Lens' ConversionPatch Int32
cpEndDate
= lens _cpEndDate (\ s a -> s{_cpEndDate = a}) .
_Coerce
cpPayload :: Lens' ConversionPatch ConversionList
cpPayload
= lens _cpPayload (\ s a -> s{_cpPayload = a})
cpStartDate :: Lens' ConversionPatch Int32
cpStartDate
= lens _cpStartDate (\ s a -> s{_cpStartDate = a}) .
_Coerce
cpStartRow :: Lens' ConversionPatch Word32
cpStartRow
= lens _cpStartRow (\ s a -> s{_cpStartRow = a}) .
_Coerce
cpRowCount :: Lens' ConversionPatch Int32
cpRowCount
= lens _cpRowCount (\ s a -> s{_cpRowCount = a}) .
_Coerce
instance GoogleRequest ConversionPatch where
type Rs ConversionPatch = ConversionList
type Scopes ConversionPatch =
'["https://www.googleapis.com/auth/doubleclicksearch"]
requestClient ConversionPatch'{..}
= go (Just _cpAdvertiserId) (Just _cpAgencyId)
(Just _cpEndDate)
(Just _cpEngineAccountId)
(Just _cpRowCount)
(Just _cpStartDate)
(Just _cpStartRow)
(Just AltJSON)
_cpPayload
doubleClickSearchService
where go
= buildClient
(Proxy :: Proxy ConversionPatchResource)
mempty