{-# 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.DynamicTargetingKeys.List
(
DynamicTargetingKeysListResource
, dynamicTargetingKeysList
, DynamicTargetingKeysList
, dtklObjectType
, dtklAdvertiserId
, dtklObjectId
, dtklProFileId
, dtklNames
) where
import Network.Google.DFAReporting.Types
import Network.Google.Prelude
type DynamicTargetingKeysListResource =
"dfareporting" :>
"v3.2" :>
"userprofiles" :>
Capture "profileId" (Textual Int64) :>
"dynamicTargetingKeys" :>
QueryParam "objectType"
DynamicTargetingKeysListObjectType
:>
QueryParam "advertiserId" (Textual Int64) :>
QueryParam "objectId" (Textual Int64) :>
QueryParams "names" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] DynamicTargetingKeysListResponse
data DynamicTargetingKeysList = DynamicTargetingKeysList'
{ _dtklObjectType :: !(Maybe DynamicTargetingKeysListObjectType)
, _dtklAdvertiserId :: !(Maybe (Textual Int64))
, _dtklObjectId :: !(Maybe (Textual Int64))
, _dtklProFileId :: !(Textual Int64)
, _dtklNames :: !(Maybe [Text])
} deriving (Eq,Show,Data,Typeable,Generic)
dynamicTargetingKeysList
:: Int64
-> DynamicTargetingKeysList
dynamicTargetingKeysList pDtklProFileId_ =
DynamicTargetingKeysList'
{ _dtklObjectType = Nothing
, _dtklAdvertiserId = Nothing
, _dtklObjectId = Nothing
, _dtklProFileId = _Coerce # pDtklProFileId_
, _dtklNames = Nothing
}
dtklObjectType :: Lens' DynamicTargetingKeysList (Maybe DynamicTargetingKeysListObjectType)
dtklObjectType
= lens _dtklObjectType
(\ s a -> s{_dtklObjectType = a})
dtklAdvertiserId :: Lens' DynamicTargetingKeysList (Maybe Int64)
dtklAdvertiserId
= lens _dtklAdvertiserId
(\ s a -> s{_dtklAdvertiserId = a})
. mapping _Coerce
dtklObjectId :: Lens' DynamicTargetingKeysList (Maybe Int64)
dtklObjectId
= lens _dtklObjectId (\ s a -> s{_dtklObjectId = a})
. mapping _Coerce
dtklProFileId :: Lens' DynamicTargetingKeysList Int64
dtklProFileId
= lens _dtklProFileId
(\ s a -> s{_dtklProFileId = a})
. _Coerce
dtklNames :: Lens' DynamicTargetingKeysList [Text]
dtklNames
= lens _dtklNames (\ s a -> s{_dtklNames = a}) .
_Default
. _Coerce
instance GoogleRequest DynamicTargetingKeysList where
type Rs DynamicTargetingKeysList =
DynamicTargetingKeysListResponse
type Scopes DynamicTargetingKeysList =
'["https://www.googleapis.com/auth/dfatrafficking"]
requestClient DynamicTargetingKeysList'{..}
= go _dtklProFileId _dtklObjectType _dtklAdvertiserId
_dtklObjectId
(_dtklNames ^. _Default)
(Just AltJSON)
dFAReportingService
where go
= buildClient
(Proxy :: Proxy DynamicTargetingKeysListResource)
mempty