{-# 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.Update
(
MarketplaceDealsUpdateResource
, marketplaceDealsUpdate
, MarketplaceDealsUpdate
, mduPayload
, mduProposalId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type MarketplaceDealsUpdateResource =
"adexchangebuyer" :>
"v1.4" :>
"proposals" :>
Capture "proposalId" Text :>
"deals" :>
"update" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] EditAllOrderDealsRequest :>
Post '[JSON] EditAllOrderDealsResponse
data MarketplaceDealsUpdate = MarketplaceDealsUpdate'
{ _mduPayload :: !EditAllOrderDealsRequest
, _mduProposalId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
marketplaceDealsUpdate
:: EditAllOrderDealsRequest
-> Text
-> MarketplaceDealsUpdate
marketplaceDealsUpdate pMduPayload_ pMduProposalId_ =
MarketplaceDealsUpdate'
{ _mduPayload = pMduPayload_
, _mduProposalId = pMduProposalId_
}
mduPayload :: Lens' MarketplaceDealsUpdate EditAllOrderDealsRequest
mduPayload
= lens _mduPayload (\ s a -> s{_mduPayload = a})
mduProposalId :: Lens' MarketplaceDealsUpdate Text
mduProposalId
= lens _mduProposalId
(\ s a -> s{_mduProposalId = a})
instance GoogleRequest MarketplaceDealsUpdate where
type Rs MarketplaceDealsUpdate =
EditAllOrderDealsResponse
type Scopes MarketplaceDealsUpdate =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient MarketplaceDealsUpdate'{..}
= go _mduProposalId (Just AltJSON) _mduPayload
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy MarketplaceDealsUpdateResource)
mempty