{-# 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.RemoveDeal
(
CreativesRemoveDealResource
, creativesRemoveDeal
, CreativesRemoveDeal
, crdBuyerCreativeId
, crdDealId
, crdAccountId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type CreativesRemoveDealResource =
"adexchangebuyer" :>
"v1.4" :>
"creatives" :>
Capture "accountId" (Textual Int32) :>
Capture "buyerCreativeId" Text :>
"removeDeal" :>
Capture "dealId" (Textual Int64) :>
QueryParam "alt" AltJSON :> Post '[JSON] ()
data CreativesRemoveDeal = CreativesRemoveDeal'
{ _crdBuyerCreativeId :: !Text
, _crdDealId :: !(Textual Int64)
, _crdAccountId :: !(Textual Int32)
} deriving (Eq,Show,Data,Typeable,Generic)
creativesRemoveDeal
:: Text
-> Int64
-> Int32
-> CreativesRemoveDeal
creativesRemoveDeal pCrdBuyerCreativeId_ pCrdDealId_ pCrdAccountId_ =
CreativesRemoveDeal'
{ _crdBuyerCreativeId = pCrdBuyerCreativeId_
, _crdDealId = _Coerce # pCrdDealId_
, _crdAccountId = _Coerce # pCrdAccountId_
}
crdBuyerCreativeId :: Lens' CreativesRemoveDeal Text
crdBuyerCreativeId
= lens _crdBuyerCreativeId
(\ s a -> s{_crdBuyerCreativeId = a})
crdDealId :: Lens' CreativesRemoveDeal Int64
crdDealId
= lens _crdDealId (\ s a -> s{_crdDealId = a}) .
_Coerce
crdAccountId :: Lens' CreativesRemoveDeal Int32
crdAccountId
= lens _crdAccountId (\ s a -> s{_crdAccountId = a})
. _Coerce
instance GoogleRequest CreativesRemoveDeal where
type Rs CreativesRemoveDeal = ()
type Scopes CreativesRemoveDeal =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient CreativesRemoveDeal'{..}
= go _crdAccountId _crdBuyerCreativeId _crdDealId
(Just AltJSON)
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy CreativesRemoveDealResource)
mempty