{-# 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.MarketplaceDeals.List
(
MarketplaceDealsListResource
, marketplaceDealsList
, MarketplaceDealsList
, mdlProposalId
, mdlPqlQuery
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type MarketplaceDealsListResource =
"adexchangebuyer" :>
"v1.4" :>
"proposals" :>
Capture "proposalId" Text :>
"deals" :>
QueryParam "pqlQuery" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetOrderDealsResponse
data MarketplaceDealsList = MarketplaceDealsList'
{ _mdlProposalId :: !Text
, _mdlPqlQuery :: !(Maybe Text)
} deriving (Eq,Show,Data,Typeable,Generic)
marketplaceDealsList
:: Text
-> MarketplaceDealsList
marketplaceDealsList pMdlProposalId_ =
MarketplaceDealsList'
{ _mdlProposalId = pMdlProposalId_
, _mdlPqlQuery = Nothing
}
mdlProposalId :: Lens' MarketplaceDealsList Text
mdlProposalId
= lens _mdlProposalId
(\ s a -> s{_mdlProposalId = a})
mdlPqlQuery :: Lens' MarketplaceDealsList (Maybe Text)
mdlPqlQuery
= lens _mdlPqlQuery (\ s a -> s{_mdlPqlQuery = a})
instance GoogleRequest MarketplaceDealsList where
type Rs MarketplaceDealsList = GetOrderDealsResponse
type Scopes MarketplaceDealsList =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient MarketplaceDealsList'{..}
= go _mdlProposalId _mdlPqlQuery (Just AltJSON)
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy MarketplaceDealsListResource)
mempty