{-# 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.Delete
(
MarketplaceDealsDeleteResource
, marketplaceDealsDelete
, MarketplaceDealsDelete
, mddPayload
, mddProposalId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type MarketplaceDealsDeleteResource =
"adexchangebuyer" :>
"v1.4" :>
"proposals" :>
Capture "proposalId" Text :>
"deals" :>
"delete" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] DeleteOrderDealsRequest :>
Post '[JSON] DeleteOrderDealsResponse
data MarketplaceDealsDelete = MarketplaceDealsDelete'
{ _mddPayload :: !DeleteOrderDealsRequest
, _mddProposalId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
marketplaceDealsDelete
:: DeleteOrderDealsRequest
-> Text
-> MarketplaceDealsDelete
marketplaceDealsDelete pMddPayload_ pMddProposalId_ =
MarketplaceDealsDelete'
{ _mddPayload = pMddPayload_
, _mddProposalId = pMddProposalId_
}
mddPayload :: Lens' MarketplaceDealsDelete DeleteOrderDealsRequest
mddPayload
= lens _mddPayload (\ s a -> s{_mddPayload = a})
mddProposalId :: Lens' MarketplaceDealsDelete Text
mddProposalId
= lens _mddProposalId
(\ s a -> s{_mddProposalId = a})
instance GoogleRequest MarketplaceDealsDelete where
type Rs MarketplaceDealsDelete =
DeleteOrderDealsResponse
type Scopes MarketplaceDealsDelete =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient MarketplaceDealsDelete'{..}
= go _mddProposalId (Just AltJSON) _mddPayload
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy MarketplaceDealsDeleteResource)
mempty