{-# 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.Proposals.Patch
(
ProposalsPatchResource
, proposalsPatch
, ProposalsPatch
, ppUpdateAction
, ppRevisionNumber
, ppPayload
, ppProposalId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type ProposalsPatchResource =
"adexchangebuyer" :>
"v1.4" :>
"proposals" :>
Capture "proposalId" Text :>
Capture "revisionNumber" (Textual Int64) :>
Capture "updateAction" ProposalsPatchUpdateAction :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Proposal :> Patch '[JSON] Proposal
data ProposalsPatch = ProposalsPatch'
{ _ppUpdateAction :: !ProposalsPatchUpdateAction
, _ppRevisionNumber :: !(Textual Int64)
, _ppPayload :: !Proposal
, _ppProposalId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
proposalsPatch
:: ProposalsPatchUpdateAction
-> Int64
-> Proposal
-> Text
-> ProposalsPatch
proposalsPatch pPpUpdateAction_ pPpRevisionNumber_ pPpPayload_ pPpProposalId_ =
ProposalsPatch'
{ _ppUpdateAction = pPpUpdateAction_
, _ppRevisionNumber = _Coerce # pPpRevisionNumber_
, _ppPayload = pPpPayload_
, _ppProposalId = pPpProposalId_
}
ppUpdateAction :: Lens' ProposalsPatch ProposalsPatchUpdateAction
ppUpdateAction
= lens _ppUpdateAction
(\ s a -> s{_ppUpdateAction = a})
ppRevisionNumber :: Lens' ProposalsPatch Int64
ppRevisionNumber
= lens _ppRevisionNumber
(\ s a -> s{_ppRevisionNumber = a})
. _Coerce
ppPayload :: Lens' ProposalsPatch Proposal
ppPayload
= lens _ppPayload (\ s a -> s{_ppPayload = a})
ppProposalId :: Lens' ProposalsPatch Text
ppProposalId
= lens _ppProposalId (\ s a -> s{_ppProposalId = a})
instance GoogleRequest ProposalsPatch where
type Rs ProposalsPatch = Proposal
type Scopes ProposalsPatch =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient ProposalsPatch'{..}
= go _ppProposalId _ppRevisionNumber _ppUpdateAction
(Just AltJSON)
_ppPayload
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy ProposalsPatchResource)
mempty