{-# 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.AndroidEnterprise.Products.List
(
ProductsListResource
, productsList
, ProductsList
, plEnterpriseId
, plToken
, plQuery
, plLanguage
, plApproved
, plMaxResults
) where
import Network.Google.AndroidEnterprise.Types
import Network.Google.Prelude
type ProductsListResource =
"androidenterprise" :>
"v1" :>
"enterprises" :>
Capture "enterpriseId" Text :>
"products" :>
QueryParam "token" Text :>
QueryParam "query" Text :>
QueryParam "language" Text :>
QueryParam "approved" Bool :>
QueryParam "maxResults" (Textual Word32) :>
QueryParam "alt" AltJSON :>
Get '[JSON] ProductsListResponse
data ProductsList = ProductsList'
{ _plEnterpriseId :: !Text
, _plToken :: !(Maybe Text)
, _plQuery :: !(Maybe Text)
, _plLanguage :: !(Maybe Text)
, _plApproved :: !(Maybe Bool)
, _plMaxResults :: !(Maybe (Textual Word32))
} deriving (Eq,Show,Data,Typeable,Generic)
productsList
:: Text
-> ProductsList
productsList pPlEnterpriseId_ =
ProductsList'
{ _plEnterpriseId = pPlEnterpriseId_
, _plToken = Nothing
, _plQuery = Nothing
, _plLanguage = Nothing
, _plApproved = Nothing
, _plMaxResults = Nothing
}
plEnterpriseId :: Lens' ProductsList Text
plEnterpriseId
= lens _plEnterpriseId
(\ s a -> s{_plEnterpriseId = a})
plToken :: Lens' ProductsList (Maybe Text)
plToken = lens _plToken (\ s a -> s{_plToken = a})
plQuery :: Lens' ProductsList (Maybe Text)
plQuery = lens _plQuery (\ s a -> s{_plQuery = a})
plLanguage :: Lens' ProductsList (Maybe Text)
plLanguage
= lens _plLanguage (\ s a -> s{_plLanguage = a})
plApproved :: Lens' ProductsList (Maybe Bool)
plApproved
= lens _plApproved (\ s a -> s{_plApproved = a})
plMaxResults :: Lens' ProductsList (Maybe Word32)
plMaxResults
= lens _plMaxResults (\ s a -> s{_plMaxResults = a})
. mapping _Coerce
instance GoogleRequest ProductsList where
type Rs ProductsList = ProductsListResponse
type Scopes ProductsList =
'["https://www.googleapis.com/auth/androidenterprise"]
requestClient ProductsList'{..}
= go _plEnterpriseId _plToken _plQuery _plLanguage
_plApproved
_plMaxResults
(Just AltJSON)
androidEnterpriseService
where go
= buildClient (Proxy :: Proxy ProductsListResource)
mempty