{-# 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.Search
(
ProductsSearchResource
, productsSearch
, ProductsSearch
, psPqlQuery
) where
import Network.Google.AdExchangeBuyer.Types
import Network.Google.Prelude
type ProductsSearchResource =
"adexchangebuyer" :>
"v1.4" :>
"products" :>
"search" :>
QueryParam "pqlQuery" Text :>
QueryParam "alt" AltJSON :>
Get '[JSON] GetOffersResponse
newtype ProductsSearch = ProductsSearch'
{ _psPqlQuery :: Maybe Text
} deriving (Eq,Show,Data,Typeable,Generic)
productsSearch
:: ProductsSearch
productsSearch =
ProductsSearch'
{ _psPqlQuery = Nothing
}
psPqlQuery :: Lens' ProductsSearch (Maybe Text)
psPqlQuery
= lens _psPqlQuery (\ s a -> s{_psPqlQuery = a})
instance GoogleRequest ProductsSearch where
type Rs ProductsSearch = GetOffersResponse
type Scopes ProductsSearch =
'["https://www.googleapis.com/auth/adexchange.buyer"]
requestClient ProductsSearch'{..}
= go _psPqlQuery (Just AltJSON)
adExchangeBuyerService
where go
= buildClient (Proxy :: Proxy ProductsSearchResource)
mempty