{-# 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.Products.Get
(
ProductsGetResource
, productsGet
, ProductsGet
, pgProductId
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type ProductsGetResource =
"adexchangebuyer" :>
"v1.4" :>
"products" :>
Capture "productId" Text :>
QueryParam "alt" AltJSON :> Get '[JSON] Product
newtype ProductsGet = ProductsGet'
{ _pgProductId :: Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsGet
:: Text
-> ProductsGet
productsGet pPgProductId_ =
ProductsGet'
{ _pgProductId = pPgProductId_
}
pgProductId :: Lens' ProductsGet Text
pgProductId
= lens _pgProductId (\ s a -> s{_pgProductId = a})
instance GoogleRequest ProductsGet where
type Rs ProductsGet = Product
type Scopes ProductsGet =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient ProductsGet'{..}
= go _pgProductId (Just AltJSON)
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy ProductsGetResource)
mempty