{-# 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.Budget.Update
(
BudgetUpdateResource
, budgetUpdate
, BudgetUpdate
, buPayload
, buAccountId
, buBillingId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type BudgetUpdateResource =
"adexchangebuyer" :>
"v1.4" :>
"billinginfo" :>
Capture "accountId" (Textual Int64) :>
Capture "billingId" (Textual Int64) :>
QueryParam "alt" AltJSON :>
ReqBody '[JSON] Budget :> Put '[JSON] Budget
data BudgetUpdate = BudgetUpdate'
{ _buPayload :: !Budget
, _buAccountId :: !(Textual Int64)
, _buBillingId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
budgetUpdate
:: Budget
-> Int64
-> Int64
-> BudgetUpdate
budgetUpdate pBuPayload_ pBuAccountId_ pBuBillingId_ =
BudgetUpdate'
{ _buPayload = pBuPayload_
, _buAccountId = _Coerce # pBuAccountId_
, _buBillingId = _Coerce # pBuBillingId_
}
buPayload :: Lens' BudgetUpdate Budget
buPayload
= lens _buPayload (\ s a -> s{_buPayload = a})
buAccountId :: Lens' BudgetUpdate Int64
buAccountId
= lens _buAccountId (\ s a -> s{_buAccountId = a}) .
_Coerce
buBillingId :: Lens' BudgetUpdate Int64
buBillingId
= lens _buBillingId (\ s a -> s{_buBillingId = a}) .
_Coerce
instance GoogleRequest BudgetUpdate where
type Rs BudgetUpdate = Budget
type Scopes BudgetUpdate =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient BudgetUpdate'{..}
= go _buAccountId _buBillingId (Just AltJSON)
_buPayload
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy BudgetUpdateResource)
mempty