{-# 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.AdExchangeSeller.Accounts.PreferredDeals.Get
(
AccountsPreferredDealsGetResource
, accountsPreferredDealsGet
, AccountsPreferredDealsGet
, apdgDealId
, apdgAccountId
) where
import Network.Google.AdExchangeSeller.Types
import Network.Google.Prelude
type AccountsPreferredDealsGetResource =
"adexchangeseller" :>
"v2.0" :>
"accounts" :>
Capture "accountId" Text :>
"preferreddeals" :>
Capture "dealId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] PreferredDeal
data AccountsPreferredDealsGet = AccountsPreferredDealsGet'
{ _apdgDealId :: !Text
, _apdgAccountId :: !Text
} deriving (Eq,Show,Data,Typeable,Generic)
accountsPreferredDealsGet
:: Text
-> Text
-> AccountsPreferredDealsGet
accountsPreferredDealsGet pApdgDealId_ pApdgAccountId_ =
AccountsPreferredDealsGet'
{ _apdgDealId = pApdgDealId_
, _apdgAccountId = pApdgAccountId_
}
apdgDealId :: Lens' AccountsPreferredDealsGet Text
apdgDealId
= lens _apdgDealId (\ s a -> s{_apdgDealId = a})
apdgAccountId :: Lens' AccountsPreferredDealsGet Text
apdgAccountId
= lens _apdgAccountId
(\ s a -> s{_apdgAccountId = a})
instance GoogleRequest AccountsPreferredDealsGet
where
type Rs AccountsPreferredDealsGet = PreferredDeal
type Scopes AccountsPreferredDealsGet =
'["https://www.googleapis.com/auth/adexchange.seller",
"https://www.googleapis.com/auth/adexchange.seller.readonly"]
requestClient AccountsPreferredDealsGet'{..}
= go _apdgAccountId _apdgDealId (Just AltJSON)
adExchangeSellerService
where go
= buildClient
(Proxy :: Proxy AccountsPreferredDealsGetResource)
mempty