{-# 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.Get
(
ConversionGetResource
, conversionGet
, ConversionGet
, cgAdGroupId
, cgEngineAccountId
, cgAgencyId
, cgAdvertiserId
, cgEndDate
, cgCampaignId
, cgCriterionId
, cgStartDate
, cgStartRow
, cgAdId
, cgRowCount
) where
import Network.Google.DoubleClickSearch.Types
import Network.Google.Prelude
type ConversionGetResource =
"doubleclicksearch" :>
"v2" :>
"agency" :>
Capture "agencyId" (Textual Int64) :>
"advertiser" :>
Capture "advertiserId" (Textual Int64) :>
"engine" :>
Capture "engineAccountId" (Textual Int64) :>
"conversion" :>
QueryParam "endDate" (Textual Int32) :>
QueryParam "rowCount" (Textual Int32) :>
QueryParam "startDate" (Textual Int32) :>
QueryParam "startRow" (Textual Word32) :>
QueryParam "adGroupId" (Textual Int64) :>
QueryParam "campaignId" (Textual Int64) :>
QueryParam "criterionId" (Textual Int64) :>
QueryParam "adId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ConversionList
data ConversionGet = ConversionGet'
{ _cgAdGroupId :: !(Maybe (Textual Int64))
, _cgEngineAccountId :: !(Textual Int64)
, _cgAgencyId :: !(Textual Int64)
, _cgAdvertiserId :: !(Textual Int64)
, _cgEndDate :: !(Textual Int32)
, _cgCampaignId :: !(Maybe (Textual Int64))
, _cgCriterionId :: !(Maybe (Textual Int64))
, _cgStartDate :: !(Textual Int32)
, _cgStartRow :: !(Textual Word32)
, _cgAdId :: !(Maybe (Textual Int64))
, _cgRowCount :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
conversionGet
:: Int64
-> Int64
-> Int64
-> Int32
-> Int32
-> Word32
-> Int32
-> ConversionGet
conversionGet pCgEngineAccountId_ pCgAgencyId_ pCgAdvertiserId_ pCgEndDate_ pCgStartDate_ pCgStartRow_ pCgRowCount_ =
ConversionGet'
{ _cgAdGroupId = Nothing
, _cgEngineAccountId = _Coerce # pCgEngineAccountId_
, _cgAgencyId = _Coerce # pCgAgencyId_
, _cgAdvertiserId = _Coerce # pCgAdvertiserId_
, _cgEndDate = _Coerce # pCgEndDate_
, _cgCampaignId = Nothing
, _cgCriterionId = Nothing
, _cgStartDate = _Coerce # pCgStartDate_
, _cgStartRow = _Coerce # pCgStartRow_
, _cgAdId = Nothing
, _cgRowCount = _Coerce # pCgRowCount_
}
cgAdGroupId :: Lens' ConversionGet (Maybe Int64)
cgAdGroupId
= lens _cgAdGroupId (\ s a -> s{_cgAdGroupId = a}) .
mapping _Coerce
cgEngineAccountId :: Lens' ConversionGet Int64
cgEngineAccountId
= lens _cgEngineAccountId
(\ s a -> s{_cgEngineAccountId = a})
. _Coerce
cgAgencyId :: Lens' ConversionGet Int64
cgAgencyId
= lens _cgAgencyId (\ s a -> s{_cgAgencyId = a}) .
_Coerce
cgAdvertiserId :: Lens' ConversionGet Int64
cgAdvertiserId
= lens _cgAdvertiserId
(\ s a -> s{_cgAdvertiserId = a})
. _Coerce
cgEndDate :: Lens' ConversionGet Int32
cgEndDate
= lens _cgEndDate (\ s a -> s{_cgEndDate = a}) .
_Coerce
cgCampaignId :: Lens' ConversionGet (Maybe Int64)
cgCampaignId
= lens _cgCampaignId (\ s a -> s{_cgCampaignId = a})
. mapping _Coerce
cgCriterionId :: Lens' ConversionGet (Maybe Int64)
cgCriterionId
= lens _cgCriterionId
(\ s a -> s{_cgCriterionId = a})
. mapping _Coerce
cgStartDate :: Lens' ConversionGet Int32
cgStartDate
= lens _cgStartDate (\ s a -> s{_cgStartDate = a}) .
_Coerce
cgStartRow :: Lens' ConversionGet Word32
cgStartRow
= lens _cgStartRow (\ s a -> s{_cgStartRow = a}) .
_Coerce
cgAdId :: Lens' ConversionGet (Maybe Int64)
cgAdId
= lens _cgAdId (\ s a -> s{_cgAdId = a}) .
mapping _Coerce
cgRowCount :: Lens' ConversionGet Int32
cgRowCount
= lens _cgRowCount (\ s a -> s{_cgRowCount = a}) .
_Coerce
instance GoogleRequest ConversionGet where
type Rs ConversionGet = ConversionList
type Scopes ConversionGet =
'["https://www.googleapis.com/auth/doubleclicksearch"]
requestClient ConversionGet'{..}
= go _cgAgencyId _cgAdvertiserId _cgEngineAccountId
(Just _cgEndDate)
(Just _cgRowCount)
(Just _cgStartDate)
(Just _cgStartRow)
_cgAdGroupId
_cgCampaignId
_cgCriterionId
_cgAdId
(Just AltJSON)
doubleClickSearchService
where go
= buildClient (Proxy :: Proxy ConversionGetResource)
mempty