{-# 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.Get
(
BudgetGetResource
, budgetGet
, BudgetGet
, bgAccountId
, bgBillingId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type BudgetGetResource =
"adexchangebuyer" :>
"v1.4" :>
"billinginfo" :>
Capture "accountId" (Textual Int64) :>
Capture "billingId" (Textual Int64) :>
QueryParam "alt" AltJSON :> Get '[JSON] Budget
data BudgetGet = BudgetGet'
{ _bgAccountId :: !(Textual Int64)
, _bgBillingId :: !(Textual Int64)
} deriving (Eq,Show,Data,Typeable,Generic)
budgetGet
:: Int64
-> Int64
-> BudgetGet
budgetGet pBgAccountId_ pBgBillingId_ =
BudgetGet'
{ _bgAccountId = _Coerce # pBgAccountId_
, _bgBillingId = _Coerce # pBgBillingId_
}
bgAccountId :: Lens' BudgetGet Int64
bgAccountId
= lens _bgAccountId (\ s a -> s{_bgAccountId = a}) .
_Coerce
bgBillingId :: Lens' BudgetGet Int64
bgBillingId
= lens _bgBillingId (\ s a -> s{_bgBillingId = a}) .
_Coerce
instance GoogleRequest BudgetGet where
type Rs BudgetGet = Budget
type Scopes BudgetGet =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient BudgetGet'{..}
= go _bgAccountId _bgBillingId (Just AltJSON)
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy BudgetGetResource)
mempty