{-# 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.MarketplaceNotes.Insert
(
MarketplaceNotesInsertResource
, marketplaceNotesInsert
, MarketplaceNotesInsert
, mniPayload
, mniProposalId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type MarketplaceNotesInsertResource =
"adexchangebuyer" :>
"v1.4" :>
"proposals" :>
Capture "proposalId" Text :>
"notes" :>
"insert" :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] AddOrderNotesRequest :>
Post '[JSON] AddOrderNotesResponse
data MarketplaceNotesInsert = MarketplaceNotesInsert'
{ _mniPayload :: !AddOrderNotesRequest
, _mniProposalId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
marketplaceNotesInsert
:: AddOrderNotesRequest
-> Text
-> MarketplaceNotesInsert
marketplaceNotesInsert pMniPayload_ pMniProposalId_ =
MarketplaceNotesInsert'
{ _mniPayload = pMniPayload_
, _mniProposalId = pMniProposalId_
}
mniPayload :: Lens' MarketplaceNotesInsert AddOrderNotesRequest
mniPayload
= lens _mniPayload (\ s a -> s{_mniPayload = a})
mniProposalId :: Lens' MarketplaceNotesInsert Text
mniProposalId
= lens _mniProposalId
(\ s a -> s{_mniProposalId = a})
instance GoogleRequest MarketplaceNotesInsert where
type Rs MarketplaceNotesInsert =
AddOrderNotesResponse
type Scopes MarketplaceNotesInsert =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient MarketplaceNotesInsert'{..}
= go _mniProposalId (Just AltJSON) _mniPayload
adExchangeBuyerService
where go
= buildClient
(Proxy :: Proxy MarketplaceNotesInsertResource)
mempty