{-# 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.AdExchangeBuyer.Creatives.ListDeals
(
CreativesListDealsResource
, creativesListDeals
, CreativesListDeals
, cldBuyerCreativeId
, cldAccountId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type CreativesListDealsResource =
"adexchangebuyer" :>
"v1.4" :>
"creatives" :>
Capture "accountId" (Textual Int32) :>
Capture "buyerCreativeId" Text :>
"listDeals" :>
QueryParam "alt" AltJSON :>
Get '[JSON] CreativeDealIds
data CreativesListDeals = CreativesListDeals'
{ _cldBuyerCreativeId :: !Text
, _cldAccountId :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativesListDeals
:: Text
-> Int32
-> CreativesListDeals
creativesListDeals pCldBuyerCreativeId_ pCldAccountId_ =
CreativesListDeals'
{ _cldBuyerCreativeId = pCldBuyerCreativeId_
, _cldAccountId = _Coerce # pCldAccountId_
}
cldBuyerCreativeId :: Lens' CreativesListDeals Text
cldBuyerCreativeId
= lens _cldBuyerCreativeId
(\ s a -> s{_cldBuyerCreativeId = a})
cldAccountId :: Lens' CreativesListDeals Int32
cldAccountId
= lens _cldAccountId (\ s a -> s{_cldAccountId = a})
. _Coerce
instance GoogleRequest CreativesListDeals where
type Rs CreativesListDeals = CreativeDealIds
type Scopes CreativesListDeals =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient CreativesListDeals'{..}
= go _cldAccountId _cldBuyerCreativeId (Just AltJSON)
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy CreativesListDealsResource)
mempty