{-# 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.List
(
CreativesListResource
, creativesList'
, CreativesList'
, clBuyerCreativeId
, clOpenAuctionStatusFilter
, clAccountId
, clPageToken
, clDealsStatusFilter
, clMaxResults
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type CreativesListResource =
"adexchangebuyer" :>
"v1.4" :>
"creatives" :>
QueryParams "buyerCreativeId" Text :>
QueryParam "openAuctionStatusFilter"
CreativesListOpenAuctionStatusFilter
:>
QueryParams "accountId" (Textual Int32) :>
QueryParam "pageToken" Text :>
QueryParam "dealsStatusFilter"
CreativesListDealsStatusFilter
:>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :> Get '[JSON] CreativesList
data CreativesList' = CreativesList''
{ _clBuyerCreativeId :: !(Maybe [Text])
, _clOpenAuctionStatusFilter :: !(Maybe CreativesListOpenAuctionStatusFilter)
, _clAccountId :: !(Maybe [Textual Int32])
, _clPageToken :: !(Maybe Text)
, _clDealsStatusFilter :: !(Maybe CreativesListDealsStatusFilter)
, _clMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
creativesList'
:: CreativesList'
creativesList' =
CreativesList''
{ _clBuyerCreativeId = Nothing
, _clOpenAuctionStatusFilter = Nothing
, _clAccountId = Nothing
, _clPageToken = Nothing
, _clDealsStatusFilter = Nothing
, _clMaxResults = Nothing
}
clBuyerCreativeId :: Lens' CreativesList' [Text]
clBuyerCreativeId
= lens _clBuyerCreativeId
(\ s a -> s{_clBuyerCreativeId = a})
. _Default
. _Coerce
clOpenAuctionStatusFilter :: Lens' CreativesList' (Maybe CreativesListOpenAuctionStatusFilter)
clOpenAuctionStatusFilter
= lens _clOpenAuctionStatusFilter
(\ s a -> s{_clOpenAuctionStatusFilter = a})
clAccountId :: Lens' CreativesList' [Int32]
clAccountId
= lens _clAccountId (\ s a -> s{_clAccountId = a}) .
_Default
. _Coerce
clPageToken :: Lens' CreativesList' (Maybe Text)
clPageToken
= lens _clPageToken (\ s a -> s{_clPageToken = a})
clDealsStatusFilter :: Lens' CreativesList' (Maybe CreativesListDealsStatusFilter)
clDealsStatusFilter
= lens _clDealsStatusFilter
(\ s a -> s{_clDealsStatusFilter = a})
clMaxResults :: Lens' CreativesList' (Maybe Word32)
clMaxResults
= lens _clMaxResults (\ s a -> s{_clMaxResults = a})
. mapping _Coerce
instance GoogleRequest CreativesList' where
type Rs CreativesList' = CreativesList
type Scopes CreativesList' =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient CreativesList''{..}
= go (_clBuyerCreativeId ^. _Default)
_clOpenAuctionStatusFilter
(_clAccountId ^. _Default)
_clPageToken
_clDealsStatusFilter
_clMaxResults
(Just AltJSON)
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy CreativesListResource)
mempty